Examples of ObsValidator


Examples of org.openmrs.validator.ObsValidator

      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();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.