<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="MaiaLaborbefund" />
  <url value="https://tiplu.de/fhir/maia/StructureDefinition/MaiaLaborbefund" />
  <version value="1.0.0" />
  <name value="MaiaLaborbefund" />
  <title value="Maia Laborbefund" />
  <status value="active" />
  <experimental value="false" />
  <date value="2023-02-27" />
  <publisher value="Tiplu GmbH" />
  <description value="Das vorliegende DiagnosticReport-Profil im Use Case eines Laborbefundes beschreibt alle verpflichtenden und optionalen Informationen, die ein Datenlieferant für Maia liefern muss." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="DiagnosticReport" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport" />
  <derivation value="constraint" />
  <differential>
    <element id="DiagnosticReport.id">
      <path value="DiagnosticReport.id" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier">
      <path value="DiagnosticReport.identifier" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="type" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier:Befundnummer">
      <path value="DiagnosticReport.identifier" />
      <sliceName value="Befundnummer" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="DiagnosticReport.identifier:Befundnummer.type">
      <path value="DiagnosticReport.identifier.type" />
      <min value="1" />
      <patternCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
          <code value="FILL" />
        </coding>
      </patternCodeableConcept>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier:Befundnummer.type.coding">
      <path value="DiagnosticReport.identifier.type.coding" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier:Befundnummer.type.coding:fillerV2">
      <path value="DiagnosticReport.identifier.type.coding" />
      <sliceName value="fillerV2" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier:Befundnummer.type.coding:fillerV2.system">
      <path value="DiagnosticReport.identifier.type.coding.system" />
      <min value="1" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/v2-0203" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier:Befundnummer.type.coding:fillerV2.code">
      <path value="DiagnosticReport.identifier.type.coding.code" />
      <min value="1" />
      <fixedCode value="FILL" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier:Befundnummer.system">
      <path value="DiagnosticReport.identifier.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier:Befundnummer.value">
      <path value="DiagnosticReport.identifier.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.basedOn">
      <path value="DiagnosticReport.basedOn" />
      <type>
        <code value="Reference" />
        <profile value="https://tiplu.de/fhir/StructureDefinition/DiagnosticReport-BasedOn-PlacerNumberReference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/CarePlan" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationRequest" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/NutritionOrder" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/ServiceRequest" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.status">
      <path value="DiagnosticReport.status" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.code">
      <path value="DiagnosticReport.code" />
      <patternCodeableConcept>
        <coding>
          <system value="http://loinc.org" />
          <code value="11502-2" />
        </coding>
      </patternCodeableConcept>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.subject">
      <path value="DiagnosticReport.subject" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://tiplu.de/fhir/maia/StructureDefinition/MaiaPatient" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.encounter">
      <path value="DiagnosticReport.encounter" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://tiplu.de/fhir/maia/StructureDefinition/MaiaKontaktGesundheitseinrichtung" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.effective[x]">
      <path value="DiagnosticReport.effective[x]" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.effective[x]:effectiveDateTime">
      <path value="DiagnosticReport.effective[x]" />
      <sliceName value="effectiveDateTime" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.result">
      <path value="DiagnosticReport.result" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://tiplu.de/fhir/maia/StructureDefinition/MaiaLaboruntersuchung" />
      </type>
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>