for example,
im making a GET on this uri “/openmrs/ws/rest/v1/encounter/da708aab-5876-4a11-99db-e82f2e0a4b17” and it shows on return a field called encounterProviders that its a empty array…
Im passing on my post to encounter an single object on first post, does this mean the provider field should be an array? the API could get an upgrade, imo
i tryed , a post to “/openmrs/ws/rest/v1/encounter”, with this body:
“{“encounterDatetime”:“2016-11-16 12:08:43”,
“patient”:“6a269855-ea8b-4220-b865-c8240c2117ae”,
“encounterType”:“d7151f82-c1f3-4152-a605-2f9ea7414a79”,
“visit”:“95fa7afc-6cb2-4cef-bae0-9fbf0febe079”,
“encounterProviders”:[
{
“provider”:“f9badd80-ab76-11e2-9e96-0800200c9a66”,
“encounterRole”:“a0b03050-c99b-11e0-9572-0800200c9a66”
}
]
}”
its working now !!
btw, you know how to make an API POST to create concept with Answers?
I discovered that answers are on array, but what is the propety name… ive tried with the uuid like this:
…
…
answers[
{“uuid”:“968a3529-85a8-4a1c-be77-88b5badf0370”}
]
I think the term answers may have confused you a bit. When submitting obs, we use “value” like in the tests in the link i gave above. If you want to select any of the concept possible answers, when creating an obs, you specify it as “value”.
I want to make some customs forms, that’s why i need the concepts, I’ve already made the “answers” concepts threw the API, but i need to know the “key” word to identify the answers so i could build my concept question, my payload: to switch over the “???” ,