Hi Roger,

I don't think this is correct.

CohortMember *has* a patient, but it isn't a patient itself. Doing this

    POST .../cohort/(parentUuid)/member ...

does not create a patient, but rather it adds the patient to the specified
cohort, writing a row to the cohort_member table.

Is that not how it's working? (If not, could you provide the sequence of
REST calls that would cause an error?)

I do see that CohortMemberResource includes a default rep of patient in its
own default rep. Is that what you're referring to? I do think we should
change things so the default rep only includes a ref of the patient...

-Darius

On Mon, May 21, 2012 at 6:45 AM, Friedman, Roger (CDC/CGH/DGHA) (CTR) <
[email protected]> wrote:

>  At this moment, CohortMember is modeled as a subresource of Cohort.
>  However, since the CohortMembers are patients, and we allow creation and
> editing of CohortMembers, we now are breaking caching for patients.  It
> seems to me we have a few possible ways to fix this: ****
>
> (1) not support POST or DELETE for CohortMembers; [makes CohortMember sort
> of hokey]****
>
> (2) use GET on a Cohort with a parameter (e.g. ?evaluate) to produce a
> list of members; [makes Cohort GET polymorphic]****
>
> (3) use PUT on a Cohort to produce a list of members; [PUT?]****
>
> (4) have an Evaluate resource that would work with various types of
> definition objects (e.g. Cohort, LogicRule, Form, Report).  [probably would
> require parameters to identify object and POST for passing parameters to
> the object] ****
>  ------------------------------
> Click here to 
> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from 
> OpenMRS Developers' mailing list

-- OpenMRS Developers: http://go.openmrs.org/dev
Post: [email protected]
Unsubscribe: [email protected]

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to 
[email protected] with "SIGNOFF openmrs-devel-l" in the  body (not 
the subject) of your e-mail.

[mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

Reply via email to