I am trying to get an idea about the encounters as far as I know when a patient visits a health center or hospital. For each electronic form completed for a patient, a new encounter is created.
And encounters can be of two types
Location encounters
Patient encounters
To find out the encounter belongs to a specific patient if am right I should send a get request to like below with the uuid of the patient.
curl -X GET \
'https://demo.openmrs.org/openmrs/ws/rest/v1/encounter/fc6ee64e-9f64-4213-8716-ae0ba93bb71d/encounterprovider?limit=1&startIndex=0&v=full' \
-H 'Authorization: Basic YWRtaW46QWRtaW4xMjM='
But am receiving an error message like below. Any idea about it
In general, the only endpoints supporting anonymous requests should be those required for authentication. Sites can make other features accessible (e.g., sharing their concept dictionary), but this example looks like a method that should require authentication, but is not. Unfortunately, this is exactly why we need REST API Documentation – i.e., what is an “app”? Should you be able to get information about them anonymously?
@dkayiwa, thoughts? Does /app need to be available to anonymous users in order to get to a login screen?
$ http -a admin:Admin123 'https://demo.openmrs.org/openmrs/ws/rest/v1/encounter/fc6ee64e-9f64-4213-8716-ae0ba93bb71d&v=full' | jq -r '.error.message'
Object with given uuid doesn't exist [null]
I don’t know where you got the encounter UUID, but it appears to not exist. If I find a patient via:
$ http -a admin:Admin123 'https://demo.openmrs.org/openmrs/ws/rest/v1/patient?q=Taylor
' | jq -r '.results[0]'
Is Orderentry ui still in usage? When I configured that to run with the latest ref app I can only see the prescribed medication link which points to the owa app (orderentry owa) .
But In a thread related to drug management saw the usage of orderenrty ui as well.Is there any configuration am missing (thread :- Drug Management)
I just want to get an idea about orders in the meantime thought to check the responsiveness of the orderentryui as well that’s why.But anyhow when I try to access it manually with typing the url
I can access the module.
As per the discussion with @burke last Friday started things off things with already existing document and to refine them because they were outdated.On REST+Web+Services+API+For+Clients.
This is why I was testing the orders in Orderentry ui module in order to get an idea about subtypes because orders have test and drug order types.
And then move forward with resource types and build something like this.
And this is the place where we keep next upcoming tasks suggestions by @burke.
What type of search query this endpoint accepts(value for q query parameter). I tried with patient name, display attributes a visit has but I didn’t get any result.
Yeah. You’ll need to look at code or ask some devs.
@ayesh & @batbrain7, I’ve added some tips to our shared google doc. I’d like to adopt some consistent conventions in the documentation. While having some directly useable (copy & paste) examples of working curl commands (probably using demo.openmrs.org) could be instructive for n00bs, there’s a lot of unnecessary text we could avoid repeating with some simple conventions. For example, curl commands & parameters, base URLs, etc. We also want to minimize horizontal scrolling when possible in examples.
Also, don’t we want to put our documentation under a folder (e.g., docs/) in the repo with subfolders based on sections?
Finally, my initial notes in the google doc where just some examples of the types of things that we might want to start with. I’d like you to draft an outline (e.g., table of contents) of the sections you think we should tackle in our first pass (not a list of every resources, but the sections you think we should include up front followed by some of the key services/resources organized in whatever hierarchy you propose).
But the problem is as I saw in the code as well in the request context it’s searching for location,patient,includeInactive,fromStartDate parameters.
curl -X GET 'https://qa-refapp.openmrs.org/openmrs/ws/rest/v1/visit?limit=1&v=default&includeInactive=true&patient=0a13a870-b9c8-4f07-be5f-ca8398a4cd8d&location=8d6c993e-c2cc-11de-8d13-0010c6dffd0f' -H 'Authorization: Basic YWRtaW46QWRtaW4xMjM='
But in swagger documentation, it’s saying it requires q as shown in screen shot (query param). Is it possible or only we can search like above curl request?.