Enter vitals and Diagnostics through a REST API

Hi fellas! I hope all of you are doing well, i need some help regarding openMRS REST APIs. I want to do following using REST APIs:

  • Start a patient visit
  • Enter Patent Vitals
  • Enter Patient Diagnostics Details
  • Also GET(fetch) all the above info.
  • How to set appointment

Actually i’m making a own frontend using openMRS REST API. I am following the link below but don’t no exactly what resources to use and what query should be passed in the REST calls


Please help if anyone had done this before. It would be a great favor. Best Regards, meullah

1 Like

hello @meullah thanks for the effort on this.

In order to archive the above ,you need to get familiar with the rest webservice module abit more .I would recommend that you have a look at these resources.





@gcliff thanks for you your help! I will have look at the resources <3

1 Like

That is indeed the best place to look when you want to understand what to include in the payload when doing a post… and luckily enough you can test out the url at http://localhost:8080/openmrs-standalone/module/webservices/rest/test.htm

Checkout visit in and see the payload which looks something like

{ “patient”: “uuid”, “visitType”: “uuid”, “startDatetime”: “string”, “location”: “uuid”, “indication”: “string”, “stopDatetime”: “string”, “encounters”: [ “uuid” ], “attributes”: [ { “attributeType”: “uuid”, “value”: “string” } ] }

These are actually Obs. So checkout how obs are POSTED in the docs with a payload like

{ “person”: “uuid”, “obsDatetime”: “2020-05-06T14:47:03.041Z”, “concept”: “uuid”, “location”: “string”, “order”: “string”, “encounter”: “string”, “accessionNumber”: “string”, “groupMembers”: [ “string” ], “valueCodedName”: “string”, “comment”: “string”, “voided”: true, “value”: “string”, “valueModifier”: “string”, “formFieldPath”: “string”, “formFieldNamespace”: “string”, “status”: “PRELIMINARY”, “interpretation”: “NORMAL” }

If you checkout the above then you will be able to figure out the rest as well… And yes checkout the resources that @gcliff has shared coz they will make things more understandable. Nice coding

1 Like

Thank you @reagan :hearts:, i will definitely look at these resources,
Regards, Muhammad

1 Like

hi @reagan, i have registered a patient and started his visit using GUI.

But now when i try to get this patient uuid through REST API it gives no result
I have used this query


and it gives this empty response why is that, kindly tell

     "results": []
1 Like

Try querring using the patientId, copy that id and try it again, dont specify the name, specify the patiendId, Again if you created one patient given name, you expect a patient ,i dont know ur expectations , like i said before better using patient id

1 Like

Could you try with



@reagan Thanks reagan it worked fine