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
and
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
<tr>
<td><spring:message code="radiology.imagingProcedure" /><span class="required">*</span></td>
<td><spring:bind path="concept">
<openmrs_tag:conceptField formFieldName="concept" formFieldId="conceptId"
initialValue="${status.editor.value.conceptId}" onSelectFunction="onQuestionSelect"
includeClasses="${radiologyConceptClassNames}" />
</spring:bind> <form:errors path="concept" cssClass="error" />
<div class="description" id="conceptDescription"></div></td>
</tr>
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 Searching for orderable concepts via REST which led me to Merge pull request #274 from vtuwei/RESTWS-647 · openmrs/openmrs-module-webservices.rest@850202b · GitHub
Which talks of a new OrderableResource but itâs not clear how to use that and I donât see any orderable endpoint in
http://localhost:8080/openmrs/module/webservices/rest/apiDocs.htm
My server is setup via SDK for Platform 2.0.5 and itâs running Rest Web Services OMOD 2.19.0.f2b4a2
cc @teleivo