o.setEncounter(encounter);
AnnotatedImage ai = new AnnotatedImage(DrawingUtil.base64ToImage(encodedImage));
ai.setAnnotations(DrawingUtil.getAnnotations(request, ""));
o.setComplexData(new ComplexData("drawingObs.png", ai));
Errors obsErrors = new BindException(o, "obs");
ValidationUtils.invokeValidator(new ObsValidator(), o, obsErrors);
if (!obsErrors.hasErrors()) {
Context.getObsService().saveObs(o, "saving obs");
request.getSession().setAttribute(WebConstants.OPENMRS_MSG_ATTR, "drawing.saved");
} else {
obsErrors.getFieldErrors();