We are building UI in Angular. We want to implement the same autocomplete for diagnosis fragment. Is there any API call? As there is for medication, tests, advice, etc.
When I write something in diagnosis, in the network tab it send request to “openmrs/coreapps/diagnoses/search.action?&term=<term_searched>”.
And when tried in Postman, it through error.
error report: https://pastebin.com/1TQjDT5a
BTW, what is with all the duplicates in this list? Best practice would be to have the actual diagnosis name first followed by the primary ICD-10-WHO code (if that’s what you are using). It is also important to remember that some diagnoses actually require two ICD codes.
This url is used to fetch presumed or confirmed diagnosis.
How can I use this on external UI that I have build using Angular 7?
Bcz if fetched in postman it show error
https://pastebin.com/hzXKpqx6
Hi @kundansinha, on the Ref app, you probably want to depend on coreapps to achieve this auto-completion. So you may want to copy the cURL of
from where you derived it (probably with Chrome under Network, XHR section) and use it(cURL) as an import in postman by pasting it into Paste Raw Text section of the popped up window.
This will generate all the header info you need for the ajax request which you will use to fire up the request in postman and probably within your use case.