@darius @ramashish, what @amalafrozalam was sharing was specific to a telemedicine use case. We're using a cloud hosted OpenMRS instance as the patient data repository. Health workers use tablet devices to see patients at various telemedicine clinics. We wanted to be able to download a cohort of patients seen at a particular clinic, aka "location". Since the REST API does not contain any resource to GET all patients at a particular location. we can do one of the following,
Option 1: Use cohorts. Assign patients to cohort and download by cohort. Unfortunately, we are unable to find a resource in the REST API that maps to the cohort_member table (unless it does exist but hasn't been documented?). This makes the most functional sense.
Option 2: Use programs. There are API resources for programs and we can enroll a patient into a program and download by the program. Strictly this does not fit the definition of a program and doesn't make as much functional sense.