ssmusoke
(Stephen Senkomago Musoke)
December 18, 2017, 9:35pm
1
I am running into an issue saving an encounter via REST on OpenMRS 2.0.6, which has to do with provider vs encounterProviders mismatch - the documentation does not clarify it
{"patient":"bc86e441-d54d-4da7-b5a9-9db64600b37d","encounterDatetime":"2017-11-08 14:21:00","encounterType":"2549af50-75c8-4aeb-87ca-4bb2cef6c69a","location":"T2VOg9HzW3U","encounterProviders":[{"provider":"5843e894-5e8c-4f61-94f9-64c750cb028d","encounterRole":"a0b03050-c99b-11e0-9572-0800200c9a66"}]}
gives an error https://gist.github.com/ssmusoke/5857644750511c9c5da485dfb5f13d04
while
{"patient":"bc86e441-d54d-4da7-b5a9-9db64600b37d","encounterDatetime":"2017-11-08 14:21:00","encounterType":"2549af50-75c8-4aeb-87ca-4bb2cef6c69a","location":"T2VOg9HzW3U","provider":"5843e894-5e8c-4f61-94f9-64c750cb028d"}
gives an error https://gist.github.com/ssmusoke/7094da74cd1e83903b8b5822c730aebb
dkayiwa
(Daniel Kayiwa)
December 18, 2017, 9:52pm
2
Can you use something like pastebin for the stack trace?
dkayiwa
(Daniel Kayiwa)
December 18, 2017, 10:16pm
4
Which url are you posting to?
ssmusoke
(Stephen Senkomago Musoke)
December 19, 2017, 6:14am
5
@dkayiwa I am posting the payload in the REST documentation - testing is within OpenMRS
dkayiwa
(Daniel Kayiwa)
December 19, 2017, 8:39am
6
Can you give the exact url on qa-refapp.openmrs.org ?
ssmusoke
(Stephen Senkomago Musoke)
December 19, 2017, 5:34pm
7
I tested with this payload
{"patient":"f7113808-46a3-4202-9775-921fef6fd3d6","encounterDatetime":"2017-11-08 14:21:00","encounterType":"d7151f82-c1f3-4152-a605-2f9ea7414a79","location":"58c57d25-8d39-41ab-8422-108a0c277d98","encounterProviders":[{"provider":"bb1a7781-7896-40be-aaca-7d1b41d843a6","encounterRole":"a0b03050-c99b-11e0-9572-0800200c9a66"}]}
and it seems to work on qa-refapp.openmrs.org https://qa-refapp.openmrs.org/openmrs/module/webservices/rest/test.htm so now moving to test on my server - to iron out problems