How do you record a patient diagnosis via the REST API. AFAIK it should be an Observation without a value, but if I try that (post encounter containing obs that has no value) I get a validation error in the log:
failed to validate with reason: error.noValue
When I use the web app, the visit diagnoses are saved as rows in the encounter_diagnosis table, so I thought I could just POST to that, but the REST API does not support that resource.
Thanks, I have now tried that. However, I get errors posting to that endpoint: as is the case generally, REST docs are very cryptic and the exception reporting is 100% unusable, so I don’t know what I’m doing wrong.
I did upgrade, but found that the error reporting that came back in the REST response was the same, just less verbose; the only thing that changed was that there was no longer that other exception (regarding SimpleObject conversion, I think) in the log.
So, server log is cleaner, REST error is less verbose, but still unusable.
I have now cloned the REST API Git repo so that I can browse the code properly. org.openmrs.module.webservices.rest.web.v1_0.controller.openmrs2_2.DiagnosisController2_2Test looks like what I want.