Make The OpenMRS Patient Flag Module User frendly

I worked on Patient flag module as my GSoC project, during this time I was focusing on improve the performance of the module. However, I realize that module is not user friendly for non-technical users, to create or manage patient flags that users should have the knowledge in sql or Java.

most of the time doctors or nurses are engaging with patients , if they want to create a flags for a patients they have to ask to manager ( who is having knowledge in sql or java and manage the application) to create flags.

if we can enable users without technical knowledge to create flags, that will make a positive impact on the OpenMRS patient flag module, that will make the system more accessible to a broader range of users.

Proposal: User Friendly Flag Creation

I propose a flag criteria generating method that simplifies flag creation, allowing non-technical users to generate patient flags without requiring SQL or Java knowledge. Below is a wireframe of the proposed UI. I just divided this into four main sections, that will help me to explain this.

  • Section 1: Select the flag type (e.g., “Allergy Flag,” “Encounter Flag”). This acts as the starting point for flag creation

  • Section 2: This section dynamically changes based on the selected flag type. For example:

    • If “Allergy Flag” is selected, this section shows a dropdown with allergy types (DRUG, Food, Other).
    • If “Encounter Flag” is selected, it would display values related to encounters (blood pressure, pulse, weight, etc.).
  • Section 3: Allows users to define the logic for the flag. For example:

    • Logic: “is greater than”
    • Value: 100

    Users can select logic operators like:

    • Is greater than
    • Is lower than
    • Equals
  • Section 4: This section remains consistent and includes standard fields such as flag name, message, tag set, and priority.

Generating Flag Criteria

Using this interface, we can get necessary details of the database tables and id’s that we needed to generate the SQL query.

  • Food Allergy Flag

Flag type: Allergy Flag (Section 1)
Allergy type: FOOD (Section 2)

Query- we put manually: SELECT a.patient_id FROM allergy a WHERE a.allergen_type = "FOOD";

Query- generated : SELECT a.patient_id FROM <flag type (section 1)> a WHERE a.allergen_type = “<allergy type (section 2) >”;

  • Pulse below 50

Flag type: Encounter Flag (Section 1)
Concept: Pulse (Section 2)
Logic: Is lower than (Section 3)
Value: 50 (Section 3)

Query: 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;

generated query : SELECT e.patient_id FROM obs o INNER JOIN encounter e ON e.encounter_id = o.encounter_id WHERE o.concept_id = <concept id ( section 2) > AND o.value_numeric <logic ( section 3)> <value ( section 3)> AND o.voided = 0;

I’d love to hear your thoughts and suggestions on this, What improvements can be made, and how else can we make flag creation easier for non-technical users?

CC: @dkayiwa @ibacher @grace @wikumc @jayasanka

2 Likes

This is interesting. I would love to see a simple prototype of the feature. Can you try to start working on that? Keep us updated.

1 Like

I will start working on it