Unable to fetch allergy details

openmrs : openmrs-2.3.1

After installing openmrs with specified version I am not able to get response for following rest call.

http://10.30.2.34:8080/openmrs/ws/rest/v1/patient/c9c4e654-243e-47f1-8378-abab1b4326e3/allergy

In details I am getting exception as follows.

org.openmrs.api.APIException: Unknown resource: v1/patient/allergy at org.openmrs.module.webservices.rest.web.api.impl.RestServiceImpl.getResourceByName(RestServiceImpl.java:415)

You need to upgrade your version of the restwebservices module.

After upgrading rest module I am getting following exception.

Two resources with the same name (v1/programenrollment) must not have the same order

java.lang.IllegalStateException: Two resources with the same name (v1/programenrollment) must not have the same order at org.openmrs.module.webservices.rest.web.api.impl.RestServiceImpl.initializeResources(RestServiceImpl.java:288) at

I restarted tomcat and now I started getting same old message as follows

[Unknown resource: v1/patient/allergy]

org.openmrs.module.webservices.rest.web.api.impl.RestServiceImpl:415

org.openmrs.api.APIException: Unknown resource: v1/patient/allergy at org.openmrs.module.webservices.rest.web.api.impl.RestServiceImpl.getResourceByName(RestServiceImpl.java:415) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at

Just restart tomcat or jetty.

restarted only tomcat. I dont have jetty installed.

Which version of the rest webservices module do you have installed?

I took it from github. Then built on local with mvn. Got following omod file . webservices.rest-2.15-SNAPSHOT.062bbe.omod

Try test int-refapp.openmrs.org

I tried following… http://int02.openmrs.org/openmrs/ws/rest/v1/patient/953d06d9-00f1-45a7-a450-d342f1d9777c/allergy

Got following error… Unknown resource: v1/patient/allergy org.openmrs.module.webservices.rest.web.api.impl.RestServiceImpl:415 org.openmrs.api.APIException: Unknown resource: v1/patient/allergy at org.openmrs.module.webservices.rest.web.api.impl.RestServiceImpl.getResourceByName(RestServiceImpl.java:415) at sun.reflect.GeneratedMethodAccessor704.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:622) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at

@aniketsawant i have just remembered that before platform 2.0, you will fetch allergies like this: http://int02.openmrs.org/openmrs/ws/rest/v1/allergy?patient=953d06d9-00f1-45a7-a450-d342f1d9777c

And these allergies are entered using this page: http://int02.openmrs.org:8080/openmrs/patientDashboard.form?patientId=11520&phrase=thom