Cohort Module Exceptions/Bugs

@bholagabbar,

We are testing out the cohort module. A few issues:

  1. We can successfully create a cohort. After creation, we can then add members and save. I can then search for the cohort after it is no longer editable. It will not let me add or remove members. In fact all edit options are not visible.

  2. If you do not not put a start date and end date when adding a member, you get an exception. I don’t think it should be required to put an end date as you may not know how long a patient will remain in the cohort.

  3. If you do not not put a start date and end date when creating a cohort, you get an exception. I also don’t think end date should be required.

  4. We have not tested this out yet, but it seems from your documentation that you need to first create an encounter via rest and then add obs to that encounter. Is it possible to combine this in one rest call as is done for patient encounters?

  5. I tried to add a patient using the rest api: https://test2.ampath.or.ke:8443/amrs/ws/rest/v1/cohortm?person=153efbc5-1367-4e67-a17a-15f3358edba8&cohort=153efbc5-1367-4e67-a17a-15f3358edba8&name=jonathan. This follows the docs which say the required properites are person=personUuid, cohort=cohortUuid and name=string. I get this exception: “Cannot extract parameter (SimpleObject post): no Content-Type found”. Note that the get request for https://test2.ampath.or.ke:8443/amrs/ws/rest/v1/cohortm/cohort/153efbc5-1367-4e67-a17a-15f3358edba is successful as is the request for the person (i.e. its not a uuid problem). Also, why is necessary to provide the name attribute? I think this is better handled by core openmrs person_name.

Thanks for the good work.

Jonathan

Hey Jonathon,

Apologies for the late reply. Feel free to tag @maimoonak and @sharonvarghese as well as they were my mentors during the project.

  1. Deletion of members needs to be worked on, yes. That is a future enhancement. 2, 3. This would potentially create problems. We need start and end dates for patients. @darius and Maimoon, what do you think?

I’ll look into 4 and 5.

Thanks. You can find the code repository at https://github.com/OpenSRP/openmrs-module-cohort. If any of your developers feel the need to add a features, feel free to issue a pull request. We’ll also include your points in a todo list to complete in the future next time (most likely by the next GSoC iteration).

There’s a project going on that will include extending the core cohort_member table to support start and end dates