<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="nfdi4health-pr-mds-document" />
  <url value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-document" />
  <version value="0.9" />
  <name value="NFDI4Health_PR_MDS_Document" />
  <title value="NFDI4Health PR MDS Document" />
  <status value="draft" />
  <publisher value="NFDI4Health" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="https://www.nfdi4health.de" />
    </telecom>
  </contact>
  <description value="Profile to collect information about documents related to german clinical, epidemiological or Public health studies." />
  <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="NFDI4Health" />
    <name value="NFDI4Health Document to FHIR Mapping" />
  </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.extension">
      <path value="DocumentReference.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="DocumentReference.extension:keywords">
      <path value="DocumentReference.extension" />
      <sliceName value="keywords" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Extension" />
        <profile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-keywords" />
      </type>
    </element>
    <element id="DocumentReference.extension:descriptions">
      <path value="DocumentReference.extension" />
      <sliceName value="descriptions" />
      <min value="1" />
      <max value="*" />
      <type>
        <code value="Extension" />
        <profile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-descriptions" />
      </type>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.descriptions" />
      </mapping>
    </element>
    <element id="DocumentReference.extension:useRights">
      <path value="DocumentReference.extension" />
      <sliceName value="useRights" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-document-use-rights" />
      </type>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.nonStudyDetails.useRights" />
      </mapping>
    </element>
    <element id="DocumentReference.extension:relatedResources">
      <path value="DocumentReference.extension" />
      <sliceName value="relatedResources" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-related" />
      </type>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.ids" />
      </mapping>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsNfdi4health" />
      </mapping>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.webpage" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier">
      <path value="DocumentReference.identifier" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="type" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <short value="Alternative identifiers" />
      <definition value="Group of items providing information about identifiers (IDs) assigned to the given resource by another registering systems, e.g. a register of clinical trials or a data repository." />
      <comment value="Short input help: If the [RESOURCE] is registered in other systems (e.g. a register of clinical trials or a data repository), you can provide corresponding identifier(s) here." />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier.type">
      <path value="DocumentReference.identifier.type" />
      <min value="1" />
      <binding>
        <strength value="required" />
        <valueSet value="https://www.nfdi4health.de/fhir/metadataschema/ValueSet/nfdi4health-vs-mds-id-type-nci-local" />
      </binding>
    </element>
    <element id="DocumentReference.identifier:DRKS">
      <path value="DocumentReference.identifier" />
      <sliceName value="DRKS" />
      <min value="0" />
      <max value="*" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:DRKS.type">
      <path value="DocumentReference.identifier.type" />
      <fixedCodeableConcept>
        <coding>
          <system value="https://www.nfdi4health.de/fhir/metadataschema/CodeSystem/nfdi4health-cs-remaining-concepts" />
          <code value="098" />
          <display value="DRKS" />
        </coding>
      </fixedCodeableConcept>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.scheme" />
        <comment value="Type = DRKS" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:DRKS.system">
      <path value="DocumentReference.identifier.system" />
      <definition value="Name of the system where the given resource is already registered. Fixed to DRKS." />
      <min value="1" />
      <fixedUri value="https://www.drks.de" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="esource.idsAlternative.scheme" />
        <comment value="Type = DRKS" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:DRKS.value">
      <path value="DocumentReference.identifier.value" />
      <definition value="Identifier (ID) assigned to the given resource by DRKS." />
      <min value="1" />
      <example>
        <label value="DRKS Identifier" />
        <valueString value="DRKS00021273" />
      </example>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.identifier" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:NCT">
      <path value="DocumentReference.identifier" />
      <sliceName value="NCT" />
      <min value="0" />
      <max value="*" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:NCT.type">
      <path value="DocumentReference.identifier.type" />
      <fixedCodeableConcept>
        <coding>
          <system value="http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl" />
          <code value="C172240" />
          <display value="Clinicaltrials.gov Identifier" />
        </coding>
      </fixedCodeableConcept>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.scheme" />
        <comment value="Type = NCT" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:NCT.system">
      <path value="DocumentReference.identifier.system" />
      <definition value="Name of the system where the given resource is already registered. Fixed to NCT (CT.gov)." />
      <min value="1" />
      <fixedUri value="https://www.clinicaltrials.gov/" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.scheme" />
        <comment value="Type = NCT" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:NCT.value">
      <path value="DocumentReference.identifier.value" />
      <definition value="Identifier (ID) assigned to the given resource by ClinicalTrials.gov." />
      <min value="1" />
      <example>
        <label value="NCT Identifier" />
        <valueString value="NCT04327505" />
      </example>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.identifier" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:ISRCTN">
      <path value="DocumentReference.identifier" />
      <sliceName value="ISRCTN" />
      <min value="0" />
      <max value="*" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:ISRCTN.type">
      <path value="DocumentReference.identifier.type" />
      <fixedCodeableConcept>
        <coding>
          <system value="https://www.nfdi4health.de/fhir/metadataschema/CodeSystem/nfdi4health-cs-remaining-concepts" />
          <code value="099" />
          <display value="ISRCTN" />
        </coding>
      </fixedCodeableConcept>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.scheme" />
        <comment value="Type = ISRCTN" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:ISRCTN.system">
      <path value="DocumentReference.identifier.system" />
      <definition value="Name of the system where the given resource is already registered. Fixed to ISRCTN." />
      <min value="1" />
      <fixedUri value="https://www.isrctn.com/" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.scheme" />
        <comment value="Type = ISRCTN" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:ISRCTN.value">
      <path value="DocumentReference.identifier.value" />
      <definition value="Identifier (ID) assigned to the given resource by ISRCTN." />
      <min value="1" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.identifier" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:EudraCT">
      <path value="DocumentReference.identifier" />
      <sliceName value="EudraCT" />
      <min value="0" />
      <max value="*" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:EudraCT.type">
      <path value="DocumentReference.identifier.type" />
      <fixedCodeableConcept>
        <coding>
          <system value="http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl" />
          <code value="C132782" />
          <display value="European Union Drug Regulating Authorities Clinical Trials Database" />
        </coding>
      </fixedCodeableConcept>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.scheme" />
        <comment value="Type = EudraCT" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:EudraCT.system">
      <path value="DocumentReference.identifier.system" />
      <definition value="Name of the system where the given resource is already registered. Fixed to EudraCT." />
      <min value="1" />
      <fixedUri value="https://eudract.ema.europa.eu/results-web/index.xhtml" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.scheme" />
        <comment value="Type = EudraCT" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:EudraCT.value">
      <path value="DocumentReference.identifier.value" />
      <min value="1" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.identifier" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:EUDAMED">
      <path value="DocumentReference.identifier" />
      <sliceName value="EUDAMED" />
      <min value="0" />
      <max value="*" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:EUDAMED.type">
      <path value="DocumentReference.identifier.type" />
      <fixedCodeableConcept>
        <coding>
          <system value="https://www.nfdi4health.de/fhir/metadataschema/CodeSystem/nfdi4health-cs-remaining-concepts" />
          <code value="100" />
          <display value="EUDAMED" />
        </coding>
      </fixedCodeableConcept>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.scheme" />
        <comment value="Type = EUDAMED" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:EUDAMED.system">
      <path value="DocumentReference.identifier.system" />
      <definition value="Name of the system where the given resource is already registered. Fixed to EUDAMED." />
      <min value="1" />
      <fixedUri value="https://ec.europa.eu/tools/eudamed/#/screen/home" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.scheme" />
        <comment value="Type = EUDAMED" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:EUDAMED.value">
      <path value="DocumentReference.identifier.value" />
      <definition value="Identifier (ID) assigned to the given resource by EUDAMED." />
      <min value="1" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.identifier" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:UTN">
      <path value="DocumentReference.identifier" />
      <sliceName value="UTN" />
      <min value="0" />
      <max value="*" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:UTN.type">
      <path value="DocumentReference.identifier.type" />
      <fixedCodeableConcept>
        <coding>
          <system value="https://www.nfdi4health.de/fhir/metadataschema/CodeSystem/nfdi4health-cs-remaining-concepts" />
          <code value="101" />
          <display value="UTN" />
        </coding>
      </fixedCodeableConcept>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.scheme" />
        <comment value="Type = UTN" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:UTN.system">
      <path value="DocumentReference.identifier.system" />
      <definition value="Name of the system where the given resource is already registered. Fixed to UTN (WHO)." />
      <min value="1" />
      <fixedUri value="https://trialsearch.who.int/utn.aspx" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.scheme" />
        <comment value="Type = UTN" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:UTN.value">
      <path value="DocumentReference.identifier.value" />
      <min value="1" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.identifier" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:KonsortSWD">
      <path value="DocumentReference.identifier" />
      <sliceName value="KonsortSWD" />
      <min value="0" />
      <max value="*" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:KonsortSWD.type">
      <path value="DocumentReference.identifier.type" />
      <fixedCodeableConcept>
        <coding>
          <system value="https://www.nfdi4health.de/fhir/metadataschema/CodeSystem/nfdi4health-cs-remaining-concepts" />
          <code value="102" />
          <display value="KonsortSWD" />
        </coding>
      </fixedCodeableConcept>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.scheme" />
        <comment value="Type = KonsortSWD" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:KonsortSWD.system">
      <path value="DocumentReference.identifier.system" />
      <definition value="Name of the system where the given resource is already registered. Fixed to KonsortSWD." />
      <min value="1" />
      <fixedUri value="https://www.konsortswd.de/" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.scheme" />
        <comment value="Type = KonsortSWD" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:KonsortSWD.value">
      <path value="DocumentReference.identifier.value" />
      <definition value="Identifier (ID) assigned to the given resource by KonsortSWD." />
      <min value="1" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.identifier" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:MDMPortal">
      <path value="DocumentReference.identifier" />
      <sliceName value="MDMPortal" />
      <min value="0" />
      <max value="*" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:MDMPortal.type">
      <path value="DocumentReference.identifier.type" />
      <fixedCodeableConcept>
        <coding>
          <system value="https://www.nfdi4health.de/fhir/metadataschema/CodeSystem/nfdi4health-cs-remaining-concepts" />
          <code value="103" />
          <display value="MDM Portal" />
        </coding>
      </fixedCodeableConcept>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.scheme" />
        <comment value="Type = MDM Portal" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:MDMPortal.system">
      <path value="DocumentReference.identifier.system" />
      <definition value="Name of the system where the given resource is already registered. Fixed to MDM Portal." />
      <min value="1" />
      <fixedUri value="https://www.mdm-portal.de/" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.scheme" />
        <comment value="Type = MDM Portal" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:MDMPortal.value">
      <path value="DocumentReference.identifier.value" />
      <definition value="Identifier (ID) assigned to the given resource by MDM Portal." />
      <min value="1" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.identifier" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:Other">
      <path value="DocumentReference.identifier" />
      <sliceName value="Other" />
      <short value="Identifier" />
      <definition value="Identifier (ID) assigned to the given resource by another registering system, e.g. by a register of clinical trials or a data repository." />
      <min value="0" />
      <max value="*" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:Other.type">
      <path value="DocumentReference.identifier.type" />
      <fixedCodeableConcept>
        <coding>
          <system value="http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl" />
          <code value="C17649" />
          <display value="Other" />
        </coding>
      </fixedCodeableConcept>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.scheme" />
        <comment value="Type = Other" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:Other.system">
      <path value="DocumentReference.identifier.system" />
      <definition value="Type/name of the system where the given resource is already registered." />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.scheme" />
        <comment value="Type = Other" />
      </mapping>
    </element>
    <element id="DocumentReference.identifier:Other.value">
      <path value="DocumentReference.identifier.value" />
      <definition value="Identifier (ID) assigned to the given resource by another registering system, e.g. by a register of clinical trials or a data repository." />
      <min value="1" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.identifier" />
      </mapping>
    </element>
    <element id="DocumentReference.content.extension">
      <path value="DocumentReference.content.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="DocumentReference.content.extension:version">
      <path value="DocumentReference.content.extension" />
      <sliceName value="version" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-version" />
      </type>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.nonStudyDetails.version" />
      </mapping>
    </element>
    <element id="DocumentReference.content.attachment.language">
      <path value="DocumentReference.content.attachment.language" />
      <short value="Languages" />
      <definition value="Language(s) in which the [RESOURCE] is conducted/provided." />
      <comment value="Select all that apply." />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.languages" />
      </mapping>
    </element>
    <element id="DocumentReference.content.format">
      <path value="DocumentReference.content.format" />
      <short value="Format" />
      <definition value="If applicable, the file format of the [RESOURCE] (e.g., XML, PDF, XLSX, etc.)." />
      <example>
        <label value="Example of a Document format" />
        <valueString value="XML" />
      </example>
      <example>
        <label value="Example of a Document format" />
        <valueString value="PDF" />
      </example>
      <example>
        <label value="Example of a Document format" />
        <valueString value="XLSX" />
      </example>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.nonStudyDetails.format" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>