return DiagnosisBean.class.getSimpleName();
}
@Override
public void print(CombinedReportCreator cCreator) throws ClipsException {
FormReportCreator creater = cCreator.createFormReporter(getClass(), 1);
HashMap<String, Object> data = new LinkedHashMap<String, Object>();
String title = "Данные диагноза";
AlignmentType alType = AlignmentType.dataInOneColoumnByLeft;
String val = getSerrenLocal().getPolisData().getClient(getAuditListener()).toString();
ExtraField extraField = new ExtraField(val, "Пациент:", alType);
data.put("client", extraField);
val = Converter.dateToString(getDate());
extraField = new ExtraField(val, "Дата:", alType);
data.put("date", extraField);
val = getMkbAndStage();
extraField = new ExtraField(val, "Диагноз:", alType);
data.put("mkb", extraField);
val = getType().getTitle();
extraField = new ExtraField(val, "Тип диагноза:", alType);
data.put("type", extraField);
val = getEncounter().getTitle();
extraField = new ExtraField(val, "Повторяемость:", alType);
data.put("enc", extraField);
if (getAuthor() != null) {
val = getAuthor();
extraField = new ExtraField(val, "Автор:", alType);
data.put("author", extraField);
}
TableModel model = null;
if (!getAccompDiagnosis().isEmpty()) {
data.put("attended", "Список сопутствующих диагнозов:");
model = new TableModelAccompDiagnosisList(getAccompDiagnosis(), false);
}
TableReportOptions ops = new TableReportOptions();
ops.tableHeaderColor = Color.WHITE;
ops.bottomMargin = 0;
ops.topMargin = 0;
creater.createReport(title, ops, data.entrySet(), model);
creater.finish();
}