<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="nfdi4health-pr-mds-study" />
  <url value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
  <version value="0.9" />
  <name value="NFDI4Health_PR_MDS_Study" />
  <title value="NFDI4Health PR MDS Study" />
  <status value="draft" />
  <publisher value="NFDI4Health" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="https://www.nfdi4health.de" />
    </telecom>
  </contact>
  <description value="Group of items applicable only to studies, substudies." />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="BRIDG5.1" />
    <uri value="https://bridgmodel.nci.nih.gov" />
    <name value="BRIDG 5.1 Mapping" />
  </mapping>
  <mapping>
    <identity value="v2" />
    <uri value="http://hl7.org/v2" />
    <name value="HL7 v2 Mapping" />
  </mapping>
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="clinicaltrials-gov" />
    <uri value="http://clinicaltrials.gov" />
    <name value="ClinicalTrials.gov Mapping" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/fivews" />
    <name value="FiveWs Pattern Mapping" />
  </mapping>
  <mapping>
    <identity value="NFDI4Health" />
    <name value="NFDI4Health to FHIR Mapping" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="ResearchStudy" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/ResearchStudy" />
  <derivation value="constraint" />
  <differential>
    <element id="ResearchStudy">
      <path value="ResearchStudy" />
      <constraint>
        <key value="category-interventional-a" />
        <severity value="error" />
        <human value="Cardinality: 1..*, if Design.primaryDesign == 'C98388'" />
        <expression value="category.coding.where(code = 'C98388').exists() implies category.extension.extension.where(url='interventional').exists()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="category-interventional-b" />
        <severity value="error" />
        <human value="Cardinality: 0..0, if Design.primaryDesign != 'C98388'" />
        <expression value="category.coding.where(code = 'C98388').exists().not() implies category.extension.extension.where(url='interventional').exists().not()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="category-nonInterventional-a" />
        <severity value="error" />
        <human value="Cardinality: 1..*, if Design.primaryDesign == 'C142615''" />
        <expression value="category.coding.where(code = 'C142615').exists() implies category.extension.extension.where(url='nonInterventional').exists()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="category-nonInterventional-b" />
        <severity value="error" />
        <human value="Cardinality: 0..0, if Design.primaryDesign != 'C142615'" />
        <expression value="category.coding.where(code = 'C142615').exists().not() implies category.extension.extension.where(url='nonInterventional').exists().not()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="study-mortalityData-a" />
        <severity value="error" />
        <human value="Cardinality: 0..1, if Design.studyType.nonInterventional == ('C15273' OR 'C15208' OR '004' OR 'D015331' OR '005' OR 'C53311'))" />
        <expression value="category.extension.extension.where(url='nonInterventional').valueCoding.where(code = 'C15273' or code = 'C15208' or code =  '004' or code =  'D015331' or code =  '005' or code =  'C53311').exists() implies extension.where(url='https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-mortality-data').exists()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="study-mortalityData-b" />
        <severity value="error" />
        <human value="Cardinality: 0..0, if Design.studyType.nonInterventional != ('C15273' OR 'C15208' OR '004' OR 'D015331' OR '005' OR 'C53311'))" />
        <expression value="category.extension.extension.where(url='nonInterventional').valueCoding.where(code = 'C15273' or code = 'C15208' or code = '004' or 'D015331' or code = '005' or code = 'C53311').exists().not() implies extension.where(url='https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-mortality-data').exists().not()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="study-statusWhenIntervention-a" />
        <severity value="error" />
        <human value="Cardinality: 0..1, if Design.primaryDesign == 'C98388'" />
        <expression value="category.coding.where(code = 'C98388').exists() implies extension.extension.where(url='statusWhenIntervention').exists()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="study-statusWhenIntervention-b" />
        <severity value="error" />
        <human value="Cardinality: 0..1, if Design.administrativeInformation.status == ('01' OR '02' OR '03' OR '04' OR '05')" />
        <expression value="extension.extension.where(url='status').valueCoding.where(code = '01' or code = '02' or code =  '03' or code = '04' or code = '05').exists() implies extension.extension.where(url='statusWhenIntervention').exists().not()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="study-statusWhenIntervention-c" />
        <severity value="error" />
        <human value="Cardinality: 0..0, if Design.primaryDesign != 'C98388'" />
        <expression value="category.coding.where(code = 'C98388').exists().not() implies extension.extension.where(url='statusWhenIntervention').exists().not()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="study-statusWhenIntervention-d" />
        <severity value="error" />
        <human value="Cardinality: 0..0, if Design.administrativeInformation.status != ('01' OR '02' OR '03' OR '04' OR '05')" />
        <expression value="extension.extension.where(url='status').valueCoding.where(code = '01' or code = '02' or code =  '03' or code = '04' or code = '05').exists().not() implies extension.extension.where(url='statusWhenIntervention').exists().not()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="study-recruitmentStatusRegister-a" />
        <severity value="error" />
        <human value="Cardinality: 0..1, if Resource.provenance.dataSource != '06'" />
        <expression value="Composition.extension.where(url='https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-provenance-data-source').valueCoding.where(code='06').exists().not() implies extension.extension.where(url='recruitmentStatusRegister').exists()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="study-recruitmentStatusRegister-b" />
        <severity value="error" />
        <human value="Cardinality: 0..0, if Resource.provenance.dataSource == '06'" />
        <expression value="Composition.extension.where(url='https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-provenance-data-source').valueCoding.where(code='06').exists() implies extension.extension.where(url='recruitmentStatusRegister').exists().not()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="probabilityMethod-a" />
        <severity value="error" />
        <human value="0..1, if Design.sampling.method == '034'" />
        <expression value="extension.extension.where(url='method').valueCoding.where(code = '034').exists() implies extension.extension.where(url='probabilityMethod').exists()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="probabilityMethod-b" />
        <severity value="error" />
        <human value="0..0, if Design.sampling.method != '034'" />
        <expression value="extension.extension.where(url='method').valueCoding.where(code = '034').exists().not() implies extension.extension.where(url='probabilityMethod').exists().not()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="nonProbabilityMethod-a" />
        <severity value="error" />
        <human value="0..1, if Design.sampling.method == 'C127781'" />
        <expression value="extension.extension.where(url='method').valueCoding.where(code = 'C127781').exists() implies extension.extension.where(url='nonProbabilityMethod').exists()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="nonProbabilityMethod-b" />
        <severity value="error" />
        <human value="0..0, if Design.sampling.method != 'C127781'" />
        <expression value="extension.extension.where(url='method').valueCoding.where(code = 'C127781').exists().not() implies extension.extension.where(url='nonProbabilityMethod').exists().not()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="biosamples-a" />
        <severity value="error" />
        <human value="0..*, if Design.dataSource.general == 'C70699'" />
        <expression value="extension.extension.where(url='general').valueCoding.where(code = 'C70699').exists() implies extension.extension.where(url='biosamples').exists()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="biosamples-b" />
        <severity value="error" />
        <human value="0..0, if Design.dataSource.general != 'C70699'" />
        <expression value="extension.extension.where(url='general').valueCoding.where(code = 'C70699').exists().not() implies extension.extension.where(url='biosamples').exists().not()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="imaging-a" />
        <severity value="error" />
        <human value="0..*, if Design.dataSource.general == '031'" />
        <expression value="extension.extension.where(url='general').valueCoding.where(code = '031').exists() implies extension.where(url='https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-radiomics').exists()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="imaging-b" />
        <severity value="error" />
        <human value="0..0, if Design.dataSource.general != '031'" />
        <expression value="extension.extension.where(url='general').valueCoding.where(code = '031').exists().not() implies extension.where(url='https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-radiomics').exists().not()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="omics-a" />
        <severity value="error" />
        <human value="0..*, if Design.dataSource.general == '033'" />
        <expression value="extension.extension.where(url='general').valueCoding.where(code = '033').exists() implies extension.extension.where(url='omics').exists()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="omics-b" />
        <severity value="error" />
        <human value="0..0, if Design.dataSource.general != '033'" />
        <expression value="extension.extension.where(url='general').valueCoding.where(code = '033').exists().not() implies extension.extension.where(url='omics').exists().not()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="supportingInformation-a" />
        <severity value="error" />
        <human value="Cardinality: 0..*, if Design.dataSharingPlan.generally == '373066001'" />
        <expression value="extension.extension.where(url='generally').valueCoding.where(code = '373066001').exists() implies extension.extension.where(url='supportingInformation').exists()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="supportingInformation-b" />
        <severity value="error" />
        <human value="Cardinality: 0..0, if Design.dataSharingPlan.generally != '373066001'" />
        <expression value="extension.extension.where(url='generally').valueCoding.where(code = '373066001').exists().not() implies extension.extension.where(url='supportingInformation').exists().not()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="timeFrame-a" />
        <severity value="error" />
        <human value="Cardinality: 0..*, if Design.dataSharingPlan.generally == '373066001'" />
        <expression value="extension.extension.where(url='generally').valueCoding.where(code = '373066001').exists() implies extension.extension.where(url='timeFrame').exists()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="timeFrame-b" />
        <severity value="error" />
        <human value="Cardinality: 0..0, if Design.dataSharingPlan.generally != '373066001'" />
        <expression value="extension.extension.where(url='generally').valueCoding.where(code = '373066001').exists().not() implies extension.extension.where(url='timeFrame').exists().not()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="accessCriteria-a" />
        <severity value="error" />
        <human value="Cardinality: 0..*, if Design.dataSharingPlan.generally == '373066001'" />
        <expression value="extension.extension.where(url='generally').valueCoding.where(code = '373066001').exists() implies extension.extension.where(url='accessCriteria').exists()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="accessCriteria-b" />
        <severity value="error" />
        <human value="Cardinality: 0..0, if Design.dataSharingPlan.generally != '373066001'" />
        <expression value="extension.extension.where(url='generally').valueCoding.where(code = '373066001').exists().not() implies extension.extension.where(url='accessCriteria').exists().not()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="masking-roles-a" />
        <severity value="error" />
        <human value="Cardinality: 0..*, if Design.interventional.masking.general == true" />
        <expression value="extension.extension.extension.where(url='general').where(value=true).exists() implies extension.extension.extension.where(url='roles').exists()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="masking-roles-b" />
        <severity value="error" />
        <human value="Cardinality: 0..*, if Design.interventional.masking.general == false" />
        <expression value="extension.extension.extension.where(url='general').where(value=true).exists().not() implies extension.extension.extension.where(url='roles').exists().not()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="masking-description-a" />
        <severity value="error" />
        <human value="Cardinality: 0..*, if Design.interventional.masking.general == true" />
        <expression value="extension.extension.extension.where(url='general').where(value=true).exists() implies extension.extension.extension.where(url='description').exists()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="masking-description-b" />
        <severity value="error" />
        <human value="Cardinality: 0..*, if Design.interventional.masking.general == false" />
        <expression value="extension.extension.extension.where(url='general').where(value=true).exists().not() implies extension.extension.extension.where(url='description').exists().not()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="interventional-a" />
        <severity value="error" />
        <human value="Cardinality: 0..1, Design.primaryDesign == 'Interventional'" />
        <expression value="category.coding.where(code = 'C98388').exists() implies extension.where(url='https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-study-interventional').exists()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="interventional-b" />
        <severity value="error" />
        <human value="Cardinality: 0..0, Design.primaryDesign != 'Interventional'" />
        <expression value="category.coding.where(code = 'C98388').exists().not() implies extension.where(url='https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-study-interventional').exists().not()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="nonInterventional-a" />
        <severity value="error" />
        <human value="Cardinality: 0..1, Design.primaryDesign == 'Non-interventional'" />
        <expression value="category.coding.where(code = 'C142615').exists() implies extension.where(url='https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-study-non-interventional').exists()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="nonInterventional-b" />
        <severity value="error" />
        <human value="Cardinality: 0..0, Design.primaryDesign != 'Non-interventional'" />
        <expression value="category.coding.where(code = 'C142615').exists().not() implies extension.where(url='https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-study-non-interventional').exists().not()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="study-stageStopped-a" />
        <severity value="error" />
        <human value="Cardinality: 0..1, if Design.administrativeInformation.status == ('06' OR '07')" />
        <expression value="extension.extension.where(url='status').valueCoding.where(code = '06' or code = '07').exists() implies reasonStopped.coding.exists()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="study-stageStopped-b" />
        <severity value="error" />
        <human value="Cardinality: 0..0, if Design.administrativeInformation.status != ('06' OR '07')" />
        <expression value="extension.extension.where(url='status').valueCoding.where(code = '06' or code = '07').exists().not() implies reasonStopped.coding.exists().not()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="study-reasonStopped-a" />
        <severity value="error" />
        <human value="Cardinality: 0..1, if Design.administrativeInformation.status == ('06' OR '07')" />
        <expression value="extension.extension.where(url='status').valueCoding.where(code = '06' or code = '07').exists() implies reasonStopped.text.exists()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="study-reasonStopped-b" />
        <severity value="error" />
        <human value="Cardinality: 0..0, if Design.administrativeInformation.status != ('06' OR '07')" />
        <expression value="extension.extension.where(url='status').valueCoding.where(code = '06' or code = '07').exists().not() implies reasonStopped.text.exists().not()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="recordLinkage-a" />
        <severity value="error" />
        <human value="Cardinality: 1..1, if Design.dataSharingPlan.recordLinkage == 'Yes'" />
        <expression value="extension.extension.where(url='recordLinkage').where(value=true).exists()  implies extension.where(url='https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-record-linkage').exists()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="recordLinkage-b" />
        <severity value="error" />
        <human value="Cardinality: 0..0, if Design.dataSharingPlan.recordLinkage == 'No'" />
        <expression value="extension.extension.where(url='recordLinkage').where(value=false).exists() implies extension.where(url='https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-record-linkage').exists().not()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="legalBasisDetails-a" />
        <severity value="error" />
        <human value="Cardinality: 1..1, if RecordLinkage.legalBasis == 'True'" />
        <expression value="extension.extension.where(url='legalBasis').where(value=true).exists() implies extension.extension.where(url='legalBasisDetails').exists()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <constraint>
        <key value="legalBasisDetails-b" />
        <severity value="error" />
        <human value="Cardinality: 0..0, if RecordLinkage.legalBasis == 'False'" />
        <expression value="extension.extension.where(url='legalBasis').where(value=false).exists() implies extension.extension.where(url='legalBasisDetails').exists().not()" />
        <source value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-study" />
      </constraint>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Design" />
      </mapping>
    </element>
    <element id="ResearchStudy.extension">
      <path value="ResearchStudy.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
      <min value="5" />
    </element>
    <element id="ResearchStudy.extension:descriptions">
      <path value="ResearchStudy.extension" />
      <sliceName value="descriptions" />
      <min value="1" />
      <max value="1" />
      <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="ResearchStudy.extension:mortalityData">
      <path value="ResearchStudy.extension" />
      <sliceName value="mortalityData" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-mortality-data" />
      </type>
    </element>
    <element id="ResearchStudy.extension:administrativeInformation">
      <path value="ResearchStudy.extension" />
      <sliceName value="administrativeInformation" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-study-admin-info" />
      </type>
    </element>
    <element id="ResearchStudy.extension:subject">
      <path value="ResearchStudy.extension" />
      <sliceName value="subject" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-subject" />
      </type>
    </element>
    <element id="ResearchStudy.extension:dataSource">
      <path value="ResearchStudy.extension" />
      <sliceName value="dataSource" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-data-source" />
      </type>
    </element>
    <element id="ResearchStudy.extension:recruitment">
      <path value="ResearchStudy.extension" />
      <sliceName value="recruitment" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-recruitment-backport-r5" />
      </type>
    </element>
    <element id="ResearchStudy.extension:comparisonGroup">
      <path value="ResearchStudy.extension" />
      <sliceName value="comparisonGroup" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Extension" />
        <profile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-study-comparison-group-backport-r5" />
      </type>
    </element>
    <element id="ResearchStudy.extension:outcomes">
      <path value="ResearchStudy.extension" />
      <sliceName value="outcomes" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Extension" />
        <profile value="https://www.nfdi4health.de/fhir/StructureDefinition/nfdi4health-ex-mds-outcomemeasure-backport-r5" />
      </type>
    </element>
    <element id="ResearchStudy.extension:assessments">
      <path value="ResearchStudy.extension" />
      <sliceName value="assessments" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Extension" />
        <profile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-assessments" />
      </type>
    </element>
    <element id="ResearchStudy.extension:dataSharingPlan">
      <path value="ResearchStudy.extension" />
      <sliceName value="dataSharingPlan" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-data-sharing-plan" />
      </type>
    </element>
    <element id="ResearchStudy.extension:nonInterventional">
      <path value="ResearchStudy.extension" />
      <sliceName value="nonInterventional" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-study-non-interventional" />
      </type>
    </element>
    <element id="ResearchStudy.extension:interventional">
      <path value="ResearchStudy.extension" />
      <sliceName value="interventional" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-study-interventional" />
      </type>
    </element>
    <element id="ResearchStudy.extension:groupsOfDiseases">
      <path value="ResearchStudy.extension" />
      <sliceName value="groupsOfDiseases" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-groups-of-diseases" />
      </type>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Design.groupsOfDiseases" />
      </mapping>
    </element>
    <element id="ResearchStudy.extension:sampling">
      <path value="ResearchStudy.extension" />
      <sliceName value="sampling" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-sampling" />
      </type>
    </element>
    <element id="ResearchStudy.extension:recordLinkage">
      <path value="ResearchStudy.extension" />
      <sliceName value="recordLinkage" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-record-linkage" />
      </type>
    </element>
    <element id="ResearchStudy.extension:imaging">
      <path value="ResearchStudy.extension" />
      <sliceName value="imaging" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-imaging" />
      </type>
    </element>
    <element id="ResearchStudy.identifier">
      <path value="ResearchStudy.identifier" />
      <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 registry of clinical trials or a data repository." />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative" />
      </mapping>
    </element>
    <element id="ResearchStudy.identifier.type">
      <path value="ResearchStudy.identifier.type" />
      <short value="Type of the registry" />
      <definition value="Type/name of the system where the given [RESOURCE] is already registered." />
      <min value="1" />
      <binding>
        <strength value="required" />
        <description value="Value set defining codes to specify the type of a resource identifier." />
        <valueSet value="https://www.nfdi4health.de/fhir/metadataschema/ValueSet/nfdi4health-vs-mds-id-type-nci-local" />
      </binding>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.idsAlternative.scheme" />
      </mapping>
    </element>
    <element id="ResearchStudy.identifier.value">
      <path value="ResearchStudy.identifier.value" />
      <definition value="Identifier" />
      <min value="1" />
      <example>
        <label value="Identifier (ID) assigned to the given [RESOURCE] by another registering system, e.g. by a registry of clinical trials or a data repository." />
        <valueString value="ISRCTN91495258" />
      </example>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="esource.idsAlternative.identifier" />
      </mapping>
    </element>
    <element id="ResearchStudy.status">
      <path value="ResearchStudy.status" />
      <comment value="The item does not exist in NFDI4Health' MDS. Fixed to 'active' for all studies." />
      <fixedCode value="active" />
    </element>
    <element id="ResearchStudy.primaryPurposeType">
      <path value="ResearchStudy.primaryPurposeType" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Design.primaryPurpose" />
      </mapping>
    </element>
    <element id="ResearchStudy.primaryPurposeType.coding">
      <path value="ResearchStudy.primaryPurposeType.coding" />
      <short value="Primary purpose of the [RESOURCE]" />
      <definition value="Specification of the main purpose of the [RESOURCE]." />
      <comment value="Additional Information: The field is defined foremost for interventional studies. For non-interventional studies, this field may not be applicable as diverse purposes may be pursued without being able to specify a primary one. In this case, the option 'Not applicable' can be selected. | Short Input Help: Foremost for interventional studies, please specify the primary purpose why the [RESOURCE] was conducted. For non-interventional studies, this field may be 'Not applicable' as multiple purposes may be defined as primary ones." />
      <binding>
        <strength value="required" />
        <description value="Value set defining codes to specify the primary purpose of a (sub-)study in a ResearchStudy resource." />
        <valueSet value="https://www.nfdi4health.de/fhir/metadataschema/ValueSet/nfdi4health-vs-mds-study-primary-purpose-hl7-nci" />
      </binding>
    </element>
    <element id="ResearchStudy.phase">
      <path value="ResearchStudy.phase" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Design.interventional.phase" />
      </mapping>
    </element>
    <element id="ResearchStudy.phase.coding">
      <path value="ResearchStudy.phase.coding" />
      <short value="Numerical phase" />
      <definition value="If applicable, numerical phase of the [RESOURCE]." />
      <comment value="Short input help: Select one value from the list." />
      <binding>
        <strength value="required" />
        <description value="Value set defining codes to specify the phase of a (sub-)study in a ResearchStudy resource." />
        <valueSet value="https://www.nfdi4health.de/fhir/metadataschema/ValueSet/nfdi4health-vs-mds-study-phase-nci" />
      </binding>
    </element>
    <element id="ResearchStudy.category">
      <path value="ResearchStudy.category" />
      <short value="Is the study design non-interventional or interventional?" />
      <min value="1" />
      <max value="1" />
      <binding>
        <strength value="required" />
        <description value="Value set defining codes for primary designs of (sub-)studies in a ResearchStudy resource." />
        <valueSet value="https://www.nfdi4health.de/fhir/metadataschema/ValueSet/nfdi4health-vs-mds-study-primary-design-nci" />
      </binding>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Design.primaryDesign" />
      </mapping>
    </element>
    <element id="ResearchStudy.category.extension">
      <path value="ResearchStudy.category.extension" />
      <min value="1" />
    </element>
    <element id="ResearchStudy.category.extension:studyType">
      <path value="ResearchStudy.category.extension" />
      <sliceName value="studyType" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-study-type" />
      </type>
    </element>
    <element id="ResearchStudy.focus">
      <path value="ResearchStudy.focus" />
      <short value="Primary focus of the [RESOURCE]" />
      <definition value="Group of items providing information about the focus of the [RESOURCE] (e.g. medication, food, therapy, device, etc.)." />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Design.focus" />
      </mapping>
    </element>
    <element id="ResearchStudy.focus.coding.extension">
      <path value="ResearchStudy.focus.coding.extension" />
      <min value="1" />
    </element>
    <element id="ResearchStudy.focus.coding.extension:codeableConcept">
      <path value="ResearchStudy.focus.coding.extension" />
      <sliceName value="codeableConcept" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-codeableconcept" />
      </type>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Design.focus.code" />
      </mapping>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Design.focus.classification" />
      </mapping>
    </element>
    <element id="ResearchStudy.focus.text">
      <path value="ResearchStudy.focus.text" />
      <short value="Focus area" />
      <definition value="Focus area of the [RESOURCE] (e.g. medication, food, therapy, device, etc.)." />
      <comment value="Additional Information: The use of terms from established terminologies/classifications (e.g. SNOMED CT, ICD, etc.) is preferred. However, also self-assigned terms are allowed. | Short input help: Preferably, use terms from SNOMED CT (https://browser.ihtsdotools.org)." />
      <min value="1" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Design.focus.label" />
      </mapping>
    </element>
    <element id="ResearchStudy.condition">
      <path value="ResearchStudy.condition" />
      <short value="Primary health conditions or diseases considered in the [RESOURCE]" />
      <definition value="Group of items providing information about primary health conditions or diseases considered in the [RESOURCE]." />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Design.conditions" />
      </mapping>
    </element>
    <element id="ResearchStudy.condition.coding.extension">
      <path value="ResearchStudy.condition.coding.extension" />
      <min value="1" />
    </element>
    <element id="ResearchStudy.condition.coding.extension:codeableConcept">
      <path value="ResearchStudy.condition.coding.extension" />
      <sliceName value="codeableConcept" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-codeableconcept" />
      </type>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Design.conditions.code" />
      </mapping>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Design.conditions.classification" />
      </mapping>
    </element>
    <element id="ResearchStudy.condition.text">
      <path value="ResearchStudy.condition.text" />
      <short value="Health condition or disease" />
      <definition value="The disease, disorder, syndrome, illness, or injury that is being studied. Conditions may also include other health-related issues, such as lifespan, quality of life, and health risks." />
      <comment value="Preferably, use terms from terminologies such as SNOMED CT." />
      <min value="1" />
      <example>
        <label value="Example of a health condition" />
        <valueString value="SARS-CoV-2" />
      </example>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Design.conditions.label" />
      </mapping>
    </element>
    <element id="ResearchStudy.relatedArtifact">
      <path value="ResearchStudy.relatedArtifact" />
      <max value="1" />
      <type>
        <code value="RelatedArtifact" />
        <profile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-related-artifact-resource" />
      </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="ResearchStudy.keyword">
      <path value="ResearchStudy.keyword" />
      <short value="Keywords" />
      <definition value="Group of items providing information about keywords describing the [RESOURCE]." />
      <comment value="Additional information: The findability of the [RESOURCE] can be significantly increased if proper keywords are stated." />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.keywords" />
      </mapping>
    </element>
    <element id="ResearchStudy.keyword.coding.code.extension">
      <path value="ResearchStudy.keyword.coding.code.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
    </element>
    <element id="ResearchStudy.keyword.coding.code.extension:code">
      <path value="ResearchStudy.keyword.coding.code.extension" />
      <sliceName value="code" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-ex-mds-code" />
      </type>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.keywords.code" />
      </mapping>
    </element>
    <element id="ResearchStudy.keyword.text">
      <path value="ResearchStudy.keyword.text" />
      <short value="label" />
      <definition value="Keyword(s) describing the [RESOURCE]." />
      <comment value="Additional information: The use of terms from established classifications/vocabularies (e.g. SNOMED CT, MeSH, UMLS) is preferred. However, also self-assigned keywords are allowed. | Short input help: Preferably, use terms from SNOMED CT or MESH." />
      <min value="1" />
      <example>
        <label value="Keyword label" />
        <valueString value="SARS-CoV-2" />
      </example>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Resource.keywords.label" />
      </mapping>
    </element>
    <element id="ResearchStudy.period.start">
      <path value="ResearchStudy.period.start" />
      <short value="Start date" />
      <definition value="In case of a planned [RESOURCE], enter the intended start date. In case of an ongoing [RESOURCE], enter the actual start date." />
      <comment value="Additional information: Preferred date format: DD.MM.YYYY. | Short input help: In case of a planned [RESOURCE], enter the intended start date. In case of an ongoing [RESOURCE], enter the actual start date." />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Design.administrativeInformation.startDate" />
      </mapping>
    </element>
    <element id="ResearchStudy.period.end">
      <path value="ResearchStudy.period.end" />
      <short value="End date" />
      <definition value="In case of a planned or ongoing [RESOURCE], enter the intended end date. In case of a completed [RESOURCE], enter the actual end date. In case of a [RESOURCE] with patients or other participants, it is the date when the last participant is examined or receives an intervention, or the date of the last participant’s last visit." />
      <comment value="Additional information: Preferred date format: DD.MM.YYYY. | Short input help: In case of a planned or ongoing [RESOURCE], enter the intended end date. In case of a completed [RESOURCE], enter the actual end date." />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Design.administrativeInformation.endDate" />
      </mapping>
    </element>
    <element id="ResearchStudy.site">
      <path value="ResearchStudy.site" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://www.nfdi4health.de/fhir/metadataschema/StructureDefinition/nfdi4health-pr-mds-centers" />
      </type>
    </element>
    <element id="ResearchStudy.reasonStopped.coding">
      <path value="ResearchStudy.reasonStopped.coding" />
      <short value="Stopping stage" />
      <definition value="Specification of the stage at which the [RESOURCE] was prematurely stopped." />
      <comment value="Cardinality: 0..1, if Resource.classification.type == ('Study' OR 'Substudy') AND Design.administrativeInformation.status == ('Suspended: Recruitment, data collection, or data quality management, halted, but potentially will resume' OR 'Terminated: Recruitment, data collection, data and quality management halted prematurely and will not resume'); otherwise 0..0 / Short Input Help: Select one value from the list. / Source of the property and/or allowed values: NFDI4Health, CT.gov [2], DRKS [3]" />
      <max value="1" />
      <binding>
        <strength value="required" />
        <valueSet value="https://www.nfdi4health.de/fhir/metadataschema/ValueSet/nfdi4health-vs-mds-study-status-halted-stage-local" />
      </binding>
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Design.administrativeInformation.stageStopped" />
      </mapping>
    </element>
    <element id="ResearchStudy.reasonStopped.text">
      <path value="ResearchStudy.reasonStopped.text" />
      <short value="Stopping reason" />
      <definition value="Specification of the reasons why the [RESOURCE] was prematurely stopped, for example due to toxicity, closed due to lack of study progress, temporarily closed per study design." />
      <comment value="Cardinality: 0..1, if Resource.classification.type == ('Study' OR 'Substudy') AND Design.administrativeInformation.status == ('Suspended: Recruitment, data collection, or data quality management, halted, but potentially will resume' OR 'Terminated: Recruitment, data collection, data and quality management halted prematurely and will not resume'); otherwise 0..0 / Short Input Help: You can provide reasons such as closed due to toxicity, closed due to lack of [RESOURCE] progress, temporarily-closed per [RESOURCE] design, etc. / Source of the property and/or allowed values: CT.gov [2], DRKS [3]" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Design.administrativeInformation.reasonStopped" />
      </mapping>
    </element>
    <element id="ResearchStudy.note">
      <path value="ResearchStudy.note" />
      <max value="1" />
    </element>
    <element id="ResearchStudy.note.text">
      <path value="ResearchStudy.note.text" />
      <short value="Additional information about the [RESOURCE]" />
      <definition value="Any additional information about specific aspects of the [RESOURCE] that could not be captured by other fields.." />
      <comment value="Short input help: You can provide here specific aspects of the [RESOURCE] that could not be captured by other fields." />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Design.comment" />
      </mapping>
    </element>
    <element id="ResearchStudy.objective.name">
      <path value="ResearchStudy.objective.name" />
      <short value="Research questions/hypotheses" />
      <definition value="Statement of the research questions and/or hypotheses underlying the [RESOURCE]." />
      <min value="1" />
      <mapping>
        <identity value="NFDI4Health" />
        <map value="Design.hypotheses" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>