PackagesCanonicalsLogsProblems
    Packages
    de.gematik.erg@1.1.0-rc2
    https://gematik.de/fhir/erg/StructureDefinition/erg-dokumentenmetadaten
{
  "description": null,
  "_filename": "StructureDefinition-erg-dokumentenmetadaten.json",
  "package_name": "de.gematik.erg",
  "date": "2025-04-07",
  "derivation": "constraint",
  "publisher": "gematik GmbH",
  "fhirVersion": "4.0.1",
  "name": "ERGDokumentenmetadaten",
  "abstract": false,
  "type": "DocumentReference",
  "experimental": "false",
  "resourceType": "StructureDefinition",
  "title": "ERG Dokumentenmetadaten",
  "package_version": "1.1.0-rc2",
  "status": "active",
  "id": "a748ea27-2fb6-467a-a976-3ed181bfb5bd",
  "kind": "resource",
  "url": "https://gematik.de/fhir/erg/StructureDefinition/erg-dokumentenmetadaten",
  "version": "1.1.0-rc2",
  "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/erg/StructureDefinition/erg-dokumentenmetadaten",
        "severity": "error",
        "expression": "type.coding.where(system = 'http://dvmd.de/fhir/CodeSystem/kdl' and code = 'AM010106').exists() implies extension.where(url = 'https://gematik.de/fhir/erg/StructureDefinition/erg-docref-signature').exists()"
      }, {
        "key": "RechnungOderAnhang",
        "human": "Ein Dokument kann entweder ein Anhang enthalten oder ein Rechnungsdokument inkl. strukturierten Rechnungsinhalten.",
        "source": "https://gematik.de/fhir/erg/StructureDefinition/erg-dokumentenmetadaten",
        "severity": "error",
        "expression": "content.format.where(system = 'https://gematik.de/fhir/erg/CodeSystem/erg-attachment-format-cs' and code = 'rechnungsanhang').exists() xor (content.format.where(system = 'https://gematik.de/fhir/erg/CodeSystem/erg-attachment-format-cs' and code = 'erechnung').exists() and  content.format.where(system = 'https://gematik.de/fhir/erg/CodeSystem/erg-attachment-format-cs' and code = 'rechnungsinhalt').exists())"
      } ]
    }, {
      "id": "DocumentReference.meta.extension",
      "path": "DocumentReference.meta.extension",
      "mustSupport": true
    }, {
      "id": "DocumentReference.meta.extension:markierung",
      "max": "*",
      "min": 0,
      "path": "DocumentReference.meta.extension",
      "type": [ {
        "code": "Extension",
        "profile": [ "https://gematik.de/fhir/erg/StructureDefinition/erg-documentreference-markierung" ]
      } ],
      "comment": "Vgl. Abschnitt '4.4.2 Markierungen' des Feature-Dokuments E-Rechnung",
      "sliceName": "markierung",
      "mustSupport": true
    }, {
      "id": "DocumentReference.meta.tag",
      "path": "DocumentReference.meta.tag",
      "comment": "Metaangaben zur E-Rechnung die sich auf das Rechnungsdokument als Ganzes beziehen und nicht Teil des durch den RE-PS erstellten Dokuments sind.",
      "slicing": {
        "rules": "open",
        "discriminator": [ {
          "path": "$this",
          "type": "pattern"
        } ]
      },
      "mustSupport": true
    }, {
      "id": "DocumentReference.meta.tag:erg-rechnungsstatus",
      "max": "1",
      "min": 0,
      "path": "DocumentReference.meta.tag",
      "binding": {
        "strength": "required",
        "valueSet": "https://gematik.de/fhir/erg/ValueSet/erg-rechnungsstatus-vs"
      },
      "comment": "Vgl. Abschnitt 4.4.1 Workflow einer Rechnung des Feature-Dokuments E-Rechnung",
      "sliceName": "erg-rechnungsstatus",
      "mustSupport": true
    }, {
      "id": "DocumentReference.meta.tag:erg-rechnungsstatus.system",
      "min": 1,
      "path": "DocumentReference.meta.tag.system",
      "mustSupport": true
    }, {
      "id": "DocumentReference.meta.tag:erg-rechnungsstatus.code",
      "min": 1,
      "path": "DocumentReference.meta.tag.code",
      "mustSupport": true
    }, {
      "id": "DocumentReference.extension",
      "path": "DocumentReference.extension",
      "mustSupport": true
    }, {
      "id": "DocumentReference.extension:docRef-signature",
      "max": "1",
      "min": 0,
      "path": "DocumentReference.extension",
      "type": [ {
        "code": "Extension",
        "profile": [ "https://gematik.de/fhir/erg/StructureDefinition/erg-docref-signature" ]
      } ],
      "sliceName": "docRef-signature",
      "mustSupport": true
    }, {
      "id": "DocumentReference.extension:rechnungsdatum",
      "max": "1",
      "min": 0,
      "path": "DocumentReference.extension",
      "type": [ {
        "code": "Extension",
        "profile": [ "https://gematik.de/fhir/erg/StructureDefinition/erg-documentreference-rechnungsdatum" ]
      } ],
      "comment": "Siehe Abschnitt '4.8.1.1 Rechnung' des Feature-Dokuments E-Rechnung",
      "sliceName": "rechnungsdatum",
      "mustSupport": true
    }, {
      "id": "DocumentReference.extension:zahlungszieldatum",
      "max": "1",
      "min": 0,
      "path": "DocumentReference.extension",
      "type": [ {
        "code": "Extension",
        "profile": [ "https://gematik.de/fhir/erg/StructureDefinition/erg-documentreference-zahlungszieldatum" ]
      } ],
      "comment": "Siehe Abschnitt '4.8.1.1 Rechnung' des Feature-Dokuments E-Rechnung",
      "sliceName": "zahlungszieldatum",
      "mustSupport": true
    }, {
      "id": "DocumentReference.extension:gesamtbetrag",
      "max": "1",
      "min": 0,
      "path": "DocumentReference.extension",
      "type": [ {
        "code": "Extension",
        "profile": [ "https://gematik.de/fhir/erg/StructureDefinition/erg-documentreference-gesamtbetrag" ]
      } ],
      "comment": "Siehe Abschnitt '4.8.1.1 Rechnung' des Feature-Dokuments E-Rechnung",
      "sliceName": "gesamtbetrag",
      "mustSupport": true
    }, {
      "id": "DocumentReference.extension:fachrichtung",
      "max": "1",
      "min": 0,
      "path": "DocumentReference.extension",
      "type": [ {
        "code": "Extension",
        "profile": [ "https://gematik.de/fhir/erg/StructureDefinition/erg-docref-fachrichtung" ]
      } ],
      "sliceName": "fachrichtung",
      "mustSupport": true
    }, {
      "id": "DocumentReference.extension:leistungsart",
      "max": "1",
      "min": 0,
      "path": "DocumentReference.extension",
      "type": [ {
        "code": "Extension",
        "profile": [ "https://gematik.de/fhir/erg/StructureDefinition/erg-docref-leistungsart" ]
      } ],
      "sliceName": "leistungsart",
      "mustSupport": true
    }, {
      "id": "DocumentReference.extension:behandlungsart",
      "max": "1",
      "min": 0,
      "path": "DocumentReference.extension",
      "type": [ {
        "code": "Extension",
        "profile": [ "https://gematik.de/fhir/erg/StructureDefinition/erg-behandlungsart" ]
      } ],
      "sliceName": "behandlungsart",
      "mustSupport": true
    }, {
      "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/erg/ValueSet/erg-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 Abschnitt '4.8.1.1 Rechnung' des Feature-Dokuments E-Rechnung.",
      "mustSupport": true
    }, {
      "id": "DocumentReference.subject.display",
      "min": 1,
      "path": "DocumentReference.subject.display",
      "mustSupport": true
    }, {
      "id": "DocumentReference.author",
      "path": "DocumentReference.author",
      "comment": "Der Fachdienst verknüpft alle Rechnungsdokumente mit der Telematik-ID des einreichenden Akteurs.",
      "mustSupport": true
    }, {
      "id": "DocumentReference.author.identifier",
      "min": 1,
      "path": "DocumentReference.author.identifier",
      "type": [ {
        "code": "Identifier",
        "profile": [ "http://fhir.de/StructureDefinition/identifier-telematik-id" ]
      } ],
      "mustSupport": true
    }, {
      "id": "DocumentReference.author.display",
      "min": 1,
      "path": "DocumentReference.author.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:rechnungspdf",
      "max": "1",
      "min": 0,
      "path": "DocumentReference.content",
      "sliceName": "rechnungspdf",
      "mustSupport": true
    }, {
      "id": "DocumentReference.content:rechnungspdf.attachment",
      "path": "DocumentReference.content.attachment",
      "mustSupport": true
    }, {
      "id": "DocumentReference.content:rechnungspdf.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:rechnungspdf.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:rechnungspdf.attachment.url",
      "path": "DocumentReference.content.attachment.url",
      "mustSupport": true
    }, {
      "id": "DocumentReference.content:rechnungspdf.format",
      "min": 1,
      "path": "DocumentReference.content.format",
      "mustSupport": true,
      "patternCoding": {
        "code": "erechnung",
        "system": "https://gematik.de/fhir/erg/CodeSystem/erg-attachment-format-cs"
      }
    }, {
      "id": "DocumentReference.content:angereicherteRechnung",
      "max": "1",
      "min": 0,
      "path": "DocumentReference.content",
      "sliceName": "angereicherteRechnung",
      "mustSupport": true
    }, {
      "id": "DocumentReference.content:angereicherteRechnung.attachment",
      "path": "DocumentReference.content.attachment",
      "mustSupport": true
    }, {
      "id": "DocumentReference.content:angereicherteRechnung.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:angereicherteRechnung.attachment.data",
      "max": "0",
      "path": "DocumentReference.content.attachment.data",
      "comment": "Die angereicherte Rechnung wird durch den FD direkt als Binary-Ressource unter attachment.url referenziert."
    }, {
      "id": "DocumentReference.content:angereicherteRechnung.attachment.url",
      "path": "DocumentReference.content.attachment.url",
      "mustSupport": true
    }, {
      "id": "DocumentReference.content:angereicherteRechnung.format",
      "min": 1,
      "path": "DocumentReference.content.format",
      "mustSupport": true,
      "patternCoding": {
        "code": "angereichertesPDF",
        "system": "https://gematik.de/fhir/erg/CodeSystem/erg-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/erg/ValueSet/erg-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. Dieses Feld muss durch die Applikation der Leistungserbringer:in gefüllt werden.",
      "mustSupport": true
    }, {
      "id": "DocumentReference.content:strukturierterRechnungsinhalt.attachment.url",
      "path": "DocumentReference.content.attachment.url",
      "mustSupport": true
    }, {
      "id": "DocumentReference.content:strukturierterRechnungsinhalt.format",
      "min": 1,
      "path": "DocumentReference.content.format",
      "mustSupport": true,
      "patternCoding": {
        "code": "rechnungsinhalt",
        "system": "https://gematik.de/fhir/erg/CodeSystem/erg-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",
      "path": "DocumentReference.content.attachment.url",
      "mustSupport": true
    }, {
      "id": "DocumentReference.content:anhang.format",
      "min": 1,
      "path": "DocumentReference.content.format",
      "mustSupport": true,
      "patternCoding": {
        "code": "rechnungsanhang",
        "system": "https://gematik.de/fhir/erg/CodeSystem/erg-attachment-format-cs"
      }
    }, {
      "id": "DocumentReference.context",
      "path": "DocumentReference.context",
      "mustSupport": true
    }, {
      "id": "DocumentReference.context.related",
      "min": 1,
      "path": "DocumentReference.context.related",
      "comment": "Der Fachdienst verknüpft alle Rechnungsdokumente mit der Rechnungsempfänger:in.",
      "slicing": {
        "rules": "open",
        "discriminator": [ {
          "path": "$this.resolve()",
          "type": "type"
        } ]
      },
      "mustSupport": true
    }, {
      "id": "DocumentReference.context.related:patient",
      "max": "1",
      "min": 1,
      "path": "DocumentReference.context.related",
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Patient" ]
      } ],
      "sliceName": "patient",
      "mustSupport": true
    }, {
      "id": "DocumentReference.context.related:anhaenge",
      "max": "*",
      "min": 0,
      "path": "DocumentReference.context.related",
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/DocumentReference" ]
      } ],
      "sliceName": "anhaenge",
      "mustSupport": true
    } ]
  },
  "contact": [ {
    "telecom": [ {
      "value": "http://gematik.de/",
      "system": "url"
    } ]
  } ],
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DocumentReference"
}