Primary mentor | |
Backup mentor | |
Assigned to |
Abstract
FHIR is an emerging standard for healthcare interoperability. While OpenMRS has been an early adopter of the FHIR standard and there has been some work done on it already, there is a scope to do more in that area. FHIR defines a very detailed API for searching that is fundamental to providing the correct data to any front-end application. Currently, the OpenMRS FHIR module supports a good amount of search functionality including the capability to search across multiple properties and support advanced search parameters such as _include/_revinclude along with pagination.
This project aims to extend the FHIR module to include support for extended operations. Operations (for these purposes) serve as stored queries where there is some logic built into the semantics of the operation itself. For example, the $lastn operation on the Observation resource (invoked using [base]/Observation/$lastn?subject=Patient/123&max=3 endpoint for example) should return the most recent 3 Observations associated with the specified Patient reference. The aim is to implement extended operations that would prove useful for clients using the FHIR module.
Project Champions
Skills Needed
- Good Java skills
- Familiarity with SQL
- Bonus points for familiarity with Hibernate and especially the Criteria API
- Bonus points for knowledge of how to write efficient queries and how to optimise queries
Objectives
- Define, implement and execute the following extended operations on the Observation resource:
- $lastn → The operation to fetch the most recent N Observations corresponding to the specified Patient resources.
URL: [base]/Observation/$lastn?[query] - $lastn-encounters → The operation to fetch all Observations matching the most recent N Encounters corresponding to the specified Patient resources.
URL: [base]/Observation/$lastn-encounters?[query]
- $lastn → The operation to fetch the most recent N Observations corresponding to the specified Patient resources.
- Improve the implementation of Observation.category to allow for enhanced filtering using the $lastn-type operations. In essence, helping in filtering out the "vitals" from other types of Observations.
- Define, implement and execute the $everything instance-level operations on:
- Patient resource → The operation to fetch all the information related to the specified Patient reference including links to any other resources.
URL: [base]/Patient/[id]/$everything - Encounter resource → The operation to fetch all the information related to the specified Encounter reference including links to any other resources.
URL: [base]/Encounter/[id]/$everything
- Patient resource → The operation to fetch all the information related to the specified Patient reference including links to any other resources.
Extra Credit
- Implement the $everything type-level extended operation for:
- Patient resource (URL: [base]/Patient/$everything)
- Encounter resource (URL:[base]/Encounter/$everything)
Resources / Getting Started
- Read up on FHIR. Good introductions can be found in this post, in this slide show, or this video.
- Read up on the HAPI FHIR library which we use for FHIR support, especially the part on search and extended operations.
- Read up on the Hibernate Criteria API.
- Read up on the extended operations (defining, implementing, executing) from the FHIR spec.
- Look through the FHIR module source code, especially the search implementation for Observation.