Skip to content

FHIR Tutorial

FHIR (Fast Healthcare Interoperability Resources) is the HL7 standard for exchanging healthcare data over RESTful HTTP APIs. This quickstart walks through reading from and writing to a FHIR server with QIE, from constructing search queries in a browser, to building a channel that converts inbound HL7 v2 messages into FHIR Patient resources and POSTs them to a server.

Every hands-on exercise targets the public HAPI FHIR test server at https://hapi.fhir.org/baseR4. That server is open to anyone, requires no credentials, and resets its data periodically. That is perfect for learning, but never use it with real patient data.

What you build

By the end of the quickstart you have:

  • A working mental model of the FHIR REST URL pattern and searchset Bundle responses, exercised in a browser against the HAPI sandbox.
  • A Web Service Connection in QIE pointing at that sandbox.
  • A channel that consumes an ADT^A04 HL7 v2 message, builds a FHIR Patient resource from a System Variable template using qie.evaluateTemplate(), PUTs it to the sandbox under the MRN from PID-3.1, and logs HAPI's response via an Acknowledgement script.

This quickstart is a starter, not an exhaustive treatment. It gets you to a working FHIR channel quickly so you can extend the pattern to your own resources. The companion Resources -> FHIR reference page covers the broader specification surface (search prefix and modifier tables, Bundle semantics, HL7 v2-to-FHIR field mappings).

Chapters

  1. Before Running the FHIR Quickstart covers the prerequisites: a working QIE install, a sample HL7 ADT message, and reachability of hapi.fhir.org.
  2. FHIR Basics covers the smallest amount of FHIR you need to follow the rest of the quickstart: payload formats, the RESTful URL pattern, Bundles, and how QIE maps to each.
  3. Searching a FHIR Server in a Browser builds queries against the HAPI sandbox in your browser to develop a feel for FHIR URLs, search prefixes, and searchset Bundle responses. No QIE work in this chapter.
  4. HL7 v2 to FHIR with a Template is the end-to-end QIE build: create the Web Service Connection, a System Variable template, and a channel that converts an inbound ADT message into a FHIR Patient resource and PUTs it to the sandbox under the MRN from PID-3.1.

How this fits with the other tutorials

The FHIR Quickstart assumes you are already comfortable with QIE channels, mapping nodes, and System Variables. If those concepts are new, work through the QIE Tutorial first.

A FHIR channel is, in the end, a JSON channel that talks to an HTTP server. If you are not yet at home with JSON node paths, the JSON Tutorial is a useful detour before this one. If your FHIR server requires OAuth 2.0 (most production servers do), pair this quickstart with the OAuth 2.0 Tutorial. The HAPI sandbox accepts anonymous requests, so OAuth is intentionally left out here.

The companion reference page is Resources -> FHIR. It collects the URL anatomy, search syntax, Bundle types, and HL7 v2-to-FHIR field mappings in one place; reach for it while building real channels after the quickstart.