<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="c26d542f-2f19-4ee9-a4de-fc4c5c6863b3" />
  <meta>
    <lastUpdated value="2020-01-10T14:29:07.629+00:00" />
  </meta>
  <url value="http://digen.nublar.de/fhir/StructureDefinition/DigenDocumentReferenceAbstract" />
  <name value="DigenDocumentReferenceAbstract" />
  <status value="draft" />
  <date value="2020-01-10T14:29:07.3896795+00:00" />
  <fhirVersion value="3.0.1" />
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/w5" />
    <name value="W5 Mapping" />
  </mapping>
  <mapping>
    <identity value="v2" />
    <uri value="http://hl7.org/v2" />
    <name value="HL7 v2 Mapping" />
  </mapping>
  <mapping>
    <identity value="xds" />
    <uri value="http://ihe.net/xds" />
    <name value="XDS metadata equivalent" />
  </mapping>
  <kind value="resource" />
  <abstract value="true" />
  <type value="DocumentReference" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/DocumentReference" />
  <derivation value="constraint" />
  <differential>
    <element id="DocumentReference.meta">
      <path value="DocumentReference.meta" />
    </element>
    <element id="DocumentReference.meta.tag">
      <path value="DocumentReference.meta.tag" />
      <max value="0" />
    </element>
    <element id="DocumentReference.implicitRules">
      <path value="DocumentReference.implicitRules" />
      <max value="0" />
    </element>
    <element id="DocumentReference.masterIdentifier">
      <path value="DocumentReference.masterIdentifier" />
      <short value="DocumentEntry.uniqeID" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.identifier">
      <path value="DocumentReference.identifier" />
      <short value="DocumentEntry.entryUUID" />
      <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" />
      <short value="DocumentEntry.availabilityStatus" />
      <definition value="approved -&gt; status=current&#xD;&#xA;deprecated -&gt; status=superseded" />
    </element>
    <element id="DocumentReference.docStatus">
      <path value="DocumentReference.docStatus" />
      <max value="0" />
    </element>
    <element id="DocumentReference.type">
      <path value="DocumentReference.type" />
      <short value="DocumentEntry.typeCode" />
      <definition value="typeCode (XDSDocumentEntry) A low-level classification of XDS Documents within a classCode that describes class, event, specialty, and setting." />
      <mustSupport value="true" />
      <binding>
        <strength value="preferred" />
        <description value="typeCode (XDSDocumentEntry) A low-level classification of XDS Documents within a classCode that describes class, event, specialty, and setting." />
        <valueSetUri value="http://ihe-d.de/ValueSets/IHEXDStypeCode" />
      </binding>
    </element>
    <element id="DocumentReference.class">
      <path value="DocumentReference.class" />
      <short value="DocumentEntry.classCode" />
      <definition value="classCode (XDSDocumentEntry) A high-level classification of XDS Documents that indicates the kind of document, e.g., report, summary, note, consent." />
      <mustSupport value="true" />
      <binding>
        <strength value="preferred" />
        <description value="classCode (XDSDocumentEntry) A high-level classification of XDS Documents that indicates the kind of document, e.g., report, summary, note, consent." />
        <valueSetUri value="http://ihe-d.de/ValueSets/IHEXDSclassCode" />
      </binding>
    </element>
    <element id="DocumentReference.subject">
      <path value="DocumentReference.subject" />
      <short value="DocumentEntry.patientId" />
      <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" />
      </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" />
      <short value="DocumentEntry.creationTime" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.author">
      <path value="DocumentReference.author" />
      <definition value="DocumentEntry.authorPerson, DocumentEntry.authorInstitution, (authorDevice)" />
      <comment value="Contained resource of type Practitioner with: authorInstitution: Organization; authorPerson: Practitioner.identifier and Practitioner.name;  authorRole: Not supported in STU3; authorSpecialty: Practitioner.qualification; 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" />
      <short value="DocumentEntry.legalAuthenticator" />
      <comment value="Represents a participant within the author institution who has legally authenticated or attested the document. Legal authentication implies that a document has been signed manually or electronically by the legal Authenticator; Contained resource" />
      <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>
    </element>
    <element id="DocumentReference.custodian">
      <path value="DocumentReference.custodian" />
      <short value="DocumentEntry.homeCommunityId" />
      <comment value="Contains the OID of the Home Community ID" />
    </element>
    <element id="DocumentReference.relatesTo">
      <path value="DocumentReference.relatesTo" />
      <short value="DocumentEntry.Relationship" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.relatesTo.code">
      <path value="DocumentReference.relatesTo.code" />
      <short value="DocumentEntry.RelationshipType" />
      <definition value="The type of relationship that this document has with anther document. (replaces | transforms | signs | appends)" />
    </element>
    <element id="DocumentReference.relatesTo.target">
      <path value="DocumentReference.relatesTo.target" />
      <short value="DocumentEntry.relationship" />
    </element>
    <element id="DocumentReference.description">
      <path value="DocumentReference.description" />
      <short value="DocumentEntry.title" />
    </element>
    <element id="DocumentReference.securityLabel">
      <path value="DocumentReference.securityLabel" />
      <short value="DocumentEntry.confidentialityCode" />
      <comment value="Note: This is NOT the DocumentReference.meta, as that holds the meta tags for the DocumentReference itself." />
      <mustSupport value="true" />
      <binding>
        <strength value="extensible" />
        <description value="confidentialityCode (XDSDocumentEntry) The code specifying the level of confidentiality of an XDS Document." />
        <valueSetUri value="http://ihe-d.de/ValueSets/IHEXDSconfidentialityCode" />
      </binding>
    </element>
    <element id="DocumentReference.content">
      <path value="DocumentReference.content" />
      <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" />
      <short value="DocumentEntry.mimeType" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.content.attachment.language">
      <path value="DocumentReference.content.attachment.language" />
      <short value="DocumentEntry.languageCode" />
      <example>
        <label value="General" />
        <valueCode value="de-DE" />
      </example>
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.content.attachment.data">
      <path value="DocumentReference.content.attachment.data" />
      <max value="0" />
    </element>
    <element id="DocumentReference.content.attachment.url">
      <path value="DocumentReference.content.attachment.url" />
      <definition value="DocumentEntry: retrievable location of the document" />
      <mustSupport value="true" />
    </element>
    <element id="DocumentReference.content.attachment.size">
      <path value="DocumentReference.content.attachment.size" />
      <short value="DocumentEntry.size" />
      <definition value="The size is calculated on the data prior to base64 encoding, if the data is base64 encoded." />
    </element>
    <element id="DocumentReference.content.attachment.hash">
      <path value="DocumentReference.content.attachment.hash" />
      <short value="DocumentEntry.hash" />
      <definition 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." />
    </element>
    <element id="DocumentReference.content.attachment.title">
      <path value="DocumentReference.content.attachment.title" />
      <short value="DocumentEntry.comments" />
    </element>
    <element id="DocumentReference.content.attachment.creation">
      <path value="DocumentReference.content.attachment.creation" />
      <max value="0" />
    </element>
    <element id="DocumentReference.content.format">
      <path value="DocumentReference.content.format" />
      <definition value="formatCode (XDSDocumentEntry) Globally unique code specifying the format of an XDS Document. Along with the typeCode, it should provide sufficient information to allow a potential consumer to know if it will be able to process the document." />
      <mustSupport value="true" />
      <binding>
        <strength value="preferred" />
        <description value="formatCode (XDSDocumentEntry) Globally unique code specifying the format of an XDS Document. Along with the typeCode, it should provide sufficient information to allow a potential consumer to know if it will be able to process the document." />
        <valueSetUri value="http://ihe-d.de/ValueSets/IHEXDSformatCodeDE" />
      </binding>
    </element>
    <element id="DocumentReference.context">
      <path value="DocumentReference.context" />
      <short value="DocumentEntry.referenceIdList" />
      <definition value="When referenceIdList contains an encounter, and a FHIR Encounter is available, it may be referenced." />
    </element>
    <element id="DocumentReference.context.event">
      <path value="DocumentReference.context.event" />
      <short value="DocumentEntry.eventCodeList" />
      <definition value="This list of codes represents the main clinical acts being documented in an XDS Document." />
      <binding>
        <strength value="preferred" />
        <valueSetUri value="http://ihe-d.de/ValueSets/IHEXDSeventCodeList" />
      </binding>
    </element>
    <element id="DocumentReference.context.period.start">
      <path value="DocumentReference.context.period.start" />
      <short value="DocumentEntry.serviceStartTime" />
    </element>
    <element id="DocumentReference.context.period.end">
      <path value="DocumentReference.context.period.end" />
      <short value="DocumentEntry.serviceStopTime" />
    </element>
    <element id="DocumentReference.context.facilityType">
      <path value="DocumentReference.context.facilityType" />
      <short value="DocumentEntry.healthcareFacilityTypeCode" />
      <definition value="This code for an XDS Document represents the type of organizational setting of the clinical encounter during which the documented act occurred." />
      <binding>
        <strength value="preferred" />
        <valueSetUri value="http://ihe-d.de/ValueSets/IHEXDShealthcareFacilityTypeCode" />
      </binding>
    </element>
    <element id="DocumentReference.context.practiceSetting">
      <path value="DocumentReference.context.practiceSetting" />
      <short value="DocumentEntry.practiceSettingCode" />
      <definition value="The code for an XDS Document that specifies the clinical specialty where the act that resulted in the document was performed (e.g., Family Practice, Laboratory, Radiology)." />
      <binding>
        <strength value="preferred" />
        <valueSetUri value="http://ihe-d.de/ValueSets/IHEXDSpracticeSettingCode" />
      </binding>
    </element>
    <element id="DocumentReference.context.sourcePatientInfo">
      <path value="DocumentReference.context.sourcePatientInfo" />
      <short value="DocumentEntry.sourcePatientId" />
      <comment value="Contained Patient resource with Patient.identifier.use element set to ‘usual’." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <aggregation value="contained" />
      </type>
    </element>
    <element id="DocumentReference.context.related.identifier">
      <path value="DocumentReference.context.related.identifier" />
      <short value="DocumentEntry.referenceIdList" />
    </element>
    <element id="DocumentReference.context.related.ref">
      <path value="DocumentReference.context.related.ref" />
      <short value="DocumentEntry.referenceIdList" />
    </element>
  </differential>
</StructureDefinition>