<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="path-Request.Specimen" />
  <text>
    <status value="empty" />
    <div xmlns="http://www.w3.org/1999/xhtml">No narrative is provided for definitional resources. A human-readable rendering can be found in the implementation guide(s) where this resource is used.</div>
  </text>
  <url value="http://medmij.nl/fhir/StructureDefinition/path-Request.Specimen" />
  <name value="PathRequestSpecimen" />
  <title value="path Request.Specimen" />
  <status value="draft" />
  <publisher value="MedMij" />
  <contact>
    <name value="MedMij" />
    <telecom>
      <system value="email" />
      <value value="info@medmij.nl" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="Specimen that will be examined by a laboratory." />
  <purpose value="This Specimen resource represents the specimen-related concepts from the Request Clinical Information Model (CIM) for patient use cases in the context of Pathology." />
  <copyright value="Copyright and related rights waived via CC0, https://creativecommons.org/publicdomain/zero/1.0/. This does not apply to information from third parties, for example a medical terminology system. The implementer alone is responsible for identifying and obtaining any necessary licenses or authorizations to utilize third party IP in connection with the specification or otherwise." />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="mercurius-core-dataset-2-0" />
    <name value="Mercurius Core Dataset 2.0" />
  </mapping>
  <mapping>
    <identity value="medmij-core-dataset-120-20260923" />
    <name value="Dataset MedMij R4 Core 1.2.0 20260923" />
  </mapping>
  <mapping>
    <identity value="path-dataset-100-alpha3-20260923" />
    <name value="Dataset Pathologie MedMij 1.0.0-alpha.3 20260923" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Specimen" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Specimen" />
  <derivation value="constraint" />
  <differential>
    <element id="Specimen">
      <path value="Specimen" />
      <short value="Specimen" />
      <definition value="Specimen that will be examined by a laboratory." />
      <comment value="This resource is used to convey either the primary specimen or an individual sample taken from that specimen. In the latter case, the `.parent` refers to the Specimen resource corresponding to the primary specimen." />
      <alias value="Monster" />
      <mapping>
        <identity value="path-dataset-100-alpha3-20260923" />
        <map value="path-dataelement-8" />
        <comment value="Specimen" />
      </mapping>
      <mapping>
        <identity value="path-dataset-100-alpha3-20260923" />
        <map value="path-dataelement-15" />
        <comment value="Sample" />
      </mapping>
    </element>
    <element id="Specimen.meta">
      <path value="Specimen.meta" />
      <min value="1" />
    </element>
    <element id="Specimen.meta.tag">
      <path value="Specimen.meta.tag" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Specimen.meta.tag:careType">
      <path value="Specimen.meta.tag" />
      <sliceName value="careType" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <short value="CareType" />
      <definition value="The type of the healthcare provider responsible for the delivered care, or more specifically, the specialty of the department and/or health professional that delivered care. It enables patients and systems to interpret the origin and context of medical data." />
      <comment value="Note that the `careType` slice is a slice on `.meta.tag`, which might not be immediately clear based on the rendering." />
      <alias value="Zorgtype" />
      <min value="1" />
      <max value="*" />
      <binding>
        <strength value="required" />
        <valueSet value="http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.17.2.4--20200901000000" />
      </binding>
      <mapping>
        <identity value="medmij-core-dataset-120-20260923" />
        <map value="medmij-core-dataelement-123" />
        <comment value="CareType" />
      </mapping>
    </element>
    <element id="Specimen.meta.tag:careType/pathology">
      <path value="Specimen.meta.tag" />
      <sliceName value="careType/pathology" />
      <comment value="Note that the `pathology` slice is a reslice of the `careType` slice, which might not be immediately clear based on the rendering." />
      <min value="1" />
      <max value="1" />
      <patternCoding>
        <system value="urn:oid:2.16.840.1.113883.2.4.6.7" />
        <code value="0388" />
      </patternCoding>
    </element>
    <element id="Specimen.identifier">
      <path value="Specimen.identifier" />
      <slicing>
        <discriminator>
          <type value="profile" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Specimen.identifier:specimenIdentifier">
      <path value="Specimen.identifier" />
      <sliceName value="specimenIdentifier" />
      <short value="IdentificationNumber / SpecimenIdentifier / SampleIdentifier" />
      <definition value="Identifier of the specimen." />
      <comment value="This element is used to convey the identifier of either the primary specimen or an individual sample taken from that specimen, based on which specimen this resource represents.&#xA;&#xA;  * In the former case, as the specimen is always directly linked to a request in Mercurius, this identifier's value equals the RequestIdentifier value, appended with _-0_. In particular, this identifier attains a `.value` of the form _[TCSB]YY-nnnnn-0_ or _[TCSB]YY-nnnnnn-0_ (based on the laboratory the report originates from), e.g. T26-012345-0.&#xA;  * In the latter case, this identifier's value equals the RequestIdentifier value, appended with _-[SampleNumber]_. In particular, this identifier attains a `.value` of the form _[TCSB]YY-nnnnn-[SampleNumber]_ or _[TCSB]YY-nnnnnn-[SampleNumber]_ (based on the laboratory the report originates from), e.g. T26-012345-1.&#xA;&#xA;In both cases, the `.system` SHALL be of the form _urn:oid:2.16.840.1.113883.2.4.3.23.3.N.1_ where _N_ is the lab number (i.e. _labid_)." />
      <alias value="Identificatienummer" />
      <alias value="MonsterIdentificatienummer" />
      <alias value="SampleIdentificatienummer" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Identifier" />
        <profile value="http://medmij.nl/fhir/StructureDefinition/path-Report.ReportIdentifier" />
      </type>
      <mapping>
        <identity value="path-dataset-100-alpha3-20260923" />
        <map value="path-dataelement-14" />
        <comment value="SpecimenIdentifier" />
      </mapping>
      <mapping>
        <identity value="path-dataset-100-alpha3-20260923" />
        <map value="path-dataelement-16" />
        <comment value="SampleNumber (implicit)" />
      </mapping>
    </element>
    <element id="Specimen.type">
      <path value="Specimen.type" />
      <short value="SpecimenMaterial" />
      <definition value="Type of specimen." />
      <comment value="The (string) value of the SpecimenMaterial concept present in the source system SHALL be translated to a SNOMED CT code using the [Palga On-line Thesaurus](https://www.palga.nl/voor-pathologen/palga-on-line-thesaurus), if possible. In any case, the original value SHALL be conveyed via `.text`." />
      <alias value="AardMateriaal" />
      <min value="1" />
      <mapping>
        <identity value="mercurius-core-dataset-2-0" />
        <map value="mercurius-core-rubriek-76" />
        <comment value="aardmateriaal" />
      </mapping>
    </element>
    <element id="Specimen.type.coding.system">
      <path value="Specimen.type.coding.system" />
      <patternUri value="http://snomed.info/sct" />
    </element>
    <element id="Specimen.type.text">
      <path value="Specimen.type.text" />
      <min value="1" />
    </element>
    <element id="Specimen.subject">
      <path value="Specimen.subject" />
      <short value="Patient" />
      <definition value="The patient as subject of the information." />
      <alias value="Patiënt" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <targetProfile value="http://medmij.nl/fhir/StructureDefinition/path-Patient" />
      </type>
      <mapping>
        <identity value="medmij-core-dataset-120-20260923" />
        <map value="medmij-core-dataelement-116" />
        <comment value="Patient" />
      </mapping>
    </element>
    <element id="Specimen.receivedTime">
      <path value="Specimen.receivedTime" />
      <short value="ReceivedDate" />
      <definition value="Date when specimen is received at the laboratory." />
      <alias value="DatumOntvangst" />
      <min value="1" />
      <mapping>
        <identity value="mercurius-core-dataset-2-0" />
        <map value="mercurius-core-rubriek-80" />
        <comment value="datumontvangst" />
      </mapping>
    </element>
    <element id="Specimen.parent">
      <path value="Specimen.parent" />
      <comment value="If this Specimen resource corresponds to a sample taken from the primary specimen, the latter is referenced here." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Specimen" />
        <targetProfile value="http://medmij.nl/fhir/StructureDefinition/path-Request.Specimen" />
      </type>
    </element>
    <element id="Specimen.collection.collected[x]">
      <path value="Specimen.collection.collected[x]" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
    </element>
    <element id="Specimen.collection.collected[x]:collectedDateTime">
      <path value="Specimen.collection.collected[x]" />
      <sliceName value="collectedDateTime" />
      <short value="CollectionDate" />
      <definition value="Date when specimen is taken from patient." />
      <alias value="DatumAfname" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
      <mapping>
        <identity value="mercurius-core-dataset-2-0" />
        <map value="mercurius-core-rubriek-77" />
        <comment value="datumafname" />
      </mapping>
    </element>
    <element id="Specimen.collection.method">
      <path value="Specimen.collection.method" />
      <short value="CollectionMethod" />
      <definition value="The way the specimen is collected (biopsy, resection, etc.)." />
      <comment value="The (string) value of the CollectionMethod concept present in the source system SHALL be translated to a SNOMED CT code using the [Palga On-line Thesaurus](https://www.palga.nl/voor-pathologen/palga-on-line-thesaurus), if possible. In any case, the original value SHALL be conveyed via `.text`." />
      <alias value="Verkrijgingswijze" />
      <mapping>
        <identity value="mercurius-core-dataset-2-0" />
        <map value="mercurius-core-rubriek-87" />
        <comment value="verkrijgingswijze" />
      </mapping>
    </element>
    <element id="Specimen.collection.method.coding.system">
      <path value="Specimen.collection.method.coding.system" />
      <patternUri value="http://snomed.info/sct" />
    </element>
    <element id="Specimen.collection.method.text">
      <path value="Specimen.collection.method.text" />
      <min value="1" />
    </element>
  </differential>
</StructureDefinition>