<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="DiagnosticReport-BasedOn-PlacerNumberReference" />
  <url value="https://tiplu.de/fhir/StructureDefinition/DiagnosticReport-BasedOn-PlacerNumberReference" />
  <version value="2.0.0" />
  <name value="DiagnosticReportBasedOnPlacerNumberReference" />
  <title value="DiagnosticReport-BasedOn-PlacerNumberReference" />
  <status value="active" />
  <description value="Mit diesem Profil wird die Möglichkeit geschaffen, eine Placer Order Number als Identifier im basedOn Attribut eines DiagnosticReport zu hinterlegen.&#xA;Der UseCase ist dann relevant, wenn HL7v2 auf Fhir gemappt wird und als einzige Information über einen ServiceRequest nur diese Information vorhanden ist." />
  <fhirVersion value="4.0.1" />
  <kind value="complex-type" />
  <abstract value="false" />
  <type value="Reference" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Reference" />
  <derivation value="constraint" />
  <differential>
    <element id="Reference">
      <path value="Reference" />
      <constraint>
        <key value="tiplu-reference-or-identifier-1" />
        <severity value="error" />
        <human value="Either reference.reference OR reference.identifier exists" />
        <expression value="$this.reference.exists() or ($this.identifier.value.exists() and $this.identifier.system.exists())" />
        <source value="https://tiplu.de/fhir/StructureDefinition/DiagnosticReport-BasedOn-PlacerNumberReference" />
      </constraint>
    </element>
    <element id="Reference.reference">
      <path value="Reference.reference" />
      <mustSupport value="true" />
    </element>
    <element id="Reference.identifier">
      <path value="Reference.identifier" />
      <mustSupport value="true" />
    </element>
    <element id="Reference.identifier.type">
      <path value="Reference.identifier.type" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Reference.identifier.type.coding">
      <path value="Reference.identifier.type.coding" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="type" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Reference.identifier.type.coding:placerV2">
      <path value="Reference.identifier.type.coding" />
      <sliceName value="placerV2" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Reference.identifier.type.coding:placerV2.system">
      <path value="Reference.identifier.type.coding.system" />
      <min value="1" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/v2-0203" />
      <mustSupport value="true" />
    </element>
    <element id="Reference.identifier.type.coding:placerV2.code">
      <path value="Reference.identifier.type.coding.code" />
      <min value="1" />
      <fixedCode value="PLAC" />
      <mustSupport value="true" />
    </element>
    <element id="Reference.identifier.system">
      <path value="Reference.identifier.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Reference.identifier.value">
      <path value="Reference.identifier.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>