CH EPR mHealth (R4)
3.0.0 - DSTU3 Switzerland flag

This page is part of the CH EPR mHealth (R4) (v3.0.0: DSTU3) based on FHIR (HL7® FHIR® Standard) R4. This is the current published version. For a full list of available versions, see the Directory of published versions

Resource Profile: CHMhdDocumentReferenceComprehensive - XML Profile

Draft as of 2020-07-10

XML representation of the ch-mhd-documentreference-comprehensive resource profile.

Raw xml | Download



<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="ch-mhd-documentreference-comprehensive"/>
  <text>
    <status value="extensions"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><table border="0" cellpadding="0" cellspacing="0" style="border: 0px #F0F0F0 solid; font-size: 11px; font-family: verdana; vertical-align: top;"><tr style="border: 1px #F0F0F0 solid; font-size: 11px; font-family: verdana; vertical-align: top"><th style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="The logical name of the element">Name</a></th><th style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="Information about the use of the element">Flags</a></th><th style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="Minimum and Maximum # of times the the element can appear in the instance">Card.</a></th><th style="width: 100px" class="hierarchy"><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="Reference to the type of the element">Type</a></th><th style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="Additional information about the element">Description &amp; Constraints</a><span style="float: right"><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="Legend for this format"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3goXBCwdPqAP0wAAAldJREFUOMuNk0tIlFEYhp9z/vE2jHkhxXA0zJCMitrUQlq4lnSltEqCFhFG2MJFhIvIFpkEWaTQqjaWZRkp0g26URZkTpbaaOJkDqk10szoODP//7XIMUe0elcfnPd9zsfLOYplGrpRwZaqTtw3K7PtGem7Q6FoidbGgqHVy/HRb669R+56zx7eRV1L31JGxYbBtjKK93cxeqfyQHbehkZbUkK20goELEuIzEd+dHS+qz/Y8PTSif0FnGkbiwcAjHaU1+QWOptFiyCLp/LnKptpqIuXHx6rbR26kJcBX3yLgBfnd7CxwJmflpP2wUg0HIAoUUpZBmKzELGWcN8nAr6Gpu7tLU/CkwAaoKTWRSQyt89Q8w6J+oVQkKnBoblH7V0PPvUOvDYXfopE/SJmALsxnVm6LbkotrUtNowMeIrVrBcBpaMmdS0j9df7abpSuy7HWehwJdt1lhVwi/J58U5beXGAF6c3UXLycw1wdFklArBn87xdh0ZsZtArghBdAA3+OEDVubG4UEzP6x1FOWneHh2VDAHBAt80IbdXDcesNoCvs3E5AFyNSU5nbrDPZpcUEQQTFZiEVx+51fxMhhyJEAgvlriadIJZZksRuwBYMOPBbO3hePVVqgEJhFeUuFLhIPkRP6BQLIBrmMenujm/3g4zc398awIe90Zb5A1vREALqneMcYgP/xVQWlG+Ncu5vgwwlaUNx+3799rfe96u9K0JSDXcOzOTJg4B6IgmXfsygc7/Bvg9g9E58/cDVmGIBOP/zT8Bz1zqWqpbXIsd0O9hajXfL6u4BaOS6SeWAAAAAElFTkSuQmCC" alt="doco" style="background-color: inherit"/></a></span></th></tr><tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck1.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_resource.png" alt="." style="background-color: white; background-color: inherit" title="Resource" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference">DocumentReference</a><a name="DocumentReference"> </a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="padding-left: 3px; padding-right: 3px; border: 1px maroon solid; font-weight: bold; color: #301212; background-color: #fdf4f4;" href="http://hl7.org/fhir/R4/conformance-rules.html#constraints" title="This element has or is affected by constraints (ch-mhd)">C</a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">0</span><span style="opacity: 0.5">..</span><span style="opacity: 0.5">*</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a href="file:///home/michaela/github/ch-core/output/StructureDefinition-ch-core-documentreference.html">CHCoreDocumentReference</a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">CH MHD DocumentReference Comprehensive<br/><span style="font-weight:bold">ch-mhd: </span>The DocumentReference needs to conform to IHE.MHD.Comprehensive.DocumentReference</td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck12.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_extension_simple.png" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Simple Extension" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.extension">Slices for extension</a><a name="DocumentReference.extension"> </a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">1..<span style="opacity: 0.5">*</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/extensibility.html#Extension">Extension</a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Extension</span><br/><span style="font-weight:bold">Slice: </span>Unordered, Open by value:url</td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck14.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_slice_item.png" alt="." style="background-color: white; background-color: inherit" title="Slice Item" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.extension:deletionStatus" title="Extension URL = http://fhir.ch/ig/ch-epr-mhealth/StructureDefinition/ch-ext-deletionstatus">deletionStatus</a><a name="DocumentReference.extension"> </a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">0..1</td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a href="http://hl7.org/fhir/R4/datatypes.html#Coding">Coding</a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">Deletion status of the document<br/><span style="font-weight:bold">URL: </span><a href="http://hl7.org/fhir/R4/StructureDefinition-ch-ext-deletionstatus.html">http://fhir.ch/ig/ch-epr-mhealth/StructureDefinition/ch-ext-deletionstatus</a><br/><span style="font-weight:bold">Binding: </span><a href="http://fhir.ch/ig/ch-epr-term/2.0.10/ValueSet-DocumentEntry.Ext.EprDeletionStatus.html" title="http://fhir.ch/ig/ch-epr-term/ValueSet/DocumentEntry.Ext.EprDeletionStatus">DocumentEntry.Ext.EprDeletionStatus</a> (<a href="http://hl7.org/fhir/R4/terminologies.html#required" title="To be conformant, the concept in this element SHALL be from the specified value set.">required</a>)</td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck14.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_slice_item.png" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Slice Item" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.extension:originalProviderRole" title="Extension URL = http://fhir.ch/ig/ch-epr-mhealth/StructureDefinition/ch-ext-author-authorrole">originalProviderRole</a><a name="DocumentReference.extension"> </a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">1..1</td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a href="http://hl7.org/fhir/R4/datatypes.html#Coding">Coding</a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">Original ProviderRole: This extra metadata attribute SHALL be set by the Document Source actor to the role value of the current user and SHALL NOT be updated by Update Initiator or Document Administrator actors.<br/><span style="font-weight:bold">URL: </span><a href="http://hl7.org/fhir/R4/StructureDefinition-ch-ext-author-authorrole.html">http://fhir.ch/ig/ch-epr-mhealth/StructureDefinition/ch-ext-author-authorrole</a><br/><span style="font-weight:bold">Binding: </span><a href="http://fhir.ch/ig/ch-epr-term/2.0.10/ValueSet-DocumentEntry.originalProviderRole.html" title="http://fhir.ch/ig/ch-epr-term/ValueSet/DocumentEntry.originalProviderRole">DocumentEntry.originalProviderRole</a> (<a href="http://hl7.org/fhir/R4/terminologies.html#required" title="To be conformant, the concept in this element SHALL be from the specified value set.">required</a>)</td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_datatype.gif" alt="." style="background-color: white; background-color: inherit" title="Data Type" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.masterIdentifier">masterIdentifier</a><a name="DocumentReference.masterIdentifier"> </a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">1..<span style="opacity: 0.5">1</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a href="StructureDefinition-OidIdentifier.html" title="Identifier">OidIdentifier</a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">An identifier intended for computation</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.identifier">identifier</a><a name="DocumentReference.identifier"> </a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">0</span><span style="opacity: 0.5">..</span><span style="opacity: 0.5">*</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#Identifier">Identifier</a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Other identifiers for the document</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.status">status</a><a name="DocumentReference.status"> </a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">1</span><span style="opacity: 0.5">..</span><span style="opacity: 0.5">1</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#code">code</a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">current | superseded</td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Element" class="hierarchy"/> <span style="text-decoration:line-through">docStatus</span><a name="DocumentReference.docStatus"> </a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="text-decoration:line-through"/><span style="text-decoration:line-through">0</span><span style="text-decoration:line-through">..</span><span style="text-decoration:line-through">0</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.type">type</a><a name="DocumentReference.type"> </a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">1..<span style="opacity: 0.5">1</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#CodeableConcept">CodeableConcept</a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Kind of document (LOINC if possible)</span><br/><span style="font-weight:bold">Binding: </span><a style="opacity: 0.5" href="http://fhir.ch/ig/ch-epr-term/2.0.10/ValueSet-DocumentEntry.typeCode.html" title="http://fhir.ch/ig/ch-epr-term/ValueSet/DocumentEntry.typeCode">DocumentEntry.typeCode</a> (<a href="http://hl7.org/fhir/R4/terminologies.html#required" title="To be conformant, the concept in this element SHALL be from the specified value set.">required</a>)</td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.category">category</a><a name="DocumentReference.category"> </a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">1..1</td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#CodeableConcept">CodeableConcept</a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Categorization of document</span><br/><span style="font-weight:bold">Binding: </span><a style="opacity: 0.5" href="http://fhir.ch/ig/ch-epr-term/2.0.10/ValueSet-DocumentEntry.classCode.html" title="http://fhir.ch/ig/ch-epr-term/ValueSet/DocumentEntry.classCode">DocumentEntry.classCode</a> (<a href="http://hl7.org/fhir/R4/terminologies.html#required" title="To be conformant, the concept in this element SHALL be from the specified value set.">required</a>)</td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_reference.png" alt="." style="background-color: white; background-color: inherit" title="Reference to another Resource" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.subject">subject</a><a name="DocumentReference.subject"> </a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">1..<span style="opacity: 0.5">1</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a href="http://hl7.org/fhir/R4/references.html">Reference</a>(<a href="file:///home/michaela/github/ch-core/output/StructureDefinition-ch-core-patient.html">CH Core Patient</a>)<a href="http://hl7.org/fhir/R4/valueset-resource-aggregation-mode.html"> {</a><a href="http://hl7.org/fhir/R4/valueset-resource-aggregation-mode.html" title="The reference to a resource that has to be resolved externally to the resource that includes the reference.">r</a><a href="http://hl7.org/fhir/R4/valueset-resource-aggregation-mode.html">}</a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Who/what is the subject of the document</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.date">date</a><a name="DocumentReference.date"> </a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">1..<span style="opacity: 0.5">1</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#instant">instant</a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">When this document reference was created</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_reference.png" alt="." style="background-color: white; background-color: inherit" title="Reference to another Resource" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.author">author</a><a name="DocumentReference.author"> </a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">0</span><span style="opacity: 0.5">..</span><span style="opacity: 0.5">*</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a href="http://hl7.org/fhir/R4/references.html">Reference</a>()<a href="http://hl7.org/fhir/R4/valueset-resource-aggregation-mode.html"> {</a><a href="http://hl7.org/fhir/R4/valueset-resource-aggregation-mode.html" title="The reference is a local reference to a contained resource.">c</a><a href="http://hl7.org/fhir/R4/valueset-resource-aggregation-mode.html">}</a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Who and/or what authored the document</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_reference.png" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Reference to another Resource" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.authenticator">authenticator</a><a name="DocumentReference.authenticator"> </a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">0</span><span style="opacity: 0.5">..</span><span style="opacity: 0.5">1</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a href="http://hl7.org/fhir/R4/references.html">Reference</a>()<a href="http://hl7.org/fhir/R4/valueset-resource-aggregation-mode.html"> {</a><a href="http://hl7.org/fhir/R4/valueset-resource-aggregation-mode.html" title="The reference is a local reference to a contained resource.">c</a><a href="http://hl7.org/fhir/R4/valueset-resource-aggregation-mode.html">}</a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Who/what authenticated the document</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/> <span style="text-decoration:line-through">custodian</span><a name="DocumentReference.custodian"> </a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="text-decoration:line-through"/><span style="text-decoration:line-through">0</span><span style="text-decoration:line-through">..</span><span style="text-decoration:line-through">0</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.relatesTo">relatesTo</a><a name="DocumentReference.relatesTo"> </a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">0</span><span style="opacity: 0.5">..</span><span style="opacity: 0.5">*</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#BackboneElement">BackboneElement</a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Relationships to other documents</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.description">description</a><a name="DocumentReference.description"> </a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">0</span><span style="opacity: 0.5">..</span><span style="opacity: 0.5">1</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#string">string</a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Human-readable description</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.securityLabel">securityLabel</a><a name="DocumentReference.securityLabel"> </a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">1..<span style="opacity: 0.5">*</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#CodeableConcept">CodeableConcept</a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Document security-tags</span><br/><span style="font-weight:bold">Binding: </span><a style="opacity: 0.5" href="http://fhir.ch/ig/ch-epr-term/2.0.10/ValueSet-DocumentEntry.confidentialityCode.html" title="http://fhir.ch/ig/ch-epr-term/ValueSet/DocumentEntry.confidentialityCode">DocumentEntry.confidentialityCode</a> (<a href="http://hl7.org/fhir/R4/terminologies.html#required" title="To be conformant, the concept in this element SHALL be from the specified value set.">required</a>)</td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck11.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.content">content</a><a name="DocumentReference.content"> </a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">1</span>..1</td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#BackboneElement">BackboneElement</a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Document referenced</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck111.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.content.attachment">attachment</a><a name="DocumentReference.content.attachment"> </a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">1</span><span style="opacity: 0.5">..</span><span style="opacity: 0.5">1</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#Attachment">Attachment</a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Where to access the document</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck1110.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.content.attachment.contentType">contentType</a><a name="DocumentReference.content.attachment.contentType"> </a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">1..<span style="opacity: 0.5">1</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#code">code</a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Mime type of the content, with charset etc.</span><br/><span style="font-weight:bold">Binding: </span><a href="http://fhir.ch/ig/ch-epr-term/2.0.10/ValueSet-DocumentEntry.mimeType.html" title="http://fhir.ch/ig/ch-epr-term/ValueSet/DocumentEntry.mimeType">DocumentEntry.mimeType</a> (<a href="http://hl7.org/fhir/R4/terminologies.html#required" title="To be conformant, the concept in this element SHALL be from the specified value set.">required</a>)</td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck1110.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.content.attachment.language">language</a><a name="DocumentReference.content.attachment.language"> </a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">1..<span style="opacity: 0.5">1</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#code">code</a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Human language of the content (BCP-47)</span><br/><span style="font-weight:bold">Binding: </span><a href="http://fhir.ch/ig/ch-epr-term/2.0.10/ValueSet-DocumentEntry.languageCode.html" title="http://fhir.ch/ig/ch-epr-term/ValueSet/DocumentEntry.languageCode">DocumentEntry.languageCode</a> (<a href="http://hl7.org/fhir/R4/terminologies.html#required" title="To be conformant, the concept in this element SHALL be from the specified value set.">required</a>)</td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck1110.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/> <span style="text-decoration:line-through">data</span><a name="DocumentReference.content.attachment.data"> </a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="text-decoration:line-through"/><span style="text-decoration:line-through">0</span><span style="text-decoration:line-through">..</span><span style="text-decoration:line-through">0</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck1110.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.content.attachment.url">url</a><a name="DocumentReference.content.attachment.url"> </a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">1..1</td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#url">url</a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Uri where the data can be found</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck1110.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.content.attachment.size">size</a><a name="DocumentReference.content.attachment.size"> </a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">0</span><span style="opacity: 0.5">..</span><span style="opacity: 0.5">1</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#unsignedInt">unsignedInt</a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Number of bytes of content (if url provided)</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck1110.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.content.attachment.hash">hash</a><a name="DocumentReference.content.attachment.hash"> </a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">0</span><span style="opacity: 0.5">..</span><span style="opacity: 0.5">1</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#base64Binary">base64Binary</a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Hash of the data (sha-1, base64ed)</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck1110.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.content.attachment.title">title</a><a name="DocumentReference.content.attachment.title"> </a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">0</span><span style="opacity: 0.5">..</span><span style="opacity: 0.5">1</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#string">string</a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Label to display in place of the data</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck1100.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin_end.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.content.attachment.creation">creation</a><a name="DocumentReference.content.attachment.creation"> </a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">1..<span style="opacity: 0.5">1</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#dateTime">dateTime</a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Date attachment was first created</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck100.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vline.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin_end.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.content.format">format</a><a name="DocumentReference.content.format"> </a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">1..<span style="opacity: 0.5">1</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#Coding">Coding</a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Format/content rules for the document</span><br/><span style="font-weight:bold">Binding: </span><a href="http://fhir.ch/ig/ch-epr-term/2.0.10/ValueSet-DocumentEntry.formatCode.html" title="http://fhir.ch/ig/ch-epr-term/ValueSet/DocumentEntry.formatCode">DocumentEntry.formatCode</a> (<a href="http://hl7.org/fhir/R4/terminologies.html#required" title="To be conformant, the concept in this element SHALL be from the specified value set.">required</a>): Document Format Codes.<br/><br/></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck01.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin_end.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.context">context</a><a name="DocumentReference.context"> </a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">1..<span style="opacity: 0.5">1</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#BackboneElement">BackboneElement</a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Clinical context of document</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck010.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_blank.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.context.period">period</a><a name="DocumentReference.context.period"> </a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">0</span><span style="opacity: 0.5">..</span><span style="opacity: 0.5">1</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#Period">Period</a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Time of service that is being documented</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck010.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_blank.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.context.facilityType">facilityType</a><a name="DocumentReference.context.facilityType"> </a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">1..<span style="opacity: 0.5">1</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#CodeableConcept">CodeableConcept</a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Kind of facility where patient was seen</span><br/><span style="font-weight:bold">Binding: </span><a href="http://fhir.ch/ig/ch-epr-term/2.0.10/ValueSet-DocumentEntry.healthcareFacilityTypeCode.html" title="http://fhir.ch/ig/ch-epr-term/ValueSet/DocumentEntry.healthcareFacilityTypeCode">DocumentEntry.healthcareFacilityTypeCode</a> (<a href="http://hl7.org/fhir/R4/terminologies.html#required" title="To be conformant, the concept in this element SHALL be from the specified value set.">required</a>): XDS Facility Type.<br/><br/></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck010.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_blank.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.context.practiceSetting">practiceSetting</a><a name="DocumentReference.context.practiceSetting"> </a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">1..<span style="opacity: 0.5">1</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#CodeableConcept">CodeableConcept</a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Additional details about where the content was created (e.g. clinical specialty)</span><br/><span style="font-weight:bold">Binding: </span><a href="http://fhir.ch/ig/ch-epr-term/2.0.10/ValueSet-DocumentEntry.practiceSettingCode.html" title="http://fhir.ch/ig/ch-epr-term/ValueSet/DocumentEntry.practiceSettingCode">DocumentEntry.practiceSettingCode</a> (<a href="http://hl7.org/fhir/R4/terminologies.html#required" title="To be conformant, the concept in this element SHALL be from the specified value set.">required</a>): Additional details about where the content was created (e.g. clinical specialty).<br/><br/></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck010.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_blank.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_reference.png" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Reference to another Resource" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.context.sourcePatientInfo">sourcePatientInfo</a><a name="DocumentReference.context.sourcePatientInfo"> </a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">1..<span style="opacity: 0.5">1</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a href="http://hl7.org/fhir/R4/references.html">Reference</a>(<a href="file:///home/michaela/github/ch-core/output/StructureDefinition-ch-core-patient.html">CH Core Patient</a>)<a href="http://hl7.org/fhir/R4/valueset-resource-aggregation-mode.html"> {</a><a href="http://hl7.org/fhir/R4/valueset-resource-aggregation-mode.html" title="The reference is a local reference to a contained resource.">c</a><a href="http://hl7.org/fhir/R4/valueset-resource-aggregation-mode.html">}</a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Patient demographics from source</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck001.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_blank.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin_end.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.context.related">related</a><a name="DocumentReference.context.related"> </a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">0</span><span style="opacity: 0.5">..</span><span style="opacity: 0.5">*</span></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a href="http://hl7.org/fhir/R4/references.html">Reference</a>(<a style="opacity: 0.5" href="http://hl7.org/fhir/R4/resource.html">Resource</a>)</td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">Related identifiers or resources</span></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck0000.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_blank.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_blank.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin_end.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-ch-mhd-documentreference-comprehensive-definitions.html#DocumentReference.context.related.identifier">identifier</a><a name="DocumentReference.context.related.identifier"> </a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="padding-left: 3px; padding-right: 3px; color: white; background-color: red" title="This element must be supported">S</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><span style="opacity: 0.5">0</span><span style="opacity: 0.5">..</span><span style="opacity: 0.5">1</span></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="opacity: 0.5" href="http://hl7.org/fhir/R4/datatypes.html#Identifier">Identifier</a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">Requirements on XDS-I.b (Swiss context): When a Imaging Document Source provides a document to the Document Repository, it must provide the StudyInstanceUID, found in the to be registered KOS object, in the referenceIdList (urn:ihe:iti:xds:2013:referenceIdList) attribute of the documentEntry metadata.</td></tr>
