{
  "resourceType": "DocumentReference",
  "id": "ExampleR5DocumentReference",
  "meta": {
    "tag": [
      {
        "code": "offen",
        "system": "https://gematik.de/fhir/dipag/CodeSystem/dipag-rechnungsstatus-cs",
        "display": "Offen"
      }
    ],
    "profile": [
      "https://gematik.de/fhir/dipag/StructureDefinition/dipag-dokumentenmetadaten-intern"
    ]
  },
  "status": "current",
  "type": {
    "coding": [
      {
        "system": "http://dvmd.de/fhir/CodeSystem/kdl",
        "code": "AM010106",
        "display": "Rechnung ambulante/stationäre Behandlung"
      }
    ]
  },
  "extension": [
    {
      "url": "https://gematik.de/fhir/dipag/StructureDefinition/dipag-documentreference-rechnungsdatum",
      "valueDateTime": "2023-09-28T11:00:00.123+00:00"
    },
    {
      "url": "https://gematik.de/fhir/dipag/StructureDefinition/dipag-documentreference-zahlungszieldatum",
      "valueDateTime": "2023-10-28T11:00:00.123+00:00"
    },
    {
      "url": "https://gematik.de/fhir/dipag/StructureDefinition/dipag-documentreference-gesamtbetrag",
      "valueMoney": {
        "value": 16.2,
        "currency": "EUR"
      }
    },
    {
      "url": "https://gematik.de/fhir/dipag/StructureDefinition/dipag-docref-signature",
      "valueSignature": {
        "type": [
          {
            "code": "1.2.840.10065.1.12.1.13",
            "system": "urn:iso-astm:E1762-95:2013"
          }
        ],
        "who": {
          "identifier": {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:oid:1.2.276.0.76.4.323"
          }
        },
        "when": "2026-02-11T09:00:00+00:00",
        "data": "ZXlKaGJHY2lPaUpJVXpJMU5pSXNJbXRwWkNJNkltVjRZVzUwSW4wLi4u"
      }
    }
  ],
  "author": [
    {
      "identifier": {
        "system": "https://gematik.de/fhir/sid/telematik-id",
        "value": "987654321"
      },
      "display": "Dr. Hausarzt"
    }
  ],
  "content": [
    {
      "attachment": {
        "contentType": "application/pdf",
        "extension": [
          {
            "valueSignature": {
              "type": [
                {
                  "code": "1.2.840.10065.1.12.1.13",
                  "system": "urn:iso-astm:E1762-95:2013"
                }
              ],
              "who": {
                "identifier": {
                  "system": "urn:ietf:rfc:3986",
                  "value": "urn:oid:1.2.276.0.76.4.323"
                }
              },
              "when": "2026-02-11T09:00:00+00:00",
              "data": "SGFzaE9yaWdpbmFsUkVjaG51bmdQREZBc2lnbmVkQnlGRDIwMjYwMjEx"
            },
            "url": "https://gematik.de/fhir/dipag/StructureDefinition/dipag-docref-signature"
          }
        ],
        "url": "[FD-endpunkt]/Binary/id-der-originalen-Rechnung"
      },
      "format": {
        "code": "originaleRechnung",
        "system": "https://gematik.de/fhir/dipag/CodeSystem/dipag-attachment-format-cs"
      }
    },
    {
      "attachment": {
        "contentType": "application/pdf",
        "extension": [
          {
            "valueSignature": {
              "type": [
                {
                  "code": "1.2.840.10065.1.12.1.13",
                  "system": "urn:iso-astm:E1762-95:2013"
                }
              ],
              "who": {
                "identifier": {
                  "system": "urn:ietf:rfc:3986",
                  "value": "urn:oid:1.2.276.0.76.4.323"
                }
              },
              "when": "2026-02-11T09:00:00+00:00",
              "data": "SGFzaEFuZ2VyZWljaGVydGVzUERGc2lnbmVkQnlGRDIwMjYwMjExQVA="
            },
            "url": "https://gematik.de/fhir/dipag/StructureDefinition/dipag-docref-signature"
          }
        ],
        "url": "[FD-endpunkt]/Binary/id-des-angereicherten-PDFs"
      },
      "format": {
        "code": "angereichertesPDF",
        "system": "https://gematik.de/fhir/dipag/CodeSystem/dipag-attachment-format-cs"
      }
    },
    {
      "attachment": {
        "contentType": "application/fhir+json",
        "extension": [
          {
            "valueSignature": {
              "type": [
                {
                  "code": "1.2.840.10065.1.12.1.13",
                  "system": "urn:iso-astm:E1762-95:2013"
                }
              ],
              "who": {
                "identifier": {
                  "system": "urn:ietf:rfc:3986",
                  "value": "urn:oid:1.2.276.0.76.4.323"
                }
              },
              "when": "2026-02-11T09:00:00+00:00",
              "data": "U3RydWt0dXJpZXJ0ZXJJbmhhbHRTaWduYXR1ckZEMjAyNjAyMTFmamg="
            },
            "url": "https://gematik.de/fhir/dipag/StructureDefinition/dipag-docref-signature"
          }
        ],
        "url": "[FD-endpunkt]/Binary/id-des-strukturierten-Rechnungsinhalts"
      },
      "format": {
        "code": "rechnungsinhalt",
        "system": "https://gematik.de/fhir/dipag/CodeSystem/dipag-attachment-format-cs"
      }
    }
  ],
  "identifier": [
    {
      "system": "http://example.com/fhir/identifiers",
      "value": "123456789"
    }
  ],
  "description": "Laborbefund vom 28.9.2023",
  "subject": {
    "display": "Max Mustermann"
  },
  "context": {
    "related": [
      {
        "reference": "Patient/BeispielPatient3-FD"
      },
      {
        "reference": "DocumentReference/ExampleR5DocumentReferenceSonstigesDokument"
      }
    ]
  }
}