Coding week 10: GSoC 2022 with OpenMRS

Anjula Shanaka
3 min readAug 21, 2022

--

We made it to the 10th coding week on the 15th of August 2022. We have two more coding weeks to complete the project. You can read the 9th-week update from here. Without further due let’s get into this week's update.

Cohort Schedule Runner

One of the features that was required to implement in the cohort builder was a scheduled cohort runner. When a user creates a cohort it saves the cohort members(patients) that were available at that moment. Because of that, it won’t be up-to-date. That’s when the scheduler runs the configured schedule to update the cohort.

But we already have a better solution to this, Which is the Save query option. Which enables you to save only the query definition without the patients. Since we can run the saved queries at any time we always get the up-to-date patients list that matches the search criteria. Follow this thread to see a step-by-step guide.

Because of the saved query option, we don’t need a scheduled cohort runner. So this feature won’t be implemented.

Saved Queries

Cohort API

Currently, there’s an issue with the create cohort API and the get cohort API. The create cohort API doesn’t save the cohort members and also the get cohort API doesn’t return them as well. I’m currently working on fixing those issues. Here’s the issue I created regarding this,

OpenMRS 4.0 migration

Currently, we are using React 16 and it’s time to move on to React 18. OpenMRS currently doing this migration for the existing ESM modules. Zac Butko helped me by sending a PR with the migration which includes the Carbon Components v11 migration as well. Due to this migration, the UI got broken due to the new version of the Carbon Components. I was able to fix them with the following PR.

Some of the tests also had to be skipped, So I started working on fixing those as well. I was able to fix all the failing tests. Here’s the PR for that.

Unfortunately, I missed this week's O3 call due to a power cut. For more updates, you can follow my OpenMRS talk thread.

Just like that, this week came to an end. I’m looking forward to finishing the project right on time. Don’t forget to check out my other articles as well. See you guys at the next one. Until then stay safe! ✌️

Wanna get connected?
Linkedin: https://www.linkedin.com/in/anjula-sack/
Facebook: https://www.facebook.com/anjula.shanaka/
Github: https://github.com/anjula-sack

--

--

Anjula Shanaka
Anjula Shanaka

Written by Anjula Shanaka

GSoC ’22 @openMRS | CTO @SEF | Developer @promiseQ | Undergraduate @USJ