PackagesCanonicalsLogsProblems
    Packages
    de.gematik.dipag@1.0.4
    https://gematik.de/fhir/dipag/StructureDefinition/dipag-dokumentenmetadaten-eingang
{
  "description": null,
  "_filename": "StructureDefinition-dipag-dokumentenmetadaten-eingang.json",
  "package_name": "de.gematik.dipag",
  "date": "2026-03-07",
  "derivation": "constraint",
  "publisher": "gematik GmbH",
  "fhirVersion": "4.0.1",
  "name": "DiPagDokumentenmetadatenEingang",
  "abstract": false,
  "type": "DocumentReference",
  "experimental": "false",
  "resourceType": "StructureDefinition",
  "title": "Digitale Patientenrechnung Dokumentenmetadaten Eingang",
  "package_version": "1.0.4",
  "status": "active",
  "id": "0c43dabd-7e00-4bbd-ad09-d34e8355e358",
  "kind": "resource",
  "url": "https://gematik.de/fhir/dipag/StructureDefinition/dipag-dokumentenmetadaten-eingang",
  "version": "1.0.4",
  "differential": {
    "element": [ {
      "id": "DocumentReference",
      "path": "DocumentReference",
      "constraint": [ {
        "key": "SignaturVerpflichtendRechnung",
        "human": "Eine Signature muss vorhanden sein, falls es sich bei der DocumentReference um eine Rechnung handelt.",
        "source": "https://gematik.de/fhir/dipag/StructureDefinition/dipag-dokumentenmetadaten-eingang",
        "severity": "error",
        "expression": "type.coding.where(system = 'http://dvmd.de/fhir/CodeSystem/kdl' and code = 'AM010106').exists() and content.format.where(system = 'https://gematik.de/fhir/dipag/CodeSystem/dipag-attachment-format-cs' and code = 'angereichertesPDF').exists() implies extension.where(url = 'https://gematik.de/fhir/dipag/StructureDefinition/dipag-docref-signature').exists()"
      }, {
        "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",
        "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())"
      } ]
    }, {
      "id": "DocumentReference.identifier",
      "min": 1,
      "path": "DocumentReference.identifier",
      "comment": "Eindeutiger Identifikator vergeben durch das RE-PS (z.B. Interne Dokumentennummer). Das System MUSS eindeutig pro Leistungserbringer:in vergeben werden.",
      "mustSupport": true
    }, {
      "id": "DocumentReference.identifier.system",
      "min": 1,
      "path": "DocumentReference.identifier.system",
      "mustSupport": true
    }, {
      "id": "DocumentReference.identifier.value",
      "min": 1,
      "path": "DocumentReference.identifier.value",
      "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",
      "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.subject",
      "min": 1,
      "path": "DocumentReference.subject",
      "comment": "Vollständiger Name der behandelten Person. Siehe Informationsmodell 'Rechnung' des Feature-Dokuments Digitale Patientenrechnung.",
      "mustSupport": true
    }, {
      "id": "DocumentReference.subject.display",
      "min": 1,
      "path": "DocumentReference.subject.display",
      "mustSupport": true
    }, {
      "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".",
      "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",
      "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",
      "binding": {
        "strength": "required",
        "valueSet": "https://gematik.de/fhir/dipag/ValueSet/dipag-restricted-mime-types-vs"
      },
      "comment": "Strukturierte Rechnungsinhalte können seitens der Leistungserbringer:in sowohl als JSON als auch XML übergeben werden.",
      "mustSupport": true
    }, {
      "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"
}