MyHealth@Eu NCPeH API
10.0.0-ci - ci-build
150
MyHealth@Eu NCPeH API - Local Development build (v10.0.0-ci) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
This page describes the implementation options of Document Retrieval 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 XDS registry/repository or any other solution solution is locally adopted.
There are multiple alternatives, not mutually exclusive, for searching, retrieving, or fetching documents using the HL7 FHIR API.
The selected mechanism may depend on the type of document and the usage context.
For example, searching for documents via DocumentReference - the query type used in the IHE MHD profile - enables a standardized retrieval mechanism regardless of document format. This approach is suitable for simple search mechanisms and requires that a DocumentReference instance is generated for each created document.
On the other hand, searching via DiagnosticReport allows for more advanced queries, but it is limited to imaging and diagnostic reports, as well as HL7 FHIR documents. Other mechanisms may apply in different contexts.
In this first version, this will be realized by searching per DocumentReference
Some alternatives - described only for documentation purposes - are listed below:
Beside the advantages described above, the DocumentReference Search mechanism permits to realize with a common call both the search and retrieve and the document fetch envisioned by the Document Retrieval sequence.
| Note: When used for realizing the search and retrieve feature it complies with the IHE MHD profile. |
In the following diagram is described how the requesting NCP realizes the search or the fetch of the document by using the DocumentReference.
In summary:
Figure 1 - Document Retrieval
The Requesting NCP initiates a search query for a DocumentReference using the FHIR API call:
GET $server/DocumentReference?<searchParameters><modifiers>
The query includes search parameters and modifiers to refine the search criteria.
| Note: The conformance verbs, such as SHALL, used in the "Requesting NCP" and "Responding NCP" optionality columns indicate the actor's capability to support that parameter, not whether the parameter is actually used in a given search. |
Common
| Parameter | searchParameter | type | Requesting NCP | Responding NCP | notes |
|---|---|---|---|---|---|
| Document type | type | token | SHOULD | SHOULD | |
| Document Class | category | token | SHALL | SHALL | |
| Type of content / format | contenttype | token | SHALL | SHALL | |
| Status | status | token | SHOULD | SHOULD | current | superseded | entered-in-error |
| Patient business identifier | patient | reference | SHALL | SHALL | |
| patient.identifier | token | SHALL | SHALL | Chained parameter | |
| Date | date | date | SHOULD | SHOULD | |
| Creation Date | creation | date | SHALL | SHALL | It specifies a search against the DocumentReference.content.attachment.creation |
Hospital Discharge Report
| Parameter | searchParameter | type | Requesting NCP | Responding NCP | notes |
|---|---|---|---|---|---|
| Document type | type | token | SHOULD | SHOULD | |
| Document Class | category | token | SHALL | SHALL | |
| Type of content / format | contenttype | token | SHALL | SHALL | |
| Status | status | token | SHOULD | SHOULD | current | superseded | entered-in-error |
| Patient business identifier | patient | reference | SHALL | SHALL | |
| patient.identifier | token | SHALL | SHALL | Chained parameter | |
| Date | date | date | SHOULD | SHOULD | |
| Creation Date | creation | date | SHALL | SHALL | It specifies a search against the DocumentReference.content.attachment.creation |
| Study type | category | token | MAY | MAY |
Laboratory Report
| Parameter | searchParameter | type | Requesting NCP | Responding NCP | notes |
|---|---|---|---|---|---|
| Document type | type | token | SHOULD | SHOULD | |
| Document Class | category | token | SHALL | SHALL | |
| Type of content / format | contenttype | token | SHALL | SHALL | |
| Status | status | token | SHOULD | SHOULD | current | superseded | entered-in-error |
| Patient business identifier | patient | reference | SHALL | SHALL | |
| patient.identifier | token | SHALL | SHALL | Chained parameter | |
| Date | date | date | SHOULD | SHOULD | |
| Creation Date | creation | date | SHALL | SHALL | It specifies a search against the DocumentReference.content.attachment.creation |
| Study type | category | token | MAY | MAY |
Imaging Study Manifest and Report
| Parameter | searchParameter | type | Requesting NCP | Responding NCP | notes |
|---|---|---|---|---|---|
| Document type | type | token | SHOULD | SHOULD | |
| Document Class | category | token | SHALL | SHALL | |
| Type of content / format | contenttype | token | SHALL | SHALL | |
| Status | status | token | SHOULD | SHOULD | current | superseded | entered-in-error |
| Patient business identifier | patient | reference | SHALL | SHALL | |
| patient.identifier | token | SHALL | SHALL | Chained parameter | |
| Date | date | date | SHOULD | SHOULD | |
| Creation Date | creation | date | SHALL | SHALL | It specifies a search against the DocumentReference.content.attachment.creation |
| Modality | modality | token | SHOULD | SHOULD | the type of imaging capture hardware (Value Set) |
| Study date | period | date | SHOULD | SHOULD | The date and time the imaging study started |
| Anatomical region | bodysite | SHOULD | SHOULD |
Patient Summary
| Parameter | searchParameter | type | Requesting NCP | Responding NCP | notes |
|---|---|---|---|---|---|
| Document type | type | token | SHOULD | SHOULD | |
| Document Class | category | token | SHALL | SHALL | |
| Type of content / format | contenttype | token | SHALL | SHALL | |
| Status | status | token | SHOULD | SHOULD | current | superseded | entered-in-error |
| Patient business identifier | patient | reference | SHALL | SHALL | |
| patient.identifier | token | SHALL | SHALL | Chained parameter | |
| Date | date | date | SHOULD | SHOULD | |
| Creation Date | creation | date | SHALL | SHALL | It specifies a search against the DocumentReference.content.attachment.creation |
Vaccination History
| Parameter | searchParameter | type | Requesting NCP | Responding NCP | notes |
|---|---|---|---|---|---|
| Document type | type | token | SHOULD | SHOULD | |
| Document Class | category | token | SHALL | SHALL | |
| Type of content / format | contenttype | token | SHALL | SHALL | |
| Status | status | token | SHOULD | SHOULD | current | superseded | entered-in-error |
| Patient business identifier | patient | reference | SHALL | SHALL | |
| patient.identifier | token | SHALL | SHALL | Chained parameter | |
| Date | date | date | SHOULD | SHOULD | |
| Creation Date | creation | date | SHALL | SHALL | It specifies a search against the DocumentReference.content.attachment.creation |
The provider shall support the combination of required search parameters
Please note that the date parameter refers to the date when the DocumentReference has been created. A query against the effective document creation date is perfomed by using the SearchParameter creation.
The Responding NCP returns a FHIR Bundle containing the search results. The bundle contains entries of type DocumentReference, compliant with the DocumentReference: Minimal
Bundle.where(type='searchSet').entry.resource.ofType(DocumentReference)
Each DocumentReference may return or refer one or more representations (e.g. PDF, HL7 CDA, HL7 FHIR json) of a specific document instance.
If the document is included in the content.data element we are in the FETCH case.
If the document is referred in the content.url element we are in the SEARCH AND GET case.
In this case it is expected that the url element contains the actual url to be used for retrieving this docuemnt from the HL7 FHIR API.
| HTTP Response | Description |
|---|---|
| 401 Unauthorized | authorization is required for the interaction that was attempted |
| 404 Not Found | resource type not supported, or not a FHIR end-point |
| 410 Gone | resource deleted or no more active |
| All the lab reports of the Czech patient 456789123 created from 2023, Feb 20th, using category [**http://loinc.org | LP74123-8**](https://loinc.org/LP74123-8). |
GET $server/DocumentReference?category=http://loinc.org|LP74123-8&patient.identifier=https://ncez.mzcr.cz/standards/fhir/sid/rid|456789123&date=ge2023-02-20
| All the lab reports of the Czech patient 456789123 of type PDF, using category [**http://loinc.org | LP74123-8**](https://loinc.org/LP74123-8). |
GET $server/DocumentReference?category=http://loinc.org|LP74123-8&patient.identifier=https://ncez.mzcr.cz/standards/fhir/sid/rid|456789123&contenttype=application/pdf
| All the Microbiology lab reports of the Czech patient 456789123 of the 6 months (assuming that today is 2024-03-25), using category [**http://loinc.org | LP74123-8**](https://loinc.org/LP74123-8). |
GET $server/DocumentReference?category=http://loinc.org|LP74123-8&patient.identifier=https://ncez.mzcr.cz/standards/fhir/sid/rid|456789123&category=http://loinc.org|18725-2&date=ge2023-09-25
If DocumentReference.content.data.exists(), the document can be fetched directly from the DocumentReference.content.data field and the sequence ends.
Otherwise,
if DocumentReference.content.data is empty, the system must search and retrieve the document from the specified URL.
The URL shall be a valid FHIR API URL in the form:
$server/[Resource]/id
The [Resource] segment shall be either Bundle or Binary.
The following rules apply:
Bundle, the content type shall be application/fhir+json or application/fhir+xml.application/fhir+json or application/fhir+xml, the resource shall be Binary.If the content type of the document is application/fhir+json or application/fhir+xml, the system retrieves it using a FHIR Bundle request:
GET $server/Bundle/id
The Requesting NCP sends a request to the Responding NCP for the Bundle. The Responding NCP returns the Bundle, compliant with one of the profiles specified in the HL7 FHIR IG listed in the Data menu.
Otherwise, if the content type is not application/fhir+json or application/fhir+xml, the system retrieves it as a HL7 FHIR Binary resource:
GET $server/Binary/id
The Requesting NCP sends a request to fetch the document as a Binary resource. The Responding NCP returns the Binary content.
| HTTP Response | Description |
|---|---|
| 401 Unauthorized | authorization is required for the interaction that was attempted |
| 404 Document Not Found | URI not known |
| 410 Gone (or 404 when 410 is unacceptable due to security/privacy policy) | Document is Deprecated or not available |
| 406 Not Acceptable | Document Responder unable to format document in content types listed the Accept field |
| 403 Forbidden / Request Type Not Supported | HTTP request specified is otherwise not a legal value |
Retrieval of an HL7 FHIR document representation returned as a Bundle.
GET $server/Bundle/12345
Retrieval of a non-FHIR document representation returned as a Binary resource.
GET $server/Binary/67890