Unable to fetch allergies and problem list using rest web service

I’m unable to fetch allergy and problem resources through REST web service as defined at [OpenMRS web service reources][1] Can anyone please give me some example calls (probably using patient id)? [1]: https://wiki.openmrs.org/display/docs/REST+Web+Service+Resources+in+OpenMRS+1.9

Hi Arpit,

If you are running OpenMRS 2.x, then you are probably running into what I describe here about allergies: https://wiki.openmrs.org/questions/81920160/answers/81920164

Hello Darius,

I’m using OpenMRS 1.10 platform with no demo data and only rest web service module (2.9). I tried installing the Allergies API module but I get the following error :

Error while trying to start module
Unable to update data model using liquibase.xml. Module: Allergy API Module

Also, do you know how can I retrieve problem list for a patient?

Hi Arpit,

I’m not sure why the problem https://wiki.openmrs.org/display/docs/REST+Web+Service+Resources+in+OpenMRS+1.9#RESTWebServiceResourcesinOpenMRS1.9-Problem web service on 1.10.x would not be working. (I have never used it though, and it’s an old API that will be deprecated in the future.)


For problem list :– I tried GET /ws/rest/v1/problem?q=pid and other search parameters but it always return an empty array. I cannot fetch them through uuid as I have no way to know their uuid except for looking in the database (is there any other way to find out their uuid?).

Hi Arpit,

Unfortunately the documentation of how to search on different resources is non-existent. See this post for how you can explore the code and find out what is supported without too much pain: https://wiki.openmrs.org/questions/80380259/answers/80380262

Peeking quickly, both the problem and allergy resources expect a “patient” parameter, not a “q” parameter.

Hi Darius,

Thanks for your reply. I’m able to fetch Allergies and Problem resources using patient parameter.