
Comparative Analysis of HAPI FHIR and FHIR Server for Azure
Centers for Medicare & Medicaid Services (CMS) recently proposed new policy changes regarding blocking rules, patient access to healthcare data, and PGHD, patient-generated health care data. The purpose of this policy is to make patient data more accessible and useful via a standard format. Usually, this health information resides is in a restricted environment and not easily accessible to end-users (patients). This new CMS rule aims towards empowering patients and giving them access to their own data.
These changes open a whole new set of opportunities for healthcare solutions providers. FHIR being already very popular in the industry provides a natural way to implements the new rules. It is the obvious choice to open healthcare data to patients. However, there are so many flavors of FHIR server implementations in the market and it’s not easy to choose a specific version. To help the developers, in this blog we have compared the two popular FHIR server implementations HAPI FHIR server and FHIR Server for Azure. This is a very comprehensive comparison that covers many different aspects of two FHIR server and will be very helpful in making an informed decision that suits best to your requirements.
Cost
There is no significant difference in cost between the two servers as both of them are open source web applications and will be deployed within an Azure app service plan.
Features
Features of the two servers have been determined through a comparison of their capability statements and their documentation. Note that Azure FHIR has implemented STU3 only while HAPI FHIR has implemented versions prior to STU3 and STU3 as well. Therefore, the comparison that follows touches the aspects of STU3.
Instance Level Interactions
FHIR Specification | HAPI FHIR | Azure FHIR |
Read the current state of the resource: “read” | Implemented | Implemented |
Read the state of a specific version of the resource: “vread” | Implemented | Implemented |
Update an existing resource by its ID: “update” | Implemented | Implemented |
Create a new resource when a resource doesn’t exist by an update: “update” | Implemented | Implemented |
Update an existing resource based on some identification criteria: “conditional update” | Implemented | Not implemented |
Update an existing resource by posting a set of changes to it: “patch” | Implemented | Not implemented |
Delete a resource: “delete” | Implemented | Implemented |
Delete a resource or multiple resources based on some identification criteria: “conditional delete” | Implemented | Not implemented |
Retrieve the change history for a particular resource: “history” | Implemented | Implemented |
Type Level Interactions
FHIR Specification | HAPI FHIR | Azure FHIR |
Create a new resource with a server assigned id: “create” | Implemented | Implemented |
Create a new resource only if some equivalent resource doesn’t already exist: “conditional create” | Implemented | Not implemented |
Search the resource type based on some filter criteria: “search” | Partial but HAPI has implemented more features than Azure | Partial |
Retrieve the change history for a particular resource type: “history” | Implemented | Implemented |
Whole System Interactions
FHIR Specification | HAPI FHIR | Azure FHIR |
Get a capability statement for the system: “capabilities” | Implemented | Implemented |
Update, create or delete a set of resources in a single interaction: “batch/transaction” | Implemented | Not implemented |
Retrieve the change history for all resources: “history” | Implemented | Implemented |
Search across all resource types based on some filter criteria: “search” | Not implemented | Can’t be determined |
The following section covers the search capabilities that are mentioned in the FHIR specification and outlines whether they have been implemented in any of the servers:
Search Parameter Types
FHIR Specification | HAPI FHIR | Azure FHIR |
Number | Implemented | Implemented |
Date/DateTime | Implemented | Implemented |
String | Implemented | Implemented |
Token | Implemented | Implemented |
Reference | Implemented | Implemented |
Composite | Implemented | Implemented |
Quantity | Implemented | Partial. Ranges don’t work. See: https://github.com/Microsoft/fhir-server/issues/103 |
URI | Implemented | Implemented |
Common search parameters
FHIR Specification | HAPI FHIR | Azure FHIR |
Logical ID of the resource: “_id” | Implemented | Implemented |
When the resource version last changed: “_lastUpdated” | Implemented | Implemented |
Tags applied to the resource: “_tag” | Implemented | Implemented |
Profiles the resource claims to conform to: “_profile” | Implemented | Implemented |
Security labels applied to the resource: “_security” | Implemented | Implemented |
Search on the narrative of the resource: “_text” | Implemented | Not implemented |
Search on the entire content of a resource: “_content” | Implemented | Not implemented |
Retrieval of resources that are referenced by a List resource: “_list” | Not implemented | Not implemented |
Retrieval of resources based on the properties of resources that refer to them: “_has” | Implemented | Not implemented |
Retrieval of resources of a particular type or types using search across all resource types: “_type” | Not implemented | Implemented |
Retrieval of resources based on an advanced specific query operation: “_query” | Not implemented | Not implemented |
Search result parameters
FHIR Specification | HAPI FHIR | Azure FHIR |
Used for advanced filtering: “_filter” | Not implemented | Not implemented |
Order to sort results in: “_sort” | Implemented | Not implemented |
Sort by relevance: “_score” | Not implemented | Not implemented |
Number of results per page: “_count” | Implemented | Implemented |
Other resources to include in the search results that search matches point to: “_include” | Implemented | Not implemented |
Other resources to include in the search results when they refer to search matches: “_revinclude” | Implemented | Not implemented |
Just return the summary elements (for resources where this is defined): “_summary” | Implemented | Partial _summary=count is supported only |
Request a specific set of elements be returned as part of the resource(s): “_elements” | Implemented | Not implemented |
Whether to return resources contained in other resources in the search matches: “_contained” | Not implemented | Not implemented |
If returning contained resources, whether to return the container or container resources: “containedType” | Not implemented | Not implemented |
Search modifiers
FHIR Specification | HAPI FHIR | Azure FHIR |
The search modifier would return all the resources that don’t have a value for the search parameter: “: missing” | Implemented | Implemented |
The search modifier would return all the resources such that the search parameter’s value matches exactly with those that reside inside the resources: “: exact” | Implemented | Implemented |
This modifier would return all the resources that have the value of the search parameter inside them but matches partially with it: “: contains” | Implemented | Implemented |
The search parameter is processed as a string that searches text associated with the code/value: “: text” | Implemented | Implemented |
The search parameter tests whether the coding in a resource is in the specified value set: “: in” (token) | Implemented | Not implemented |
The search parameter tests whether the coding in a resource exists below the hierarchy when compared with the specified search code: “: below” (token) | Implemented | Not implemented |
The search parameter tests whether the coding in a resource exists above the hierarchy when compared with the specified search code: “: above” (token) | Implemented | Not implemented |
The behavior of the search parameter is opposite to the one mentioned above (“in”): “:not-in” (token) | Implemented | Not implemented |
The search modifier allows to returns those resources which contains a reference to a particular FHIR resource: “:[type]” (reference) | Implemented | Not implemented |
The search modifier indicates that the value of the search parameter left-matches the value inside all the resources returned: “: below” (URI) | Implemented | Implemented |
The search modifier indicates that the value of the search parameter right-matches the value inside all the resources returned: “: above” (URI) | Not implemented | Not implemented |
FHIR Formats (as per their mention in capability statements)
FHIR Specification | HAPI FHIR | Azure FHIR |
JSON | Implemented | Implemented |
XML | Implemented | Not implemented |
RDF | Not implemented | Not implemented |
Other areas of the specification
FHIR Specification | HAPI FHIR | Azure FHIR |
Accept unknown elements within resources | Not implemented | Implemented |
Accept unknown extensions within resources | Implemented | Implemented |
Out-of-the-box implementation for authentication of users who access the REST API | Not implemented | Implemented (Role-based access control but is globally applied to the whole API) |
Integration
There is no out-of-the-box integration with any of the technologies (Mirth, CDS Hooks, and jBPM) mentioned in both of the servers. Therefore, manual development is needed for doing so.