<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="dipag-organisation-rechnungsempfaenger" />
  <url value="https://gematik.de/fhir/dipag/StructureDefinition/dipag-organisation-rechnungsempfaenger" />
  <version value="1.3.0" />
  <name value="DiPagOrganisationRechnungsempfaenger" />
  <title value="Digitale Patientenrechnung Organisation Rechnungsempfänger" />
  <status value="active" />
  <experimental value="false" />
  <date value="2026-10-01" />
  <publisher value="gematik GmbH" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://gematik.de/" />
    </telecom>
  </contact>
  <description value="Kostenträger-Organisation, die im Fachdienst als Empfänger für den direkten Rechnungsversand konfiguriert ist. Die Liste der Organisationen wird durch den Fachdienst-Betreiber gepflegt und kann durch das RE-PS abgefragt werden." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Organization" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Organization" />
  <derivation value="constraint" />
  <differential>
    <element id="Organization.extension">
      <path value="Organization.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.extension:workflowtyp">
      <path value="Organization.extension" />
      <sliceName value="workflowtyp" />
      <short value="Unterstützte Workflowtypen" />
      <comment value="An jeder Organisation MUSS mitgeteilt werden, welche Workflowtypen sie unterstützt. Das RE-PS entscheidet, welcher der unterstützten Workflowtypen beim $invoice-submit gewählt wird. Die Beschreibung der einzelnen Workflowtypen ist im CodeSystem DiPagWorkflowtypCS hinterlegt." />
      <min value="1" />
      <max value="*" />
      <type>
        <code value="Extension" />
        <profile value="https://gematik.de/fhir/dipag/StructureDefinition/dipag-organization-workflowtyp" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Organization.extension:workflowtyp.value[x].system">
      <path value="Organization.extension.value[x].system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.extension:workflowtyp.value[x].code">
      <path value="Organization.extension.value[x].code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.extension:workflowtyp.value[x].display">
      <path value="Organization.extension.value[x].display" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier">
      <path value="Organization.identifier" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:Telematik-ID">
      <path value="Organization.identifier" />
      <sliceName value="Telematik-ID" />
      <short value="Telematik-ID" />
      <comment value="Die Telematik-ID MUSS vorhanden sein." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Identifier" />
        <profile value="http://fhir.de/StructureDefinition/identifier-telematik-id" />
      </type>
      <patternIdentifier>
        <type>
          <coding>
            <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
            <code value="PRN" />
          </coding>
        </type>
      </patternIdentifier>
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:Telematik-ID.type">
      <path value="Organization.identifier.type" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:Telematik-ID.system">
      <path value="Organization.identifier.system" />
      <short value="System der Telematik-ID" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:Telematik-ID.value">
      <path value="Organization.identifier.value" />
      <short value="Telematik-ID" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.name">
      <path value="Organization.name" />
      <short value="Name der Organisation" />
      <comment value="Der Name der Organisation SOLL vorhanden sein." />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>