protected String getBeanName() {
return PrescriptionBean.class.getSimpleName();
}
public void itemPrint(PrescriptionItemData itemData) throws ClipsException {
DirectoryCollaboratorItem collab = getSerrenLocal().getSerRenDirector();
ClientLocal client = getSerrenLocal().getPolisData().getClient(getAuditListener());
FormReportCreator creater = ReporterFactory.createFormReporter(getClass(), 1);
HashMap<String, Object> data = new HashMap<String, Object>();
data.put("recipeDate", Converter.dateToString(getDate()));
data.put("recipeClient", client.toString());
int age = DateTimeUtils.calcAge(client.getBorn(), TimeLocal.getCurrentTime().getTime());
data.put("clientAge", age != Integer.MIN_VALUE ? Integer.toString(age) : "Не определен");
data.put("clientAddress", client.getAddress().toStringShort());
data.put("clientEMC", client.getEMC().getID());
data.put("recipeCollab", collab.getTitle());
data.put("recipeVidal", itemData.getVidal().toString());
data.put("recipeTake", itemData.getTakeDrug().toString());
creater.createReport(null, null, data.entrySet(), null);
creater.finish();
}