<tr><td colspan="5" class="hierarchy"><br/><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="Legend for this format"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3goXBCwdPqAP0wAAAldJREFUOMuNk0tIlFEYhp9z/vE2jHkhxXA0zJCMitrUQlq4lnSltEqCFhFG2MJFhIvIFpkEWaTQqjaWZRkp0g26URZkTpbaaOJkDqk10szoODP//7XIMUe0elcfnPd9zsfLOYplGrpRwZaqTtw3K7PtGem7Q6FoidbGgqHVy/HRb669R+56zx7eRV1L31JGxYbBtjKK93cxeqfyQHbehkZbUkK20goELEuIzEd+dHS+qz/Y8PTSif0FnGkbiwcAjHaU1+QWOptFiyCLp/LnKptpqIuXHx6rbR26kJcBX3yLgBfnd7CxwJmflpP2wUg0HIAoUUpZBmKzELGWcN8nAr6Gpu7tLU/CkwAaoKTWRSQyt89Q8w6J+oVQkKnBoblH7V0PPvUOvDYXfopE/SJmALsxnVm6LbkotrUtNowMeIrVrBcBpaMmdS0j9df7abpSuy7HWehwJdt1lhVwi/J58U5beXGAF6c3UXLycw1wdFklArBn87xdh0ZsZtArghBdAA3+OEDVubG4UEzP6x1FOWneHh2VDAHBAt80IbdXDcesNoCvs3E5AFyNSU5nbrDPZpcUEQQTFZiEVx+51fxMhhyJEAgvlriadIJZZksRuwBYMOPBbO3hePVVqgEJhFeUuFLhIPkRP6BQLIBrmMenujm/3g4zc398awIe90Zb5A1vREALqneMcYgP/xVQWlG+Ncu5vgwwlaUNx+3799rfe96u9K0JSDXcOzOTJg4B6IgmXfsygc7/Bvg9g9E58/cDVmGIBOP/zT8Bz1zqWqpbXIsd0O9hajXfL6u4BaOS6SeWAAAAAElFTkSuQmCC" alt="doco" style="background-color: inherit"/> Documentation for this format</a></td></tr></table></div>
  </text>
  <url
       value="http://fhir.ch/ig/ch-epr-mhealth/StructureDefinition/ch-mhd-documentreference-comprehensive"/>
  <version value="3.0.0"/>
  <name value="CHMhdDocumentReferenceComprehensive"/>
  <title value="CH MHD DocumentReference Comprehensive"/>
  <status value="draft"/>
  <date value="2020-07-10"/>
  <publisher value="eHealth Suisse"/>
  <contact>
    <name value="eHealth Suisse"/>
    <telecom>
      <system value="url"/>
      <value value="https://www.e-health-suisse.ch"/>
    </telecom>
  </contact>
  <description value="CH MHD Profile on CH Core DocumentReference"/>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="CH"/>
    </coding>
  </jurisdiction>
  <copyright value="CC0-1.0"/>
  <fhirVersion value="4.0.1"/>
  <mapping>
    <identity value="workflow"/>
    <uri value="http://hl7.org/fhir/workflow"/>
    <name value="Workflow Pattern"/>
  </mapping>
  <mapping>
    <identity value="fhircomposition"/>
    <uri value="http://hl7.org/fhir/composition"/>
    <name value="FHIR Composition"/>
  </mapping>
  <mapping>
    <identity value="rim"/>
    <uri value="http://hl7.org/v3"/>
    <name value="RIM Mapping"/>
  </mapping>
  <mapping>
    <identity value="cda"/>
    <uri value="http://hl7.org/v3/cda"/>
    <name value="CDA (R2)"/>
  </mapping>
  <mapping>
    <identity value="w5"/>
    <uri value="http://hl7.org/fhir/fivews"/>
    <name value="FiveWs Pattern 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>
  <mapping>
    <identity value="EPR-XDS"/>
    <uri
         value="https://www.ihe.net/uploadedFiles/Documents/ITI/IHE_ITI_Suppl_MHD.pdf"/>
    <name value="XDS"/>
  </mapping>
  <kind value="resource"/>
  <abstract value="false"/>
  <type value="DocumentReference"/>
  <baseDefinition
                  value="http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-documentreference"/>
  <derivation value="constraint"/>
  <snapshot>
    <element id="DocumentReference">
      <path value="DocumentReference"/>
      <short value="CH MHD DocumentReference Comprehensive"/>
      <definition
                  value="A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. The scope of a document is any seralized object with a mime-type, so includes formal patient centric documents (CDA), cliical notes, scanned paper, and non-patient specific documents like policy text."/>
      <comment
               value="Usually, this is used for documents other than those defined by FHIR."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DocumentReference"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <constraint>
        <key value="dom-2"/>
        <severity value="error"/>
        <human
               value="If the resource is contained in another resource, it SHALL NOT contain nested Resources"/>
        <expression value="contained.contained.empty()"/>
        <xpath value="not(parent::f:contained and f:contained)"/>
        <source
                value="http://hl7.org/fhir/StructureDefinition/DomainResource"/>
      </constraint>
      <constraint>
        <key value="dom-3"/>
        <severity value="error"/>
        <human
               value="If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource"/>
        <expression
                    value="contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()"/>
        <xpath
               value="not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))"/>
        <source
                value="http://hl7.org/fhir/StructureDefinition/DomainResource"/>
      </constraint>
      <constraint>
        <key value="dom-4"/>
        <severity value="error"/>
        <human
               value="If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated"/>
        <expression
                    value="contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()"/>
        <xpath
               value="not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))"/>
        <source
                value="http://hl7.org/fhir/StructureDefinition/DomainResource"/>
      </constraint>
      <constraint>
        <key value="dom-5"/>
        <severity value="error"/>
        <human
               value="If a resource is contained in another resource, it SHALL NOT have a security label"/>
        <expression value="contained.meta.security.empty()"/>
        <xpath value="not(exists(f:contained/*/f:meta/f:security))"/>
        <source
                value="http://hl7.org/fhir/StructureDefinition/DomainResource"/>
      </constraint>
      <constraint>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice">
          <valueBoolean value="true"/>
        </extension>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation">
          <valueMarkdown
                         value="When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time."/>
        </extension>
        <key value="dom-6"/>
        <severity value="warning"/>
        <human
               value="A resource should have narrative for robust management"/>
        <expression value="text.`div`.exists()"/>
        <xpath value="exists(f:text/h:div)"/>
        <source
                value="http://hl7.org/fhir/StructureDefinition/DomainResource"/>
      </constraint>
      <constraint>
        <key value="ch-mhd"/>
        <severity value="error"/>
        <human
               value="The DocumentReference needs to conform to IHE.MHD.Comprehensive.DocumentReference"/>
        <expression
                    value="conformsTo('https://profiles.ihe.net/ITI/MHD/StructureDefinition/IHE.MHD.Comprehensive.DocumentReference')"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="Entity. Role, or Act"/>
      </mapping>
      <mapping>
        <identity value="workflow"/>
        <map value="Event"/>
      </mapping>
      <mapping>
        <identity value="fhircomposition"/>
        <map value="when describing a Composition"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map
             value="Document[classCode=&quot;DOC&quot; and moodCode=&quot;EVN&quot;]"/>
      </mapping>
      <mapping>
        <identity value="cda"/>
        <map value="when describing a CDA"/>
      </mapping>
    </element>
    <element id="DocumentReference.id">
      <path value="DocumentReference.id"/>
      <short value="Logical id of this artifact"/>
      <definition
                  value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes."/>
      <comment
               value="The only time that a resource does not have an id is when it is being submitted to the server using a create operation."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Resource.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
          <valueUrl value="id"/>
        </extension>
        <code value="http://hl7.org/fhirpath/System.String"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="true"/>
    </element>
    <element id="DocumentReference.meta">
      <path value="DocumentReference.meta"/>
      <short value="Metadata about the resource"/>
      <definition
                  value="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Resource.meta"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Meta"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
    </element>
    <element id="DocumentReference.implicitRules">
      <path value="DocumentReference.implicitRules"/>
      <short value="A set of rules under which this content was created"/>
      <definition
                  value="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc."/>
      <comment
               value="Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Resource.implicitRules"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="uri"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="true"/>
      <isModifierReason
                        value="This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation"/>
      <isSummary value="true"/>
    </element>
    <element id="DocumentReference.language">
      <path value="DocumentReference.language"/>
      <short value="Language of the resource content"/>
      <definition
                  value="The base language in which the resource is written."/>
      <comment
               value="Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute)."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Resource.language"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet">
          <valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages"/>
        </extension>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="Language"/>
        </extension>
        <strength value="preferred"/>
        <description value="A human language."/>
        <valueSet value="http://hl7.org/fhir/ValueSet/languages"/>
      </binding>
    </element>
    <element id="DocumentReference.text">
      <path value="DocumentReference.text"/>
      <short value="Text summary of the resource, for human interpretation"/>
      <definition
                  value="A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety."/>
      <comment
               value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a &quot;text blob&quot; or where text is additionally entered raw or narrated and encoded information is added later."/>
      <alias value="narrative"/>
      <alias value="html"/>
      <alias value="xhtml"/>
      <alias value="display"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="DomainResource.text"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Narrative"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="Act.text?"/>
      </mapping>
    </element>
    <element id="DocumentReference.contained">
      <path value="DocumentReference.contained"/>
      <short value="Contained, inline Resources"/>
      <definition
                  value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope."/>
      <comment
               value="This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels."/>
      <alias value="inline resources"/>
      <alias value="anonymous resources"/>
      <alias value="contained resources"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.contained"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Resource"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="DocumentReference.extension">
      <path value="DocumentReference.extension"/>
      <slicing>
        <discriminator>
          <type value="value"/>
          <path value="url"/>
        </discriminator>
        <rules value="open"/>
      </slicing>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="1"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="false"/>
    </element>
    <element id="DocumentReference.extension:deletionStatus">
      <path value="DocumentReference.extension"/>
      <sliceName value="deletionStatus"/>
      <short value="Deletion status of the document"/>
      <definition value="Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile
                 value="http://fhir.ch/ig/ch-epr-mhealth/StructureDefinition/ch-ext-deletionstatus"/>
      </type>
      <condition value="ele-1"/>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
    </element>
    <element id="DocumentReference.extension:originalProviderRole">
      <path value="DocumentReference.extension"/>
      <sliceName value="originalProviderRole"/>
      <short
             value="Original ProviderRole: This extra metadata attribute SHALL be set by the Document Source actor to the role value of the current user and SHALL NOT be updated by Update Initiator or Document Administrator actors."/>
      <definition value="Extension"/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="DomainResource.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile
                 value="http://fhir.ch/ig/ch-epr-mhealth/StructureDefinition/ch-ext-author-authorrole"/>
      </type>
      <condition value="ele-1"/>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
    </element>
    <element id="DocumentReference.modifierExtension">
      <path value="DocumentReference.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.

Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <requirements
                    value="Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension)."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DomainResource.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <isModifier value="true"/>
      <isModifierReason
                        value="Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="DocumentReference.masterIdentifier">
      <path value="DocumentReference.masterIdentifier"/>
      <short value="An identifier intended for computation"/>
      <definition
                  value="An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers."/>
      <comment
               value="See ITI TF-2: Z.9.1.1 Identifier and CDA root plus extension."/>
      <requirements
                    value="The structure and format of this Id shall be consistent with the specification corresponding to the formatCode attribute. (e.g. for a DICOM standard document a 64-character numeric UID, for an HL7 CDA format a serialization of the CDA Document Id extension and root in the form &quot;oid^extension&quot;, where OID is a 64 digits max, and the Id is a 16 UTF-8 char max. If the OID is coded without the extension then the '^' character shall not be included.)."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="DocumentReference.masterIdentifier"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Identifier"/>
        <profile
                 value="http://fhir.ch/ig/ch-epr-mhealth/StructureDefinition/OidIdentifier"/>
      </type>
      <condition value="ele-1"/>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map
             value="CX / EI (occasionally, more often EI maps to a resource id or a URL)"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map
             value="II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]"/>
      </mapping>
      <mapping>
        <identity value="servd"/>
        <map value="Identifier"/>
      </mapping>
    </element>
    <element id="DocumentReference.identifier">
      <path value="DocumentReference.identifier"/>
      <short value="Other identifiers for the document"/>
      <definition
                  value="Other identifiers associated with the document, including version independent identifiers."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DocumentReference.identifier"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Identifier"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="workflow"/>
        <map value="Event.identifier"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="FiveWs.identifier"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map value="TXA-16?"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".id / .setId"/>
      </mapping>
      <mapping>
        <identity value="xds"/>
        <map value="DocumentEntry.entryUUID"/>
      </mapping>
    </element>
    <element id="DocumentReference.status">
      <path value="DocumentReference.status"/>
      <short value="current | superseded"/>
      <definition value="The status of this document reference."/>
      <comment
               value="approved -&gt; status=current, deprecated -&gt; status=superseded"/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="DocumentReference.status"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="true"/>
      <isModifierReason
                        value="This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid"/>
      <isSummary value="true"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="DocumentReferenceStatus"/>
        </extension>
        <strength value="required"/>
        <description value="The status of the document reference."/>
        <valueSet
                  value="http://hl7.org/fhir/ValueSet/document-reference-status|4.0.1"/>
      </binding>
      <mapping>
        <identity value="workflow"/>
        <map value="Event.status"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="FiveWs.status"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map value="TXA-19"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map
             value="interim: .completionCode=&quot;IN&quot; &amp; ./statusCode[isNormalDatatype()]=&quot;active&quot;;  final: .completionCode=&quot;AU&quot; &amp;&amp;  ./statusCode[isNormalDatatype()]=&quot;complete&quot; and not(./inboundRelationship[typeCode=&quot;SUBJ&quot; and isNormalActRelationship()]/source[subsumesCode(&quot;ActClass#CACT&quot;) and moodCode=&quot;EVN&quot; and domainMember(&quot;ReviseDocument&quot;, code) and isNormalAct()]);  amended: .completionCode=&quot;AU&quot; &amp;&amp;  ./statusCode[isNormalDatatype()]=&quot;complete&quot; and ./inboundRelationship[typeCode=&quot;SUBJ&quot; and isNormalActRelationship()]/source[subsumesCode(&quot;ActClass#CACT&quot;) and moodCode=&quot;EVN&quot; and domainMember(&quot;ReviseDocument&quot;, code) and isNormalAct() and statusCode=&quot;completed&quot;];  withdrawn : .completionCode=NI &amp;&amp;  ./statusCode[isNormalDatatype()]=&quot;obsolete&quot;"/>
      </mapping>
      <mapping>
        <identity value="xds"/>
        <map value="DocumentEntry.availabilityStatus"/>
      </mapping>
      <mapping>
        <identity value="EPR-XDS"/>
        <map
             value="Table 4.5.1.1-1 (FHIR DocumentReference mapping to DocumentEntry): approved -&gt; status=current,
							deprecated -&gt; status=superseded. Other status values are allowed but are not defined in this mapping to XDS."/>
      </mapping>
    </element>
    <element id="DocumentReference.docStatus">
      <path value="DocumentReference.docStatus"/>
      <short value="preliminary | final | amended | entered-in-error"/>
      <definition value="The status of the underlying document."/>
      <comment
               value="These HL7 FHIR elements are not used in XDS, therefore would not be present. Document Consumers should be robust to these elements holding values."/>
      <min value="0"/>
      <max value="0"/>
      <base>
        <path value="DocumentReference.docStatus"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="ReferredDocumentStatus"/>
        </extension>
        <strength value="required"/>
        <description value="Status of the underlying document."/>
        <valueSet
                  value="http://hl7.org/fhir/ValueSet/composition-status|4.0.1"/>
      </binding>
      <mapping>
        <identity value="w5"/>
        <map value="FiveWs.status"/>
      </mapping>
      <mapping>
        <identity value="fhircomposition"/>
        <map value="Composition.status"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map value="TXA-17"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".statusCode"/>
      </mapping>
    </element>
    <element id="DocumentReference.type">
      <path value="DocumentReference.type"/>
      <short value="Kind of document (LOINC if possible)"/>
      <definition
                  value="Specifies the particular kind of document referenced  (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced."/>
      <comment
               value="Key metadata element describing the document that describes he exact type of document. Helps humans to assess whether the document is of interest when viewing a list of documents."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="DocumentReference.type"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <binding>
        <strength value="required"/>
        <valueSet
                  value="http://fhir.ch/ig/ch-epr-term/ValueSet/DocumentEntry.typeCode"/>
      </binding>
      <mapping>
        <identity value="workflow"/>
        <map value="Event.code"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="FiveWs.class"/>
      </mapping>
      <mapping>
        <identity value="fhircomposition"/>
        <map value="Composition.type"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map value="TXA-2"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="./code"/>
      </mapping>
      <mapping>
        <identity value="xds"/>
        <map value="DocumentEntry.type"/>
      </mapping>
      <mapping>
        <identity value="cda"/>
        <map
             value="ClinicalDocument/code/@code 

