}
RecipeData data = new RecipeData();
data.id = pr.getId();
Client cl = pr.getServiceRender().getPolis().getClient();
data.snils = cl.getSnils();
data.lpuTFOMScode = lpuTFOMScode;
String sql = "SELECT fc FROM FacilityClient fc " +
"WHERE fc.surname = :surname " +
"AND fc.name = :name " +
"AND fc.pathronymic = :pathronymic " +
"AND fc.snils = :snils";
Query query = manager.createQuery(sql);
query.setParameter("surname", cl.getSurname());
query.setParameter("name", cl.getName());
query.setParameter("pathronymic", cl.getPathronymic());
query.setParameter("snils", cl.getSnils());
List<FacilityClient> fcList = query.getResultList();
if (!fcList.isEmpty()) {
FacilityClient fc = fcList.get(0);
Excemption ex = fc.getExcemption1();
if (ex == null) {
ex = fc.getExcemption2();
}
if (ex != null) {
data.exemptionID = ex.getExtKey();
}
}
Polis polisOMI = clientPolisMap.get(cl.getId());
if (polisOMI != null) {
String polisSN ="";
if (polisOMI.getSeries() != null) {
polisSN = polisOMI.getSeries();
}