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 DischargeSummaryScheduleVo getJob(String jobDesc) { DomainFactory factory = getDomainFactory(); String sql = "from DischargeSummarySchedule"; List jobs = factory.find(sql); if (jobs.size() > 0) { for (int i = 0 ; i < jobs.size(); i ++) { DischargeSummaryScheduleVo voDSS = DischargeSummaryScheduleVoAssembler.create((DischargeSummarySchedule) jobs.get(i)); StringBuffer sb = new StringBuffer(); sb.append(voDSS.getJobType().getText().toString()); if (jobDesc.equals(sb.toString())) { return voDSS; } } } return null; }
public void executeDSPrintReport(DischargeSummaryScheduleVo job) { DischargeReportDetailVoCollection dischargeReportsDetails = null; do { dischargeReportsDetails = getPatientDocuments(); if (dischargeReportsDetails != null && dischargeReportsDetails.size() > 0) { try { saveReports(dischargeReportsDetails, job, "Discharge Summary Report", DocumentCategory.DISCHARGE_SUMMARY); } catch (Exception e) { getDomainFactory().close(); break; } } } while (getMorePatientDocuments); }
@Override protected void onFormOpen(Object[] args) throws PresentationLogicException { if (args.length > 0) { populateGrid((DischargeSummaryScheduleVo)args[0]); } }
private void populateGrid(DischargeSummaryScheduleVo dischargeSummary) { if (dischargeSummary == null) return; form.grdList().getRows().clear(); FailedEmailsDetailsVoCollection failedEmails = dischargeSummary.getFailedEmails(); for (int j = 0 ; failedEmails != null && j < failedEmails.size() ; j++) { FailedEmailsDetailsVo failedEmail = failedEmails.get(j); grdListRow row = form.grdList().getRows().newRow(); row.setValue(failedEmail); if (failedEmail.getJobTypeIsNotNull()) row.setColJobType(failedEmail.getJobType().getText()); if (failedEmail.getGPNameIsNotNull()) row.setColGPName(failedEmail.getGPName()); if (failedEmail.getEmailAddressIsNotNull()) row.setColEmailAddress(failedEmail.getEmailAddress()); if (failedEmail.getPatientNameIsNotNull()) row.setColPatient(failedEmail.getPatientName()); if (failedEmail.getInitialDateTimeIsNotNull()) row.setColInitialDateTime(failedEmail.getInitialDateTime().toString()); if (failedEmail.getFailedDateTimeIsNotNull()) row.setColFailedDateTime(failedEmail.getFailedDateTime().toString()); if (failedEmail.getSuccessfulDateTimeIsNotNull()) row.setColSuccessfulSent(failedEmail.getSuccessfulDateTime().toString()); } }
public void save(DischargeSummaryScheduleVo batch) throws StaleObjectException { if(batch == null) { throw new CodingRuntimeException("DischargeSummaryScheduleVo is null"); } if (!batch.isValidated()) { throw new DomainRuntimeException("DischargeSummaryScheduleVo not validated"); } DomainFactory factory = getDomainFactory(); factory.save(DischargeSummaryScheduleVoAssembler.extractDischargeSummarySchedule(factory, batch)); }
public DischargeSummaryScheduleVo getDischargeSummarySchedule(DischargeSummaryScheduleRefVo voRef) { if(voRef == null) throw new CodingRuntimeException("Cannot get DischargeSummaryScheduleVo for null DischargeSummaryScheduleRefVo"); DomainFactory factory = getDomainFactory(); DischargeSummarySchedule doDischargeSummarySchedule = (DischargeSummarySchedule) factory.getDomainObject(DischargeSummarySchedule.class, voRef.getID_DischargeSummarySchedule()); return DischargeSummaryScheduleVoAssembler.create(doDischargeSummarySchedule); }
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 void executeSUPPPrintReport(DischargeSummaryScheduleVo job) { DischargeReportDetailVoCollection dischargeReportsDetails = getSuppPatientDocuments(); if (dischargeReportsDetails != null && dischargeReportsDetails.size() > 0) { try { saveReports(dischargeReportsDetails, job, "Supplementary Report", DocumentCategory.DISCHARGE_SUPPLEMENTARY); } catch(Exception e) { getDomainFactory().close(); } } }
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(); } } }
private void populateGrid() { form.grdJob().getRows().clear(); DischargeSummaryScheduleVoCollection voCol = domain.getJobs(); DischargeSummaryScheduleVo summaryScheduleVo = null; for (int j = 0 ; voCol != null && j < voCol.size() ; j++) { summaryScheduleVo = voCol.get(j); grdJobRow row = form.grdJob().getRows().newRow(); row.setValue(summaryScheduleVo); if (summaryScheduleVo.getCreationDateIsNotNull()) row.setcolCreatedOn(summaryScheduleVo.getCreationDate()); if (summaryScheduleVo.getTriggerFrequencyIsNotNull()) row.setcolFrequency(summaryScheduleVo.getTriggerFrequency()); if (summaryScheduleVo.getLastRunIsNotNull()) row.setcolLastRun(summaryScheduleVo.getLastRun().toString()); if (summaryScheduleVo.getNextRunIsNotNull()) row.setcolNextRun(summaryScheduleVo.getNextRun().toString()); if (summaryScheduleVo.getPrintedLettersNoIsNotNull()) row.setcolNumberLettersPrinted(summaryScheduleVo.getPrintedLettersNo()); if (summaryScheduleVo.getGeneratedLeettersNoIsNotNull()) row.setcolNumberLettersGenerated(summaryScheduleVo.getGeneratedLeettersNo()); if (summaryScheduleVo.getSuccessfulEmailsNoIsNotNull()) row.setcolSuccessfulSentEmail(summaryScheduleVo.getSuccessfulEmailsNo()); if (summaryScheduleVo.getFailedEmailsNoIsNotNull()) row.setcolFailedSentEmail(summaryScheduleVo.getFailedEmailsNo()); row.setcolJob("Print Report"); row.setValue(summaryScheduleVo); if (summaryScheduleVo.getJobTypeIsNotNull()) { row.setcolType(summaryScheduleVo.getJobType().toString()); form.cmbJobType().removeRow(summaryScheduleVo.getJobType()); } } updateControlState(); }
private void populateGrid() { form.grdJob().getRows().clear(); DischargeSummaryScheduleVoCollection voCol = domain.getJobs(); DischargeSummaryScheduleVo summaryScheduleVo = null; for (int j = 0 ; voCol != null && j < voCol.size() ; j++) { summaryScheduleVo = voCol.get(j); grdJobRow row = form.grdJob().getRows().newRow(); row.setValue(summaryScheduleVo); if (summaryScheduleVo.getCreationDateIsNotNull()) row.setcolCreatedOn(summaryScheduleVo.getCreationDate()); if (summaryScheduleVo.getTriggerFrequencyIsNotNull()) row.setcolFrequency(summaryScheduleVo.getTriggerFrequency()); if (summaryScheduleVo.getLastRunIsNotNull()) row.setcolLastRun(summaryScheduleVo.getLastRun().toString()); if (summaryScheduleVo.getNextRunIsNotNull()) row.setcolNextRun(summaryScheduleVo.getNextRun().toString()); if (summaryScheduleVo.getPrintedLettersNoIsNotNull()) row.setcolNumberLettersPrinted(summaryScheduleVo.getPrintedLettersNo()); if (summaryScheduleVo.getGeneratedLeettersNoIsNotNull()) row.setcolNumberLettersGenerated(summaryScheduleVo.getGeneratedLeettersNo()); if (summaryScheduleVo.getSuccessfulEmailsNoIsNotNull()) row.setcolSuccessfulSentEmail(summaryScheduleVo.getSuccessfulEmailsNo()); if (summaryScheduleVo.getFailedEmailsNoIsNotNull()) row.setcolFailedSentEmail(summaryScheduleVo.getFailedEmailsNo()); if (summaryScheduleVo.getSealedEnvelopePatientsNo() != null) row.setcolSealedEnvelops(summaryScheduleVo.getSealedEnvelopePatientsNo()); row.setcolJob("Print Report"); row.setValue(summaryScheduleVo); if (summaryScheduleVo.getJobTypeIsNotNull()) { row.setcolType(summaryScheduleVo.getJobType().toString()); form.cmbJobType().removeRow(summaryScheduleVo.getJobType()); } } updateControlState(); }