In radiology, before you add an order you first need to set the Radiology Concept Classes global property which is a comma separated list of concept class UUIDs which define concepts that are orderable as radiology orders.
I have added the UUID of the Test concept class to that global property as shown by
I have created one concept of the concept class Test with name X-RAY.
When creating a an order. An imaging procedure is is asked which is a concept. If I use a query string like
'X-RAY' only one concept is been returned as expected.
When I do a search with other queries like 'Tr' or 'True' I get no result as expected.
But when I visit http://localhost:8080/openmrs/module/webservices/rest/apiDocs.htm#!/concept/getConcept
And make a get to /openmrs/ws/rest/v1/concept with the class param set to the UUID of the Test concept class and a search query of Tr, I actually get multiple results of which the concept True is one of them. I didn't expect this. I expected it to behave like radiology add order form and return no result.
I'm trying to reimplement the add order form via angular2 and I'm searching for this concept via REST and I want it to behave exactly like the radiology add order form.
Below is the result of the search results from my angular app running on the same openmrs platform as above
I expected no results. That's the same behavior I get when I try to do the same via the http://localhost:8080/openmrs/module/webservices/rest/apiDocs.htm
Below is the code in legacyui that handles that
<td><spring:message code="radiology.imagingProcedure" /><span class="required">*</span></td>
<openmrs_tag:conceptField formFieldName="concept" formFieldId="conceptId"
</spring:bind> <form:errors path="concept" cssClass="error" />
<div class="description" id="conceptDescription"></div></td>
We'll not be using that and I don't have the time to go through the openmrs_tag internals just to understand how to do this.
I found this thread https://talk.openmrs.org/t/searching-for-orderable-concepts-via-rest/10161 which led me to https://github.com/openmrs/openmrs-module-webservices.rest/commit/850202b434bcb5797625b6252e9a4d8f8f576b04
Which talks of a new OrderableResource but it's not clear how to use that and I don't see any orderable endpoint in
My server is setup via SDK for Platform 2.0.5 and it's running Rest Web Services OMOD 2.19.0.f2b4a2