GSoC 2023 : FHIR: Add support for FHIR PATCH operations
Primary Mentor | @Ian Bacher |
Backup Mentor | @Namanya Abert |
Student | @herman muhereza |
Abstract
OpenMRS is using the FHIR API more and more in place of the REST API. However, the FHIR API is, by default, quite verbose. Supporting PATCH operations would allow us to support partial updates to FHIR resources without needing to send the whole resource from the client to the server.
PATCH requests essentially comprise of instructions on how to modify a resource or resources. Patch requests can be used to avoid sending a whole document when only a part has changed and this is where it basically differs with the PUT request. Patch Request formats include the following JSON PATCH, XML PATCH which have to be implemented within the openmrs fhir2 module and in addition to those, the FHIR PATCH has to be included as well as a way of ensuring that when slight changes are made to the Json document, the entire document does not have to be sent. The Patch operations used within the above mentioned patch formats are add, replace, move, copy, test, remove
.
Format for supporting a single patch
Detect the incoming format(either json-merge patch, json-patch or xml-patch)
Load the existing resource in the appropriate format
Apply the patch
Required Skills
Excellent Java skills.
Project Length
Medium, 175 hours.
Objectives
Implement JSON PATCH operations on all OpenMRS FHIR R4 resources and ensure to have the tests working perfectly. - COMPLETED ✅
Implement JSON MERGE PATCH operations on all OpenMRS FHIR R4 resources and ensure to have the tests working perfectly. - COMPLETED ✅
Implement XML PATCH operations on all OpenMRS FHIR R4 resources and ensure to have the tests working perfectly. - COMPLETED ✅
Repositories:
Pull Requests:
https://github.com/openmrs/openmrs-module-fhir2/pull/513 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/489 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/485 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/483 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/488 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/490 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/491 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/484 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/481 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/487 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/479 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/480 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/492 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/493 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/478 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/499 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/500 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/501 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/502 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/503 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/505 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/507 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/509 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/513 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/498 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/495 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/496 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/497 - Merged ✅
Found Issues:
Medication Dispense was not added to the landing page of the FhirIG
Medication was not added to the landing page of the FhirIG
Fixed Issues:
https://github.com/openmrs/openmrs-contrib-fhir2-ig/pull/59 - Merged ✅
https://github.com/openmrs/openmrs-contrib-fhir2-ig/pull/60 - Merged ✅
Other related work:
During this GSoC jouney, i was able to do other work on the FHIR module as assigned by my mentor and below are the pull requests;-
[FM2-606: Mapping ContactPoints to OpenMRS](https://github.com/openmrs/openmrs-module-fhir2/pull/517) - Merged ✅
[FM2-605: Add Support for ETags in the FHIR API](https://github.com/openmrs/openmrs-module-fhir2/pull/515) - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/510 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/518 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/511 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/512 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/504 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/505 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/442 - Merged ✅
https://github.com/openmrs/openmrs-module-fhir2/pull/441 - Merged ✅
Talk Thread links:
Jira Epic
Weekly Blog Posts:
Throughout the development cycle, I chronicled my progress and insights through weekly blog posts:
GSOC WEEK 11: A JOURNEY OF REFINEMENT AND INNOVATION IN FHIR2 MODULE
GSOC WEEK 10 - EMBRACING THE FINALE: REFLECTING ON MY GSOC JOURNEY
Video(Demo)
Resources: