<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="profile-labresult" />
  <url value="https://fhir.synapxe.sg/StructureDefinition/profile-labresult" />
  <name value="LabResult" />
  <title value="Lab Result Profile" />
  <status value="active" />
  <publisher value="Synapxe" />
  <description value="This FHIR resource represents a clinical document that presents the results of laboratory tests performed on a patient's biological samples, such as blood, urine, or tissue. It typically includes patient information, the type of test(s) conducted, test results (with reference ranges), interpretation or comments from the laboratory, and the date and time of sample collection and analysis." />
  <fhirVersion value="5.0.0" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="DiagnosticReport" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport" />
  <derivation value="constraint" />
  <differential>
    <element id="DiagnosticReport">
      <path value="DiagnosticReport" />
      <definition value="Sub-categorisation of the type of laboratory investigation." />
    </element>
    <element id="DiagnosticReport.modifierExtension">
      <path value="DiagnosticReport.modifierExtension" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.identifier">
      <path value="DiagnosticReport.identifier" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="DiagnosticReport.identifier.id">
      <path value="DiagnosticReport.identifier.id" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.identifier.extension">
      <path value="DiagnosticReport.identifier.extension" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.identifier.use">
      <path value="DiagnosticReport.identifier.use" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.identifier.type">
      <path value="DiagnosticReport.identifier.type" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.identifier.system">
      <path value="DiagnosticReport.identifier.system" />
      <min value="1" />
    </element>
    <element id="DiagnosticReport.identifier.value">
      <path value="DiagnosticReport.identifier.value" />
      <min value="1" />
    </element>
    <element id="DiagnosticReport.identifier.period">
      <path value="DiagnosticReport.identifier.period" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.identifier.assigner">
      <path value="DiagnosticReport.identifier.assigner" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.identifier:recordIdentifier">
      <path value="DiagnosticReport.identifier" />
      <sliceName value="recordIdentifier" />
      <definition value="A unique identifier for this laboratory result within the source system." />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="DiagnosticReport.identifier:recordIdentifier.id">
      <path value="DiagnosticReport.identifier.id" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.identifier:recordIdentifier.extension">
      <path value="DiagnosticReport.identifier.extension" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.identifier:recordIdentifier.use">
      <path value="DiagnosticReport.identifier.use" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.identifier:recordIdentifier.type">
      <path value="DiagnosticReport.identifier.type" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.identifier:recordIdentifier.system">
      <path value="DiagnosticReport.identifier.system" />
      <patternUri value="https://fhir.synapxe.sg/NamingSystem/record-id" />
    </element>
    <element id="DiagnosticReport.identifier:accessionNumber">
      <path value="DiagnosticReport.identifier" />
      <sliceName value="accessionNumber" />
      <definition value="The unique order number assigned by the Laboratory Information System where the investigation was performed." />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="DiagnosticReport.identifier:accessionNumber.id">
      <path value="DiagnosticReport.identifier.id" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.identifier:accessionNumber.extension">
      <path value="DiagnosticReport.identifier.extension" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.identifier:accessionNumber.use">
      <path value="DiagnosticReport.identifier.use" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.identifier:accessionNumber.type">
      <path value="DiagnosticReport.identifier.type" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.identifier:accessionNumber.system">
      <path value="DiagnosticReport.identifier.system" />
      <fixedUri value="https://fhir.synapxe.sg/NamingSystem/accession-no" />
    </element>
    <element id="DiagnosticReport.basedOn">
      <path value="DiagnosticReport.basedOn" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.synapxe.sg/StructureDefinition/profile-servicerequest" />
        <targetProfile value="https://fhir.synapxe.sg/StructureDefinition/profile-investigationorder" />
        <aggregation value="bundled" />
      </type>
    </element>
    <element id="DiagnosticReport.status">
      <path value="DiagnosticReport.status" />
      <definition value="Status of the laboratory diagnostic report." />
    </element>
    <element id="DiagnosticReport.category">
      <path value="DiagnosticReport.category" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept" />
      </type>
      <binding>
        <strength value="required" />
        <description value="Diagnostic report category is fixed to LAB (Laboratory)." />
        <valueSet value="http://terminology.hl7.org/ValueSet/v2-0074" />
      </binding>
    </element>
    <element id="DiagnosticReport.category.extension">
      <path value="DiagnosticReport.category.extension" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.category.coding.version">
      <path value="DiagnosticReport.category.coding.version" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.category.coding.code">
      <path value="DiagnosticReport.category.coding.code" />
      <patternCode value="LAB" />
    </element>
    <element id="DiagnosticReport.code">
      <path value="DiagnosticReport.code" />
      <type>
        <code value="CodeableConcept" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept" />
      </type>
    </element>
    <element id="DiagnosticReport.code.extension">
      <path value="DiagnosticReport.code.extension" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.code.coding">
      <path value="DiagnosticReport.code.coding" />
      <definition value="Name of the investigation type." />
    </element>
    <element id="DiagnosticReport.code.coding.version">
      <path value="DiagnosticReport.code.coding.version" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.subject">
      <path value="DiagnosticReport.subject" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/profile-reference-patient" />
        <targetProfile value="https://fhir.synapxe.sg/StructureDefinition/profile-patient" />
      </type>
    </element>
    <element id="DiagnosticReport.encounter">
      <path value="DiagnosticReport.encounter" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/profile-reference-encounter" />
        <targetProfile value="https://fhir.synapxe.sg/StructureDefinition/profile-encounter" />
      </type>
    </element>
    <element id="DiagnosticReport.encounter.identifier">
      <path value="DiagnosticReport.encounter.identifier" />
      <definition value="The identifier populated in the putEvent message of the event linked to this laboratory investigation." />
    </element>
    <element id="DiagnosticReport.effective[x]">
      <path value="DiagnosticReport.effective[x]" />
      <type>
        <code value="dateTime" />
      </type>
    </element>
    <element id="DiagnosticReport.issued">
      <path value="DiagnosticReport.issued" />
      <definition value="Date and time the report was released." />
    </element>
    <element id="DiagnosticReport.performer">
      <path value="DiagnosticReport.performer" />
      <short value="A reference from one resource to another" />
      <definition value="A reference from one resource to another." />
      <comment value="References SHALL be a reference to an actual FHIR resource, and SHALL be resolvable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.synapxe.sg/StructureDefinition/profile-organization" />
        <targetProfile value="https://fhir.synapxe.sg/StructureDefinition/profile-location" />
        <aggregation value="bundled" />
      </type>
    </element>
    <element id="DiagnosticReport.performer.reference">
      <path value="DiagnosticReport.performer.reference" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.performer.type">
      <path value="DiagnosticReport.performer.type" />
      <min value="1" />
    </element>
    <element id="DiagnosticReport.performer.identifier">
      <path value="DiagnosticReport.performer.identifier" />
      <definition value="Healthcare institution where the investigation was performed." />
      <max value="1" />
    </element>
    <element id="DiagnosticReport.performer.identifier.use">
      <path value="DiagnosticReport.performer.identifier.use" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.performer.identifier.type">
      <path value="DiagnosticReport.performer.identifier.type" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.performer.identifier.period">
      <path value="DiagnosticReport.performer.identifier.period" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.performer.identifier.assigner">
      <path value="DiagnosticReport.performer.identifier.assigner" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.performer.display">
      <path value="DiagnosticReport.performer.display" />
      <definition value="Reporting facility unit where the investigation was performed." />
    </element>
    <element id="DiagnosticReport.resultsInterpreter">
      <path value="DiagnosticReport.resultsInterpreter" />
      <definition value="Clinician or device that reported the laboratory result." />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.synapxe.sg/StructureDefinition/profile-practitioner" />
      </type>
    </element>
    <element id="DiagnosticReport.resultsInterpreter.id">
      <path value="DiagnosticReport.resultsInterpreter.id" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.resultsInterpreter.extension">
      <path value="DiagnosticReport.resultsInterpreter.extension" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.resultsInterpreter.reference">
      <path value="DiagnosticReport.resultsInterpreter.reference" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.resultsInterpreter.type">
      <path value="DiagnosticReport.resultsInterpreter.type" />
      <patternUri value="Practitioner" />
    </element>
    <element id="DiagnosticReport.resultsInterpreter.identifier">
      <path value="DiagnosticReport.resultsInterpreter.identifier" />
      <definition value="Medical Council Registration number of the clinician." />
      <min value="1" />
      <type>
        <code value="Identifier" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/profile-identifier-mcr" />
      </type>
    </element>
    <element id="DiagnosticReport.resultsInterpreter.display">
      <path value="DiagnosticReport.resultsInterpreter.display" />
      <definition value="Name of the clinician or device." />
    </element>
    <element id="DiagnosticReport.specimen">
      <path value="DiagnosticReport.specimen" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.synapxe.sg/StructureDefinition/profile-specimen" />
        <aggregation value="bundled" />
      </type>
    </element>
    <element id="DiagnosticReport.result">
      <path value="DiagnosticReport.result" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.synapxe.sg/StructureDefinition/profile-investigation" />
        <aggregation value="bundled" />
      </type>
    </element>
    <element id="DiagnosticReport.result.reference">
      <path value="DiagnosticReport.result.reference" />
      <min value="1" />
    </element>
    <element id="DiagnosticReport.note">
      <path value="DiagnosticReport.note" />
      <max value="1" />
      <type>
        <code value="Annotation" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/profile-annotation" />
      </type>
    </element>
    <element id="DiagnosticReport.note.text">
      <path value="DiagnosticReport.note.text" />
      <definition value="Additional information related to the investigation at battery or panel level." />
    </element>
    <element id="DiagnosticReport.study">
      <path value="DiagnosticReport.study" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.supportingInfo">
      <path value="DiagnosticReport.supportingInfo" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.supportingInfo.id">
      <path value="DiagnosticReport.supportingInfo.id" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.supportingInfo.extension">
      <path value="DiagnosticReport.supportingInfo.extension" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.supportingInfo.modifierExtension">
      <path value="DiagnosticReport.supportingInfo.modifierExtension" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.supportingInfo.type.id">
      <path value="DiagnosticReport.supportingInfo.type.id" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.supportingInfo.type.extension">
      <path value="DiagnosticReport.supportingInfo.type.extension" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.supportingInfo.type.coding">
      <path value="DiagnosticReport.supportingInfo.type.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="DiagnosticReport.supportingInfo.type.coding.id">
      <path value="DiagnosticReport.supportingInfo.type.coding.id" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.supportingInfo.type.coding.extension">
      <path value="DiagnosticReport.supportingInfo.type.coding.extension" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.supportingInfo.type.coding.system">
      <path value="DiagnosticReport.supportingInfo.type.coding.system" />
      <min value="1" />
    </element>
    <element id="DiagnosticReport.supportingInfo.type.coding.code">
      <path value="DiagnosticReport.supportingInfo.type.coding.code" />
      <min value="1" />
    </element>
    <element id="DiagnosticReport.supportingInfo.type.coding.display">
      <path value="DiagnosticReport.supportingInfo.type.coding.display" />
      <min value="1" />
    </element>
    <element id="DiagnosticReport.supportingInfo.type.coding.userSelected">
      <path value="DiagnosticReport.supportingInfo.type.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.supportingInfo.type.text">
      <path value="DiagnosticReport.supportingInfo.type.text" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.supportingInfo.reference">
      <path value="DiagnosticReport.supportingInfo.reference" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.synapxe.sg/StructureDefinition/profile-specimen" />
      </type>
    </element>
    <element id="DiagnosticReport.media">
      <path value="DiagnosticReport.media" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.media.id">
      <path value="DiagnosticReport.media.id" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.media.extension">
      <path value="DiagnosticReport.media.extension" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.media.modifierExtension">
      <path value="DiagnosticReport.media.modifierExtension" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.media.comment">
      <path value="DiagnosticReport.media.comment" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.media.link">
      <path value="DiagnosticReport.media.link" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.synapxe.sg/StructureDefinition/profile-documentreference" />
      </type>
    </element>
    <element id="DiagnosticReport.composition">
      <path value="DiagnosticReport.composition" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.conclusion">
      <path value="DiagnosticReport.conclusion" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.conclusionCode">
      <path value="DiagnosticReport.conclusionCode" />
      <definition value="Normality of the investigation result at battery or panel level." />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept" />
      </type>
      <binding>
        <strength value="required" />
        <valueSet value="https://fhir.synapxe.sg/ValueSet/abnormal-flag" />
      </binding>
    </element>
    <element id="DiagnosticReport.conclusionCode.extension">
      <path value="DiagnosticReport.conclusionCode.extension" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.conclusionCode.coding.version">
      <path value="DiagnosticReport.conclusionCode.coding.version" />
      <max value="0" />
    </element>
    <element id="DiagnosticReport.presentedForm">
      <path value="DiagnosticReport.presentedForm" />
      <type>
        <code value="Attachment" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/profile-attachment" />
      </type>
    </element>
  </differential>
</StructureDefinition>