where the concept is a complex datatype with a texthandler or binarydatahandler results in an error like this:
{
“error”: {
“message”: “Unable to convert object into response content”,
“code”: “org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource:796”,
“detail”: "org.openmrs.module.webservices.rest.web.response.ConversionException: value on class org.openmrs.Obs\n\tat
…
I can create obs with simple datatypes without problems, but there’s not much in the way of documentation or example code that I’ve been able to find regarding complex types.
My aim is to create an observation which is basically a blob of json data. This is then interpreted by front end javascript to produce diagrams.
Obviously not the right forum for questions like this given the lack of response. I will repost elsewhere.
In case anyone is interested, I have got as far as working out that the REST API seems to be only able to cope with either strings (or numbers cast to strings) or coded values. Strings are passed through to the Obs class in core and then fail due to the fact that it’s setValueAsString function has no way of handling complex values.