Sample JSON for all FHIR resource types

There’s a hidden gem in the FHIR documentation.

You could be working with FHIR for years without realizing it was there. I won’t tell you how long it took me to find it — too embarrassing.

Each resource type in FHIR is fully documented on its own page. Here’s the Encounter resource:

https://hl7.org/fhir/R4/encounter.html

When we reach this page most of us start scrolling until we find what we’re looking for. Often that’s the description of the elements that make up the resource.

But before you start scrolling, take a look at the tabs at the top of the page. Click on the second tab marked “Examples”.

Here you’ll find a list of sample Encounter resources populated with test data for a host of different use cases. In the case of Encounter there are 10.

https://hl7.org/fhir/R4/encounter-examples.html

Click on the JSON link next to any one of them and you’ll see the raw JSON for the sample resource.

Every resource type in the FHIR documentation has an Examples section just like this, complete with a full JSON body ready to be dropped into a Postman request.

The Observation page is even better. There are upwards of 100 examples on this page, providing complete Observations for glucose, body weight, and all sorts of more complicated readings.

https://hl7.org/fhir/R4/observation-examples.html

If you want to use these samples you will have to do a little work, as the resource reference links to Patients and other resource types will not be pointing to resources in your FHIR server.

But that’s a small price to pay.

When it comes to the FHIR documentation, everything you need is there. It’s just a matter of finding it.

---

Ways to Work With Me

Discover more from Darren Devitt

Subscribe now to keep reading and get access to the full archive.

Continue reading