<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="http://apiframework.dedalus.eu/fhir/StructureDefinition/Specimen-ForAIS" />
  <name value="Specimen-ForAIS" />
  <title value="API Framework Specimen-ForAIS" />
  <status value="active" />
  <experimental value="false" />
  <description value="Api Framework FHRI Profile for AIS specimens" />
  <fhirVersion value="3.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Specimen" />
  <baseDefinition value="http://apiframework.dedalus.eu/fhir/StructureDefinition/Specimen" />
  <derivation value="constraint" />
  <differential>
    <element id="Specimen.extension">
      <path value="Specimen.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Specimen.extension:checkIn">
      <path value="Specimen.extension" />
      <sliceName value="checkIn" />
      <definition value="Details about specimen checkin" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/extension-specimen-checkIn" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Specimen.extension:description">
      <path value="Specimen.extension" />
      <sliceName value="description" />
      <definition value="Human-generated short description of the specimen" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/extension-Specimen-description" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Specimen.identifier">
      <path value="Specimen.identifier" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Specimen.identifier:labelBarcode">
      <path value="Specimen.identifier" />
      <sliceName value="labelBarcode" />
      <definition value="Unique identifier used to create the barcode printed on the label placed on the container. This is just an identifier, not the actul label (which shall be placed in specimen.label)" />
      <max value="1" />
    </element>
    <element id="Specimen.identifier:labelBarcode.system">
      <path value="Specimen.identifier.system" />
      <fixedUri value="http://apiframework.dedalus.eu/identifiers/ais/specimen/labelBarcode" />
      <mustSupport value="true" />
    </element>
    <element id="Specimen.identifier:labelBarcode.value">
      <path value="Specimen.identifier.value" />
      <mustSupport value="true" />
    </element>
    <element id="Specimen.identifier:sequenceIdentifier">
      <path value="Specimen.identifier" />
      <sliceName value="sequenceIdentifier" />
      <definition value="Unique identifier of the speciment on the AIS system (aka Sequence in Oracle)" />
      <max value="1" />
    </element>
    <element id="Specimen.identifier:sequenceIdentifier.system">
      <path value="Specimen.identifier.system" />
      <fixedUri value="http://apiframework.dedalus.eu/identifiers/ais/specimen/sequence" />
      <mustSupport value="true" />
    </element>
    <element id="Specimen.identifier:sequenceIdentifier.value">
      <path value="Specimen.identifier.value" />
      <mustSupport value="true" />
    </element>
    <element id="Specimen.type">
      <path value="Specimen.type" />
      <binding>
        <strength value="required" />
      </binding>
    </element>
    <element id="Specimen.parent">
      <path value="Specimen.parent" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/Specimen-ForAIS" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Specimen.collection.extension:procedure">
      <path value="Specimen.collection.extension" />
      <sliceName value="procedure" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/extension-specimen-collectionProcedure" />
      </type>
    </element>
    <element id="Specimen.collection.collected[x]:collectedDateTime">
      <path value="Specimen.collection.collectedDateTime" />
      <sliceName value="collectedDateTime" />
      <type>
        <code value="dateTime" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Specimen.collection.method">
      <path value="Specimen.collection.method" />
      <mustSupport value="true" />
      <binding>
        <strength value="preferred" />
        <valueSetReference>
          <reference value="http://apiframework.dedalus.eu/fhir/ValueSet/SpecimenCollectionMethod-ForAIS" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Specimen.collection.bodySite">
      <path value="Specimen.collection.bodySite" />
      <binding>
        <strength value="example" />
        <valueSetUri value="http://apiframework.dedalus.eu/fhir/ValueSet/SpecimenBodySite" />
      </binding>
    </element>
    <element id="Specimen.processing">
      <path value="Specimen.processing" />
      <mustSupport value="true" />
    </element>
    <element id="Specimen.processing.procedure">
      <path value="Specimen.processing.procedure" />
      <mustSupport value="true" />
      <binding>
        <strength value="example" />
        <valueSetReference>
          <reference value="http://apiframework.dedalus.eu/fhir/ValueSet/SpecimenProcessingProcedure-ForAIS" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Specimen.container">
      <path value="Specimen.container" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Specimen.container.description">
      <path value="Specimen.container.description" />
      <definition value="Textual description of the container. Might contain an alphanumeric value representing the order of the specimen among other specimens of the same type in the same order" />
      <mustSupport value="true" />
    </element>
    <element id="Specimen.container.type">
      <path value="Specimen.container.type" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSetReference>
          <reference value="http://apiframework.dedalus.eu/fhir/ValueSet/SpecimenContainerType-ForAIS" />
        </valueSetReference>
      </binding>
    </element>
  </differential>
</StructureDefinition>