unable to save Encounter Data

Tags: #<Tag:0x00007f01c25deb78> #<Tag:0x00007f01c25de8d0>

url :- openmrs/ws/rest/v1/encounter

request Json using Rest Api :-

{“encounterDatetime”: “2019-03-05 19:04:04”, “encounterType”: { “uuid”: “7760d41b-b253-4245-8f5f-ae7a5c7ceb58” }, “patient”: { “uuid”: “16c08d84-2526-4588-af8f-3a1dea8d5768” }, “visit”: { “uuid”: “2e3256cc-040b-470a-8b71-2bc8e1e119ae” }, “location”: { “uuid”: “8d6c993e-c2cc-11de-8d13-0010c6dffd0f” }, “obs”: [ { “concept”: { “uuid”: “e7bc438f-b05e-4585-98ec-a1e569854788” }, “obsDatetime”: “2019-03-05 19:04:04”, “value”: “[16:ALBENDAZOLE:3, 18:BENZYL BENZOATE APPLICATION:6]”, “person”: { “uuid”: “16c08d84-2526-4588-af8f-3a1dea8d5768” } } ] }

Getting Error :-

{ “error”: { “message”: “[obs on class org.openmrs.Encounter]”, “code”: “org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource:789”, “detail”: "org.openmrs.module.webservices.rest.web.response.ConversionException: obs on class org.openmrs.Encounter\n\tat org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource.setProperty(BaseDelegatingResource.java:789)\n\tat org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource.setConvertedProperties(BaseDelegatingResource.java:656)\n\tat org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource.convert(DelegatingCrudResource.java:107)\n\tat org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource.create(DelegatingCrudResource.java:76)\n\tat org.openmrs.module.webservices

You may need to validate the JSON request content from here

I think .you are not able to understand my question.

probem is this :-

is this JSON ,what element is Incorrect that why its giving me console have Error

@govind , kindly use pastebin.com on the code and error pastes for better legibility and then drop the links here.

1 Like

I resolved Error. Thanks.

1 Like

yo can put the solution you used for this so as to help the community