The typeCode should be mapped from the ClinicalDocument/code element to a set of document type codes configured in the affinity domain. One suggested coding system to use for typeCode is LOINC, in which case the mapping step can be omitted."/>
      </mapping>
    </element>
    <element id="DocumentReference.category">
      <path value="DocumentReference.category"/>
      <short value="Categorization of document"/>
      <definition
                  value="A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type."/>
      <comment
               value="Key metadata element describing the the category or classification of the document. This is a broader perspective that groups similar documents based on how they would be used. This is a primary key used in searching."/>
      <alias value="claxs"/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="DocumentReference.category"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <binding>
        <strength value="required"/>
        <valueSet
                  value="http://fhir.ch/ig/ch-epr-term/ValueSet/DocumentEntry.classCode"/>
      </binding>
      <mapping>
        <identity value="w5"/>
        <map value="FiveWs.class"/>
      </mapping>
      <mapping>
        <identity value="fhircomposition"/>
        <map value="Composition.class"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map
             value=".outboundRelationship[typeCode=&quot;COMP].target[classCode=&quot;LIST&quot;, moodCode=&quot;EVN&quot;].code"/>
      </mapping>
      <mapping>
        <identity value="xds"/>
        <map value="DocumentEntry.class"/>
      </mapping>
      <mapping>
        <identity value="cda"/>
        <map
             value="Derived from a mapping of /ClinicalDocument/code/@code to an Affinity Domain specified coded value to use and coding system. Affinity Domains are encouraged to use the appropriate value for Type of Service, based on the LOINC Type of Service (see Page 53 of the LOINC User's Manual). Must be consistent with /ClinicalDocument/code/@code"/>
      </mapping>
    </element>
    <element id="DocumentReference.subject">
      <path value="DocumentReference.subject"/>
      <short value="Who/what is the subject of the document"/>
      <definition
                  value="Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure)."/>
      <comment
               value="Not a contained resource. URL Points to an existing Patient Resource representing the XDS Affinity Domain Patient."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="DocumentReference.subject"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Reference"/>
        <targetProfile
                       value="http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-patient"/>
        <aggregation value="referenced"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="workflow"/>
        <map value="Event.subject"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="FiveWs.subject[x]"/>
      </mapping>
      <mapping>
        <identity value="fhircomposition"/>
        <map value="Composition.subject"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map
             value="PID-3 (No standard way to define a Practitioner or Group subject in HL7 v2 MDM message)"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map
             value=".participation[typeCode=&quot;SBJ&quot;].role[typeCode=&quot;PAT&quot;]"/>
      </mapping>
      <mapping>
        <identity value="xds"/>
        <map value="DocumentEntry.patientId"/>
      </mapping>
      <mapping>
        <identity value="cda"/>
        <map value="ClinicalDocument/recordTarget/"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="FiveWs.subject"/>
      </mapping>
    </element>
    <element id="DocumentReference.date">
      <path value="DocumentReference.date"/>
      <short value="When this document reference was created"/>
      <definition value="When the document reference was created."/>
      <comment
               value="Referencing/indexing time is used for tracking, organizing versions and searching."/>
      <alias value="indexed"/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="DocumentReference.date"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="instant"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="workflow"/>
        <map value="Event.occurrence[x]"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="FiveWs.recorded"/>
      </mapping>
      <mapping>
        <identity value="fhircomposition"/>
        <map value="Composition.date"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".availabilityTime[type=&quot;TS&quot;]"/>
      </mapping>
    </element>
    <element id="DocumentReference.author">
      <path value="DocumentReference.author"/>
      <short value="Who and/or what authored the document"/>
      <definition
                  value="Identifies who is responsible for adding the information to the document."/>
      <comment value="Contained resource."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DocumentReference.author"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Reference"/>
        <aggregation value="contained"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="workflow"/>
        <map value="Event.performer.actor"/>
      </mapping>
      <mapping>
        <identity value="fhircomposition"/>
        <map value="Composition.author"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map
             value="TXA-9 (No standard way to indicate a Device in HL7 v2 MDM message)"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map
             value=".participation[typeCode=&quot;AUT&quot;].role[classCode=&quot;ASSIGNED&quot;]"/>
      </mapping>
      <mapping>
        <identity value="xds"/>
        <map value="DocumentEntry.author"/>
      </mapping>
      <mapping>
        <identity value="cda"/>
        <map value="ClinicalDocument/author"/>
      </mapping>
    </element>
    <element id="DocumentReference.authenticator">
      <path value="DocumentReference.authenticator"/>
      <short value="Who/what authenticated the document"/>
      <definition
                  value="Which person or organization authenticates that this document is valid."/>
      <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."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="DocumentReference.authenticator"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Reference"/>
        <aggregation value="contained"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="workflow"/>
        <map value="Event.performer.actor"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="FiveWs.witness"/>
      </mapping>
      <mapping>
        <identity value="fhircomposition"/>
        <map value="Composition.attester"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map value="TXA-10"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map
             value=".participation[typeCode=&quot;AUTHEN&quot;].role[classCode=&quot;ASSIGNED&quot;]"/>
      </mapping>
      <mapping>
        <identity value="xds"/>
        <map value="DocumentEntry.legalAuthenticator"/>
      </mapping>
      <mapping>
        <identity value="cda"/>
        <map value="ClinicalDocument/legalAuthenticator"/>
      </mapping>
    </element>
    <element id="DocumentReference.custodian">
      <path value="DocumentReference.custodian"/>
      <short value="Organization which maintains the document"/>
      <definition
                  value="Identifies the organization or group who is responsible for ongoing maintenance of and access to the document."/>
      <comment
               value="Identifies the logical organization (software system, vendor, or department) to go to find the current version, where to report issues, etc. This is different from the physical location (URL, disk drive, or server) of the document, which is the technical location of the document, which host may be delegated to the management of some other organization."/>
      <min value="0"/>
      <max value="0"/>
      <base>
        <path value="DocumentReference.custodian"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Reference"/>
        <targetProfile
                       value="http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-organization"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="workflow"/>
        <map value="Event.performer.actor"/>
      </mapping>
      <mapping>
        <identity value="fhircomposition"/>
        <map value="Composition.custodian"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map
             value=".participation[typeCode=&quot;RCV&quot;].role[classCode=&quot;CUST&quot;].scoper[classCode=&quot;ORG&quot; and determinerCode=&quot;INST&quot;]"/>
      </mapping>
    </element>
    <element id="DocumentReference.relatesTo">
      <path value="DocumentReference.relatesTo"/>
      <short value="Relationships to other documents"/>
      <definition
                  value="Relationships that this document has with other document references that already exist."/>
      <comment value="See ITI TF-2c: 3.65.4.1.2.3"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DocumentReference.relatesTo"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="fhircomposition"/>
        <map value="Composition.relatesTo"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".outboundRelationship"/>
      </mapping>
      <mapping>
        <identity value="xds"/>
        <map value="DocumentEntry Associations"/>
      </mapping>
    </element>
    <element id="DocumentReference.relatesTo.id">
      <path value="DocumentReference.relatesTo.id"/>
      <representation value="xmlAttr"/>
      <short value="Unique id for inter-element referencing"/>
      <definition
                  value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
          <valueUrl value="string"/>
        </extension>
        <code value="http://hl7.org/fhirpath/System.String"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="DocumentReference.relatesTo.extension">
      <path value="DocumentReference.relatesTo.extension"/>
      <short value="Additional content defined by implementations"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="DocumentReference.relatesTo.modifierExtension">
      <path value="DocumentReference.relatesTo.modifierExtension"/>
      <short value="Extensions that cannot be ignored even if unrecognized"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.

Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <requirements
                    value="Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension)."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <isModifier value="true"/>
      <isModifierReason
                        value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="DocumentReference.relatesTo.code">
      <path value="DocumentReference.relatesTo.code"/>
      <short value="replaces | transforms | signs | appends"/>
      <definition
                  value="The type of relationship that this document has with anther document."/>
      <comment
               value="If this document appends another document, then the document cannot be fully understood without also accessing the referenced document."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="DocumentReference.relatesTo.code"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="DocumentRelationshipType"/>
        </extension>
        <strength value="required"/>
        <description value="The type of relationship between documents."/>
        <valueSet
                  value="http://hl7.org/fhir/ValueSet/document-relationship-type|4.0.1"/>
      </binding>
      <mapping>
        <identity value="fhircomposition"/>
        <map value="Composition.relatesTo.code"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".outboundRelationship.typeCode"/>
      </mapping>
      <mapping>
        <identity value="xds"/>
        <map value="DocumentEntry Associations type"/>
      </mapping>
    </element>
    <element id="DocumentReference.relatesTo.target">
      <path value="DocumentReference.relatesTo.target"/>
      <short value="Target of the relationship"/>
      <definition value="The target document of this relationship."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="DocumentReference.relatesTo.target"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Reference"/>
        <targetProfile
                       value="http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-documentreference"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="fhircomposition"/>
        <map value="Composition.relatesTo.target"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map
             value=".target[classCode=&quot;DOC&quot;, moodCode=&quot;EVN&quot;].id"/>
      </mapping>
      <mapping>
        <identity value="xds"/>
        <map value="DocumentEntry Associations reference"/>
      </mapping>
    </element>
    <element id="DocumentReference.description">
      <path value="DocumentReference.description"/>
      <short value="Human-readable description"/>
      <definition value="Human-readable description of the source document."/>
      <comment
               value="What the document is about,  a terse summary of the document."/>
      <requirements
                    value="Helps humans to assess whether the document is of interest."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="DocumentReference.description"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="TXA-25"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map
             value=".outboundRelationship[typeCode=&quot;SUBJ&quot;].target.text"/>
      </mapping>
      <mapping>
        <identity value="xds"/>
        <map value="DocumentEntry.comments"/>
      </mapping>
    </element>
    <element id="DocumentReference.securityLabel">
      <path value="DocumentReference.securityLabel"/>
      <short value="Document security-tags"/>
      <definition
                  value="A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the &quot;reference&quot; to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to."/>
      <comment
               value="Note: This is NOT the DocumentReference.meta, as that holds the meta tags for the DocumentReference itself."/>
      <requirements
                    value="Use of the Health Care Privacy/Security Classification (HCS) system of security-tag use is recommended."/>
      <min value="1"/>
      <max value="*"/>
      <base>
        <path value="DocumentReference.securityLabel"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <binding>
        <strength value="required"/>
        <valueSet
                  value="http://fhir.ch/ig/ch-epr-term/ValueSet/DocumentEntry.confidentialityCode"/>
      </binding>
      <mapping>
        <identity value="fhircomposition"/>
        <map value="Composition.confidentiality, Composition.meta.security"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map value="TXA-18"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".confidentialityCode"/>
      </mapping>
      <mapping>
        <identity value="xds"/>
        <map value="DocumentEntry.confidentialityCode"/>
      </mapping>
      <mapping>
        <identity value="cda"/>
        <map value="ClinicalDocument/confidentialityCode/@code"/>
      </mapping>
    </element>
    <element id="DocumentReference.content">
      <path value="DocumentReference.content"/>
      <short value="Document referenced"/>
      <definition
                  value="The document and format referenced. There may be multiple content element repetitions, each with a different format."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="DocumentReference.content"/>
        <min value="1"/>
        <max value="*"/>
      </base>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="fhircomposition"/>
        <map value="Bundle(Composition+*)"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="document.text"/>
      </mapping>
    </element>
    <element id="DocumentReference.content.id">
      <path value="DocumentReference.content.id"/>
      <representation value="xmlAttr"/>
      <short value="Unique id for inter-element referencing"/>
      <definition
                  value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
          <valueUrl value="string"/>
        </extension>
        <code value="http://hl7.org/fhirpath/System.String"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="DocumentReference.content.extension">
      <path value="DocumentReference.content.extension"/>
      <short value="Additional content defined by implementations"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="DocumentReference.content.modifierExtension">
      <path value="DocumentReference.content.modifierExtension"/>
      <short value="Extensions that cannot be ignored even if unrecognized"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.

Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <requirements
                    value="Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension)."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <isModifier value="true"/>
      <isModifierReason
                        value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="DocumentReference.content.attachment">
      <path value="DocumentReference.content.attachment"/>
      <short value="Where to access the document"/>
      <definition
                  value="The document or URL of the document along with critical metadata to prove content has integrity."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="DocumentReference.content.attachment"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Attachment"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="fhircomposition"/>
        <map
             value="Composition.language, 
