PackagesCanonicalsLogsProblems
    Packages
    de.gematik.dipag@1.3.0-beta
    https://gematik.de/fhir/dipag/StructureDefinition/dipag-dokumentenmetadaten-eingang-base
{
  "description": "Basisprofil für die Einreichung von Rechnungsdokumenten und Anhängen. Es enthält alle kontextübergreifenden Festlegungen. Kontextspezifische Festlegungen erfolgen in den abgeleiteten Profilen für den Versand an Versicherte (DiPagDokumentenmetadatenEingangPatient) und an Kostenträger-Organisationen (DiPagDokumentenmetadatenEingangOrganisation).",
  "_filename": "StructureDefinition-dipag-dokumentenmetadaten-eingang-base.json",
  "package_name": "de.gematik.dipag",
  "date": "2026-09-01",
  "derivation": "constraint",
  "publisher": "gematik GmbH",
  "fhirVersion": "4.0.1",
  "name": "DiPagDokumentenmetadatenEingangBase",
  "abstract": false,
  "type": "DocumentReference",
  "experimental": "false",
  "resourceType": "StructureDefinition",
  "title": "Digitale Patientenrechnung Dokumentenmetadaten Eingang Base",
  "package_version": "1.3.0-beta",
  "status": "active",
  "id": "8a4a2057-b221-496f-b31f-7f2826cf4201",
  "kind": "resource",
  "url": "https://gematik.de/fhir/dipag/StructureDefinition/dipag-dokumentenmetadaten-eingang-base",
  "version": "1.3.0-beta",
  "differential": {
    "element": [ {
      "id": "DocumentReference",
      "path": "DocumentReference",
      "constraint": [ {
        "key": "RechnungOderAnhang",
        "human": "Ein Dokument kann entweder ein Anhang enthalten oder ein Rechnungsdokument inkl. strukturierten Rechnungsinhalten.",
        "source": "https://gematik.de/fhir/dipag/StructureDefinition/dipag-dokumentenmetadaten-eingang-base",
        "severity": "error",
        "expression": "content.format.where(system = 'https://gematik.de/fhir/dipag/CodeSystem/dipag-attachment-format-cs' and code = 'rechnungsanhang').exists() xor (content.format.where(system = 'https://gematik.de/fhir/dipag/CodeSystem/dipag-attachment-format-cs' and code = 'originaleRechnung').exists() and  content.format.where(system = 'https://gematik.de/fhir/dipag/CodeSystem/dipag-attachment-format-cs' and code = 'rechnungsinhalt').exists())"
      }, {
        "key": "AnhangIdentifierPflicht",
        "human": "Ein identifier:AnhangIdentifier MUSS angegeben werden, wenn das Dokument kein Rechnungsdokument (AM010106) ist.",
        "source": "https://gematik.de/fhir/dipag/StructureDefinition/dipag-dokumentenmetadaten-eingang-base",
        "severity": "error",
        "expression": "type.coding.where(system = 'http://dvmd.de/fhir/CodeSystem/kdl' and code = 'AM010106').exists().not() implies identifier.where(type.coding.where(system = 'https://gematik.de/fhir/dipag/CodeSystem/dipag-rechnung-identifier-type-cs' and code = 'anhang').exists()).exists()"
      } ]
    }, {
      "id": "DocumentReference.identifier",
      "path": "DocumentReference.identifier",
      "slicing": {
        "rules": "open",
        "discriminator": [ {
          "path": "$this",
          "type": "pattern"
        } ]
      },
      "mustSupport": true
    }, {
      "path": "DocumentReference.identifier",
      "min": 0,
      "short": "Anhangs-Identifier",
      "mustSupport": true,
      "sliceName": "AnhangIdentifier",
      "patternIdentifier": {
        "type": {
          "coding": [ {
            "code": "anhang",
            "system": "https://gematik.de/fhir/dipag/CodeSystem/dipag-rechnung-identifier-type-cs"
          } ]
        }
      },
      "max": "1",
      "id": "DocumentReference.identifier:AnhangIdentifier",
      "comment": "Eindeutiger Identifikator für Anhänge vergeben durch das RE-PS (z.B. Interne Dokumentennummer). Bei Anhängen MUSS das System eindeutig pro Leistungserbringer:in vergeben werden."
    }, {
      "id": "DocumentReference.identifier:AnhangIdentifier.type",
      "min": 1,
      "path": "DocumentReference.identifier.type",
      "mustSupport": true,
      "patternCodeableConcept": {
        "coding": [ {
          "code": "anhang",
          "system": "https://gematik.de/fhir/dipag/CodeSystem/dipag-rechnung-identifier-type-cs"
        } ]
      }
    }, {
      "id": "DocumentReference.identifier:AnhangIdentifier.system",
      "min": 1,
      "path": "DocumentReference.identifier.system",
      "short": "NamingSystem des Anhangs-Identifier",
      "mustSupport": true
    }, {
      "id": "DocumentReference.identifier:AnhangIdentifier.value",
      "min": 1,
      "path": "DocumentReference.identifier.value",
      "short": "Anhangs-Identifier",
      "maxLength": 200,
      "mustSupport": true
    }, {
      "id": "DocumentReference.status",
      "path": "DocumentReference.status",
      "comment": "Versionierung von Dokumenten ist nicht unterstützt. Nur jeweils die aktuelle Version des Dokumentes wird akzeptiert.",
      "mustSupport": true,
      "patternCode": "current"
    }, {
      "id": "DocumentReference.type",
      "min": 1,
      "path": "DocumentReference.type",
      "comment": "Kodierung des Dokumentes als 'Rechnung', sowie darüber hinausgehende Klassifizierung per KDL",
      "mustSupport": true
    }, {
      "id": "DocumentReference.type.coding",
      "min": 1,
      "path": "DocumentReference.type.coding",
      "slicing": {
        "rules": "open",
        "discriminator": [ {
          "path": "$this",
          "type": "pattern"
        } ]
      }
    }, {
      "id": "DocumentReference.type.coding:DokumentenKlassifizierung",
      "max": "1",
      "min": 0,
      "path": "DocumentReference.type.coding",
      "binding": {
        "strength": "required",
        "valueSet": "https://gematik.de/fhir/dipag/ValueSet/dipag-sonstigesdokument-type-vs"
      },
      "sliceName": "DokumentenKlassifizierung",
      "mustSupport": true,
      "patternCoding": {
        "system": "http://dvmd.de/fhir/CodeSystem/kdl"
      }
    }, {
      "id": "DocumentReference.type.coding:DokumentenKlassifizierung.system",
      "min": 1,
      "path": "DocumentReference.type.coding.system",
      "mustSupport": true
    }, {
      "id": "DocumentReference.type.coding:DokumentenKlassifizierung.code",
      "min": 1,
      "path": "DocumentReference.type.coding.code",
      "mustSupport": true
    }, {
      "id": "DocumentReference.type.coding:DokumentenKlassifizierung.display",
      "min": 1,
      "path": "DocumentReference.type.coding.display",
      "maxLength": 1024,
      "mustSupport": true
    }, {
      "id": "DocumentReference.type.coding:Rechnungstyp",
      "max": "1",
      "min": 0,
      "path": "DocumentReference.type.coding",
      "sliceName": "Rechnungstyp",
      "mustSupport": true,
      "patternCoding": {
        "code": "AM010106",
        "system": "http://dvmd.de/fhir/CodeSystem/kdl"
      }
    }, {
      "id": "DocumentReference.description",
      "min": 1,
      "path": "DocumentReference.description",
      "comment": "Menschenlesbarer Titel des Dokumentes, der dem Versicherten in der UI angezeigt wird. Der Titel kann manuell erfasst oder vom Dateinamen/Metadaten abgeleitet werden. z.B. "Laborbefund vom 28.9.2023".",
      "maxLength": 5000,
      "mustSupport": true
    }, {
      "id": "DocumentReference.content",
      "path": "DocumentReference.content",
      "slicing": {
        "rules": "open",
        "discriminator": [ {
          "path": "format",
          "type": "pattern"
        } ]
      },
      "mustSupport": true
    }, {
      "id": "DocumentReference.content.attachment.url",
      "path": "DocumentReference.content.attachment.url",
      "comment": "Der FD muss die Base64-kodierten Daten aus attachment.data extrahieren und in eine Binary-Ressource auslagern."
    }, {
      "id": "DocumentReference.content:originaleRechnung",
      "max": "1",
      "min": 0,
      "path": "DocumentReference.content",
      "sliceName": "originaleRechnung",
      "mustSupport": true
    }, {
      "id": "DocumentReference.content:originaleRechnung.attachment",
      "path": "DocumentReference.content.attachment",
      "mustSupport": true
    }, {
      "id": "DocumentReference.content:originaleRechnung.attachment.contentType",
      "min": 1,
      "path": "DocumentReference.content.attachment.contentType",
      "comment": "Zum Zeitpunkt der Veröffentlichung werden nur PDF-Dokumente als Rechnung seitens der Leistungserbringer:in unterstützt.",
      "mustSupport": true,
      "patternCode": "application/pdf"
    }, {
      "id": "DocumentReference.content:originaleRechnung.attachment.data",
      "min": 1,
      "path": "DocumentReference.content.attachment.data",
      "comment": "Base64-kodiertes PDF. Dieses Feld muss durch die Applikation der Leistungserbringer:in gefüllt werden.",
      "mustSupport": true
    }, {
      "id": "DocumentReference.content:originaleRechnung.attachment.url",
      "max": "0",
      "path": "DocumentReference.content.attachment.url"
    }, {
      "id": "DocumentReference.content:originaleRechnung.format",
      "min": 1,
      "path": "DocumentReference.content.format",
      "mustSupport": true,
      "patternCoding": {
        "code": "originaleRechnung",
        "system": "https://gematik.de/fhir/dipag/CodeSystem/dipag-attachment-format-cs"
      }
    }, {
      "id": "DocumentReference.content:strukturierterRechnungsinhalt",
      "max": "1",
      "min": 0,
      "path": "DocumentReference.content",
      "comment": "Das base64 kodierte Collection-Bundle mit den strukturierten Rechnungsinhalten darf nicht größer als 512 kB sein.",
      "sliceName": "strukturierterRechnungsinhalt",
      "mustSupport": true
    }, {
      "id": "DocumentReference.content:strukturierterRechnungsinhalt.attachment",
      "path": "DocumentReference.content.attachment",
      "mustSupport": true
    }, {
      "id": "DocumentReference.content:strukturierterRechnungsinhalt.attachment.contentType",
      "min": 1,
      "path": "DocumentReference.content.attachment.contentType",
      "comment": "Strukturierte Rechnungsinhalte können seitens der Leistungserbringer:in sowohl als JSON als auch XML übergeben werden.",
      "mustSupport": true,
      "patternCode": "application/fhir+json"
    }, {
      "id": "DocumentReference.content:strukturierterRechnungsinhalt.attachment.data",
      "min": 1,
      "path": "DocumentReference.content.attachment.data",
      "comment": "Base64-kodierte Repräsentation der Rechnungsinhalte. Alle Ressourcen sollen in einem collection Bundle zusammengefasst sein, welches durch das Profil [`DiPagRechnungsbundle`](https://gematik.de/fhir/dipag/StructureDefinition/dipag-rechnungsbundle) definiert ist. Dieses Feld muss durch die Applikation der Leistungserbringer:in gefüllt werden.",
      "mustSupport": true
    }, {
      "id": "DocumentReference.content:strukturierterRechnungsinhalt.attachment.url",
      "max": "0",
      "path": "DocumentReference.content.attachment.url"
    }, {
      "id": "DocumentReference.content:strukturierterRechnungsinhalt.format",
      "min": 1,
      "path": "DocumentReference.content.format",
      "mustSupport": true,
      "patternCoding": {
        "code": "rechnungsinhalt",
        "system": "https://gematik.de/fhir/dipag/CodeSystem/dipag-attachment-format-cs"
      }
    }, {
      "id": "DocumentReference.content:anhang",
      "max": "1",
      "min": 0,
      "path": "DocumentReference.content",
      "sliceName": "anhang",
      "mustSupport": true
    }, {
      "id": "DocumentReference.content:anhang.attachment",
      "path": "DocumentReference.content.attachment",
      "mustSupport": true
    }, {
      "id": "DocumentReference.content:anhang.attachment.contentType",
      "min": 1,
      "path": "DocumentReference.content.attachment.contentType",
      "comment": "Zum Zeitpunkt der Veröffentlichung werden nur PDF-Dokumente als Rechnungsanhänge seitens der Leistungserbringer:in unterstützt.",
      "mustSupport": true,
      "patternCode": "application/pdf"
    }, {
      "id": "DocumentReference.content:anhang.attachment.data",
      "min": 1,
      "path": "DocumentReference.content.attachment.data",
      "comment": "Base64-kodiertes PDF. Dieses Feld muss durch die Applikation der Leistungserbringer:in gefüllt werden.",
      "mustSupport": true
    }, {
      "id": "DocumentReference.content:anhang.attachment.url",
      "max": "0",
      "path": "DocumentReference.content.attachment.url"
    }, {
      "id": "DocumentReference.content:anhang.format",
      "min": 1,
      "path": "DocumentReference.content.format",
      "mustSupport": true,
      "patternCoding": {
        "code": "rechnungsanhang",
        "system": "https://gematik.de/fhir/dipag/CodeSystem/dipag-attachment-format-cs"
      }
    } ]
  },
  "contact": [ {
    "telecom": [ {
      "value": "http://gematik.de/",
      "system": "url"
    } ]
  } ],
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DocumentReference"
}