- VS Code
- Browser
- Insomnia (https://insomnia.rest/)or Postman (https://www.postman.com/downloads/)
- Convert the below patient record (unstructured) to a FHIR patient resource
Name: Pablo Emilio Escobar Gaviria Gender: Male DOB: 1, December 1949 Phone: 2908409234 Email: [email protected] Address : 213, Rionegro, Medellín, Colombia.
- Go to the FHIR website - https://www.hl7.org/fhir. Everything you need to know about FHIR standard and also the source of truth
- Download the FHIR JSON Schema here - JSON Schema https://www.hl7.org/fhir/fhir.schema.json.zip
- Add a File with fhir.schema.json to your project folder
- Congifgure the workspace settings by clicking ctr+shift+p or cmd+shit+p then type workspace settings, then add the following code
{
"json.schemas": [
{
"fileMatch": [
"*.fhir.json"
],
"url": "./fhir.schema.json"
}
]
}
- In the project folder, create a resource (patient.fhir.json)
- Go to the patient resource to learn more about the patient resources - https://www.hl7.org/fhir/patient.html
- Start by adding the braces {}
- Use autocomplete to fill in the resource (patient) attributes - Press ctrl+space and press enter once you get the key for the resource
- Manually add/type value for the key
- VSCode will let you know of any errors/validation/type for the key selected in the problems pane
Creating a patient resource extensions & profiles - https://www.hl7.org/fhir/patient-profiles.html
NB. The use of extensions should be controlled to avoid duplication or corruption of the file
Also check out https://simplifier.net/ to do it online :)
- HL7 has publicly available servers - https://wiki.hl7.org/Publicly_Available_FHIR_Servers_for_testing
- We shall be using - http://hapi.fhir.org/baseR4 for the API test
- You can use this GUI to do the same - http://hapi.fhir.org/resource?encoding=null&pretty=true&resource=Patient (Select the Health Intersection R4 server)
- We can use Insomnia to test our resources
- In Insomnia/Postman you can create a FHIR project folder
- You can use the following operations on the base url : in this case using publicly available HAPI server url OPTIONS - Get the capability statement for the FHIR server - http://hapi.fhir.org/baseR4 GET - get resource or search - http://hapi.fhir.org/baseR4/Patient/id POST - create a resource - http://hapi.fhir.org/baseR4/Patient PUT - Update a resource - http://hapi.fhir.org/baseR4/Patient/id
- Resources to create 1. Create a Patient 2. Create a Patient with extension 3. Get Patient 4. Create Patient Observation 5. Update Patient Observation 6. Search Patient Observation
NB. Add your patient_id where id is given or value for xxx
We can also perform search examples via URL. More info on params here - https://www.hl7.org/fhir/searchparameter.html
- All patient whose name starts with X - http://hapi.fhir.org/baseR4/Patient?name=xxx
- All patient whose family name starts with X - http://hapi.fhir.org/baseR4/Patient?family=xxx
- All patient observations by patient name - http://hapi.fhir.org/baseR4/Observation?subject.name=xxx
- All patient observations by patient id - http://hapi.fhir.org/baseR4/Observation?patient=Patient/id
- All BP observations by code - http://hapi.fhir.org/baseR4/Observation?patient=Patient/id&code=http://lonic.org|15074-8 NB. the BP code used was http://lonic.org|15074-8
We are going to work on the Transaction Bundle with a conditional update - https://www.hl7.org/fhir/bundle.html
This takes multiple resources to POST concurrently to the FHIR server. It's an all or nothing success scenario.
Example TBC