Composition.title, 
Composition.date"/>
      </mapping>
      <mapping>
        <identity value="v2"/>
        <map value="TXA-3 for mime type"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="document.text"/>
      </mapping>
      <mapping>
        <identity value="xds"/>
        <map
             value="DocumentEntry.mimeType, DocumentEntry.languageCode, DocumentEntry.URI, DocumentEntry.size, DocumentEntry.hash, DocumentEntry.title, DocumentEntry.creationTime"/>
      </mapping>
      <mapping>
        <identity value="cda"/>
        <map
             value="ClinicalDocument/languageCode, ClinicalDocument/title, ClinicalDocument/date"/>
      </mapping>
    </element>
    <element id="DocumentReference.content.attachment.id">
      <path value="DocumentReference.content.attachment.id"/>
      <representation value="xmlAttr"/>
      <short value="Unique id for inter-element referencing"/>
      <definition
                  value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
          <valueUrl value="string"/>
        </extension>
        <code value="http://hl7.org/fhirpath/System.String"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="DocumentReference.content.attachment.extension">
      <path value="DocumentReference.content.attachment.extension"/>
      <slicing>
        <discriminator>
          <type value="value"/>
          <path value="url"/>
        </discriminator>
        <description value="Extensions are always sliced by (at least) url"/>
        <rules value="open"/>
      </slicing>
      <short value="Additional content defined by implementations"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="DocumentReference.content.attachment.contentType">
      <path value="DocumentReference.content.attachment.contentType"/>
      <short value="Mime type of the content, with charset etc."/>
      <definition
                  value="Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate."/>
      <requirements
                    value="Processors of the data need to be able to know how to interpret the data."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="Attachment.contentType"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <example>
        <label value="General"/>
        <valueCode value="text/plain; charset=UTF-8, image/png"/>
      </example>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ch-docref-1"/>
        <severity value="warning"/>
        <human
               value="The codes from the following ValueSet are 'preferred': http://fhir.ch/ig/ch-epr-term/ValueSet/DocumentEntry.mimeType"/>
        <expression value="exists()"/>
        <source
                value="http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-documentreference"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <binding>
        <strength value="required"/>
        <valueSet
                  value="http://fhir.ch/ig/ch-epr-term/ValueSet/DocumentEntry.mimeType"/>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map
             value="ED.2+ED.3/RP.2+RP.3. Note conversion may be needed if old style values are being used"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="./mediaType, ./charset"/>
      </mapping>
    </element>
    <element id="DocumentReference.content.attachment.language">
      <path value="DocumentReference.content.attachment.language"/>
      <short value="Human language of the content (BCP-47)"/>
      <definition
                  value="The human language of the content. The value can be any valid value according to BCP 47."/>
      <requirements
                    value="Users need to be able to choose between the languages in a set of attachments."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="Attachment.language"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <example>
        <label value="General"/>
        <valueCode value="en-AU"/>
      </example>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <binding>
        <strength value="required"/>
        <valueSet
                  value="http://fhir.ch/ig/ch-epr-term/ValueSet/DocumentEntry.languageCode"/>
      </binding>
      <mapping>
        <identity value="rim"/>
        <map value="./language"/>
      </mapping>
    </element>
    <element id="DocumentReference.content.attachment.data">
      <path value="DocumentReference.content.attachment.data"/>
      <short value="Data inline, base64ed"/>
      <definition
                  value="The actual data of the attachment - a sequence of bytes, base64 encoded."/>
      <comment
               value="These HL7 FHIR elements are not used in XDS, therefore would not be present. Document Consumers should be robust to these elements holding values."/>
      <requirements value="The data needs to able to be transmitted inline."/>
      <min value="0"/>
      <max value="0"/>
      <base>
        <path value="Attachment.data"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="base64Binary"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="v2"/>
        <map value="ED.5"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="./data"/>
      </mapping>
    </element>
    <element id="DocumentReference.content.attachment.url">
      <path value="DocumentReference.content.attachment.url"/>
      <short value="Uri where the data can be found"/>
      <definition value="A location where the data can be accessed."/>
      <comment
               value="If both data and url are provided, the url SHALL point to the same content as the data contains. Urls may be relative references or may reference transient locations such as a wrapping envelope using cid: though this has ramifications for using signatures. Relative URLs are interpreted relative to the service url, like a resource reference, rather than relative to the resource itself. If a URL is provided, it SHALL resolve to actual data."/>
      <requirements value="The data needs to be transmitted by reference."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="Attachment.url"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="url"/>
      </type>
      <example>
        <label value="General"/>
        <valueUrl value="http://www.acme.com/logo-small.png"/>
      </example>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="RP.1+RP.2 - if they refer to a URL (see v2.6)"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="./reference/literal"/>
      </mapping>
    </element>
    <element id="DocumentReference.content.attachment.size">
      <path value="DocumentReference.content.attachment.size"/>
      <short value="Number of bytes of content (if url provided)"/>
      <definition
                  value="The number of bytes of data that make up this attachment (before base64 encoding, if that is done)."/>
      <comment
               value="The number of bytes is redundant if the data is provided as a base64binary, but is useful if the data is provided as a url reference."/>
      <requirements
                    value="Representing the size allows applications to determine whether they should fetch the content automatically in advance, or refuse to fetch it at all."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Attachment.size"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="unsignedInt"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A (needs data type R3 proposal)"/>
      </mapping>
    </element>
    <element id="DocumentReference.content.attachment.hash">
      <path value="DocumentReference.content.attachment.hash"/>
      <short value="Hash of the data (sha-1, base64ed)"/>
      <definition
                  value="The calculated hash of the data using SHA-1. Represented using base64."/>
      <comment
               value="The hash is calculated on the data prior to base64 encoding, if the data is based64 encoded. The hash is not intended to support digital signatures. Where protection against malicious threats a digital signature should be considered, see [Provenance.signature](http://hl7.org/fhir/R4/provenance-definitions.html#Provenance.signature) for mechanism to protect a resource with a digital signature."/>
      <requirements
                    value="Included so that applications can verify that the contents of a location have not changed due to technical failures (e.g., storage rot, transport glitch, incorrect version)."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Attachment.hash"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="base64Binary"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map
             value=".integrityCheck[parent::ED/integrityCheckAlgorithm=&quot;SHA-1&quot;]"/>
      </mapping>
    </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"/>
      <short value="Label to display in place of the data"/>
      <definition
                  value="A label or set of text to display in place of the data."/>
      <requirements
                    value="Applications need a label to display to a human user in place of the actual data if the data cannot be rendered or perceived by the viewer."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Attachment.title"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <example>
        <label value="General"/>
        <valueString value="Official Corporate Logo"/>
      </example>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="./title/data"/>
      </mapping>
    </element>
    <element id="DocumentReference.content.attachment.creation">
      <path value="DocumentReference.content.attachment.creation"/>
      <short value="Date attachment was first created"/>
      <definition value="The date that the attachment was first created."/>
      <requirements
                    value="This is often tracked as an integrity issue for use of the attachment."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="Attachment.creation"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="dateTime"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A (needs data type R3 proposal)"/>
      </mapping>
    </element>
    <element id="DocumentReference.content.format">
      <path value="DocumentReference.content.format"/>
      <short value="Format/content rules for the document"/>
      <definition
                  value="An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType."/>
      <comment
               value="Note that while IHE mostly issues URNs for format types, not all documents can be identified by a URI."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="DocumentReference.content.format"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Coding"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <binding>
        <strength value="required"/>
        <description value="Document Format Codes."/>
        <valueSet
                  value="http://fhir.ch/ig/ch-epr-term/ValueSet/DocumentEntry.formatCode"/>
      </binding>
      <mapping>
        <identity value="fhircomposition"/>
        <map value="Composition.meta.profile"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value="document.text"/>
      </mapping>
      <mapping>
        <identity value="xds"/>
        <map value="DocumentEntry.formatCode"/>
      </mapping>
      <mapping>
        <identity value="cda"/>
        <map
             value="derived from the IHE Profile or Implementation Guide templateID"/>
      </mapping>
    </element>
    <element id="DocumentReference.context">
      <path value="DocumentReference.context"/>
      <short value="Clinical context of document"/>
      <definition
                  value="The clinical context in which the document was prepared."/>
      <comment
               value="These values are primarily added to help with searching for interesting/relevant documents."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="DocumentReference.context"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="BackboneElement"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map
             value="outboundRelationship[typeCode=&quot;SUBJ&quot;].target[classCode&lt;'ACT']"/>
      </mapping>
    </element>
    <element id="DocumentReference.context.id">
      <path value="DocumentReference.context.id"/>
      <representation value="xmlAttr"/>
      <short value="Unique id for inter-element referencing"/>
      <definition
                  value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
          <valueUrl value="string"/>
        </extension>
        <code value="http://hl7.org/fhirpath/System.String"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="DocumentReference.context.extension">
      <path value="DocumentReference.context.extension"/>
      <short value="Additional content defined by implementations"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="DocumentReference.context.modifierExtension">
      <path value="DocumentReference.context.modifierExtension"/>
      <short value="Extensions that cannot be ignored even if unrecognized"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.

Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <requirements
                    value="Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension)."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="BackboneElement.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <isModifier value="true"/>
      <isModifierReason
                        value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="DocumentReference.context.encounter">
      <path value="DocumentReference.context.encounter"/>
      <short value="Context of the document  content"/>
      <definition
                  value="Describes the clinical encounter or type of care that the document content is associated with."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DocumentReference.context.encounter"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Reference"/>
        <targetProfile
                       value="http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-encounter"/>
        <targetProfile
                       value="http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="workflow"/>
        <map value="Event.context"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="FiveWs.context"/>
      </mapping>
      <mapping>
        <identity value="fhircomposition"/>
        <map value="Composition.encounter"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map
             value="unique(highest(./outboundRelationship[typeCode=&quot;SUBJ&quot; and isNormalActRelationship()], priorityNumber)/target[moodCode=&quot;EVN&quot; and classCode=(&quot;ENC&quot;, &quot;PCPR&quot;) and isNormalAct])"/>
      </mapping>
    </element>
    <element id="DocumentReference.context.event">
      <path value="DocumentReference.context.event"/>
      <short value="Main clinical acts documented"/>
      <definition
                  value="This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the type Code, such as a &quot;History and Physical Report&quot; in which the procedure being documented is necessarily a &quot;History and Physical&quot; act."/>
      <comment
               value="An event can further specialize the act inherent in the type, such as  where it is simply &quot;Procedure Report&quot; and the procedure was a &quot;colonoscopy&quot;. If one or more event codes are included, they shall not conflict with the values inherent in the class or type elements as such a conflict would create an ambiguous situation."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DocumentReference.context.event"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="DocumentEventType"/>
        </extension>
        <strength value="example"/>
        <description
                     value="This list of codes represents the main clinical acts being documented."/>
        <valueSet value="http://terminology.hl7.org/ValueSet/v3-ActCode"/>
      </binding>
      <mapping>
        <identity value="fhircomposition"/>
        <map value="Composition.event.code"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".code"/>
      </mapping>
      <mapping>
        <identity value="xds"/>
        <map value="DocumentEntry.eventCodeList"/>
      </mapping>
    </element>
    <element id="DocumentReference.context.period">
      <path value="DocumentReference.context.period"/>
      <short value="Time of service that is being documented"/>
      <definition
                  value="The time period over which the service that is described by the document was provided."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="DocumentReference.context.period"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Period"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="fhircomposition"/>
        <map value="Composition.event.period"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".effectiveTime"/>
      </mapping>
      <mapping>
        <identity value="xds"/>
        <map
             value="DocumentEntry.serviceStartTime, DocumentEntry.serviceStopTime"/>
      </mapping>
      <mapping>
        <identity value="cda"/>
        <map
             value="ClinicalDocument/documentationOf/
