Package org.openmrs.api

Examples of org.openmrs.api.APIException


            String startDateFieldName = (ModuleUtil.compareVersion(
                    OpenmrsConstants.OPENMRS_VERSION_SHORT, "1.10") > -1) ? "dateActivated" : "startDate";
            try {
                startDateWidget.setInitialValue(PropertyUtils.getProperty(regDrugOrders.get(0), startDateFieldName));
            } catch (Exception e) {
                throw new APIException(e);
            }
        }
        context.getSchema().addField(srf);
  }
View Full Code Here


    super.populateOrderTag(orderTag, session, submission);

        try {
            orderTag.dosingType = (Class<? extends DosingInstructions>)Context.loadClass((String) dosingTypeWidget.getValue(session.getContext(), submission));
        } catch (ClassNotFoundException e) {
            throw new APIException(e);
        }
   
    String doseUnitsValue = (String) doseUnitsWidget.getValue(session.getContext(), submission);
    if (doseUnitsValue != null) {
      orderTag.doseUnits = Context.getConceptService().getConcept(Integer.valueOf(doseUnitsValue));
View Full Code Here

    try {
      xml = generator.applyMacros(xml);
      xml = generator.applyRepeats(xml);
    }
    catch (Exception e) {
      throw new APIException("Unable to process macros and templates when processing form to make it shareable", e);
    }
   
    // now we need to loop through the attributes to find what dependencies we need to look for
    // fetch the tag handlers so we can gain access to the attribute descriptors
    Map<String, TagHandler> tagHandlers = Context.getService(HtmlFormEntryService.class).getHandlers();
View Full Code Here

    public static PatientProgram getPatientProgramByProgramOnDate(Patient patient, Program program, Date date) {

        List<PatientProgram> patientPrograms = Context.getProgramWorkflowService().getPatientPrograms(patient, program, null, date, date, null, false);

        if (patientPrograms.size() > 1) {
            throw new APIException("Simultaneous program enrollments in same program not supported");
        }

        if (patientPrograms.size() == 1) {
            return patientPrograms.get(0);
        }
View Full Code Here

TOP

Related Classes of org.openmrs.api.APIException

Copyright © 2018 www.massapicom. 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.