FHIR (pronounced "Fire") is a standard for interoperable exchange of healthcare data developed under the HL7 organization. FHIR includes all features present in HL7 V2, HL7 V3, and CDA.
For more information on FHIR and benefits for providers, payers, clinicians, etc. - check out
Now, let's immediately double click into the HAPI-FHIR Library.
HAPI-FHIR library is an open-source implementation of the FHIR specification in Java. It can be used for development of the client and RESTful client and server applications.
You can start testing the HAPI-FHIR by for example creating a simple client application for inserting Patient data into the test FHIR server.
In order to create a client application, the developer must include the Core library and one of the data structure libraries into the project. The appropriate data structure is selected based on the FHIR version that the developer is planning to use. The following maven configuration example shows how DSTU2 dependency with HL7 data model definitions is
The following example shows how HAPI-FHIR framework can be used to create a model that will be used as a part of the Add Patient transaction (This example uses
FhirContext ctx = FhirContext.forDstu2Hl7Org();
String serverBase = "http://fhirtest.uhn.ca/baseDstu2";
IGenericClient client = ctx.newRestfulGenericClient(serverBase);
Patient patient = new Patient();
// FIRST AND LAST NAME
// SOCIAL SECURITY NUMBER
// ADDRESS INFORMATION
.addLine("Street name, number, direction & P.O. Box etc.")
.setCity("Name of city, town etc.")
.setState("Sub-unit of country (abbreviations ok)")
.setPostalCode("Postal/ZIP code for area");
// CONTACT https://www.hl7.org/fhir/datatypes-examples.html#ContactPoint
.setValue("(555) 675 5745");
.setValue("(415) 675 5745");
// EMERGENCY CONTACT https://www.hl7.org/FHIR/patient-definitions.html#Patient.contact
ContactComponent emergencyContact = new ContactComponent();
.setValue("(111) 675 5745");
// Relationship to patient
new HumanName().addFamily("Last Name contact").addGiven("First name contact")
// Encode to JSON
IParser jsonParser = ctx.newJsonParser();
String encoded = jsonParser.encodeResourceToString(patient);
"value": "(555) 675 5745"
"value": "(415) 675 5745"
"Street name, number, direction & P.O. Box etc."
"city": "Name of city, town etc.",
"state": "Sub-unit of country (abbreviations ok)",
"postalCode": "Postal/ZIP code for area"
"Last Name contact"
"First name contact"
"value": "(111) 675 5745"
Developers should carefully choose data structure dependency as there are some differences in the HAPI-FHIR API. For
HAPI-FHIR framework is a fairly simple framework to use. The complexity is in the maturity of the FHIR specification. Numerous hours can be spent trying to figure out how to populate FHIR resource request objects, so be sure to allocate enough time on this or consult with someone in advance.
SMART Health IT
SMART Health IT is a guideline, based on open standards, for creating healthcare applications.
When describing SMART Health IT we must keep the following terms in mind:
- FHIR is a data model definition.
- EHR systems are populating FHIR data model with the actual patient data.
- SMART defines how 3rd party applications can be executed inside of the EHR itself (There is a default launch mechanism definition). It tackles security as well, as it defines how to determine identity and data access rights of the EHR user.
You can create a sample SMART application by following the introductory Cerner tutorial. The process is rather simple, but we did encounter some surprises along the way. Namely, at least in the Cerner Sandbox, almost all FHIR operations are Read Only. Currently, only the following resources are writable: AllergyIntolerance, Appointment, Condition,
Creating SMART applications is not challenging from the technological perspective. The documentation is not quite there yet since it's still a young project, but the expectation is that the SMART organization and vendors will improve in this area. The bigger problem might be the vendors and their interpretation of the FHIR specification. One example of such difference is as follows: FHIR medication resource, Epic sites implement with the RXNorm standard; however, a Cerner implementation would use an internal Cerner ID. Each vendor has their own specifics for EHR API's so maybe, for start, go with some of the integration platforms like Redox.
- More in-depth details about SMART can be
found onthe following URL: https://fhirblog.com/2016/07/08/what-is-smart-and-why-should-you-care/.
- Here is a
sampletutorial on how to create an application on the Cerner’s sandbox: http://engineering.cerner.com/smart-on-fhir-tutorial/#run-your-app-against-smart-health-it-sandbox.
If you want to double