Modeling Groups of Patients, Group Encounters & Linking Patient Encounters to Groups

@ssmusoke here we go: https://ci.openmrs.org/browse/COH-COH/latest

FWIW, I would love for us to have cohort-level encounters & observations as first class citizens in core (note the “Cohort-level Encounters and Observations” on the OpenMRS Someday wiki page). There are several use cases for collecting data on groups as you would a person.

OpenMRS cohorts are equivalent to FHIR’s groups. If you are going to represent a collection of persons, I would use cohorts.

That said, it’s interesting how introduction of cohort membership is now blurring the lines between cohort_member (patients in a group) and patient_program (patients in a program). I suppose they’re both just lists of people. Some key differences:

  • Programs comprise patients; cohorts comprise persons – i.e., cohorts can contains persons who are not patients; programs cannot.

  • Tracking program-specific metadata about a patient’s enrollment in a program would be easier in programs. If we had cohort_member_attribute, then you could conceivably use cohort membership attributes to track these metadata.

  • When we get around to adding group-level encounters and observations, it would be for cohorts (not programs).

Perhaps we could create a cohort_program to allow a group to enroll into a program? :confused:

@dkayiwa now I need your help here … Its way past me why my tests are not being reflected

FYI: https://github.com/openmrs/openmrs-module-cohort/commit/7475ef8dfbaf33f61ca58a2a0fcb259f8638e7a6

:grapes::watermelon::banana::pineapple::apple::cherries::strawberry::kiwi_fruit::tomato::coconut::avocado::rice::tumbler_glass::tropical_drink:

Just add that to my bill

Interesting perspective… I think I will take this and write it up into a set of ideas, and use cases to delve deeper as I work with both cohort membership and programs

@dkayiwa on adding the cohort module to UgandaEMR, https://github.com/ssmusoke/openmrs-module-aijar/tree/dsdm, I get the following compile error looking for a RestInit class https://gist.github.com/ssmusoke/2aee1784be8691787ad36aed275b849e

Looks like I have entangled myself “profile” chaos

You api pom file seems to have web related dependencies (omod)

@dkayiwa The omods were an attempt to fix this web service error https://gist.github.com/ssmusoke/a66f290221e20a5641318f64db816ef9

Start by removing all omod dependencies from your api pom file

@dkayiwa Thank you!!!

@maimoonak @bholagabbar Just checking, I see no tests in the cohort module, are they anywhere else that I can reference?

I don’t remember writing tests for the module. I’m pretty sure they don’t exist. I think the cohort module could make for a good gsoc project next year.