Cohort Module
Introduction:
What's a cohort?
A cohort consists of a group of patients based on a condition like patients receiving similar kind of treatment which can be monitored over a period of time.
Cohort management system unlike patient management system deals specifically to monitoring and suggesting possible cures to group of cohort members under a specific cohort unlike separate diagnosis for a particular patient.
We can analyze trends and patterns and this helps in research an policy making
Objective of the Project:
The purpose is to manage cohort related data
cohorts,
cohort types
cohort attributes
cohort attribute types
cohort members
cohort member attribute
cohort member attribute type
Using REST to allow external system integration with cohort module
Cohort Management can be performed in two ways
Simple Cohorts for single entities
Cohorts including groups or collections like households
This document will cover following information :-
Design of the Module:
ER Diagram:
The module deals with creating cohorts and associating it with cohort attributes which are dependent on cohort attribute types
Every cohort member who is a patient is associated to the cohort and also it can have cohort member attributes which are dependent on cohort member attribute types.
Search operations can be performed based on name under the mange cohorts page
Each of the cohort can have many encounters ,visits and observations which are created utilizing the forms from the HTML Form Entry Module
The search operation would be based on the cohort unlike in OpenMRS Platform which is based on only patient identifier/names.
It is also created utilizing the Rest interface from the Rest Module wherein the resources are identified in requests using URIs as resource identifiers to view cohorts, cohort encounters and cohort observations.
Cohort Web Service Web Integration:
We would be utilizing REST services in our module so that users who are not accessing the OpenMRS Platform can view the available data of the module by sending an HTTP GET or POST request
GET Request can be sent to view the data related to cohorts , cohort members, cohort encounters and cohort observations
POST Request can be sent to add data into the database by sending parameters as a JSON object.
To know more about REST MODULE click here : REST Module
Modules required
Cohort Module
REST web services
Example GET Requests
list the related cohort
GET: http://localhost:8080/openmrs/ws/rest/v1/cohortm/cohort/2baddb64-f4f9-47c4-80c6-404c4b016d12
list the related cohort member
GET: http://localhost:8080/openmrs/ws/rest/v1/cohortm/cohortmember/2003394e-daa2-4df8-acba-4894460b0624
list the related cohort encounter
GET: http://localhost:8080/openmrs/ws/rest/v1/cohortm/cohortenc/47d7bb8c-c4f2-4d16-978a-a4c7cf0d9556
list the related cohort observation
GET : http://localhost:8080/openmrs/ws/rest/v1/cohortm/cohortobs/34839160-5c8a-4c37-bdf6-e17042d46614
Example POST Requests
POST: http://localhost:8080/openmrs/ws/rest/v1/cohortm/cohort
PARAMETERS:
{"name":"neurologicalrecoverystudy","cohortType":"(list the related cohortType uuid)","cohortProgram":"(list the related cohortProgram uuid)"}
POST :http://localhost:8080/openmrs/ws/rest/v1/cohortm/
{"name":"Horatio","person":"(list the related person uuid)","cohort":"(list the related cohort uuid)"}
POST: http://localhost:8080/openmrs/ws/rest/v1/cohortm/
{"encounterType":"(list the related encounterType uuid)","visit":"(list the related visit uuid)","cohort":"(list the related cohort uuid)","form":"(list the related form uuid")}
POST: http://localhost:8080/openmrs/ws/rest/v1/cohortm/cohortobs
PARAMETERS{"encounterId":"(list the related encounter uuid)","concept":"(list the related concept uuid)","cohort":"(list the related cohort uuid)"}