GSoC Week 09: Diving into FHIR Flag Mapping

Manojlakshan
3 min readJul 5, 2024

--

Hello everyone!

Welcome back to my Google Summer of Code (GSoC) journey blog series. As you may know, I am currently working on a project to enhance the patient flag module and develop a FHIR flag resource for OpenMRS. This week marks Week 09 of GSoC and Week 06 of the coding phase, and I am excited to share my progress and challenges.

This week, I primarily focused on the FHIR flag mapping. I started by reviewing the existing documentation and codebase to understand how to approach the mapping. After a thorough analysis, I began implementing the initial steps of the FHIR flag mapping. Despite making some progress, I encountered a new error that prevented me from loading the FHIR module in the OpenMRS 2.x reference application. When It loads to reference application it clashes the entire application. I discovered that the issue arises after adding the patient flag dependency to the FHIR module.

In addition I made some sort of progress on flag translator which is doing the translation job , converts openmrs flags to FHIR flag and FHIR flag to openmrs flag.

here is draft PR for flag mapping : #543

Recap on past month:

In past month I worked on ticket related to patient flag module.

FLAG-69 : Improve the performance of patient flag evaluation

I refactored the patient flag evaluation process to run in parallel instead of evaluating in sequentially. This approach could significantly improve the module’s performance.

  • Improve the performance of patient flag evaluation : #59

Test & Evaluation Results

parallel process → 7.6.5.8,7,7,6,7,8,6 => avg 6.7 milliseconds

current module → 8,7,7,6,8,7,7,7,8,6 => avg 7.1 milliseconds

flags count < 5 — current module perform better than this implementations

flags count < 10 — both are perform in same way

flags count = 17 — this implementation perform better than current module

when the flag count is increased, the prell process performs better than the current module.

  • Improve the performance of the evaluating all flags : #60

Test & Evaluation Results

parallel process → 74, 58 , 63 . 47 , 79, 40 , 101, 121 , 58 => avg 64.1 milliseconds

current module → 258, 230, 215, 208, 207, 208, 204, 196,202, 198 => avg 212.6 milliseconds

FLAG-75: Refactor the methods using lambda expressions and stream API

  • Refactoring methods using lambda expressions and the Stream API simplifies code by making it more readable

PR’s : #63 #64 #65 #66 #67 #68 #69

FLAG-74 : add java 17 support

I updated the patient flag module to support Java 17, while retaining compatibility with Java 8. As a result, the module now works with Java 8, Java 11, and Java 17.

In addition to these objectives, I worked on the following tickets:

  • Unit tests not triggering in mvn build - FLAG-77
  • Implement batch saving functionality for saving patient flags — FLAG-76
  • Update the unit test with some actual flag data — FLAG-78

Plan for next week

In the coming week, my focus will remain on resolving this error and continuing with the FHIR flag mapping. Additionally, I have my first GSoC evaluation next week, and I need to create a demo video to showcase the progress I’ve made so far and share with the community.

Stay tuned for more updates, and thank you for following along with my GSoC journey!

Thank you for the reading, Join me on this tech adventure! Follow my profile to stay updated on the cool world of technology and innovation. Your support means a lot, and I can’t wait to share more exciting stuff with you. Let’s stay connected for more insights and fun discoveries ahead!

Github: https://github.com/ManojLL

LinkedIn : https://www.linkedin.com/in/manoj-lakshan/

--

--