I’m designing a REST client which consumes the OpenMRS REST architecture to fetch patient details and display it in form of a summary page.
After going through wiki on REST Web Services module and I’ve learnt about how to exploit various resources using REST.
So far, I’ve been able to fetch basic details about patient using REST calls: name, address and other person attributes that were collected as a part of patient registration.
I’m having trouble devising REST calls to extract the following patient information:
Visits
Encounters
Observations, etc.
Basically, I’m trying to extract all the information about a patient that’s displayed on clinicianfacing and patient dashboard page using REST.
Digging down the wiki on REST I found no particular set of REST calls to extract the above information for a specific patient providing a unique identifier or something.
Thanks @pascal for a quick reply. Seems I didn’t explain my issue well.
I clearly understand fetching details of a particular resource by its uuid: GET /resource/{uuid}.
The point where I’m struggling is at the time of making REST calls initially, I only have the patient details in form of JSON and nothing else (no uuid for visits, encounters and observations).
Is there a possible way in which I can fetch these details based on patient uuid or patient details as parameter to the resource request (something like /resource?patient={patient}) ??
It basically depends on if the resources you want to fetch support fetch by patient operations, looking at the encounter, obs and visit resources, I actually do see that they do support get by patient, you need to specify the patient request parameter and the value is the patient uuid, but it means you need to make 3 other rest calls one for each.
@wyclif and @pascal. Is there a way to fetch person/patient by personattribute using REST??
For instance, fetching person details using his/her telephone number.