} else if (Double.class.isAssignableFrom(clazz)) {
return Double.valueOf(val);
} else if (Integer.class.isAssignableFrom(clazz)) {
return Integer.valueOf(val);
} else if (Concept.class.isAssignableFrom(clazz)) {
ConceptEditor ed = new ConceptEditor();
ed.setAsText(val);
return ed.getValue();
} else if (Drug.class.isAssignableFrom(clazz)) {
DrugEditor ed = new DrugEditor();
ed.setAsText(val);
return ed.getValue();
} else if (Patient.class.isAssignableFrom(clazz)) {
PatientEditor ed = new PatientEditor();
ed.setAsText(val);
return ed.getValue();
} else if (Person.class.isAssignableFrom(clazz)) {
PersonEditor ed = new PersonEditor();
ed.setAsText(val);
return ed.getValue();
} else if (EncounterType.class.isAssignableFrom(clazz)) {
EncounterTypeEditor ed = new EncounterTypeEditor();
ed.setAsText(val);
return ed.getValue();
} else {
return val;
}
}