return new SicklistLocal(details, getAuditListener());
}
public void formPrintFields(DirectoryCollaboratorFunctionsItem collab) throws ClipsException {
ClientLocal client = getEmcLocal().getClient();
DiseaseFolluwupPrintInfo printInfo = getPrintInfo();
DirectoryMKB10 mKB10 = DirectoryLocator.getDirectory(DirectoryMKB10.class);
ArrayList<SerRenLocal> serrensInTap = getSerRensByCollab(collab);
data = new HashMap<String, Object>();
String emcNum = getEmcLocal().getClient().getNumberEmc();
if (emcNum != null) {
data.put("emc_code", emcNum);
}
data.put("tap_date", Converter.dateToString(getCreated(), "dd.MM.yy"));
DirectoryDistrictItem dist = client.getDistrict();
if (dist != null && dist.getID() != 0) {
String district = dist.getTitle();
data.put("pacient_district", district);
}
String snils = client.getSnils();
if (snils != null) {
data.put("pacient_snils", snils);
}
ClientExemptionData chunk = client.getExemption();
if (chunk != null) {
DirectoryExcemptionItem exemp = chunk.getExemption();
if (exemp != null && exemp.getID() != 0) {
data.put("exemption_code", exemp.getExtKey());
}
}
data.put("pacient_fio", client.toString());
data.put("pacient_sex", client.getSex().getID());
String bornDate = Converter.dateToString(client.getBorn());
data.put("pacient_born_date", bornDate.isEmpty() ? " " : bornDate);
ClientLocal representative = null;
if (client.getPolisOMS().getNumber().equals(Polis.FICTIVE_POLIS_NUMBER)) {
representative = client.getRepresentative();
}
ClientDocumentData doc;
PolisData polis;
if (representative != null) {
data.put("representative_surname", representative.getSurname().getTitle());
data.put("representative_name", representative.getName().getTitle());
data.put("representative_patron", representative.getPathron().getTitle());
data.put("is_representative_document", Boolean.TRUE);
DirectoryRepresentativeStatusItem item = client.getRepresStatus();
if (item != null) {
data.put("representative_status", item.getID());
}
doc = representative.getClientDocument();
polis = representative.getPolisOMS();
}
else {
doc = client.getClientDocument();
polis = client.getPolisOMS();
}