serviceEvent/effectiveTime/low/
@value --&gt; ClinicalDocument/documentationOf/
serviceEvent/effectiveTime/high/
@value"/>
      </mapping>
    </element>
    <element id="DocumentReference.context.facilityType">
      <path value="DocumentReference.context.facilityType"/>
      <short value="Kind of facility where patient was seen"/>
      <definition value="The kind of facility where the patient was seen."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="DocumentReference.context.facilityType"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="DocumentC80FacilityType"/>
        </extension>
        <strength value="required"/>
        <description value="XDS Facility Type."/>
        <valueSet
                  value="http://fhir.ch/ig/ch-epr-term/ValueSet/DocumentEntry.healthcareFacilityTypeCode"/>
      </binding>
      <mapping>
        <identity value="fhircomposition"/>
        <map value="usually from a mapping to a local ValueSet"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map
             value=".participation[typeCode=&quot;LOC&quot;].role[classCode=&quot;DSDLOC&quot;].code"/>
      </mapping>
      <mapping>
        <identity value="xds"/>
        <map value="DocumentEntry.healthcareFacilityTypeCode"/>
      </mapping>
      <mapping>
        <identity value="cda"/>
        <map
             value="usually a mapping to a local ValueSet. Must be consistent with /clinicalDocument/code"/>
      </mapping>
    </element>
    <element id="DocumentReference.context.practiceSetting">
      <path value="DocumentReference.context.practiceSetting"/>
      <short
             value="Additional details about where the content was created (e.g. clinical specialty)"/>
      <definition
                  value="This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty."/>
      <comment
               value="This element should be based on a coarse classification system for the class of specialty practice. Recommend the use of the classification system for Practice Setting, such as that described by the Subject Matter Domain in LOINC."/>
      <requirements
                    value="This is an important piece of metadata that providers often rely upon to quickly sort and/or filter out to find specific content."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="DocumentReference.context.practiceSetting"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="DocumentC80PracticeSetting"/>
        </extension>
        <strength value="required"/>
        <description
                     value="Additional details about where the content was created (e.g. clinical specialty)."/>
        <valueSet
                  value="http://fhir.ch/ig/ch-epr-term/ValueSet/DocumentEntry.practiceSettingCode"/>
      </binding>
      <mapping>
        <identity value="fhircomposition"/>
        <map value="usually from a mapping to a local ValueSet"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map
             value=".participation[typeCode=&quot;LOC&quot;].role[classCode=&quot;DSDLOC&quot;].code"/>
      </mapping>
      <mapping>
        <identity value="xds"/>
        <map value="DocumentEntry.practiceSettingCode"/>
      </mapping>
      <mapping>
        <identity value="cda"/>
        <map value="usually from a mapping to a local ValueSet"/>
      </mapping>
    </element>
    <element id="DocumentReference.context.sourcePatientInfo">
      <path value="DocumentReference.context.sourcePatientInfo"/>
      <short value="Patient demographics from source"/>
      <definition
                  value="The Patient Information as known when the document was published. May be a reference to a version specific, or contained."/>
      <comment
               value="Contained Patient resource with Patient.identifier.use element set to ‘usual’.

