<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="UKCore-Observation-Lab" />
  <url value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation-Lab" />
  <version value="1.0.0" />
  <name value="UKCoreObservationLab" />
  <title value="UK Core Observation Lab" />
  <status value="active" />
  <date value="2023-04-28" />
  <publisher value="HL7 UK" />
  <contact>
    <name value="HL7 UK" />
    <telecom>
      <system value="email" />
      <value value="ukcore@hl7.org.uk" />
      <use value="work" />
      <rank value="1" />
    </telecom>
  </contact>
  <description value="This derived profile represents an individual Laboratory test and result value. These tests can be grouped together using the Observation-Group Profile." />
  <purpose value="To provide the minimum expectations for each individual Laboratory test." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Observation" />
  <baseDefinition value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Observation" />
  <derivation value="constraint" />
  <differential>
    <element id="Observation">
      <path value="Observation" />
      <constraint>
        <key value="ukcore-obs-lab-001" />
        <severity value="warning" />
        <human value="Either value, dataAbsentReason or note SHOULD be populated" />
        <expression value="value.exists() or dataAbsentReason.exists() or note.exists()" />
      </constraint>
    </element>
    <element id="Observation.category">
      <path value="Observation.category" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="coding.code" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Observation.category:sliceLaboratory">
      <path value="Observation.category" />
      <sliceName value="sliceLaboratory" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Observation.category:sliceLaboratory.coding.system">
      <path value="Observation.category.coding.system" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/observation-category" />
    </element>
    <element id="Observation.category:sliceLaboratory.coding.code">
      <path value="Observation.category.coding.code" />
      <fixedCode value="laboratory" />
    </element>
    <element id="Observation.code">
      <path value="Observation.code" />
      <binding>
        <strength value="preferred" />
        <description value="A code from the SNOMED Clinical Terminology UK coding system regrading laboratory medicine test requests and results" />
        <valueSet value="https://fhir.hl7.org.uk/ValueSet/UKCore-UnifiedTestList" />
      </binding>
    </element>
    <element id="Observation.subject">
      <path value="Observation.subject" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient" />
      </type>
    </element>
  </differential>
</StructureDefinition>