Package org.openmrs.module.htmlformentry.widget

Examples of org.openmrs.module.htmlformentry.widget.TimeWidget


        // TODO: in 1.7-compatible version of the module, we can replace the H17 checks
        // used below with the new isDate, isTime, and isDatetime
       
      } else {
        DateWidget dateWidget = null;
        TimeWidget timeWidget = null;
        boolean disableTime = "false".equalsIgnoreCase(parameters.get("allowTime"));
       
        if (ConceptDatatype.DATE.equals(concept.getDatatype().getHl7Abbreviation()) || (ConceptDatatype.DATETIME.equals(concept.getDatatype().getHl7Abbreviation()) && disableTime)) {
          valueWidget = new DateWidget();
        } else if (ConceptDatatype.TIME.equals(concept.getDatatype().getHl7Abbreviation())) {
          valueWidget = new TimeWidget();
        } else if (ConceptDatatype.DATETIME.equals(concept.getDatatype().getHl7Abbreviation())) {
          dateWidget = new DateWidget();
          timeWidget = new TimeWidget();
         
          valueWidget = new DateTimeWidget(dateWidget, timeWidget);
        } else {
          throw new RuntimeException("Cannot handle datatype: " + concept.getDatatype().getName()
                  + " (for concept " + concept.getConceptId() + ")");
View Full Code Here


                dateWidget.setOnChangeFunction("existingEncounterOnDate(this, '"
                        + parameters.get("disallowMultipleEncountersOnDate") + "') ");
            }

            if ("true".equals(parameters.get("showTime"))) {
                timeWidget = new TimeWidget();
                timeErrorWidget = new ErrorWidget();
                if (context.getExistingEncounter() != null) {
                    timeWidget.setInitialValue(context.getExistingEncounter().getEncounterDatetime());
                } else if (parameters.get("defaultDate") != null) {
                    timeWidget.setInitialValue(parameters.get("defaultDate"));
View Full Code Here

TOP

Related Classes of org.openmrs.module.htmlformentry.widget.TimeWidget

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.