Indicates that the data within the XDS document entry be represented as a contained resource. See Section 4.5.4.4.7"/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="DocumentReference.context.sourcePatientInfo"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Reference"/>
        <targetProfile
                       value="http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-patient"/>
        <aggregation value="contained"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="fhircomposition"/>
        <map value="Composition.subject"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map
             value=".participation[typeCode=&quot;SBJ&quot;].role[typeCode=&quot;PAT&quot;]"/>
      </mapping>
      <mapping>
        <identity value="xds"/>
        <map
             value="DocumentEntry.sourcePatientInfo, DocumentEntry.sourcePatientId"/>
      </mapping>
      <mapping>
        <identity value="cda"/>
        <map value="ClinicalDocument/recordTarget/"/>
      </mapping>
    </element>
    <element id="DocumentReference.context.related">
      <path value="DocumentReference.context.related"/>
      <short value="Related identifiers or resources"/>
      <definition
                  value="Related identifiers or resources associated with the DocumentReference."/>
      <comment
               value="May be filled with URL pointers to Resources or Identifiers found in referenceIdList"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="DocumentReference.context.related"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Reference"/>
        <targetProfile
                       value="http://hl7.org/fhir/StructureDefinition/Resource"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="fhircomposition"/>
        <map value="Composition.event.detail"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map
             value="./outboundRelationship[typeCode=&quot;PERT&quot; and isNormalActRelationship()] / target[isNormalAct]"/>
      </mapping>
      <mapping>
        <identity value="xds"/>
        <map value="DocumentEntry.referenceIdList"/>
      </mapping>
      <mapping>
        <identity value="cda"/>
        <map value="ClinicalDocument/relatedDocument"/>
      </mapping>
    </element>
    <element id="DocumentReference.context.related.id">
      <path value="DocumentReference.context.related.id"/>
      <representation value="xmlAttr"/>
      <short value="Unique id for inter-element referencing"/>
      <definition
                  value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Element.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
          <valueUrl value="string"/>
        </extension>
        <code value="http://hl7.org/fhirpath/System.String"/>
      </type>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="DocumentReference.context.related.extension">
      <path value="DocumentReference.context.related.extension"/>
      <slicing>
        <discriminator>
          <type value="value"/>
          <path value="url"/>
        </discriminator>
        <description value="Extensions are always sliced by (at least) url"/>
        <rules value="open"/>
      </slicing>
      <short value="Additional content defined by implementations"/>
      <definition
                  value="May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension."/>
      <comment
               value="There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Element.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <constraint>
        <key value="ext-1"/>
        <severity value="error"/>
        <human value="Must have either extensions or value[x], not both"/>
        <expression value="extension.exists() != value.exists()"/>
        <xpath
               value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &quot;value&quot;)])"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="DocumentReference.context.related.reference">
      <path value="DocumentReference.context.related.reference"/>
      <short value="Literal reference, Relative, internal or absolute URL"/>
      <definition
                  value="A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources."/>
      <comment
               value="Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure &quot;/[type]/[id]&quot; then it should be assumed that the reference is to a FHIR RESTful server."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Reference.reference"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <condition value="ref-1"/>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="DocumentReference.context.related.type">
      <path value="DocumentReference.context.related.type"/>
      <short value="Type the reference refers to (e.g. &quot;Patient&quot;)"/>
      <definition
                  value="The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.

