API to search patient list seen by doctor.

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.

@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.

1 Like

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



1 Like

thanks @sumangala28 and @jwnasambu.

But i am looking for Rest Api for this .

Let me rephrase .

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

@wyclif @raff @bwolfe @ngoel2

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

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

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.

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