Test the openmrs patient flag module

hey everyone,

I’m Manoj Rathnariya, a participant in Google Summer of Code 2024, working on the project Validating and updating openMRS patient flag module. My project aims to improve the performance of the module, add java 17 support and add mapping between FHIR flag resource and openmrs flag data model.

I would like to invite the OpenMRS community to test the module and provide feedback.

How to Test the Module

pre- Requirements

  • Java ( 8, 11, 17)

  • Maven

  • o2 refApp ( if not setup o2 refApp yet, you can setup it from here)

Setup the project

  1. Clone the module from github : GitHub - openmrs/openmrs-module-patientflags: Provides a mechanism for marking patient records with important messages within OpenMRS
  2. checkout to clone project : cd <root>/openmrs-module-patientflags
  3. build the project : mvn clean install
  4. run the refApp : mvn openmrs-sdk:run -DserverId=<server name>
  5. login to o2 username : admin / password: Admin123 (http://localhost:<server port>/openmrs/login.htm)
  6. go to system administration → advanced administration → manage module → add or update module
  7. here you can upload the module omod file which is in <roo>/openmrs-module-patientflags/omod/target/patientflags-3.0.8-SNAPSHOT.omod

Select and upload module omod file

Add Flag Tags, Priority and Flags

after uploading the flag module go to advanced administarting screen and scroll down then you can see the flag module functions .

image

  1. Add a priority : provide a name, style and rank . The style is how the flag should disply is patient dashboard (style=“background-color:red” : shows flag in red color) rank is used to set the flag order if we provide 1 that flag listed in first.

edit priority screen

  1. Add a Tag : manage tags -> add tag - you can add flag tag by providing a tag name and tag role ( the flags are shows based on the roles you provided) edit tag screen

  2. Add flag : manage flags -> add flag - we can add three type of flags. I prefer to add SQL type flag and it is easy to add. When adding a flag you have to provide a priority and flag tag.

sample sql flag queries :

DRUG allergy : SELECT a.patient_id FROM allergy a where a.allergen_type = "DRUG";

Food allergy : SELECT a.patient_id FROM allergy a where a.allergen_type = "FOOD";

Systolic blood pressure over 125 : SELECT e.patient_id from obs o inner join encounter e on e.encounter_id = o.encounter_id where o.concept_id = 5085 and o.value_numeric >= 125 AND o.voided = 0;

Pulse below 50 : SELECT e.patient_id from obs o inner join encounter e on e.encounter_id = o.encounter_id where o.concept_id = 5087 and o.value_numeric < 50 AND o.voided = 0;

patient flag module wiki page

Evaluate Flags for patient

Evaluate all flags with all patients : patient flag module -> evaluate all flags

generate flags for patient in visits ( encounter) : when you adding visit or encounter happens for patient, module will generate flags for patients.

Get flagged patients for a flag : patient flag module -> find flagged patient - in the find flag patient section you can get the flagged patients for a flag

We can view the generated flags for patients in the Patient Dashboard under the Patient Flag section

Feedback Areas

  • Functionality: Does everything work as expected?
  • Performance: Are there noticeable improvements?
  • Suggestions: Any features or improvements you would like to see?

Thank you for your time and support. I look forward to your valuable feedback!

CC: @wikumc @dkayiwa @grace @jayasanka @piumal1999

4 Likes

Thank you so much Manoj, this is such an important part of the EMR, and of course an especially sensitive area since Clinical Decision Support is always where we have to be extra careful with safety. We’re so grateful you picked up this project!

It looks like your focus was on testing in OpenMRS v2 (e.g. demo.OpenMRS.org). Were you able to test in OpenMRS v3, e.g. on o3.OpenMRS.org?

FYI to the team at UW DIGI (e.g. @mozzy @ibacher @caseynth2) who are also interested in testing Patient Flags in OpenMRS v3.

3 Likes

I have tested the module with both OpenMRS versions, v2 and v3. Module works fine on both versions. but in v3, patient flags are not yet configured to display on the patient dashboard

1 Like

Awesome work @manojll ! You might want to connect with @mozzy about his work on patient flags with CDS in O3? Here’s his latest update with CDS using the patient flags module: https://openmrs.atlassian.net/wiki/spaces/projects/pages/26938745/Implementing+SMART+Guideline+Indicators+in+OpenMRS+Reports

4 Likes