<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="IHE.MHD.Minimal.DocumentReference" />
  <text>
    <status value="additional" />
    <div xmlns="http://www.w3.org/1999/xhtml">
	StructureDefinition for DocumentRefererence as represented in the Provide Document Bundle (ITI-65) transaction with Minimal Metadata compliance in the  
    IHE IT Infrastructure Technical Framework Supplement <a href="http://wiki.ihe.net/index.php/Mobile_access_to_Health_Documents_(MHD)">Mobile access to Health Documents (MHD) Rev. 2.3</a>. 
	The IHE MHD Profile text is Normative, this conformance resource is Informative.
		</div>
  </text>
  <url value="http://nictiz.nl/fhir/StructureDefinition/IHE.MHD.Minimal.DocumentReference" />
  <name value="Nictiz.IHE.MHD.Minimal.DocumentReference" />
  <title value="Nictiz IHE MHD Profile on DocumentReference (DocumentEntry) when used in the Provide Transaction with Minimal Metadata, see Table 3:4.3.1-3." />
  <status value="active" />
  <experimental value="false" />
  <date value="2019-07-29" />
  <publisher value="HL7 Netherlands" />
  <contact>
    <name value="Nictiz" />
    <telecom>
      <system value="url" />
      <value value="https://www.nictiz.nl" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="Copied profile on DocumentReference based on IHE IT Infrastructure Technical Framework Supplement - Mobile access to Health Documents (MHD) Rev. 2.3.  See http://wiki.ihe.net/index.php/Mobile_access_to_Health_Documents_(MHD). The IHE MHD Profile text is Normative, this conformance resource is Informative." />
  <purpose value="Copied profile from IHE MHD to have control over the downstream references. The ProvideDocumentBundle.Minimal and DocumentManifest profiles contained errors that are only addressed in FHIR R4. This profile is copied and governed by Nictiz because the two mentioned profiles reference this profile. IHE differentiated between Provide DocumentReference and Query DocumentReference. However, these profiles are identical and for usability reasons it has been decided to merge the two profiles into this single profile." />
  <fhirVersion value="3.0.2" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="DocumentReference" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/DocumentReference" />
  <derivation value="constraint" />
  <differential>
    <element id="DocumentReference.masterIdentifier">
      <path value="DocumentReference.masterIdentifier" />
      <comment value="See ITI TF-2x: Z.9.1.1 Identifier and CDA root plus extension." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.identifier">
      <path value="DocumentReference.identifier" />
      <comment value="When the DocumentReference.identifier carries the entryUUID then the DocumentReference.identifier use shall be ‘official’." />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.status">
      <path value="DocumentReference.status" />
      <comment value="approved -&gt; status=current&#xD;&#xA;deprecated -&gt; status=superseded" />
      <mustSupport value="false" />
    </element>
    <element id="DocumentReference.docStatus">
      <path value="DocumentReference.docStatus" />
      <comment value="These HL7 FHIR STU3 elements are not used in XDS, therefore would not be present." />
      <max value="0" />
    </element>
    <element id="DocumentReference.type">
      <path value="DocumentReference.type" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.class">
      <path value="DocumentReference.class" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.subject">
      <path value="DocumentReference.subject" />
      <comment value="Not a contained resource. URL Points to an existing Patient Resource representing the XDS Affinity Domain Patient." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <aggregation value="referenced" />
        <aggregation value="bundled" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.created">
      <path value="DocumentReference.created" />
      <max value="0" />
    </element>
    <element id="DocumentReference.indexed">
      <path value="DocumentReference.indexed" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.author">
      <path value="DocumentReference.author" />
      <comment value="Contained resource of type Practitioner with:&#xD;&#xA;* authorInstitution: Organization&#xD;&#xA;* authorPerson: Practitioner.identifier and Practitioner.name&#xD;&#xA;* authorRole: — Not supported in STU3&#xD;&#xA;* authorSpecialty: Practitioner.qualification&#xD;&#xA;* authorTelecommunication: Practitioner.telecom" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <aggregation value="contained" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
        <aggregation value="contained" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.authenticator">
      <path value="DocumentReference.authenticator" />
      <comment value="Contained resource" />
      <type>
        <code value="Reference" />
        <aggregation value="contained" />
      </type>
      <mustSupport value="false" />
    </element>
    <element id="DocumentReference.custodian">
      <path value="DocumentReference.custodian" />
      <comment value="These HL7 FHIR STU3 elements are not used in XDS, therefore would not be present." />
      <max value="0" />
    </element>
    <element id="DocumentReference.relatesTo">
      <path value="DocumentReference.relatesTo" />
      <comment value="See ITI TF-2c: 3.65.4.1.2.3" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.description">
      <path value="DocumentReference.description" />
      <mustSupport value="false" />
    </element>
    <element id="DocumentReference.securityLabel">
      <path value="DocumentReference.securityLabel" />
      <comment value="Note: This is NOT the DocumentReference.meta, as that holds the meta tags for the DocumentReference itself." />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.content">
      <path value="DocumentReference.content" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.content.attachment">
      <path value="DocumentReference.content.attachment" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.content.attachment.contentType">
      <path value="DocumentReference.content.attachment.contentType" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.content.attachment.language">
      <path value="DocumentReference.content.attachment.language" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.content.attachment.data">
      <path value="DocumentReference.content.attachment.data" />
      <comment value="These HL7 FHIR STU3 elements are not used in XDS, therefore would not be present." />
      <max value="0" />
    </element>
    <element id="DocumentReference.content.attachment.url">
      <path value="DocumentReference.content.attachment.url" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.content.attachment.size">
      <path value="DocumentReference.content.attachment.size" />
      <comment value="The size is calculated on the data prior to base64 encoding, if the data is base64 encoded." />
      <mustSupport value="false" />
    </element>
    <element id="DocumentReference.content.attachment.hash">
      <path value="DocumentReference.content.attachment.hash" />
      <comment value="The IHE Document Sharing metadata element hash holds the SHA1 hash of the document. The hash is encoded in FHIR in base64Binary, whereas in XDS hexbinary is used. The hash is calculated on the data prior to base64 encoding, if the data is base64 encoded." />
      <mustSupport value="false" />
    </element>
    <element id="DocumentReference.content.attachment.title">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="DocumentReference.content.attachment.title" />
      <mustSupport value="false" />
    </element>
    <element id="DocumentReference.content.attachment.creation">
      <path value="DocumentReference.content.attachment.creation" />
      <comment value="These HL7 FHIR STU3 elements are not used in XDS, therefore would not be present." />
      <max value="0" />
    </element>
    <element id="DocumentReference.content.format">
      <path value="DocumentReference.content.format" />
      <mustSupport value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="DocumentFormat" />
        </extension>
        <strength value="preferred" />
        <valueSetReference>
          <reference value="http://ihe.net/fhir/ValueSet/IHE.formatcode.vs" />
        </valueSetReference>
      </binding>
    </element>
    <element id="DocumentReference.context">
      <path value="DocumentReference.context" />
      <mustSupport value="false" />
    </element>
    <element id="DocumentReference.context.encounter">
      <path value="DocumentReference.context.encounter" />
      <comment value="When referenceIdList contains an encounter, and a FHIR Encounter is available, it may be referenced." />
      <mustSupport value="false" />
    </element>
    <element id="DocumentReference.context.event">
      <path value="DocumentReference.context.event" />
      <mustSupport value="false" />
    </element>
    <element id="DocumentReference.context.period">
      <path value="DocumentReference.context.period" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.context.facilityType">
      <path value="DocumentReference.context.facilityType" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.context.practiceSetting">
      <path value="DocumentReference.context.practiceSetting" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.context.sourcePatientInfo">
      <path value="DocumentReference.context.sourcePatientInfo" />
      <comment value="Contained Patient resource with Patient.identifier.use element set to ‘usual’.&#xD;&#xA;&#xD;&#xA;Indicates that the data within the XDS document entry be represented as a contained resource. See Section 4.5.4.4.7" />
      <type>
        <code value="Reference" />
        <aggregation value="contained" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.context.related">
      <path value="DocumentReference.context.related" />
      <mustSupport value="false" />
    </element>
    <element id="DocumentReference.context.related.identifier">
      <path value="DocumentReference.context.related.identifier" />
      <comment value="See ITI TF-2x: Appendix E.3.1 on CXi mapping to FHIR Identifier" />
      <mustSupport value="false" />
    </element>
    <element id="DocumentReference.context.related.ref">
      <path value="DocumentReference.context.related.ref" />
      <comment value="May be filled with URL pointers to Resources found in referenceIdList" />
      <mustSupport value="false" />
    </element>
  </differential>
</StructureDefinition>