FHIR Warehouse
This page is deprecated. It describes how to access the old FHIR warehouse. You should follow the new procedure on the page Access FHIR warehouse.
Introduction
Posos provides read-only access to a FHIR warehouse containing scanned prescriptions.
This warehouse is hosted in Europe using the Google Cloud Healthcare API service, and its access is protected. It complies with the FHIR R4 standard.
This documentation does not aim to describe the exposed interface, which corresponds exactly to the protocol described by FHIR, following the following conformance statement: https://cloud.google.com/healthcare-api/docs/fhir.
Here, we will discuss the connection modalities to the warehouse proposed by Posos and provide some content examples.
Reference to standard and Google documentation
- Standard API REST Documentation
- Standard Resources Documentation
- Examples with Google Cloud Healthcare
Access URL to the warehouse
The base URL is:
https://healthcare.googleapis.com/v1/projects/posos-prod/locations/europe-west2/datasets/posos-on-fhir/fhirStores/:slug
Parameter | Description |
---|---|
slug | Name of the FHIR warehouse. It corresponds to the name communicated to you with the key. |
Obtaining an identity token
The API is accessible only to authenticated users. The authentication mechanism is the one proposed by Google Cloud, based on the OAuth2 protocol and a private service account key.
The rest of this documentation mentions a key.json
file that you can obtain from Posos. It is a personal private key that will allow you access to the demonstration environment. Never share this key.
For the request to be accepted, it must be accompanied, in its HTTP headers, by an authentication token obtained during a previous exchange phase following the OAuth2 protocol summarized here:
- The user service constructs a JWT token signed with its private key containing its access requests.
- The service exchanges this signed JWT token for an opaque access token with the Google Auth API.
- The service then uses this access token as a Bearer token in its subsequent requests.
Obtaining an access token
The procedure is written here https://developers.google.com/identity/protocols/oauth2/service-account#httprest and is facilitated by the use of ad-hoc libraries. If Google does not offer one for your programming language, there are third-party implementations, and otherwise, you have to implement the exchange yourself, which is not very complex.
The claims / scope to request for accessing the Cloud Healthcare API are as follows:
https://www.googleapis.com/auth/cloud-platform
Using the token
Requests to the FHIR warehouse must then contain the previously obtained access token in their Authorization
header according to the principle of the Bearer token. This would result in a header of the following form:
Authorization: Bearer <access token>
Using the API
The next step is to use the warehouse’s REST API, either directly with a REST client or via a dedicated FHIR client. The only requirement is to be able to provide the Bearer token as described above.
Example
Retrieving a patient’s last scanned prescription with the httpie
command.
Request
curl --request GET \
--url "https://healthcare.googleapis.com/v1/projects/posos-prod/locations/europe-west2/datasets/posos-on-fhir/fhirStores/:slug/fhir/RequestGroup?subject:Patient.identifier=id://partner|3f76b58d-26ea-458a-8992-a0740aa0c0f4&_count=1&_sort=-_lastUpdated" \
--header 'Authorization : Bearer <token>'
Output
{
"entry": [
{
"fullUrl": "https://healthcare.googleapis.com/v1/projects/posos-prod/locations/europe-west2/datasets/posos-on-fhir/fhirStores/:slug/fhir/RequestGroup/acfaed53-ea82-4970-be08-34ddd4385e65",
"ressource": {
"action": [
{
"resource": {
"reference": "#b8751a34-956a-4f7c-95f7-feb9f1b96b7f-0"
}
},
{
"resource": {
"reference": "#b8751a34-956a-4f7c-95f7-feb9f1b96b7f-1"
}
},
{
"resource": {
"reference": "#b8751a34-956a-4f7c-95f7-feb9f1b96b7f-2"
}
},
{
"resource": {
"reference": "#b8751a34-956a-4f7c-95f7-feb9f1b96b7f-3"
}
},
{
"resource": {
"reference": "#b8751a34-956a-4f7c-95f7-feb9f1b96b7f-4"
}
}
],
"author": {
"reference": "#author"
},
"authoredOn": "2022-05-12T18:16:03.467Z",
"contained": [
{
"code": {
"coding": [
{
"code": "ramipril",
"display": "ramipril",
"system": "http://posos.on.fhir/shortname"
},
{
"code": "ramipril",
"display": "ramipril",
"system": "http://posos.on.fhir/dci"
},
{
"code": "C09AA05",
"display": "RAMIPRIL",
"system": "http://www.whocc.no/atc"
},
{
"code": "60489841",
"display": "RAMIPRIL ZYDUS FRANCE 2,5 mg, divisible tablet",
"system": "http://bdpm/cis"
},
{
"code": "60834757",
"display": "RAMIPRIL BOUCHARA RECORDATI 2,5 mg, divisible tablet",
"system": "http://bdpm/cis"
},
{
"code": "62387714",
"display": "RAMIPRIL ZENTIVA 2,5 mg, divisible tablet",
"system": "http://bdpm/cis"
},
{
"code": "63386309",
"display": "RAMIPRIL SUN 2,5 mg, divisible tablet",
"system": "http://bdpm/cis"
},
{
"code": "63506242",
"display": "RAMIPRIL SANDOZ 2,5 mg, divisible tablet",
"system": "http://bdpm/cis"
},
{
"code": "64227441",
"display": "RAMIPRIL BIOGARAN 2,5 mg, divisible tablet",
"system": "http://bdpm/cis"
},
{
"code": "64687386",
"display": "RAMIPRIL EVOLUGEN 2,5 mg, divisible tablet",
"system": "http://bdpm/cis"
},
{
"code": "65542746",
"display": "RAMIPRIL EG 2,5 mg, divisible tablet",
"system": "http://bdpm/cis"
},
{
"code": "66216041",
"display": "RAMIPRIL CRISTERS 2,5 mg, divisible tablet",
"system": "http://bdpm/cis"
},
{
"code": "66285105",
"display": "RAMIPRIL VIATRIS 2,5 mg, divisible tablet",
"system": "http://bdpm/cis"
},
{
"code": "66487797",
"display": "RAMIPRIL ALTER 2,5 mg, divisible tablet",
"system": "http://bdpm/cis"
},
{
"code": "67791290",
"display": "RAMIPRIL ARROW LAB 2,5 mg, divisible tablet",
"system": "http://bdpm/cis"
},
{
"code": "68604085",
"display": "RAMIPRIL ALMUS 2,5 mg, divisible tablet",
"system": "http://bdpm/cis"
},
{
"code": "68929602",
"display": "RAMIPRIL ARROW GENERIQUES 2,5 mg, divisible tablet",
"system": "http://bdpm/cis"
},
{
"code": "69048652",
"display": "RAMIPRIL KRKA 2,5 mg, tablet",
"system": "http://bdpm/cis"
},
{
"code": "69868248",
"display": "RAMIPRIL TEVA SANTE 2,5 mg, divisible tablet",
"system": "http://bdpm/cis"
},
{
"code": "2,5 mg",
"display": "2,5 mg",
"system": "http://posos.on.fhir/dose"
},
{
"code": "tablet",
"display": "tablet",
"system": "http://posos.on.fhir/form"
}
]
},
"id": "UmFtaXByaWw=",
"ingredient": [
{
"itemCodeableConcept": {
"coding": [
{
"code": "ramipril",
"display": "ramipril",
"system": "http://posos.on.fhir/dci"
}
]
}
}
],
"resourceType": "Medication"
},
{
"code": {
"coding": [
{
"code": "monoprost",
"display": "monoprost",
"system": "http://posos.on.fhir/shortname"
},
{
"code": "latanoprost",
"display": "latanoprost",
"system": "http://posos.on.fhir/dci"
},
{
"code": "S01EE01",
"display": "LATANOPROST",
"system": "http://www.whocc.no/atc"
},
{
"code": "66287654",
"display": "MONOPROST 50 microgrammes/ml, collyre solution",
"system": "http://bdpm/cis"
},
{
"code": "67303969",
"display": "MONOPROST 50 microgrammes/ml, collyre solution in single-dose container",
"system": "http://bdpm/cis"
},
{
"code": "collyre en solution",
"display": "collyre solution",
"system": "http://posos.on.fhir/form"
}
]
},
"id": "TW9ub3Byb3N0",
"ingredient": [
{
"itemCodeableConcept": {
"coding": [
{
"code": "latanoprost",
"display": "latanoprost",
"system": "http://posos.on.fhir/dci"
}
]
}
}
],
"resourceType": "Medication"
},
{
"code": {
"coding": [
{
"code": "bromazepam",
"display": "bromazepam",
"system": "http://posos.on.fhir/shortname"
},
{
"code": "bromazepam",
"display": "bromazepam",
"system": "http://posos.on.fhir/dci"
},
{
"code": "N05BA08",
"display": "BROMAZEPAM",
"system": "http://www.whocc.no/atc"
},
{
"code": "61084408",
"display": "BROMAZEPAM ARROW 1,5 mg, tablet",
"system": "http://bdpm/cis"
},
{
"code": "1,5 mg",
"display": "1,5 mg",
"system": "http://posos.on.fhir/dose"
},
{
"code": "tablet",
"display": "tablet",
"system": "http://posos.on.fhir/form"
}
]
},
"id": "QnJvbWF6ZXBhbQ==",
"ingredient": [
{
"itemCodeableConcept": {
"coding": [
{
"code": "bromazepam",
"display": "bromazepam",
"system": "http://posos.on.fhir/dci"
}
]
}
}
],
"resourceType": "Medication"
},
{
"code": {
"coding": [
{
"code": "tamsulosine",
"display": "tamsulosine",
"system": "http://posos.on.fhir/shortname"
},
{
"code": "tamsulosine",
"display": "tamsulosine",
"system": "http://posos.on.fhir/dci"
},
{
"code": "G04CA02",
"display": "TAMSULOSINE",
"system": "http://www.whocc.no/atc"
},
{
"code": "65795735",
"display": "TAMSULOSINE ARROW LAB LP 0,4 mg, extended-release capsule",
"system": "http://bdpm/cis"
},
{
"code": "65823679",
"display": "TAMSULOSINE BIOGARAN L.P. 0,4 mg, extended-release capsule",
"system": "http://bdpm/cis"
},
{
"code": "65869609",
"display": "TAMSULOSINE SUN LP 0,4 mg, extended-release capsule",
"system": "http://bdpm/cis"
},
{
"code": "66281345",
"display": "TAMSULOSINE ZENTIVA LAB LP 0,4 mg, extended-release capsule",
"system": "http://bdpm/cis"
},
{
"code": "66305159",
"display": "TAMSULOSINE KRKA LP 0,4 mg, extended-release capsule",
"system": "http://bdpm/cis"
},
{
"code": "67486011",
"display": "TAMSULOSINE ALMUS L.P. 0,4 mg, extended-release capsule",
"system": "http://bdpm/cis"
},
{
"code": "68655083",
"display": "TAMSULOSINE TEVA LP 0,4 mg, extended-release capsule",
"system": "http://bdpm/cis"
},
{
"code": "68735615",
"display": "TAMSULOSINE SANDOZ LP 0,4 mg, extended-release capsule",
"system": "http://bdpm/cis"
},
{
"code": "68840153",
"display": "TAMSULOSINE MYLAN L.P. 0,4 mg, extended-release capsule",
"system": "http://bdpm/cis"
},
{
"code": "68843466",
"display": "TAMSULOSINE EG L.P. 0,4 mg, extended-release capsule",
"system": "http://bdpm/cis"
},
{
"code": "69181268",
"display": "TAMSULOSINE EVOLUGEN L.P. 0,4 mg, extended-release capsule",
"system": "http://bdpm/cis"
},
{
"code": "69284407",
"display": "TAMSULOSINE ARROW LP 0,4 mg, extended-release capsule",
"system": "http://bdpm/cis"
},
{
"code": "0,4 mg",
"display": "0,4 mg",
"system": "http://posos.on.fhir/dose"
},
{
"code": "extended-release capsule",
"display": "extended-release capsule",
"system": "http://posos.on.fhir/form"
}
]
},
"id": "VGFtc3Vsb3NpbmU=",
"ingredient": [
{
"itemCodeableConcept": {
"coding": [
{
"code": "tamsulosine",
"display": "tamsulosine",
"system": "http://posos.on.fhir/dci"
}
]
}
}
],
"resourceType": "Medication"
},
{
"code": {
"coding": [
{
"code": "doliprane",
"display": "doliprane",
"system": "http://posos.on.fhir/shortname"
},
{
"code": "paracetamol",
"display": "paracetamol",
"system": "http://posos.on.fhir/dci"
},
{
"code": "N02BE01",
"display": "PARACETAMOL",
"system": "http://www.whocc.no/atc"
},
{
"code": "67119691",
"display": "DOLIPRANE 500 mg, capsule",
"system": "http://bdpm/cis"
},
{
"code": "500 mg",
"display": "500 mg",
"system": "http://posos.on.fhir/dose"
},
{
"code": "capsule",
"display": "capsule",
"system": "http://posos.on.fhir/form"
}
]
},
"id": "RG9saXByYW5l",
"ingredient": [
{
"itemCodeableConcept": {
"coding": [
{
"code": "paracetamol",
"display": "paracetamol",
"system": "http://posos.on.fhir/dci"
}
]
}
}
],
"resourceType": "Medication"
},
{
"dosageInstruction": [
{
"text": "SP 28 jour(s)."
}
],
"id": "b8751a34-956a-4f7c-95f7-feb9f1b96b7f-0",
"intent": "order",
"medicationReference": {
"reference": "#UmFtaXByaWw="
},
"resourceType": "MedicationRequest",
"status": "draft",
"subject": {
"reference": "Patient/cc508c17-051b-42e9-bf8e-4205ea6183d9"
},
"text": {
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">Ramipril - SP 28 jour(s).</div>",
"status": "generated"
}
},
{
"dosageInstruction": [
{
"text": "recipient unidose le soir À partir du 30/11/2021"
}
],
"id": "b8751a34-956a-4f7c-95f7-feb9f1b96b7f-1",
"intent": "order",
"medicationReference": {
"reference": "#TW9ub3Byb3N0"
},
"resourceType": "MedicationRequest",
"status": "draft",
"subject": {
"reference": "Patient/cc508c17-051b-42e9-bf8e-4205ea6183d9"
},
"text": {
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">Monoprost - recipient unidose le soir À partir du 30/11/2021</div>",
"status": "generated"
}
},
{
"dosageInstruction": [
{
"text": ""
}
],
"id": "b8751a34-956a-4f7c-95f7-feb9f1b96b7f-2",
"intent": "order",
"medicationReference": {
"reference": "#QnJvbWF6ZXBhbQ=="
},
"resourceType": "MedicationRequest",
"status": "draft",
"subject": {
"reference": "Patient/cc508c17-051b-42e9-bf8e-4205ea6183d9"
},
"text": {
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">Bromazepam - </div>",
"status": "generated"
}
},
{
"dosageInstruction": [
{
"text": ""
}
],
"id": "b8751a34-956a-4f7c-95f7-feb9f1b96b7f-3",
"intent": "order",
"medicationReference": {
"reference": "#VGFtc3Vsb3NpbmU="
},
"resourceType": "MedicationRequest",
"status": "draft",
"subject": {
"reference": "Patient/cc508c17-051b-42e9-bf8e-4205ea6183d9"
},
"text": {
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">Tamsulosine - </div>",
"status": "generated"
}
},
{
"dosageInstruction": [
{
"text": "IV. Paracetamol 500 mg capsule (DOLIPRANE 500MG capsule 100) 2 capsules orally in the morning at night if necessary From 30/11/2021 QSP 28 day(s)."
}
],
"id": "b8751a34-956a-4f7c-95f7-feb9f1b96b7f-4",
"intent": "order",
"medicationReference": {
"reference": "#RG9saXByYW5l"
},
"resourceType": "MedicationRequest",
"status": "draft",
"subject": {
"reference": "Patient/cc508c17-051b-42e9-bf8e-4205ea6183d9"
},
"text": {
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">Doliprane - IV. Paracetamol 500 mg capsule (DOLIPRANE 500MG capsule 100) 2 capsules orally in the morning and at night if necessary From 30/11/2021 QSP 28 day(s).</div>",
"status": "generated"
}
},
{
"id": "author",
"identifier": [
{
"system": "id://partner",
"value": "john-doe"
},
{
"system": "id://posos",
"value": "3cc53d9f-c82c-4038-9869-a1b8b6d43ddf"
}
],
"resourceType": "Practitioner"
}
],
"id": "acfaed53-ea82-4970-be08-34ddd4385e65",
"identifier": [
{
"system": "id://posos",
"value": "b8751a34-956a-4f7c-95f7-feb9f1b96b7f"
}
],
"intent": "order",
"meta": {
"lastUpdated": "2022-05-12T18:16:06.503802+00:00",
"versionId": "MTY1MjM3OTM2NjUwMzgwMjAwMA"
},
"resourceType": "RequestGroup",
"status": "draft",
"subject": {
"reference": "Patient/cc508c17-051b-42e9-bf8e-4205ea6183d9"
},
"text": {
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><ul><li>Ramipril - SP 28 day(s).</li><li>Monoprost - single-dose container in the evening From 30/11/2021</li><li>Bromazepam - </li><li>Tamsulosine - </li><li>Doliprane - IV. Paracetamol 500 mg capsule (DOLIPRANE 500MG capsule 100) 2 capsules orally in the morning at night if necessary From 30/11/2021 QSP 28 day(s).</li></ul></div>",
"status": "generated"
}
},
"search": {
"mode": "match"
}
}
],
"link": [
{
"relation": "search",
"url": "https://healthcare.googleapis.com/v1/projects/posos-prod/locations/europe-west2/datasets/posos-on-fhir/fhirStores/:slug/fhir/RequestGroup/?_count=1&_sort=-_lastUpdated&subject%3APatient.identifier=id%3A%2F%2Fpartner%7C3f76b58d-26ea-458a-8992-a0740aa0c0f4"
},
{
"relation": "first",
"url": "https://healthcare.googleapis.com/v1/projects/posos-prod/locations/europe-west2/datasets/posos-on-fhir/fhirStores/:slug/fhir/RequestGroup/?_count=1&_sort=-_lastUpdated&subject%3APatient.identifier=id%3A%2F%2Fpartner%7C3f76b58d-26ea-458a-8992-a0740aa0c0f4"
},
{
"relation": "self",
"url": "https://healthcare.googleapis.com/v1/projects/posos-prod/locations/europe-west2/datasets/posos-on-fhir/fhirStores/:slug/fhir/RequestGroup/?_count=1&_sort=-_lastUpdated&subject%3APatient.identifier=id%3A%2F%2Fpartner%7C3f76b58d-26ea-458a-8992-a0740aa0c0f4"
}
],
"resourceType": "Bundle",
"total": 1,
"type": "searchset"
}