Getting visits information of a patient using rest api

1 view
Skip to first unread message

Sriharsha Ayinala

unread,
Mar 9, 2015, 2:31:38 PM3/9/15
to d...@openmrs.org
Hi All,

I want to get visits information of a particular patient using rest api's. Is that possible?, If so please give me the instruction on how to do this?

Thanks

Darius Jazayeri

unread,
Mar 9, 2015, 2:42:53 PM3/9/15
to dev
See https://wiki.openmrs.org/questions/80380259/answers/80380262 for a description of how to determine what searches are possible on a REST resource.

In this case, if you want to get a patient's visits, you query the visit resource using "patient" and "includeInactive" parameters.

https://github.com/openmrs/openmrs-module-webservices.rest/blob/master/omod-1.9/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_9/VisitResource1_9.java#L222

-Darius

--
OpenMRS Developers: http://om.rs/dev
Post: d...@openmrs.org | Unsubscribe: dev+uns...@openmrs.org
Manage your OpenMRS subscriptions: http://om.rs/id
 
Visit OpenMRS Talk at http://om.rs/talk for chat and discussions!

Sriharsha Ayinala

unread,
Mar 9, 2015, 3:04:15 PM3/9/15
to d...@openmrs.org
Thanks for your information @Darius, But my problem is bit different I want to make a rest api call from UI to display patient visits.

To unsubscribe from this group and stop receiving emails from it, send an email to dev+uns...@openmrs.org.



--

Sriharsha Ayinala 

Mobile: +1-2818985222


Darius Jazayeri

unread,
Mar 9, 2015, 3:13:04 PM3/9/15
to dev
Hi,

I don't understand how your problem is different. If you want to get all visits for a particular patient, you query:

...ws/rest/v1/visit?patient=uuid-of-patient&includeInactive=true

-Darius
Reply all
Reply to author
Forward
0 new messages