<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="dipag-institution" />
  <url value="https://gematik.de/fhir/dipag/StructureDefinition/dipag-institution" />
  <version value="1.0.5" />
  <name value="DiPagInstitution" />
  <title value="Digitale Patientenrechnung Institution" />
  <status value="active" />
  <experimental value="false" />
  <date value="2026-03-26" />
  <publisher value="gematik GmbH" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://gematik.de/" />
    </telecom>
  </contact>
  <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.identifier">
      <path value="Organization.identifier" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:Telematik-ID">
      <path value="Organization.identifier" />
      <sliceName value="Telematik-ID" />
      <short value="Telematik-ID (VZD-Eintrag)" />
      <comment value="Die Telematik-ID (VZD-Eintrag) SOLL vorhanden sein." />
      <min value="0" />
      <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" />
      <comment value="Das System der Telematik-ID MUSS vorhanden sein." />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:Telematik-ID.value">
      <path value="Organization.identifier.value" />
      <short value="Telematik-ID (VZD-Eintrag)" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:IKNR">
      <path value="Organization.identifier" />
      <sliceName value="IKNR" />
      <short value="IK-Nummer" />
      <comment value="Für alle Institutionen KANN die IK-Nummer vorhanden sein." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Identifier" />
        <profile value="http://fhir.de/StructureDefinition/identifier-iknr" />
      </type>
      <patternIdentifier>
        <type>
          <coding>
            <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
            <code value="XX" />
          </coding>
        </type>
      </patternIdentifier>
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:IKNR.type">
      <path value="Organization.identifier.type" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:IKNR.system">
      <path value="Organization.identifier.system" />
      <short value="System der IK-Nummer" />
      <comment value="Das System der IK-Nummer MUSS vorhanden sein." />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:IKNR.value">
      <path value="Organization.identifier.value" />
      <short value="IK-Nummer" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:BSNR">
      <path value="Organization.identifier" />
      <sliceName value="BSNR" />
      <short value="Betriebsstättennummer" />
      <comment value="Die Betriebsstättennummer für vertragsärztliche Praxen KANN vorhanden sein." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Identifier" />
        <profile value="http://fhir.de/StructureDefinition/identifier-bsnr" />
      </type>
      <patternIdentifier>
        <type>
          <coding>
            <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
            <code value="BSNR" />
          </coding>
        </type>
      </patternIdentifier>
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:BSNR.type">
      <path value="Organization.identifier.type" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:BSNR.system">
      <path value="Organization.identifier.system" />
      <short value="System der BSNR" />
      <comment value="Das System der BSNR MUSS vorhanden sein." />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:BSNR.value">
      <path value="Organization.identifier.value" />
      <short value="Betriebsstättennummer" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:KZVAbrechnungsnummer">
      <path value="Organization.identifier" />
      <sliceName value="KZVAbrechnungsnummer" />
      <short value="Abrechnungsnummer für zahnärztliche Praxen" />
      <comment value="Die Abrechnungsnummer für zahnärztliche Praxen KANN vorhanden sein." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Identifier" />
        <profile value="http://fhir.de/StructureDefinition/identifier-kzva" />
      </type>
      <patternIdentifier>
        <type>
          <coding>
            <system value="http://fhir.de/CodeSystem/identifier-type-de-basis" />
            <code value="KZVA" />
          </coding>
        </type>
      </patternIdentifier>
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:KZVAbrechnungsnummer.type">
      <path value="Organization.identifier.type" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:KZVAbrechnungsnummer.system">
      <path value="Organization.identifier.system" />
      <short value="System der Abrechnungsnummer für zahnärztliche Praxen" />
      <comment value="Das System der Abrechnungsnummer für zahnärztliche Praxen MUSS vorhanden sein, wenn eine Abrechnungsnummer angegeben ist." />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:KZVAbrechnungsnummer.value">
      <path value="Organization.identifier.value" />
      <short value="Abrechnungsnummer für zahnärztliche Praxen" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:USt-ID-Nr">
      <path value="Organization.identifier" />
      <sliceName value="USt-ID-Nr" />
      <short value="Umsatzsteuer-Identifikationsnummer" />
      <comment value="Die Umsatzsteuer-Identifikationsnummer KANN vorhanden sein.&#xA;  Sie KANN vorkommen, wenn eine Institution die Rolle eines 'Abweichender Forderungsinhaber', sowie des 'Rechnungsersteller' inne hat." />
      <min value="0" />
      <max value="1" />
      <patternIdentifier>
        <type>
          <coding>
            <system value="https://gematik.de/fhir/dipag/CodeSystem/dipag-rechnung-identifier-type-cs" />
            <code value="ustid" />
          </coding>
        </type>
      </patternIdentifier>
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:USt-ID-Nr.type">
      <path value="Organization.identifier.type" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.identifier:USt-ID-Nr.system">
      <path value="Organization.identifier.system" />
      <comment value="Es gibt kein FHIR-NamingSystem für die USt.-ID von offizieller Seite. Aus dem Grund ist System nicht mit MS gekennzeichnet und SOLL nicht befüllt sein." />
    </element>
    <element id="Organization.identifier:USt-ID-Nr.value">
      <path value="Organization.identifier.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.type">
      <path value="Organization.type" />
      <short value="Fachrichtung" />
      <comment value="Die Fachrichtung SOLL vorhanden sein. Das Element ist wiederholbar." />
      <binding>
        <strength value="required" />
        <valueSet value="http://ihe-d.de/ValueSets/IHEXDSpracticeSettingCode" />
      </binding>
    </element>
    <element id="Organization.type.coding.system">
      <path value="Organization.type.coding.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.type.coding.code">
      <path value="Organization.type.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.name">
      <path value="Organization.name" />
      <short value="Institutionsname" />
      <comment value="Der Institutionsname SOLL vorhanden sein." />
      <mustSupport value="true" />
    </element>
    <element id="Organization.telecom">
      <path value="Organization.telecom" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <mustSupport value="true" />
    </element>
    <element id="Organization.telecom:Telefon">
      <path value="Organization.telecom" />
      <sliceName value="Telefon" />
      <short value="Telefon" />
      <comment value="Die Angabe einer Telefonnummer KANN vorhanden sein.&#xA;  Sie KANN vorkommen, wenn eine Institution die Rolle eines 'Abweichender Forderungsinhaber', sowie des 'Rechnungsersteller' inne hat." />
      <min value="0" />
      <max value="*" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.telecom:Telefon.system">
      <path value="Organization.telecom.system" />
      <min value="1" />
      <fixedCode value="phone" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.telecom:Telefon.value">
      <path value="Organization.telecom.value" />
      <short value="Telefonnummer" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.address">
      <path value="Organization.address" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <mustSupport value="true" />
    </element>
    <element id="Organization.address:Strassenanschrift">
      <path value="Organization.address" />
      <sliceName value="Strassenanschrift" />
      <short value="Strassenanschrift" />
      <comment value="Die Strassenanschrift SOLL vorhanden sein." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Address" />
        <profile value="http://fhir.de/StructureDefinition/address-de-basis" />
      </type>
      <patternAddress>
        <type value="both" />
      </patternAddress>
      <mustSupport value="true" />
    </element>
    <element id="Organization.address:Strassenanschrift.type">
      <path value="Organization.address.type" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.address:Strassenanschrift.line">
      <path value="Organization.address.line" />
      <short value="Straße und Hausnummer" />
      <comment value="Straße und Hausnummer SOLLEN angegeben werden, die Extensions zur strukurierten Erfassung KÖNNEN vorhanden sein." />
      <mustSupport value="true" />
    </element>
    <element id="Organization.address:Strassenanschrift.line.extension:Strasse">
      <path value="Organization.address.line.extension" />
      <sliceName value="Strasse" />
      <comment value="Die Extension zur strukurierten Erfassung der Straße KANN vorhanden sein." />
      <mustSupport value="true" />
    </element>
    <element id="Organization.address:Strassenanschrift.line.extension:Hausnummer">
      <path value="Organization.address.line.extension" />
      <sliceName value="Hausnummer" />
      <comment value="Die Extension zur strukurierten Erfassung der Hausnummer KANN vorhanden sein." />
      <mustSupport value="true" />
    </element>
    <element id="Organization.address:Strassenanschrift.line.extension:Adresszusatz">
      <path value="Organization.address.line.extension" />
      <sliceName value="Adresszusatz" />
      <comment value="Die Extension zur strukurierten Erfassung des Adresszusatz KANN vorhanden sein." />
      <mustSupport value="true" />
    </element>
    <element id="Organization.address:Strassenanschrift.line.extension:Postfach">
      <path value="Organization.address.line.extension" />
      <sliceName value="Postfach" />
      <max value="0" />
    </element>
    <element id="Organization.address:Strassenanschrift.city">
      <path value="Organization.address.city" />
      <short value="Ort" />
      <comment value="Der Ort SOLL vorhanden sein." />
      <mustSupport value="true" />
    </element>
    <element id="Organization.address:Strassenanschrift.postalCode">
      <path value="Organization.address.postalCode" />
      <comment value="Die Postleitzahl SOLL vorhanden sein." />
      <mustSupport value="true" />
    </element>
    <element id="Organization.address:Strassenanschrift.country">
      <path value="Organization.address.country" />
      <short value="Länderkennzeichen" />
      <comment value="Das Länderkennzeichen KANN vorhanden sein." />
      <mustSupport value="true" />
    </element>
    <element id="Organization.address:Postfach">
      <path value="Organization.address" />
      <sliceName value="Postfach" />
      <short value="Postfach" />
      <comment value="Das Postfach SOLL vorhanden sein." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Address" />
        <profile value="http://fhir.de/StructureDefinition/address-de-basis" />
      </type>
      <patternAddress>
        <type value="postal" />
      </patternAddress>
      <constraint>
        <key value="address-cnt-2or3-char" />
        <severity value="warning" />
        <human value="The content of the country element (if present) SHALL be selected EITHER from ValueSet ISO Country Alpha-2 http://hl7.org/fhir/ValueSet/iso3166-1-2 OR MAY be selected from ISO Country Alpha-3 Value Set http://hl7.org/fhir/ValueSet/iso3166-1-3, IF the country is not specified in value Set ISO Country Alpha-2 http://hl7.org/fhir/ValueSet/iso3166-1-2." />
        <expression value="country.empty() or (country.memberOf('http://hl7.org/fhir/ValueSet/iso3166-1-2') or country.memberOf('http://hl7.org/fhir/ValueSet/iso3166-1-3'))" />
        <source value="https://gematik.de/fhir/dipag/StructureDefinition/dipag-institution" />
      </constraint>
      <mustSupport value="true" />
    </element>
    <element id="Organization.address:Postfach.type">
      <path value="Organization.address.type" />
      <mustSupport value="true" />
    </element>
    <element id="Organization.address:Postfach.line">
      <path value="Organization.address.line" />
      <short value="Postfach-Angabe" />
      <comment value="Die Postfach-Angabe SOLL angegeben werden, die Extensions zur strukurierten Erfassung KANN vorhanden sein." />
      <mustSupport value="true" />
    </element>
    <element id="Organization.address:Postfach.line.extension:Strasse">
      <path value="Organization.address.line.extension" />
      <sliceName value="Strasse" />
      <max value="0" />
    </element>
    <element id="Organization.address:Postfach.line.extension:Hausnummer">
      <path value="Organization.address.line.extension" />
      <sliceName value="Hausnummer" />
      <max value="0" />
    </element>
    <element id="Organization.address:Postfach.line.extension:Adresszusatz">
      <path value="Organization.address.line.extension" />
      <sliceName value="Adresszusatz" />
      <max value="0" />
    </element>
    <element id="Organization.address:Postfach.line.extension:Postfach">
      <path value="Organization.address.line.extension" />
      <sliceName value="Postfach" />
      <comment value="Die Extension zur strukurierten Erfassung des Postfach KANN vorhanden sein." />
      <mustSupport value="true" />
    </element>
    <element id="Organization.address:Postfach.city">
      <path value="Organization.address.city" />
      <short value="Ort" />
      <comment value="Der Ort SOLL vorhanden sein." />
      <mustSupport value="true" />
    </element>
    <element id="Organization.address:Postfach.postalCode">
      <path value="Organization.address.postalCode" />
      <comment value="Die Postleitzahl SOLL vorhanden sein." />
      <mustSupport value="true" />
    </element>
    <element id="Organization.address:Postfach.country">
      <path value="Organization.address.country" />
      <short value="Länderkennzeichen" />
      <comment value="Das Länderkennzeichen KANN vorhanden sein." />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>