The type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. &quot;Patient&quot; is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)."/>
      <comment
               value="This element is used to indicate the type of  the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Reference.type"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="uri"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="FHIRResourceTypeExt"/>
        </extension>
        <strength value="extensible"/>
        <description
                     value="Aa resource (or, for logical models, the URI of the logical model)."/>
        <valueSet value="http://hl7.org/fhir/ValueSet/resource-types"/>
      </binding>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element id="DocumentReference.context.related.identifier">
      <path value="DocumentReference.context.related.identifier"/>
      <short
             value="Requirements on XDS-I.b (Swiss context): When a Imaging Document Source provides a document to the Document Repository, it must provide the StudyInstanceUID, found in the to be registered KOS object, in the referenceIdList (urn:ihe:iti:xds:2013:referenceIdList) attribute of the documentEntry metadata."/>
      <definition
                  value="An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference."/>
      <comment
               value="When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. 

When both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference

Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.

Reference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference.  For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport).  One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any)."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Reference.identifier"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Identifier"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <mustSupport value="true"/>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value=".identifier"/>
      </mapping>
    </element>
    <element id="DocumentReference.context.related.display">
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true"/>
      </extension>
      <path value="DocumentReference.context.related.display"/>
      <short value="Text alternative for the resource"/>
      <definition
                  value="Plain text narrative that identifies the resource in addition to the resource reference."/>
      <comment
               value="This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="Reference.display"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <constraint>
        <key value="ele-1"/>
        <severity value="error"/>
        <human value="All FHIR elements must have a @value or children"/>
        <expression
                    value="hasValue() or (children().count() &gt; id.count())"/>
        <xpath value="@value|f:*|h:div"/>
        <source value="http://hl7.org/fhir/StructureDefinition/Element"/>
      </constraint>
      <isModifier value="false"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
  </snapshot>
  <differential>
    <element id="DocumentReference">
      <path value="DocumentReference"/>
      <short value="CH MHD DocumentReference Comprehensive"/>
      <constraint>
        <key value="ch-mhd"/>
        <severity value="error"/>
        <human
               value="The DocumentReference needs to conform to IHE.MHD.Comprehensive.DocumentReference"/>
        <expression
                    value="conformsTo('https://profiles.ihe.net/ITI/MHD/StructureDefinition/IHE.MHD.Comprehensive.DocumentReference')"/>
      </constraint>
    </element>
    <element id="DocumentReference.extension">
      <path value="DocumentReference.extension"/>
      <slicing>
        <discriminator>
          <type value="value"/>
          <path value="url"/>
        </discriminator>
        <rules value="open"/>
      </slicing>
      <min value="1"/>
      <mustSupport value="true"/>
    </element>
    <element id="DocumentReference.extension:deletionStatus">
      <path value="DocumentReference.extension"/>
      <sliceName value="deletionStatus"/>
      <short value="Deletion status of the document"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile
                 value="http://fhir.ch/ig/ch-epr-mhealth/StructureDefinition/ch-ext-deletionstatus"/>
      </type>
      <mustSupport value="true"/>
    </element>
    <element id="DocumentReference.extension:originalProviderRole">
      <path value="DocumentReference.extension"/>
      <sliceName value="originalProviderRole"/>
      <short
             value="Original ProviderRole: This extra metadata attribute SHALL be set by the Document Source actor to the role value of the current user and SHALL NOT be updated by Update Initiator or Document Administrator actors."/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile
                 value="http://fhir.ch/ig/ch-epr-mhealth/StructureDefinition/ch-ext-author-authorrole"/>
      </type>
      <mustSupport value="true"/>
    </element>
    <element id="DocumentReference.masterIdentifier">
      <path value="DocumentReference.masterIdentifier"/>
      <comment
               value="See ITI TF-2: Z.9.1.1 Identifier and CDA root plus extension."/>
      <min value="1"/>
      <type>
        <code value="Identifier"/>
        <profile
                 value="http://fhir.ch/ig/ch-epr-mhealth/StructureDefinition/OidIdentifier"/>
      </type>
      <mustSupport value="true"/>
    </element>
    <element id="DocumentReference.identifier">
      <path value="DocumentReference.identifier"/>
      <mustSupport value="true"/>
    </element>
    <element id="DocumentReference.status">
      <path value="DocumentReference.status"/>
      <short value="current | superseded"/>
      <comment
               value="approved -&gt; status=current, deprecated -&gt; status=superseded"/>
      <mustSupport value="true"/>
    </element>
    <element id="DocumentReference.docStatus">
      <path value="DocumentReference.docStatus"/>
      <comment
               value="These HL7 FHIR elements are not used in XDS, therefore would not be present. Document Consumers should be robust to these elements holding values."/>
      <max value="0"/>
    </element>
    <element id="DocumentReference.type">
      <path value="DocumentReference.type"/>
      <min value="1"/>
      <mustSupport value="true"/>
      <binding>
        <strength value="required"/>
      </binding>
    </element>
    <element id="DocumentReference.category">
      <path value="DocumentReference.category"/>
      <min value="1"/>
      <max value="1"/>
      <mustSupport value="true"/>
      <binding>
        <strength value="required"/>
      </binding>
    </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."/>
      <min value="1"/>
      <type>
        <code value="Reference"/>
        <targetProfile
                       value="http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-patient"/>
        <aggregation value="referenced"/>
      </type>
      <mustSupport value="true"/>
    </element>
    <element id="DocumentReference.date">
      <path value="DocumentReference.date"/>
      <min value="1"/>
      <mustSupport value="true"/>
    </element>
    <element id="DocumentReference.author">
      <path value="DocumentReference.author"/>
      <comment value="Contained resource."/>
      <type>
        <code value="Reference"/>
        <aggregation value="contained"/>
      </type>
      <mustSupport value="true"/>
    </element>
    <element id="DocumentReference.authenticator">
      <path value="DocumentReference.authenticator"/>
      <type>
        <code value="Reference"/>
        <aggregation value="contained"/>
      </type>
    </element>
    <element id="DocumentReference.custodian">
      <path value="DocumentReference.custodian"/>
      <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="true"/>
    </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."/>
      <min value="1"/>
      <mustSupport value="true"/>
      <binding>
        <strength value="required"/>
      </binding>
    </element>
    <element id="DocumentReference.content">
      <path value="DocumentReference.content"/>
      <max value="1"/>
    </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"/>
      <binding>
        <strength value="required"/>
        <valueSet
                  value="http://fhir.ch/ig/ch-epr-term/ValueSet/DocumentEntry.mimeType"/>
      </binding>
    </element>
    <element id="DocumentReference.content.attachment.language">
      <path value="DocumentReference.content.attachment.language"/>
      <min value="1"/>
      <mustSupport value="true"/>
      <binding>
        <strength value="required"/>
        <valueSet
                  value="http://fhir.ch/ig/ch-epr-term/ValueSet/DocumentEntry.languageCode"/>
      </binding>
    </element>
    <element id="DocumentReference.content.attachment.data">
      <path value="DocumentReference.content.attachment.data"/>
      <comment
               value="These HL7 FHIR elements are not used in XDS, therefore would not be present. Document Consumers should be robust to these elements holding values."/>
      <max value="0"/>
    </element>
    <element id="DocumentReference.content.attachment.url">
      <path value="DocumentReference.content.attachment.url"/>
      <min value="1"/>
      <max value="1"/>
      <mustSupport value="true"/>
    </element>
    <element id="DocumentReference.content.attachment.size">
      <path value="DocumentReference.content.attachment.size"/>
      <mustSupport value="true"/>
    </element>
    <element id="DocumentReference.content.attachment.hash">
      <path value="DocumentReference.content.attachment.hash"/>
      <mustSupport value="true"/>
    </element>
    <element id="DocumentReference.content.attachment.title">
      <path value="DocumentReference.content.attachment.title"/>
      <mustSupport value="true"/>
    </element>
    <element id="DocumentReference.content.attachment.creation">
      <path value="DocumentReference.content.attachment.creation"/>
      <min value="1"/>
      <mustSupport value="true"/>
    </element>
    <element id="DocumentReference.content.format">
      <path value="DocumentReference.content.format"/>
      <min value="1"/>
      <mustSupport value="true"/>
      <binding>
        <strength value="required"/>
        <description value="Document Format Codes."/>
        <valueSet
                  value="http://fhir.ch/ig/ch-epr-term/ValueSet/DocumentEntry.formatCode"/>
      </binding>
    </element>
    <element id="DocumentReference.context">
      <path value="DocumentReference.context"/>
      <min value="1"/>
    </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"/>
      <min value="1"/>
      <mustSupport value="true"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="DocumentC80FacilityType"/>
        </extension>
        <strength value="required"/>
        <description value="XDS Facility Type."/>
        <valueSet
                  value="http://fhir.ch/ig/ch-epr-term/ValueSet/DocumentEntry.healthcareFacilityTypeCode"/>
      </binding>
    </element>
    <element id="DocumentReference.context.practiceSetting">
      <path value="DocumentReference.context.practiceSetting"/>
      <min value="1"/>
      <mustSupport value="true"/>
      <binding>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="DocumentC80PracticeSetting"/>
        </extension>
        <strength value="required"/>
        <description
                     value="Additional details about where the content was created (e.g. clinical specialty)."/>
        <valueSet
                  value="http://fhir.ch/ig/ch-epr-term/ValueSet/DocumentEntry.practiceSettingCode"/>
      </binding>
    </element>
    <element id="DocumentReference.context.sourcePatientInfo">
      <path value="DocumentReference.context.sourcePatientInfo"/>
      <comment
               value="Contained Patient resource with Patient.identifier.use element set to ‘usual’.

Indicates that the data within the XDS document entry be represented as a contained resource. See Section 4.5.4.4.7"/>
      <min value="1"/>
      <type>
        <code value="Reference"/>
        <targetProfile
                       value="http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-patient"/>
        <aggregation value="contained"/>
      </type>
      <mustSupport value="true"/>
    </element>
    <element id="DocumentReference.context.related">
      <path value="DocumentReference.context.related"/>
      <comment
               value="May be filled with URL pointers to Resources or Identifiers found in referenceIdList"/>
      <mustSupport value="true"/>
    </element>
    <element id="DocumentReference.context.related.identifier">
      <path value="DocumentReference.context.related.identifier"/>
      <short
             value="Requirements on XDS-I.b (Swiss context): When a Imaging Document Source provides a document to the Document Repository, it must provide the StudyInstanceUID, found in the to be registered KOS object, in the referenceIdList (urn:ihe:iti:xds:2013:referenceIdList) attribute of the documentEntry metadata."/>
      <mustSupport value="true"/>
    </element>
  </differential>
</StructureDefinition>