Where can I find docs for the REST Module?

Hello Everyone! I am not able to find docs for the OpenMRS Rest modules. I want to checkout the endpoints for a few operations.

To be quick, can you help me out in the endpoints for :

  1. Observations for a particular Encounter
  2. Medications in an encounter.

Thanks!

Here you go: https://rest.openmrs.org/ :slight_smile:

Some of the endpoints you are looking for might not yet exist.

From wiki page of your project:

" * For those administration features that do not have existing REST endpoints, create (or coordinate with the GSoC 2021: The REST of Administration project to create) those endpoints by extending the REST Module.".

By the way, I’m doing the project “The REST of Administration” this year, and I am now going to focus on discovering endpoints that do not yet exist, so feel free to reach out to me if you want to have some implemented :smiley:

2 Likes

Thanks @navareth for such a quick response. I’ll find the endpoint in the docs link. If I get into problem, I’ll surely revert back to you. Thanks!

2 Likes

Hello @navareth , can you help me in finding the endpoint to fetch order on the basis of the startDate?

Hi @vasharma05.

I think such a query/condition doesn’t exist yet. You would have to modify the method doSearch in OrderResource. It’s located here: https://github.com/openmrs/openmrs-module-webservices.rest/blob/7e24fbca20affffa6df4ea364ebaa9125a3eb648/omod-1.10/src/main/java/org/openmrs/module/webservices/rest/web/v1_0/resource/openmrs1_10/OrderResource1_10.java#L218

Thanks @navareth !

1 Like

@vasharma05 I have some updates for you according to “Observations for a particular Encounter” endpoint.

You can actually list observations by encounter ID but it’s just not yet documented :slight_smile:

GET /obs?encounter=070f0120-0283-4858-885d-a20d967729cf

That should work just fine!

1 Like

Thanks @navareth for the update! I actually fetched the observations from the encounter details only.