{
  "resourceType": "StructureDefinition",
  "url": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-DocumentReference-1",
  "version": "1.3",
  "name": "CareConnect-GPC-DocumentReference-1",
  "status": "draft",
  "date": "2024-01-22T11:39:06.3872207+00:00",
  "publisher": "HL7 UK",
  "contact": [
    {
      "name": "INTEROPen",
      "telecom": [
        {
          "system": "email",
          "value": "admin@interopen.org",
          "use": "work"
        }
      ]
    }
  ],
  "description": "The DocumentReference resource is used to describe a document that is made available to a healthcare system.",
  "purpose": "CURATED BY INTEROPen see: http://www.interopen.org/careconnect-curation-methodology/ on the 5th July 2019.",
  "copyright": "Copyright © 2020 HL7 UK\r\n\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\r\n\r\nhttp://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\r\n\r\nHL7® FHIR® standard Copyright © 2011+ HL7\r\n\r\nThe HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at\r\n\r\nhttps://www.hl7.org/fhir/license.html",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "DocumentReference",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DocumentReference",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "DocumentReference.meta.profile",
        "path": "DocumentReference.meta.profile",
        "min": 1
      },
      {
        "id": "DocumentReference.masterIdentifier",
        "path": "DocumentReference.masterIdentifier",
        "short": "Version Number of the document"
      },
      {
        "id": "DocumentReference.masterIdentifier.system",
        "path": "DocumentReference.masterIdentifier.system",
        "min": 1
      },
      {
        "id": "DocumentReference.masterIdentifier.value",
        "path": "DocumentReference.masterIdentifier.value",
        "min": 1
      },
      {
        "id": "DocumentReference.masterIdentifier.assigner",
        "path": "DocumentReference.masterIdentifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Organization-1"
          }
        ]
      },
      {
        "id": "DocumentReference.identifier",
        "path": "DocumentReference.identifier",
        "short": "The identifier of the document.",
        "definition": "Other identifiers associated with the document, including version independent identifiers.  This will be generated by the organisation that is the custodian of the document.",
        "min": 1
      },
      {
        "id": "DocumentReference.identifier.system",
        "path": "DocumentReference.identifier.system",
        "min": 1
      },
      {
        "id": "DocumentReference.identifier.value",
        "path": "DocumentReference.identifier.value",
        "min": 1
      },
      {
        "id": "DocumentReference.type",
        "path": "DocumentReference.type",
        "short": "Type of document",
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "DocumentC80Type"
            }
          ],
          "strength": "preferred",
          "description": "SNOMED CT UK document type",
          "valueSetReference": {
            "reference": "https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-DocumentType-1"
          }
        }
      },
      {
        "id": "DocumentReference.type.coding.extension",
        "path": "DocumentReference.type.coding.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "DocumentReference.type.coding.extension:snomedCTDescriptionID",
        "path": "DocumentReference.type.coding.extension",
        "sliceName": "snomedCTDescriptionID",
        "type": [
          {
            "code": "Extension",
            "profile": "https://fhir.nhs.uk/STU3/StructureDefinition/Extension-coding-sctdescid"
          }
        ]
      },
      {
        "id": "DocumentReference.type.coding.system",
        "path": "DocumentReference.type.coding.system",
        "min": 1
      },
      {
        "id": "DocumentReference.type.coding.version",
        "path": "DocumentReference.type.coding.version",
        "max": "0"
      },
      {
        "id": "DocumentReference.type.coding.code",
        "path": "DocumentReference.type.coding.code",
        "min": 1
      },
      {
        "id": "DocumentReference.type.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "DocumentReference.type.coding.display",
        "min": 1
      },
      {
        "id": "DocumentReference.subject",
        "path": "DocumentReference.subject",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Patient-1"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Practitioner-1"
          }
        ]
      },
      {
        "id": "DocumentReference.created",
        "path": "DocumentReference.created",
        "definition": "When the document was created. Creation/Edit datetime of the document - event date"
      },
      {
        "id": "DocumentReference.author",
        "path": "DocumentReference.author",
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-RelatedPerson-1"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Patient-1"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Practitioner-1"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Organization-1"
          }
        ]
      },
      {
        "id": "DocumentReference.authenticator",
        "path": "DocumentReference.authenticator",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Practitioner-1"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Organization-1"
          }
        ]
      },
      {
        "id": "DocumentReference.custodian",
        "path": "DocumentReference.custodian",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Organization-1"
          }
        ]
      },
      {
        "id": "DocumentReference.relatesTo.target",
        "path": "DocumentReference.relatesTo.target",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-DocumentReference-1"
          }
        ]
      },
      {
        "id": "DocumentReference.description",
        "path": "DocumentReference.description",
        "short": "Document description or title"
      },
      {
        "id": "DocumentReference.content.attachment.contentType",
        "path": "DocumentReference.content.attachment.contentType",
        "min": 1
      },
      {
        "id": "DocumentReference.content.attachment.size",
        "path": "DocumentReference.content.attachment.size",
        "short": "Size of the file",
        "min": 1
      },
      {
        "id": "DocumentReference.context.encounter",
        "path": "DocumentReference.context.encounter",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Encounter-1"
          }
        ]
      },
      {
        "id": "DocumentReference.context.practiceSetting",
        "path": "DocumentReference.context.practiceSetting",
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "DocumentC80PracticeSetting"
            }
          ],
          "strength": "preferred",
          "description": "Care setting type of the document",
          "valueSetReference": {
            "reference": "https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-CareSettingType-1"
          }
        }
      },
      {
        "id": "DocumentReference.context.sourcePatientInfo",
        "path": "DocumentReference.context.sourcePatientInfo",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Patient-1"
          }
        ]
      },
      {
        "id": "DocumentReference.context.related.identifier.assigner",
        "path": "DocumentReference.context.related.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Organization-1"
          }
        ]
      }
    ]
  }
}