else {
logger.error("Unable to locate 'participants' property in object template: "
+ encounter.getObjectInstance().getObjectTemplate());
// alert service
alertService.addAlert(new Alert(Alert.Type.ERROR, EncounterBuilderEditor.class.getSimpleName(),
"Unable to locate 'participants' property in object template: "
+ encounter.getObjectInstance().getObjectTemplate()));
}
}
if(od != null) {
if(ep.getParticipant() instanceof BasicModelObject) {
od.addValue("instance:" + ((BasicModelObject)ep.getParticipant()).getId());
}
else {
od.addValue("label:" + ep.getLabel());
}
// save
doSave(null);
}
else {
logger.error("Unable to add data; no 'participants' object data found in instance: "
+ encounter.getObjectInstance());
// alert service
alertService.addAlert(new Alert(Alert.Type.ERROR, EncounterBuilderEditor.class.getSimpleName(),
"Unable to add data; no 'participants' object data found in instance: "
+ encounter.getObjectInstance()));
}
}
}