The error in logs is NPE, which may imply that no concept with the CIEL:5087 or CIEL:5088 same-as mapping was found. Did you verify that concepts have those mappings?
@raff . Yes concepts with mappings exists. Also I am using the same request with just changed concept field value during data post.
Thats how both concepts look like
Apparently get by mapping only works when fetching a concept but i see there is a bug in ObsResource where they only looking up a concept by uuid so the concept mapping fails, you can create a ticket to get it fixed so that it supports concept mappings too. We should probably get rid of the method with @PropertySetter annotation in ObsResource1_8.java to get it to work
Wyclif is right, ObsResource1_8.setConcept must be modified to replicate the behavior of ConceptResource1_9.getByUniqueId and possibly other resources using concepts.
To avoid code duplication we should probably move ConceptResource1_9.getByUniqueId to the Concept Service.
Hi @darius, I have reported the issue here https://issues.openmrs.org/browse/RESTWS-499 with a test class which have two tests. One for passing case with concept uuid and other for failing test case with exception thrown. The class need to have openmrs url, user and password changed to work as expected. The test doesnot work with demo openmrs since it has REST version 2.6, while we need 2.9.
It appears that the issue has fixed but under final code review process. Could you please give any idea when we can have it available in any module release. Or is there any chance that we can get the code for the fix and update and compile module ourselves, because looking into the commits I was not able to track down the actual changes done to make the concept-mapping work.
Hmm, try to put breakpoints at the first line of ConceptResource1_8.getByUniqueId and ConceptResource1_9.getByUniqueId, and see which is getting called.
(If it’s hitting the 1.8 resource but you’re on Platform 1.11, that’s a different issue to explore.)