CH EPR FHIR (R4)
            
            5.0.0-ci-build - ci-build
  
            
          
CH EPR FHIR (R4), published by eHealth Suisse. This guide is not an authorized publication; it is the continuous build for version 5.0.0-ci-build built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/ehealthsuisse/ch-epr-fhir/ and changes regularly. See the Directory of published versions
This section corresponds to transaction [CH:MHD-1]. Transaction [CH:MHD-1] is used by the Document Source and Document Responder Actors.
The Update Document Metadata [CH:MHD-1] transaction is used to update document metadata from the Document Consumer to the Document Responder.
Actor: Document Source 
Role: Prepares and issues an update to a DocumentReference resource 
Actor: Document Responder  
Role: Accepts requests for updates to a DocumentReference resource
The Update Document Metadata Request Message provides the ability to submit updated attributes for DocumentReference resources.
The Update Document Metadata Request Message is triggered when a Document Source needs to transmit updated DocumentReference metadata.
A Document Source initiates a FHIR request using Update as defined at http://hl7.org/fhir/http.html#update on DocumentReference Resources. A Document Source initiates a FHIR request using Update as defined at http://hl7.org/fhir/http.html#update on DocumentReference Resources, with a standalone HTTP request or a transaction.
A Document Source shall send a request for either the JSON or the XML format as defined in FHIR. A Document Responder shall support the JSON and the XML format.
The Document Source shall be capable of accepting elements specified in profile CH MHD DocumentReference Comprehensive. The DocumentReference elements which are allowed to be updated are defined in Annex 5.1 1.12. The Mappings tab, indicates the mapping between DocumentReference elements and the XDS elements defined in Annex 5.1 1.12.
PUT [base]/DocumentReference/DocRefPdf HTTP/1.1
Accept: application/fhir+json
traceparent: 00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-00
{
  "resourceType" : "DocumentReference",
  "id" : "DocRefPdf",
  "meta" : {
    "profile" : [
      🔗 "http://fhir.ch/ig/ch-epr-fhir/StructureDefinition/ch-mhd-documentreference-comprehensive"
    ]
  },
  "text" : {
    "status" : "extensions",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: DocumentReference DocRefPdf</b></p><a name=\"DocRefPdf\"> </a><a name=\"hcDocRefPdf\"> </a><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\"/><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-ch-mhd-documentreference-comprehensive.html\">CH MHD DocumentReference Comprehensive</a></p></div><p><b>CH Extension Author AuthorRole</b>: <a href=\"https://build.fhir.org/ig/hl7ch/ch-term/CodeSystem-2.16.756.5.30.1.127.3.10.6.html#2.16.756.5.30.1.127.3.10.6-HCP\">ch-ehealth-codesystem-role: HCP</a> (Healthcare professional)</p><p><b>masterIdentifier</b>: <a href=\"http://terminology.hl7.org/6.1.0/NamingSystem-uri.html\" title=\"As defined by RFC 3986 (http://www.ietf.org/rfc/rfc3986.txt)(with many schemes defined in many RFCs). For OIDs and UUIDs, use the URN form (urn:oid:(note: lowercase) and urn:uuid:). See http://www.ietf.org/rfc/rfc3001.txt and http://www.ietf.org/rfc/rfc4122.txt \r\n\r\nThis oid is used as an identifier II.root to indicate the the extension is an absolute URI (technically, an IRI). Typically, this is used for OIDs and GUIDs. Note that when this OID is used with OIDs and GUIDs, the II.extension should start with urn:oid or urn:uuid: \r\n\r\nNote that this OID is created to aid with interconversion between CDA and FHIR - FHIR uses urn:ietf:rfc:3986 as equivalent to this OID. URIs as identifiers appear more commonly in FHIR.\r\n\r\nThis OID may also be used in CD.codeSystem.\">Uniform Resource Identifier (URI)</a>/urn:oid:1.3.6.1.4.1.12559.11.13.2.1.2951</p><p><b>identifier</b>: <a href=\"http://terminology.hl7.org/6.1.0/NamingSystem-uri.html\" title=\"As defined by RFC 3986 (http://www.ietf.org/rfc/rfc3986.txt)(with many schemes defined in many RFCs). For OIDs and UUIDs, use the URN form (urn:oid:(note: lowercase) and urn:uuid:). See http://www.ietf.org/rfc/rfc3001.txt and http://www.ietf.org/rfc/rfc4122.txt \r\n\r\nThis oid is used as an identifier II.root to indicate the the extension is an absolute URI (technically, an IRI). Typically, this is used for OIDs and GUIDs. Note that when this OID is used with OIDs and GUIDs, the II.extension should start with urn:oid or urn:uuid: \r\n\r\nNote that this OID is created to aid with interconversion between CDA and FHIR - FHIR uses urn:ietf:rfc:3986 as equivalent to this OID. URIs as identifiers appear more commonly in FHIR.\r\n\r\nThis OID may also be used in CD.codeSystem.\">Uniform Resource Identifier (URI)</a>/urn:uuid:7261fa25-b36d-4660-a58a-d9df4370e985\u00a0(use:\u00a0official,\u00a0)</p><p><b>status</b>: Current</p><p><b>type</b>: <span title=\"Codes:{http://snomed.info/sct 419891008}\">Record artifact</span></p><p><b>category</b>: <span title=\"Codes:{http://snomed.info/sct 405624007}\">Administrative documentation</span></p><p><b>subject</b>: Identifier: <code>urn:oid:2.16.756.5.30.1.127.3.10.3</code>/761337610411353650</p><p><b>date</b>: 2025-09-24 12:01:30+0000</p><p><b>description</b>: Test PDF</p><p><b>securityLabel</b>: <span title=\"Codes:{http://snomed.info/sct 17621005}\">Normal (qualifier value)</span></p><blockquote><p><b>content</b></p><h3>Attachments</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>ContentType</b></td><td><b>Language</b></td><td><b>Url</b></td><td><b>Title</b></td><td><b>Creation</b></td></tr><tr><td style=\"display: none\">*</td><td>application/pdf</td><td>German (Region=Switzerland)</td><td><a href=\"Bundle-BundleProvideDocument.html#urn-uuid-d8d1fe44-07e9-4a84-985f-fde97d77d54b\">Binary: application/pdf (75692 bytes base64)</a></td><td>Test PDF</td><td>2025-09-24 12:01:30+0000</td></tr></table><p><b>format</b>: <a href=\"https://build.fhir.org/ig/hl7ch/ch-term/CodeSystem-2.16.756.5.30.1.127.3.10.10.html#2.16.756.5.30.1.127.3.10.10-urn.58che.58epr.58EPR_Unstructured_Document\">ch-ehealth-codesystem-format: urn:che:epr:EPR_Unstructured_Document</a> (Unstructured EPR document)</p></blockquote><h3>Contexts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>FacilityType</b></td><td><b>PracticeSetting</b></td><td><b>SourcePatientInfo</b></td></tr><tr><td style=\"display: none\">*</td><td><span title=\"Codes:{http://snomed.info/sct 264358009}\">General practice premises (environment)</span></td><td><span title=\"Codes:{http://snomed.info/sct 394802001}\">General medicine (qualifier value)</span></td><td><a href=\"#hcDocRefPdf/1\">John Doe  (no stated gender), DoB Unknown ( Medical record number\u00a0(use:\u00a0usual,\u00a0))</a></td></tr></table><hr/><blockquote><p class=\"res-header-id\"><b>Generated Narrative: Patient #1</b></p><a name=\"DocRefPdf/1\"> </a><a name=\"hcDocRefPdf/1\"> </a><p style=\"border: 1px #661aff solid; background-color: #e6e6ff; padding: 10px;\">John Doe  (no stated gender), DoB Unknown ( Medical record number\u00a0(use:\u00a0usual,\u00a0))</p><hr/></blockquote></div>"
  },
  "contained" : [
    {
      "resourceType" : "Patient",
      "id" : "1",
      "identifier" : [
        {
          "use" : "usual",
          "type" : {
            "coding" : [
              {
                "system" : "http://terminology.hl7.org/CodeSystem/v2-0203",
                "code" : "MR"
              }
            ]
          },
          "system" : "urn:oid:2.999.1.2.3.4",
          "value" : "8734"
        }
      ],
      "name" : [
        {
          "family" : "Doe",
          "given" : [
            "John"
          ]
        }
      ]
    }
  ],
  "extension" : [
    {
      "url" : "http://fhir.ch/ig/ch-epr-fhir/StructureDefinition/ch-ext-author-authorrole",
      "valueCoding" : {
        "system" : "urn:oid:2.16.756.5.30.1.127.3.10.6",
        "code" : "HCP",
        "display" : "Healthcare professional"
      }
    }
  ],
  "masterIdentifier" : {
    "system" : "urn:ietf:rfc:3986",
    "value" : "urn:oid:1.3.6.1.4.1.12559.11.13.2.1.2951"
  },
  "identifier" : [
    {
      "use" : "official",
      "system" : "urn:ietf:rfc:3986",
      "value" : "urn:uuid:7261fa25-b36d-4660-a58a-d9df4370e985"
    }
  ],
  "status" : "current",
  "type" : {
    "coding" : [
      {
        "system" : "http://snomed.info/sct",
        "code" : "419891008",
        "display" : "Record artifact"
      }
    ]
  },
  "category" : [
    {
      "coding" : [
        {
          "system" : "http://snomed.info/sct",
          "code" : "405624007",
          "display" : "Administrative documentation"
        }
      ]
    }
  ],
  "subject" : {
    "identifier" : {
      "system" : "urn:oid:2.16.756.5.30.1.127.3.10.3",
      "value" : "761337610411353650"
    }
  },
  "date" : "2025-09-24T12:01:30+00:00",
  "description" : "Test PDF",
  "securityLabel" : [
    {
      "coding" : [
        {
          "system" : "http://snomed.info/sct",
          "code" : "17621005",
          "display" : "Normal (qualifier value)"
        }
      ]
    }
  ],
  "content" : [
    {
      "attachment" : {
        "contentType" : "application/pdf",
        "language" : "de-CH",
        "url" : "urn:uuid:d8d1fe44-07e9-4a84-985f-fde97d77d54b",
        "title" : "Test PDF",
        "creation" : "2025-09-24T12:01:30+00:00"
      },
      "format" : {
        "system" : "urn:oid:2.16.756.5.30.1.127.3.10.10",
        "code" : "urn:che:epr:EPR_Unstructured_Document",
        "display" : "Unstructured EPR document"
      }
    }
  ],
  "context" : {
    "facilityType" : {
      "coding" : [
        {
          "system" : "http://snomed.info/sct",
          "code" : "264358009",
          "display" : "General practice premises (environment)"
        }
      ]
    },
    "practiceSetting" : {
      "coding" : [
        {
          "system" : "http://snomed.info/sct",
          "code" : "394802001",
          "display" : "General medicine (qualifier value)"
        }
      ]
    },
    "sourcePatientInfo" : {
      "reference" : "#1"
    }
  }
}The Document Responder shall provide a CapabilityStatement with the capabilities interaction and indicate that update is available on the DocumentReference.
The Document Responder shall process the Update Document Metadata Request message and return the updated DocumentReference.
Any error that occurs during the processing of the Update Document Metadata Request message shall cause the entire transaction to fail and no change made to the existing DocumentReference. The Document Responder shall return the status and any error codes incurred during the processing of the request in its response message.
With the Federated Cross Community Access option the Document Responder SHALL identify if a document metadata update targets another community. If this is the case, it SHALL forward the request to the target community, otherwise the request can be handled in the own community. If the remote community cannot be reached an error SHALL be generated by the Document Responder and the Document Source SHALL process this error.
See http://hl7.org/fhir/http.html#update for response.
The transaction SHALL be secured by Transport Layer Security (TLS) encryption and server authentication with server certificates. Transactions across communities SHALL use mTLS.
The transaction SHALL use client authentication and authorization using one of the following strategies:
Document Responders SHALL be grouped with the Authorization Decision Consumer actor of the CH:ADR profile defined in Extension 2.1 to Annex 5 of the ordinances and perform an Authorization Decision Request [CH:ADR] for every update document metadata [CH:MHD-1] request in the own community.
The actors SHALL support the traceparent header handling, as defined in Appendix: Trace Context.
The Document Source shall record an CH Audit Event for [CH:MHD-1] Document Source (example).
The Document Responder shall record an CH Audit Event for [CH:MHD-1] Document Responder (example).
For a transaction instead of a direct PUT interaction, the actors shall also be able to record audit events for each Update Document Metadata Request Message in the Bundle.