private DischargeFuturePlanVo populateFollowDetails(DischargeFuturePlanVo voFuture) { DischargeFuturePlanFollowUpVoCollection voColl = new DischargeFuturePlanFollowUpVoCollection(); for (int i = 0; i < form.grdFollowUp().getRows().size(); i++) { DischargeFuturePlanFollowUpVo voFutureFOllowup = new DischargeFuturePlanFollowUpVo(); if (form.grdFollowUp().getRows().get(i).getValue() != null) voFutureFOllowup = form.grdFollowUp().getRows().get(i).getValue(); voFutureFOllowup.setFollowUpType(form.grdFollowUp().getRows().get(i).getColFollowUpType()); voFutureFOllowup.setHospitalFollowUp(form.grdFollowUp().getRows().get(i).getColHospFollowUp()); voFutureFOllowup.setFollowUpInValue(form.grdFollowUp().getRows().get(i).getColIN()); voFutureFOllowup.setFollowUpInUnit(form.grdFollowUp().getRows().get(i).getColPeriod()); voFutureFOllowup.setFollowUpHCP((HcpLiteVo) form.grdFollowUp().getRows().get(i).getColHCP().getValue()); voFutureFOllowup.setFollowUpSpecialty(form.grdFollowUp().getRows().get(i).getColSpec()); voFutureFOllowup.setLocation((LocationLiteVo) form.grdFollowUp().getRows().get(i).getColLoc().getValue()); voColl.add(voFutureFOllowup); } voFuture.setFollowUpDetails(voColl); return voFuture; }
private DischargeFuturePlanVo populateFollowDetails(DischargeFuturePlanVo voFuture) { DischargeFuturePlanFollowUpVoCollection voColl = new DischargeFuturePlanFollowUpVoCollection(); for (int i = 0; i < form.grdFuturePlan().getRows().size(); i++) { DischargeFuturePlanFollowUpVo voFutureFOllowup = new DischargeFuturePlanFollowUpVo(); if (form.grdFuturePlan().getRows().get(i).getValue() != null) voFutureFOllowup = form.grdFuturePlan().getRows().get(i).getValue(); voFutureFOllowup.setHospitalFollowUp(form.grdFuturePlan().getRows().get(i).getColHospFollowUp()); voFutureFOllowup.setFollowUpInValue(form.grdFuturePlan().getRows().get(i).getColIN()); voFutureFOllowup.setFollowUpInUnit(form.grdFuturePlan().getRows().get(i).getColPeriod()); voFutureFOllowup.setFollowUpHCP((HcpLiteVo) form.grdFuturePlan().getRows().get(i).getColHCP().getValue()); voFutureFOllowup.setFollowUpSpecialty(form.grdFuturePlan().getRows().get(i).getColSpec()); voFutureFOllowup.setLocation((LocationLiteVo) form.grdFuturePlan().getRows().get(i).getColLoc().getValue()); voColl.add(voFutureFOllowup); } voFuture.setFollowUpDetails(voColl); return voFuture; }
private DischargeFuturePlanVo populateFollowDetails(DischargeFuturePlanVo voFuture) { DischargeFuturePlanFollowUpVoCollection voColl = new DischargeFuturePlanFollowUpVoCollection(); for (int i = 0; i < form.grdFuturePlan().getRows().size(); i++) { DischargeFuturePlanFollowUpVo voFutureFOllowup = new DischargeFuturePlanFollowUpVo(); if (form.grdFuturePlan().getRows().get(i).getValue() != null) voFutureFOllowup = form.grdFuturePlan().getRows().get(i).getValue(); voFutureFOllowup.setHospitalFollowUp(form.grdFuturePlan().getRows().get(i).getColHospFollowUp()); voFutureFOllowup.setFollowUpInValue(getFollowUpInValue(form.grdFuturePlan().getRows().get(i).getColIN().getValue())); voFutureFOllowup.setFollowUpInUnit(form.grdFuturePlan().getRows().get(i).getColPeriod()); voFutureFOllowup.setFollowUpHCP((HcpLiteVo) form.grdFuturePlan().getRows().get(i).getColHCP().getValue()); voFutureFOllowup.setFollowUpSpecialty(form.grdFuturePlan().getRows().get(i).getColSpec()); voFutureFOllowup.setLocation((LocationLiteVo) form.grdFuturePlan().getRows().get(i).getColLoc().getValue()); voColl.add(voFutureFOllowup); } voFuture.setFollowUpDetails(voColl); return voFuture; }
private DischargeFuturePlanVo generateDocumentAndPopulate(DischargeFuturePlanVo dischargeFuturePlanVo,ArrayList<String> errors) throws PresentationLogicException { if (dischargeFuturePlanVo == null || !dischargeFuturePlanVo.getID_FuturePlanIsNotNull() || !dischargeFuturePlanVo.getLinkedSurgicalOperationNoteIsNotNull() || !dischargeFuturePlanVo.getLinkedSurgicalOperationNote().getID_SurgicalOperationNotesIsNotNull()) { throw new PresentationLogicException("Logic Error - a saved valid SurgicalOperationNotes VO was expected!"); } //Try to generate the report if (errors == null) errors = new ArrayList<String>(); String filename = buildReport(errors); if (filename == null) return null; //String patientDocumentName = "Report Notes"; //DocumentCategory patientDocumentCategory = DocumentCategory.DISCHARGE_REPORTS; //wdev-15920 String patientDocumentName = "eOpNotes Report"; DocumentCategory patientDocumentCategory = DocumentCategory.OPNOTES_REPORTS; if (dischargeFuturePlanVo.getLinkedSurgicalOperationNote().getSurgicalOpNoteDocumentIsNotNull()) throw new PresentationLogicException("Logic Error - Surgical OP Notes Document already generated"); dischargeFuturePlanVo.getLinkedSurgicalOperationNote().setSurgicalOpNoteDocument(populatePatientDocumentVo(populateServetDocumentVo(filename),patientDocumentName, patientDocumentCategory)); return dischargeFuturePlanVo; }
public DischargeFuturePlanVo saveFuturePlan(DischargeFuturePlanVo voFuturePlan) throws DomainInterfaceException, StaleObjectException { if(voFuturePlan == null) throw new CodingRuntimeException("DischargeFuturePlanVo is null"); if(!voFuturePlan.isValidated()) throw new CodingRuntimeException("DischargeFuturePlanVo Value Object has not been validated"); DomainFactory factory = getDomainFactory(); FuturePlan doFP = DischargeFuturePlanVoAssembler.extractFuturePlan(factory, voFuturePlan); factory.save(doFP); return DischargeFuturePlanVoAssembler.create(doFP); }
public DischargeFuturePlanVo getFuturePlan(CareContextRefVo careContextRefvo) { if(careContextRefvo == null) throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. "); if(careContextRefvo != null) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" from FuturePlan fp where "); String andStr = " "; ArrayList<String> markers = new ArrayList<String>(); ArrayList<Serializable> values = new ArrayList<Serializable>(); hql.append(andStr + " fp.careContext.id = :careContextId"); markers.add("careContextId"); values.add(careContextRefvo.getID_CareContext()); andStr = " and "; List list = factory.find(hql.toString(), markers,values); if(list != null && list.size() > 0) { DischargeFuturePlanVoCollection voColl = DischargeFuturePlanVoAssembler.createDischargeFuturePlanVoCollectionFromFuturePlan(list); if(voColl != null && voColl.size() > 0) return voColl.get(0); } } return null; }
public ims.clinical.vo.DischargeFuturePlanVo getFuturePlan(ims.core.admin.vo.CareContextRefVo careContextRefVo) { if(careContextRefVo == null) throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. "); if(careContextRefVo != null) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" from FuturePlan fp where "); String andStr = " "; ArrayList<String> markers = new ArrayList<String>(); ArrayList<Serializable> values = new ArrayList<Serializable>(); hql.append(andStr + " fp.careContext.id = :careContextId"); markers.add("careContextId"); values.add(careContextRefVo.getID_CareContext()); andStr = " and "; List list = factory.find(hql.toString(), markers,values); if(list != null && list.size() > 0) { DischargeFuturePlanVoCollection voColl = DischargeFuturePlanVoAssembler.createDischargeFuturePlanVoCollectionFromFuturePlan(list); if(voColl != null && voColl.size() > 0) return voColl.get(0); } } return null; }
public DischargeFuturePlanVo save(DischargeFuturePlanVo dummy, SurgicalOperationSummaryVo surgicalOperationSumm) throws DomainInterfaceException, StaleObjectException { if(dummy == null) throw new CodingRuntimeException("DischargeFuturePlanVo is null"); if(!dummy.isValidated()) throw new CodingRuntimeException("DischargeFuturePlanVo Value Object has not been validated"); if( surgicalOperationSumm == null) //wdev-15917 throw new CodingRuntimeException("SurgicalOperationSummaryVo is null"); //wdev-11576 if(!dummy.getID_FuturePlanIsNotNull()) { if( getFuturePlan(dummy.getCareContext()) != null) throw new StaleObjectException(null); } //----------- DomainFactory factory = getDomainFactory(); //wdev-15917 SurgicalOperationSummary dosurgOpum = SurgicalOperationSummaryVoAssembler.extractSurgicalOperationSummary(factory,surgicalOperationSumm); if( dosurgOpum != null ) factory.save(dosurgOpum); //---- wdev-15917 FuturePlan doFP = DischargeFuturePlanVoAssembler.extractFuturePlan(factory, dummy); factory.save(doFP); return DischargeFuturePlanVoAssembler.create(doFP); }
private void updateControlState(DischargeFuturePlanVo voFuture) { form.imbInfo().setVisible(voFuture.getHospitalPlanIsNotNull() || voFuture.getCommentsIsNotNull() || voFuture.getMedicalCertificationIssuedIsNotNull() || voFuture.getOtherResultsAwaitedIsNotNull()); if (form.imbInfo().isVisible()) { form.imbInfo().setTooltip(setFormInforTooltip(voFuture)); form.imbInfo().setEnabled(false); } }
private String setFormInforTooltip(DischargeFuturePlanVo voFuture) { String infoTooltip = "Hospital Plan : "; if (voFuture.getHospitalPlanIsNotNull()) infoTooltip = infoTooltip + voFuture.getHospitalPlan(); infoTooltip = infoTooltip + "<br>Medical Certification: "; Boolean medicalCertification = voFuture.getMedicalCertificationIssuedIsNotNull() ? (voFuture.getMedicalCertificationIssued().equals(YesNo.YES) ? Boolean.TRUE : Boolean.FALSE) : Boolean.FALSE; if (medicalCertification) { String certificateExpiresDate = voFuture.getCertificateExpiresDateIsNotNull() ? ", Expires: " + voFuture.getCertificateExpiresDate().toString() : ""; String refrainFromWorkValue = voFuture.getRefrainFromWorkValueIsNotNull() ? ", Refrain From Work: " + voFuture.getRefrainFromWorkValue().toString() : ""; String refrainFromWorkUnit = voFuture.getRefrainFromWorkUnitIsNotNull() ? voFuture.getRefrainFromWorkUnit().toString() : ""; infoTooltip = infoTooltip + "Issued" + certificateExpiresDate + refrainFromWorkValue + " " + refrainFromWorkUnit; } infoTooltip = infoTooltip + "<br>Comments : "; if (voFuture.getCommentsIsNotNull()) infoTooltip = infoTooltip + voFuture.getComments(); infoTooltip = infoTooltip + "<br>Other Results Awaited : "; if (voFuture.getOtherResultsAwaitedIsNotNull()) infoTooltip = infoTooltip + voFuture.getOtherResultsAwaited(); return infoTooltip; }
private void populateScreenFromData(DischargeFuturePlanVo voFuture) { clearInstanceControls(); if (voFuture == null) return; form.grdFollowUp().getRows().clear(); //WDEV-15862 for (int i = 0; voFuture.getOpNotesFollowUpDetailsIsNotNull() && i < voFuture.getOpNotesFollowUpDetails().size(); i++) { grdFollowUpRow row = form.grdFollowUp().getRows().newRow(); row.setColFollowUpType(voFuture.getOpNotesFollowUpDetails().get(i).getFollowUpTypeIsNotNull() ? voFuture.getOpNotesFollowUpDetails().get(i).getFollowUpType() : null); row.setColHospFollowUp(voFuture.getOpNotesFollowUpDetails().get(i).getHospitalFollowUpIsNotNull() ? voFuture.getOpNotesFollowUpDetails().get(i).getHospitalFollowUp() : null); row.setColIN(voFuture.getOpNotesFollowUpDetails().get(i).getFollowUpInValueIsNotNull() ? voFuture.getOpNotesFollowUpDetails().get(i).getFollowUpInValue() : null); row.setColPeriod(voFuture.getOpNotesFollowUpDetails().get(i).getFollowUpInUnitIsNotNull() ? voFuture.getOpNotesFollowUpDetails().get(i).getFollowUpInUnit() : null); row.getColHCP().clear(); if (voFuture.getOpNotesFollowUpDetails().get(i).getFollowUpHCPIsNotNull()) { row.getColHCP().newRow(voFuture.getOpNotesFollowUpDetails().get(i).getFollowUpHCP(), voFuture.getOpNotesFollowUpDetails().get(i).getFollowUpHCP().getName().toString()); row.getColHCP().setValue(voFuture.getOpNotesFollowUpDetails().get(i).getFollowUpHCP()); } row.setColSpec(voFuture.getOpNotesFollowUpDetails().get(i).getFollowUpSpecialtyIsNotNull() ? voFuture.getOpNotesFollowUpDetails().get(i).getFollowUpSpecialty() : null); row.getColLoc().clear(); if (voFuture.getOpNotesFollowUpDetails().get(i).getLocationIsNotNull()) { row.getColLoc().newRow(voFuture.getOpNotesFollowUpDetails().get(i).getLocation(), voFuture.getOpNotesFollowUpDetails().get(i).getLocation().getName().toString()); row.getColLoc().setValue(voFuture.getOpNotesFollowUpDetails().get(i).getLocation()); } row.setValue(voFuture.getOpNotesFollowUpDetails().get(i)); //wdev-9379 verifyAndDisableNonHospFollowUp(row); } form.txtGeneral().setValue(voFuture.getComments()); //WDEV-15862 //form.txtNurseEnabled().setValue(voFuture.getNurseEnabledInstructionsIsNotNull() ? voFuture.getNurseEnabledInstructions().getNurseEnabledInstructions() : ""); //form.txtActions().setValue(voFuture.getActionsforGPandCommunityIsNotNull() ? voFuture.getActionsforGPandCommunity() : null); form.txtNurseEnabled().setValue(voFuture.getOpNotesNurseEnabledInstructionsIsNotNull() ? voFuture.getOpNotesNurseEnabledInstructions().getNurseEnabledInstructions() : ""); form.txtActions().setValue(voFuture.getOpNotesActionsforGPandCommunityIsNotNull() ? voFuture.getOpNotesActionsforGPandCommunity() : null); if(form.getLocalContext().getcurentSurgicalOpNotes() != null) { form.ccCompletingClinician().setValue(form.getLocalContext().getcurentSurgicalOpNotes().getSignOffHCP()); form.dtimCompletion().setValue(form.getLocalContext().getcurentSurgicalOpNotes().getSignOffDateTime()); } //wdev-13658 form.chkSurgicalOperationNotesComplete().setValue(voFuture.getIsSugicalOpNotesCompleteIsNotNull() ? voFuture.getIsSugicalOpNotesComplete():Boolean.FALSE); setHideVisbleSIgnOffControls(Boolean.FALSE); //----------------- }