API to search patient list seen by doctor.


(Kundan Sinha) #1

Hi, my name is Kundan and I’m new to OpenMRS and looking for an API to search list of patient seen by a doctor. Is there any existing API for this? As i can see it require 3 tables to be searched

  1. user
  2. encounter and
  3. person_name table.

(Juliet Wamalwa) #2

@kundansinha welcome to the community. Have you tried checking on this link? feel free to click on any icon and enter your information and confirm the solution to your case.


(Jeyasumangala Rasanayagam) #3

Hello @kundansinha

We have this feature implemented in the RefrenceMetaData module for the reporting purposes. You can have a look at this implementation to get more details - ListOfPatientsForProvider

Or simply you can install the BuiltIn reports OWA to get the information as the report like these following

Regards,

Jeyasumangala


(Kundan Sinha) #4

thanks @sumangala28 and @jwnasambu.

But i am looking for Rest Api for this .


(Kundan Sinha) #5

Let me rephrase .

Is there any existing REST Api to search list of patient seen by doctor?

@wyclif @raff @bwolfe @ngoel2


(Daniel Kayiwa) #6

How do you tell that a patient has been seen by a doctor?


(Suthagar Kailayapathy) #7

Since we wre using this in the OWA, there should be an REST service for this. Can you find out that REST?


(Kundan Sinha) #8

By using username.

  1. selecting ‘user_id’ in users table.
  2. patient_id in encounter table via user_id.
  3. And finally given_name and family_name from person_name table via patient_id.

(Kundan Sinha) #9

Still searching for the same. If you are using this then maybe you can share.