opensrp / openmrs-module-cohort

2 stars 8 forks source link

Cohort Module

The purpose of the OpenMRS Cohort Module is to manage Cohort-related Data, Types, Attributes, Attribute Types and Members while using REST to allow external system integration. Cohort management can be performed by one of two ways:

  1. Simple cohorts for single entities.
  2. Group cohorts catering to collections like households.

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 groups 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 and policy making.

Objective of the Project

This document will cover following information:

  1. Design of the Module
  2. Cohort REST Web Service Integration
  3. User Manual
  4. Potential Improvements
  5. Downloads and Resources

Design of the Module

ER Diagram:

Cohort Web Service Web Integration


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/

PARAMETERS

{"name":"Horatio","person":"\(list the related person uuid\)","cohort":"\(list the related cohort uuid\)"}

POST: http://localhost:8080/openmrs/ws/rest/v1/cohortm/

PARAMETERS

{"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\)"}

User Manual

Potential Improvements:

The demonstration has been done on the legacy UI of this module. The current UI has been changed. However, the essential process remains the same.

Downloads and Resources