MyHealth@Eu NCPeH API
0.0.1 - ci-build
150
MyHealth@Eu NCPeH API - Local Development build (v0.0.1) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
This page describes the implementation options of Document Provision task.
The overall business scenarios associated to this task is described in the Business view page
The implementation-indipendent sequence diagrams associated to this task is described in the in the Application view page
The Myhealth@EU general architecture requires that no assumptions are made on the way the service is implemented at the national level.
This implies that any solution adopted for the NCPeH to NCPeH communications has to work properly indipendently by the fact that a HL7 FHIR server, or an XCA registry/repository or any other solution solution is locally adopted.
As for the other services, there are multiple alternatives, not mutually exclusive, for providing documents using the HL7 FHIR API.
The selected mechanism may depend on the type of document and the usage context.
In this first version, this service will be realized by posting (creating) or putting (updating) a DocumentReference, depending on the operation required.
Some alternatives - described only for documentation purposes - are listed below:
Please note that Bundle transaction or batch can be used to issue multiple POST or PUT actions (e.g. providing multiple documents).
The service provider SHALL support transaction and batch interactions as described by the HL7 FHIR standard |
The main advatage of this solution is that of using the same mechanism for providing the document independently by its format. For example it could include and/or refer the PDF and the corresponding FHIR (or CDA) representation.
A DocumentReference resource can refer to or include multiple representations of the same document.
In the following diagram is described how the requesting NCP provides the document by using the DocumentReference.
Figure 1 - Document Provisioning
This transaction uses the same call used by the IHE Simplified Publish [ITI-105] transaction |
The Requesting NCP initiates a send request by sending an HTTP POST request method composed by an eHDSI DocumentReference
The document to be provided SHALL be encoded in the DocumentReference.content.attachment.data element.
Each DocumentReference may return or refer one or more representations (e.g. PDF, HL7 CDA, HL7 FHIR json) of the same document.
POST $server/DocumentReference
In case of success the Responding NCP returns a DocumentReference of type eHDSI DocumentReference with the logical identifier assigned by the receiving partner.
If supported, this id can be used for updating the resource.
In case of processing failure the Responding NCP returns one of the following errors :
HTTP Response | Description |
---|---|
400 Bad Request | resource could not be parsed or failed basic FHIR validation rules |
404 Not Found | resource type not supported, or not a FHIR end-point |
422 Unprocessable Entity | the proposed resource violated applicable FHIR profiles or server business rules. This should be accompanied by an OperationOutcome resource providing additional detail |
POST myNCP.xyz/fhir/DocumentReference
The Requesting NCP initiates an update nd request for a DocumentReference using the FHIR API:
PUT $server/DocumentReference/[docrefid]
[docrefid] is the id of the DocumentReference resource to be updated.
DocumentReference complies with the eHDSI DocumentReference
Each DocumentReference may return or refer one or more representations (e.g. PDF, HL7 CDA, HL7 FHIR json) of the same document.
In case of success the Responding NCP returns a DocumentReference of type eHDSI DocumentReference.
HTTP Response | Description |
400 Bad Request | resource could not be parsed or failed basic FHIR validation rules (or multiple matches were found for conditional criteria) |
401 Not Authorized | authorization is required for the interaction that was attempted |
404 Not Found | resource type not supported, or not a FHIR end-point |
405 Method Not allowed | the resource did not exist prior to the update, and the server does not allow client defined ids |
409/412 - version conflict management | see Managing Resource Contention |
422 Unprocessable Entity | the proposed resource violated applicable FHIR profiles or server business rules |
PUT myNCP.xyz/fhir/DocumentReference/12345