// 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() + ")");