<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="Profile-HiGHmed-InfectionControl-DiagnosticReportLab" />
  <url value="http://highmed.org/fhir/StructureDefinition/ic/DiagnosticReportLab" />
  <version value="1.0.0" />
  <name value="Profile_HiGHmed_InfectionControl_DiagnosticReportLab" />
  <title value="Profile - HiGHmed - Infection Control - DiagnosticReportLab" />
  <status value="active" />
  <publisher value="https://highmed.org/" />
  <description value="Dieses Profil beschreibt einen Laborbefund in HiGHmed Use Case Infection Control" />
  <purpose value="Dieses Profil beschreibt einen Laborbefund in HiGHmed Use Case Infection Control" />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="DiagnosticReport" />
  <baseDefinition value="https://www.medizininformatik-initiative.de/fhir/core/modul-labor/StructureDefinition/DiagnosticReportLab" />
  <derivation value="constraint" />
  <differential>
    <element id="DiagnosticReport.basedOn">
      <path value="DiagnosticReport.basedOn" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://highmed.org/fhir/StructureDefinition/ic/ServiceRequestLab" />
      </type>
    </element>
    <element id="DiagnosticReport.category.coding">
      <path value="DiagnosticReport.category.coding" />
      <min value="3" />
    </element>
    <element id="DiagnosticReport.category.coding:loinc-report-studies">
      <path value="DiagnosticReport.category.coding" />
      <sliceName value="loinc-microbiology-studies" />
      <min value="1" />
      <max value="1" />
      <binding>
        <strength value="required" />
        <valueSet value="http://highmed.org/fhir/ValueSet/ic/DiagnosticReportStudies" />
      </binding>
    </element>
    <element id="DiagnosticReport.category.coding:loinc-microbiology-specialization">
      <path value="DiagnosticReport.category.coding" />
      <sliceName value="loinc-microbiology-specialization" />
      <max value="1" />
      <constraint>
        <key value="dia-ic-highmed-1" />
        <severity value="error" />
        <human value="Microbiology LOINC Spezialisierungen dürfen nur ausgewählt werden, falls der Report als Microbiology studies kodiert wurde" />
        <expression value="%resource.category.where(coding.where(code = '18725-2' and system = 'http://loinc.org').exists()).exists()" />
        <source value="http://highmed.org/fhir/StructureDefinition/ic/DiagnosticReportLab" />
      </constraint>
      <binding>
        <strength value="required" />
        <valueSet value="http://highmed.org/fhir/ValueSet/ic/MicrobiologySpecializationDiagnosticReport" />
      </binding>
    </element>
    <element id="DiagnosticReport.resultsInterpreter">
      <path value="DiagnosticReport.resultsInterpreter" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.specimen">
      <path value="DiagnosticReport.specimen" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://highmed.org/fhir/StructureDefinition/ic/Specimen" />
      </type>
    </element>
  </differential>
</StructureDefinition>