<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-DocumentReference-1" />
  <version value="1.3" />
  <name value="CareConnect-GPC-DocumentReference-1" />
  <status value="draft" />
  <date value="2024-01-22T11:39:06.3872207+00:00" />
  <publisher value="HL7 UK" />
  <contact>
    <name value="INTEROPen" />
    <telecom>
      <system value="email" />
      <value value="admin@interopen.org" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="The DocumentReference resource is used to describe a document that is made available to a healthcare system." />
  <purpose value="CURATED BY INTEROPen see: http://www.interopen.org/careconnect-curation-methodology/ on the 5th July 2019." />
  <copyright value="Copyright © 2020 HL7 UK&#xD;&#xA;&#xD;&#xA;Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at&#xD;&#xA;&#xD;&#xA;http://www.apache.org/licenses/LICENSE-2.0&#xD;&#xA;&#xD;&#xA;Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; 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.&#xD;&#xA;&#xD;&#xA;HL7® FHIR® standard Copyright © 2011+ HL7&#xD;&#xA;&#xD;&#xA;The HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at&#xD;&#xA;&#xD;&#xA;https://www.hl7.org/fhir/license.html" />
  <fhirVersion value="3.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="DocumentReference" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/DocumentReference" />
  <derivation value="constraint" />
  <differential>
    <element id="DocumentReference.meta.profile">
      <path value="DocumentReference.meta.profile" />
      <min value="1" />
    </element>
    <element id="DocumentReference.masterIdentifier">
      <path value="DocumentReference.masterIdentifier" />
      <short value="Version Number of the document" />
    </element>
    <element id="DocumentReference.masterIdentifier.system">
      <path value="DocumentReference.masterIdentifier.system" />
      <min value="1" />
    </element>
    <element id="DocumentReference.masterIdentifier.value">
      <path value="DocumentReference.masterIdentifier.value" />
      <min value="1" />
    </element>
    <element id="DocumentReference.masterIdentifier.assigner">
      <path value="DocumentReference.masterIdentifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Organization-1" />
      </type>
    </element>
    <element id="DocumentReference.identifier">
      <path value="DocumentReference.identifier" />
      <short value="The identifier of the document." />
      <definition value="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 value="1" />
    </element>
    <element id="DocumentReference.identifier.system">
      <path value="DocumentReference.identifier.system" />
      <min value="1" />
    </element>
    <element id="DocumentReference.identifier.value">
      <path value="DocumentReference.identifier.value" />
      <min value="1" />
    </element>
    <element id="DocumentReference.type">
      <path value="DocumentReference.type" />
      <short value="Type of document" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="DocumentC80Type" />
        </extension>
        <strength value="preferred" />
        <description value="SNOMED CT UK document type" />
        <valueSetReference>
          <reference value="https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-DocumentType-1" />
        </valueSetReference>
      </binding>
    </element>
    <element id="DocumentReference.type.coding.extension">
      <path value="DocumentReference.type.coding.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="DocumentReference.type.coding.extension:snomedCTDescriptionID">
      <path value="DocumentReference.type.coding.extension" />
      <sliceName value="snomedCTDescriptionID" />
      <type>
        <code value="Extension" />
        <profile value="https://fhir.nhs.uk/STU3/StructureDefinition/Extension-coding-sctdescid" />
      </type>
    </element>
    <element id="DocumentReference.type.coding.system">
      <path value="DocumentReference.type.coding.system" />
      <min value="1" />
    </element>
    <element id="DocumentReference.type.coding.version">
      <path value="DocumentReference.type.coding.version" />
      <max value="0" />
    </element>
    <element id="DocumentReference.type.coding.code">
      <path value="DocumentReference.type.coding.code" />
      <min value="1" />
    </element>
    <element id="DocumentReference.type.coding.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="DocumentReference.type.coding.display" />
      <min value="1" />
    </element>
    <element id="DocumentReference.subject">
      <path value="DocumentReference.subject" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Group" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Patient-1" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Practitioner-1" />
      </type>
    </element>
    <element id="DocumentReference.created">
      <path value="DocumentReference.created" />
      <definition value="When the document was created. Creation/Edit datetime of the document - event date" />
    </element>
    <element id="DocumentReference.author">
      <path value="DocumentReference.author" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-RelatedPerson-1" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Patient-1" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Practitioner-1" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Organization-1" />
      </type>
    </element>
    <element id="DocumentReference.authenticator">
      <path value="DocumentReference.authenticator" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Practitioner-1" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Organization-1" />
      </type>
    </element>
    <element id="DocumentReference.custodian">
      <path value="DocumentReference.custodian" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Organization-1" />
      </type>
    </element>
    <element id="DocumentReference.relatesTo.target">
      <path value="DocumentReference.relatesTo.target" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-DocumentReference-1" />
      </type>
    </element>
    <element id="DocumentReference.description">
      <path value="DocumentReference.description" />
      <short value="Document description or title" />
    </element>
    <element id="DocumentReference.content.attachment.contentType">
      <path value="DocumentReference.content.attachment.contentType" />
      <min value="1" />
    </element>
    <element id="DocumentReference.content.attachment.size">
      <path value="DocumentReference.content.attachment.size" />
      <short value="Size of the file" />
      <min value="1" />
    </element>
    <element id="DocumentReference.context.encounter">
      <path value="DocumentReference.context.encounter" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Encounter-1" />
      </type>
    </element>
    <element id="DocumentReference.context.practiceSetting">
      <path value="DocumentReference.context.practiceSetting" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="DocumentC80PracticeSetting" />
        </extension>
        <strength value="preferred" />
        <description value="Care setting type of the document" />
        <valueSetReference>
          <reference value="https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-CareSettingType-1" />
        </valueSetReference>
      </binding>
    </element>
    <element id="DocumentReference.context.sourcePatientInfo">
      <path value="DocumentReference.context.sourcePatientInfo" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Patient-1" />
      </type>
    </element>
    <element id="DocumentReference.context.related.identifier.assigner">
      <path value="DocumentReference.context.related.identifier.assigner" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Organization-1" />
      </type>
    </element>
  </differential>
</StructureDefinition>