public void executeDSPrintReport(DischargeSummaryScheduleVo job) { EDischargeSTHKSummaryVoCollection summaries = getSTHKPatientDocuments(); if (summaries != null && summaries.size() > 0) { System.out.println( "executeDSPrintReport " + summaries.size()); try { saveReports(summaries, job, "Discharge Summary Report", DocumentCategory.DISCHARGE_SUMMARY); } catch (Exception e) { getDomainFactory().close(); } } }
public EDischargeSTHKSummaryVoCollection getSTHKPatientDocuments() { DomainFactory factory = getDomainFactory(); String sql = "select summ from Summary as summ left join summ.careContext as cCtxt left join cCtxt.currentStatus as cStat where summ.dischargeLetterStatus.id = -1719 and ( summ.tTAStatus = -2084 or summ.tTAStatus = -2075) and cStat.status not in (:id1) "; List lst = factory.find(sql,new String[]{"id1"}, new Object[]{getDomLookup(CareContextStatus.CANCELLED)}); if(lst != null && !lst.isEmpty()) { System.out.println(new DateTime().toString() + ": No of results : " + lst.size()); return EDischargeSTHKSummaryVoAssembler.createEDischargeSTHKSummaryVoCollectionFromSummary(lst); } return null; }
public EDischargeSTHKSummaryVoCollection getSTHKSuppPatientDocuments() { DomainFactory factory = getDomainFactory(); String sql = "select summ from Summary as summ left join summ.careContext as cCtxt left join cCtxt.currentStatus as cStat where summ.dischargeLetterStatus.id = -1727 and summ.dischargeSupplementaryLetterStatus.id = -1821 and ( summ.tTAStatus = -2084 or summ.tTAStatus = -2075) and cStat.status not in (:id1)"; List lst = factory.find(sql,new String[]{"id1"}, new Object[]{getDomLookup(CareContextStatus.CANCELLED)}); if(lst != null && !lst.isEmpty()) { System.out.println(new DateTime().toString() + ": No of results : " + lst.size()); return EDischargeSTHKSummaryVoAssembler.createEDischargeSTHKSummaryVoCollectionFromSummary(lst); } return null; }
public void executeSUPPPrintReport(DischargeSummaryScheduleVo job) { EDischargeSTHKSummaryVoCollection summaries = getSTHKSuppPatientDocuments(); if (summaries != null && summaries.size() > 0) { try { saveReports(summaries, job, "Supplementary Report", DocumentCategory.DISCHARGE_SUPPLEMENTARY); } catch(Exception e) { getDomainFactory().close(); } } }
public EDischargeSTHKSummaryVo getCurrentSummary(CareContextRefVo ccRefVo) { if(ccRefVo == null) throw new CodingRuntimeException("ccRefVo Filter not provided for list call. "); if(ccRefVo != null) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" from Summary summ where "); String andStr = " "; ArrayList<String> markers = new ArrayList<String>(); ArrayList<Serializable> values = new ArrayList<Serializable>(); hql.append(andStr + " summ.careContext.id = :careContextId"); markers.add("careContextId"); values.add(ccRefVo.getID_CareContext()); andStr = " and "; List list = factory.find(hql.toString(), markers,values); if(list != null && list.size() > 0) { EDischargeSTHKSummaryVoCollection voColl = EDischargeSTHKSummaryVoAssembler.createEDischargeSTHKSummaryVoCollectionFromSummary(list); if(voColl != null && voColl.size() > 0) return voColl.get(0); } } return null; }
public EDischargeSTHKSummaryVoCollection getSTHKPatientDocuments() { DomainFactory factory = getDomainFactory(); String sql = "from Summary as summ where summ.dischargeLetterStatus.id = -1719 and ( summ.tTAStatus = -2084 or summ.tTAStatus = -2075)"; List lst = factory.find(sql); if(lst != null && !lst.isEmpty()) { System.out.println(new DateTime().toString() + ": No of results : " + lst.size()); return EDischargeSTHKSummaryVoAssembler.createEDischargeSTHKSummaryVoCollectionFromSummary(lst); } return null; }
public EDischargeSTHKSummaryVoCollection getSTHKSuppPatientDocuments() { DomainFactory factory = getDomainFactory(); String sql = "from Summary as summ where summ.dischargeLetterStatus.id = -1727 and ( summ.tTAStatus = -2084 or summ.tTAStatus = -2075)"; List lst = factory.find(sql); if(lst != null && !lst.isEmpty()) { System.out.println(new DateTime().toString() + ": No of results : " + lst.size()); return EDischargeSTHKSummaryVoAssembler.createEDischargeSTHKSummaryVoCollectionFromSummary(lst); } return null; }
public void executeDSPrintReport(DischargeSummaryScheduleVo job) { EDischargeSTHKSummaryVoCollection summaries = getSTHKPatientDocuments(); if (summaries != null && summaries.size() > 0) { try { saveReports(summaries, job, "Discharge Summary Report", DocumentCategory.DISCHARGE_SUMMARY); } catch (Exception e) { getDomainFactory().close(); } } }