<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="https://medico-emr.net/medico/r4/sd/DocumentReference_StandardDocument_1" />
  <name value="DocumentReference_StandardDocument_1" />
  <status value="draft" />
  <description value="A resource of this profile type represents a medico document - i.e. as it is stored/referenced by x1350dre/x1351dme.&#xD;&#xA;The references documents can be of many different format types. The most common ones are word, rtf, pdf, plain text, images as jpg or tiff." />
  <fhirVersion value="4.0.0" />
  <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>
  <kind value="resource" />
  <abstract value="false" />
  <type value="DocumentReference" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/DocumentReference" />
  <derivation value="constraint" />
  <differential>
    <element id="DocumentReference.id">
      <path value="DocumentReference.id" />
      <definition value="Format: StandardDocument-####&#xD;&#xA;where #### maps to x1350dre.dre" />
      <min value="1" />
    </element>
    <element id="DocumentReference.meta">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.meta" />
      <min value="1" />
    </element>
    <element id="DocumentReference.meta.id">
      <path value="DocumentReference.meta.id" />
      <max value="0" />
    </element>
    <element id="DocumentReference.meta.versionId">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.meta.versionId" />
      <max value="0" />
    </element>
    <element id="DocumentReference.meta.lastUpdated">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.meta.lastUpdated" />
      <definition value="When the resource last changed - e.g. when the version changed.&#xD;&#xA;maps to x1350dre.chd - or if not present to x1350dre.crd" />
      <min value="1" />
    </element>
    <element id="DocumentReference.meta.source">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.meta.source" />
      <max value="0" />
    </element>
    <element id="DocumentReference.meta.profile">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.meta.profile" />
      <min value="1" />
      <max value="1" />
      <fixedCanonical value="https://medico-emr.net/medico/r4/sd/DocumentReference_StandardDocument_1" />
    </element>
    <element id="DocumentReference.meta.security">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.meta.security" />
      <max value="0" />
    </element>
    <element id="DocumentReference.meta.tag">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.meta.tag" />
      <max value="0" />
    </element>
    <element id="DocumentReference.implicitRules">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.implicitRules" />
      <max value="0" />
    </element>
    <element id="DocumentReference.language">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.language" />
      <max value="0" />
    </element>
    <element id="DocumentReference.text">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.text" />
      <short value="maps to x1350dre.textr" />
      <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. &#xD;&#xA;medico: maps to x1350dre.textr - this field may contain text or not - dependant on that it is contained in the DocumentReference resource or not." />
    </element>
    <element id="DocumentReference.contained">
      <path value="DocumentReference.contained" />
      <max value="0" />
    </element>
    <element id="DocumentReference.extension">
      <path value="DocumentReference.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="DocumentReference.extension:authenticatedDate">
      <path value="DocumentReference.extension" />
      <sliceName value="authenticatedDate" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://medico-emr.net/medico/r4/sd/ext/DocumentReference_AuthenticatedDate" />
      </type>
    </element>
    <element id="DocumentReference.masterIdentifier">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.masterIdentifier" />
      <definition value="medico does currently not offer a reference to a versioned document from FHIR" />
      <max value="0" />
    </element>
    <element id="DocumentReference.identifier">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.identifier" />
      <slicing>
        <rules value="open" />
      </slicing>
      <min value="1" />
      <max value="1" />
    </element>
    <element id="DocumentReference.identifier:medicoResourceId">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.identifier" />
      <sliceName value="medicoResourceId" />
      <max value="1" />
      <type>
        <code value="Identifier" />
        <profile value="https://medico-emr.net/medico/r4/sd/Identifier_medicoResourceId_1" />
      </type>
    </element>
    <element id="DocumentReference.identifier:medicoResourceId.system">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.identifier.system" />
      <definition value="Resolves to https://medico-emr.net/medico/%KUNDE%/sid1/StandardDocument" />
    </element>
    <element id="DocumentReference.status">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.status" />
      <short value="current | entered-in-error" />
      <definition value="Since medico references can only point to the latest version of a document - it is either current or was cancalled (=entered-in-error)" />
    </element>
    <element id="DocumentReference.docStatus">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.docStatus" />
      <short value="preliminary | final | entered-in-error" />
      <definition value="medico documents are either draft (i.e. preliminary), released (i.e. final) or cancelled ( i.e. entered-in-error)" />
      <min value="1" />
    </element>
    <element id="DocumentReference.type">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.type" />
      <definition value="content-wise refers to x1350dre.doctyp (which can be found in conding.code)" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
        <profile value="https://medico-emr.net/medico/r4/sd/CodeableConcept_CustomerDefined_1" />
      </type>
    </element>
    <element id="DocumentReference.type.coding.system">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.type.coding.system" />
      <definition value="https://medico-emr.net/medico/%KUNDE%/cs/* is a virtual customer specific Code System that does not exist as a single download.&#xD;&#xA;Binding to real values are established through .code's Valueset binding" />
      <comment value="Dynamically resolved for validation&#xD;&#xA;--FixedValue=https://medico-emr.net/medico/%KUNDE%/cs/DocumentType" />
    </element>
    <element id="DocumentReference.type.coding.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="DocumentReference.type.coding.display" />
      <definition value="retrieves a human-readable name for the document type&#xD;&#xA;maps to x9205dty.des" />
      <min value="1" />
    </element>
    <element id="DocumentReference.type.text">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="DocumentReference.type.text" />
      <max value="0" />
    </element>
    <element id="DocumentReference.category">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.category" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="coding.system" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="DocumentReference.category:classtype1">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.category" />
      <sliceName value="classtype1" />
      <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.&#xD;&#xA;this slice maps to x1350dre.classtype1. If this field is empty, the slice is omitted" />
      <max value="1" />
    </element>
    <element id="DocumentReference.category:classtype1.id">
      <path value="DocumentReference.category.id" />
      <max value="0" />
    </element>
    <element id="DocumentReference.category:classtype1.coding">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.category.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="DocumentReference.category:classtype1.coding.id">
      <path value="DocumentReference.category.coding.id" />
      <max value="0" />
    </element>
    <element id="DocumentReference.category:classtype1.coding.system">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.category.coding.system" />
      <comment value="Dynamically resolved for validation&#xD;&#xA;--FixedValue=https://medico-emr.net/medico/%KUNDE%/sid1/classtype1" />
      <min value="1" />
    </element>
    <element id="DocumentReference.category:classtype1.coding.version">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.category.coding.version" />
      <max value="0" />
    </element>
    <element id="DocumentReference.category:classtype1.coding.code">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.category.coding.code" />
      <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).&#xD;&#xA;maps to x1350dre.classtype1" />
      <min value="1" />
    </element>
    <element id="DocumentReference.category:classtype1.coding.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="DocumentReference.category.coding.display" />
      <max value="0" />
    </element>
    <element id="DocumentReference.category:classtype1.coding.userSelected">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.category.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="DocumentReference.category:classtype1.text">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="DocumentReference.category.text" />
      <max value="0" />
    </element>
    <element id="DocumentReference.category:classtype2">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.category" />
      <sliceName value="classtype2" />
      <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.&#xD;&#xA;this slice maps to x1350dre.classtype1. If this field is empty, the slice is omitted" />
      <max value="1" />
    </element>
    <element id="DocumentReference.category:classtype2.id">
      <path value="DocumentReference.category.id" />
      <max value="0" />
    </element>
    <element id="DocumentReference.category:classtype2.coding">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.category.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="DocumentReference.category:classtype2.coding.id">
      <path value="DocumentReference.category.coding.id" />
      <max value="0" />
    </element>
    <element id="DocumentReference.category:classtype2.coding.system">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.category.coding.system" />
      <comment value="Dynamically resolved for validation&#xD;&#xA;--FixedValue=https://medico-emr.net/medico/%KUNDE%/sid1/classtype2" />
      <min value="1" />
    </element>
    <element id="DocumentReference.category:classtype2.coding.version">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.category.coding.version" />
      <max value="0" />
    </element>
    <element id="DocumentReference.category:classtype2.coding.code">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.category.coding.code" />
      <definition value="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).&#xD;&#xA;maps to x1350dre.classtype2" />
      <min value="1" />
    </element>
    <element id="DocumentReference.category:classtype2.coding.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="DocumentReference.category.coding.display" />
      <max value="0" />
    </element>
    <element id="DocumentReference.category:classtype2.coding.userSelected">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.category.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="DocumentReference.category:classtype2.text">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="DocumentReference.category.text" />
      <max value="0" />
    </element>
    <element id="DocumentReference.category:classtype3">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.category" />
      <sliceName value="classtype3" />
      <max value="1" />
    </element>
    <element id="DocumentReference.category:classtype3.id">
      <path value="DocumentReference.category.id" />
      <max value="0" />
    </element>
    <element id="DocumentReference.category:classtype3.coding">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.category.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="DocumentReference.category:classtype3.coding.id">
      <path value="DocumentReference.category.coding.id" />
      <max value="0" />
    </element>
    <element id="DocumentReference.category:classtype3.coding.system">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.category.coding.system" />
      <comment value="Dynamically resolved for validation&#xD;&#xA;--FixedValue=https://medico-emr.net/medico/%KUNDE%/sid1/classtype3" />
      <min value="1" />
    </element>
    <element id="DocumentReference.category:classtype3.coding.version">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.category.coding.version" />
      <max value="0" />
    </element>
    <element id="DocumentReference.category:classtype3.coding.code">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.category.coding.code" />
      <min value="1" />
    </element>
    <element id="DocumentReference.category:classtype3.coding.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="DocumentReference.category.coding.display" />
      <max value="0" />
    </element>
    <element id="DocumentReference.category:classtype3.coding.userSelected">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.category.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="DocumentReference.category:classtype3.text">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="DocumentReference.category.text" />
      <max value="0" />
    </element>
    <element id="DocumentReference.subject">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.subject" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <profile value="https://medico-emr.net/medico/r4/sd/Reference_SubjectPatient_1" />
        <targetProfile value="https://medico-emr.net/medico/r4/sd/Patient_Patient_1" />
        <aggregation value="referenced" />
      </type>
    </element>
    <element id="DocumentReference.date">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.date" />
      <label value="Document creation time (x1350dre.crd)" />
      <min value="1" />
    </element>
    <element id="DocumentReference.author">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.author" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="type" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="2" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://medico-emr.net/medico/r4/sd/Practitioner_User_1" />
        <targetProfile value="https://medico-emr.net/medico/r4/sd/Organization_Department_1" />
      </type>
    </element>
    <element id="DocumentReference.author:sliceCreatingUser">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.author" />
      <sliceName value="sliceCreatingUser" />
      <definition value="Identifies who is responsible for adding the information to the document.&#xD;&#xA;medico: maps to x1350dre.cruser" />
      <type>
        <code value="Reference" />
        <profile value="https://medico-emr.net/medico/r4/sd/Reference_User_1" />
        <targetProfile value="https://medico-emr.net/medico/r4/sd/Practitioner_User_1" />
        <aggregation value="referenced" />
      </type>
    </element>
    <element id="DocumentReference.author:sliceCreatingDepartment">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.author" />
      <sliceName value="sliceCreatingDepartment" />
      <definition value="Identifies who is responsible for adding the information to the document.&#xD;&#xA;medico: maps to x1350dre.dep" />
      <type>
        <code value="Reference" />
        <profile value="https://medico-emr.net/medico/sd/r4/Reference_Department_1" />
        <targetProfile value="https://medico-emr.net/medico/r4/sd/Organization_Department_1" />
        <aggregation value="referenced" />
      </type>
    </element>
    <element id="DocumentReference.authenticator">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.authenticator" />
      <label value="User releasing document" />
      <definition value="Which person or organization authenticates that this document is valid.&#xD;&#xA;medico: represents the medico user who released the document (freeuser)" />
      <type>
        <code value="Reference" />
        <profile value="https://medico-emr.net/medico/r4/sd/Reference_User_1" />
        <targetProfile value="https://medico-emr.net/medico/r4/sd/Practitioner_User_1" />
        <aggregation value="referenced" />
      </type>
    </element>
    <element id="DocumentReference.custodian">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.custodian" />
      <max value="0" />
    </element>
    <element id="DocumentReference.relatesTo">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.relatesTo" />
      <definition value="Relationships that this document has with other document references that already exist.&#xD;&#xA;medico: present only, if x1350dre.maindre (main document is provided)" />
      <max value="1" />
    </element>
    <element id="DocumentReference.relatesTo.id">
      <path value="DocumentReference.relatesTo.id" />
      <max value="0" />
    </element>
    <element id="DocumentReference.relatesTo.code">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.relatesTo.code" />
      <fixedCode value="appends" />
    </element>
    <element id="DocumentReference.relatesTo.target">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.relatesTo.target" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://medico-emr.net/medico/r4/sd/DocumentReference_StandardDocument_1" />
      </type>
    </element>
    <element id="DocumentReference.relatesTo.target.id">
      <path value="DocumentReference.relatesTo.target.id" />
      <max value="0" />
    </element>
    <element id="DocumentReference.relatesTo.target.reference">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.relatesTo.target.reference" />
      <min value="1" />
    </element>
    <element id="DocumentReference.relatesTo.target.type">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.relatesTo.target.type" />
      <max value="0" />
    </element>
    <element id="DocumentReference.relatesTo.target.identifier">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.relatesTo.target.identifier" />
      <max value="0" />
    </element>
    <element id="DocumentReference.relatesTo.target.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="DocumentReference.relatesTo.target.display" />
      <max value="0" />
    </element>
    <element id="DocumentReference.description">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.description" />
      <definition value="Human-readable description of the source document.&#xD;&#xA;medico: maps to x1350dre.info" />
    </element>
    <element id="DocumentReference.securityLabel">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.securityLabel" />
      <max value="0" />
    </element>
    <element id="DocumentReference.content">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.content" />
      <definition value="The document and format referenced. &#xD;&#xA;Each document is often readable in different format / MimeTypes" />
    </element>
    <element id="DocumentReference.content.id">
      <path value="DocumentReference.content.id" />
      <max value="0" />
    </element>
    <element id="DocumentReference.content.attachment.id">
      <path value="DocumentReference.content.attachment.id" />
      <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.&#xD;&#xA;medico: id of document characteristic x1351dme.dme" />
    </element>
    <element id="DocumentReference.content.attachment.contentType">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.content.attachment.contentType" />
      <label value="MimeType of document" />
      <definition value="medico" />
      <min value="1" />
    </element>
    <element id="DocumentReference.content.attachment.language">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.content.attachment.language" />
      <max value="0" />
    </element>
    <element id="DocumentReference.content.attachment.data">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.content.attachment.data" />
      <definition value="The actual data of the attachment - a sequence of bytes, base64 encoded.&#xD;&#xA;data is only present if the documentreference is retrieved via GetDocumentAttachement operation, or if the DocumentReference is sent for upate/create" />
    </element>
    <element id="DocumentReference.content.attachment.url">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.content.attachment.url" />
      <definition value="The url points to the fhir server itself - though it will not not be read through FHIR mechanisms&#xD;&#xA;Use the same JSON webtoken for access when 'GET'ting the document" />
      <min value="1" />
    </element>
    <element id="DocumentReference.content.attachment.size">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.content.attachment.size" />
      <max value="0" />
    </element>
    <element id="DocumentReference.content.attachment.hash">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.content.attachment.hash" />
      <max value="0" />
    </element>
    <element id="DocumentReference.content.attachment.title">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="DocumentReference.content.attachment.title" />
      <max value="0" />
    </element>
    <element id="DocumentReference.content.attachment.creation">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.content.attachment.creation" />
      <max value="0" />
    </element>
    <element id="DocumentReference.content.format">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.content.format" />
      <max value="0" />
    </element>
    <element id="DocumentReference.context">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.context" />
      <min value="1" />
    </element>
    <element id="DocumentReference.context.id">
      <path value="DocumentReference.context.id" />
      <max value="0" />
    </element>
    <element id="DocumentReference.context.encounter">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.context.encounter" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <profile value="https://medico-emr.net/medico/r4/sd/Reference_ContextEncounter_1" />
        <targetProfile value="https://medico-emr.net/medico/r4/sd/Encounter_Case_1" />
        <aggregation value="referenced" />
      </type>
    </element>
    <element id="DocumentReference.context.event">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.context.event" />
      <max value="0" />
    </element>
    <element id="DocumentReference.context.period">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.context.period" />
      <max value="0" />
    </element>
    <element id="DocumentReference.context.facilityType">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.context.facilityType" />
      <max value="0" />
    </element>
    <element id="DocumentReference.context.practiceSetting">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.context.practiceSetting" />
      <max value="0" />
    </element>
    <element id="DocumentReference.context.sourcePatientInfo">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.context.sourcePatientInfo" />
      <max value="0" />
    </element>
    <element id="DocumentReference.context.related">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="DocumentReference.context.related" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>