Test your FHIR query skills

Are your FHIR query skills advanced or are you just getting started?

Here are 5 tasks that can be accomplished with a single search query each. If you can run all 5 in 10 minutes, consider yourself a FHIR master.

Write your search queries in Postman or in Vanya and run each query against the Firely test server.

Firely Server URL: https://server.fire.ly

Bonus points for including a total count with each query.

1. BEGINNER: Get all “completed” appendectomy Procedures, sorted by most recent
– Appendectomy code: 80146002
– Expect 28 Procedures

2. BEGINNER: Get all Encounters for this year along with their Patients and Observations
– Hint: you need to use both the “_include” and “_revinclude” parameters
– Expect 58 Encounters

3. INTERMEDIATE: Get all Patients with a name that contains “john” and with an address
– Hint: You should see “John Doe” AND “Fred Johnson”
– Expect 316 Patients

4. ADVANCED: Get all Patients who had the MMR vaccine in 2024
Find the MMR vaccine code here.
– Vaccine details are stored in the Immunization resource type
– Expect 1 Patient

5. ADVANCED: Get all blood pressure Observations with a reading above 180/100
– BP code: 85354-9
– Expect 2 Observations

If you can successfully run all of the above queries without referencing the FHIR documentation for the Observation and Immunization resources, your FHIR query skills surpass my own.

  • Query 3 requires an understanding of search modifiers
  • Query 4 uses reverse chaining
  • Query 5 requires a composite search parameter

You’ll find the answers at the bottom of the page.

Postman: https://www.postman.com
Vanya: https://vanyalabs.com

*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*

Answers

Query 1

/Procedure?code=http://snomed.info/sct|80146002&status=completed&_sort=-date&_total=accurate

Query 2

/Encounter?date=2025&_include=Encounter:patient&_revinclude=Observation:encounter&_total=accurate

Query 3

/Patient?name:contains=john&address:missing=false&_total=accurate

Query 4

/Patient?_has:Immunization:patient:vaccine-code=http://hl7.org/fhir/sid/cvx|03&_has:Immunization:patient:date=2024&_total=accurate

Query 5

/Observation?code=http://loinc.org|85354-9&component-code-value-quantity=http://loinc.org|8480-6$gt180&component-code-value-quantity=http://loinc.org|8462-4$gt100&_total=accurate

---

Download my “FHIR Architecture Decisions” book

Discover more from Darren Devitt

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

Continue reading