private void loadProcedures() { PatientProcedureShortVoCollection list = domain.listProcedures(form.getGlobalContext().Core.getPatientShort(), getProcedureStatus()); for (int x = 0; list != null && x < list.size(); x++) { if (list.get(x) != null && list.get(x).getProcedureDescriptionIsNotNull()) { if (!list.get(x).equals(form.getGlobalContext().Clinical.PatientSummary.getPrimaryAssociation())) { GenForm.grdProcedureRow row = form.grdProcedure().getRows().newRow(); row.setcolLaterality(getProcedureLateralityImg(list.get(x).getProcLaterality(), list.get(x).getProcedureStatus())); row.setColProcedure(list.get(x).getProcedureDescription()); row.setTooltip(list.get(x).getDiAssociationsTooltip()); row.setValue(list.get(x)); } } } }
private void getProcedureRecords() { PatientProcedureShortVoCollection voCollProcedure = null; voCollProcedure = domain.listProceduresByEpisodeOfCare(form.getGlobalContext().Core.getEpisodeofCareShort()); if (voCollProcedure == null || voCollProcedure.size() == 0) { // engine.showMessage("No procedures found!"); return; } displayProcedureCollection(voCollProcedure); }
private void displayProcedureCollection(PatientProcedureShortVoCollection voCollProcedure) { if (voCollProcedure != null) { for (int i = 0; i < voCollProcedure.size(); i++) { if(PatientProcedureStatus.PERFORMED.equals(voCollProcedure.get(i).getProcedureStatus()) || (PatientProcedureStatus.PLANNED.equals(voCollProcedure.get(i).getProcedureStatus()) && voCollProcedure.get(i).getProcedureOutcome()==null)){ GenForm.grdDiagnosisRow pRow = form.grdDiagnosis().getRows().newRow(); pRow.setColDiagnosis(voCollProcedure.get(i).getProcedureDescription()); pRow.setValue(voCollProcedure.get(i)); } } } }
private PatientProcedureShortVoCollection listProceduresForPatient(PatientRefVo patrefvo, boolean boolDiagnosis) { DomainFactory factory = getDomainFactory(); String hql = new String(); hql = " from PatientProcedure patproc "; StringBuffer condStr = new StringBuffer(); String andStr = " "; ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); condStr.append(andStr + " patproc.careContext.episodeOfCare.careSpell.patient.id = :patientId"); markers.add("patientId"); values.add(patrefvo.getID_Patient()); andStr = " and "; //if ( (boolDiagnosis) )//List all Diagnosis //{ // condStr.append(andStr + " patproc.isComplication = :complication"); // markers.add("complication"); // values.add(Boolean.FALSE); //} //else if ( (boolComplication) && (!boolDiagnosis) )//List all Complications //{ // condStr.append(andStr + " patproc.isComplication = :complication"); // markers.add("complication"); // values.add(Boolean.TRUE); //} hql += " where "; hql += condStr.toString(); return PatientProcedureShortVoAssembler.createPatientProcedureShortVoCollectionFromPatientProcedure(factory.find(hql,markers,values)).sort(); }
public PatientProcedureShortVoCollection listProceduresByEpisodeOfCare(EpisodeOfCareRefVo episodeOfCareRefVo) { if(episodeOfCareRefVo == null) throw new DomainRuntimeException("Invalid Episode Context Ref"); DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer("from PatientProcedure p "); hql.append(" where p.careContext.episodeOfCare.id = " + episodeOfCareRefVo.getID_EpisodeOfCare()); return PatientProcedureShortVoAssembler.createPatientProcedureShortVoCollectionFromPatientProcedure(factory.find(hql.toString())); }
private void populateProcedures(PatientProcedureShortVoCollection voCollProcedure) { form.ctnSummary().grdProcedure().getRows().clear(); if (voCollProcedure != null) { for (int i = 0; i < voCollProcedure.size(); i++) { PatientProcedureShortVo voPatientProcedureShort = voCollProcedure.get(i); if (voPatientProcedureShort.getProcedureStatusIsNotNull()) { if ((voPatientProcedureShort.getProcedureStatus().equals(PatientProcedureStatus.PLANNED) && (voPatientProcedureShort.getProcedureOutcome() == null || voPatientProcedureShort.getProcedureOutcome().equals(PatientProcedureOutcome.CANCELLED)) || (voPatientProcedureShort.getProcedureStatus().equals(PatientProcedureStatus.PERFORMED)))) { GenForm.ctnSummaryContainer.grdProcedureRow pRow = form.ctnSummary().grdProcedure().getRows().newRow(); pRow.setColImage(getProcedureLateralityImg(voPatientProcedureShort.getProcLaterality(), voPatientProcedureShort.getProcedureStatus())); pRow.setColText(getProcedureText(voPatientProcedureShort)); pRow.setTooltipForColText(voPatientProcedureShort.createTooltipForPatientSummary()); pRow.setColDatePerformed(getDate(voPatientProcedureShort)); if (voPatientProcedureShort.getSysInfoIsNotNull() && voPatientProcedureShort.getSysInfo().getLastupdateUser() != null) pRow.setcolHasAudit(form.getImages().Core.EditDisabled); pRow.setTooltip(voPatientProcedureShort.getDiAssociationsTooltip()); pRow.setColStatus(getStatus(voPatientProcedureShort)); pRow.setValue(voPatientProcedureShort); } } } } }
private PatientProcedureShortVo getExistingPatientProcedureOrCreateNew(ProcedureLiteVo voProcedure) { PatientProcedureShortVoCollection collProc = form.getLocalContext().getPatientProcedures(); if(collProc == null) return new PatientProcedureShortVo(); for(int i = 0; i < collProc.size(); i++) { if(collProc.get(i).getProcedure().getID_Procedure().equals(voProcedure.getID_Procedure())) return collProc.get(i); } return new PatientProcedureShortVo(); }
private void populateProcedures(PatientProcedureShortVoCollection voCollProcedure) { form.ctnSummary().grdProcedure().getRows().clear(); if (voCollProcedure != null) { for (int i = 0; i < voCollProcedure.size(); i++) { PatientProcedureShortVo voPatientProcedureShort = voCollProcedure.get(i); if(voPatientProcedureShort.getProcedureStatusIsNotNull()) { if((voPatientProcedureShort.getProcedureStatus().equals(PatientProcedureStatus.PLANNED) && (voPatientProcedureShort.getProcedureOutcome() == null || voPatientProcedureShort.getProcedureOutcome().equals(PatientProcedureOutcome.CANCELLED)) || (voPatientProcedureShort.getProcedureStatus().equals(PatientProcedureStatus.PERFORMED)))) { GenForm.ctnSummaryContainer.grdProcedureRow pRow = form.ctnSummary().grdProcedure().getRows().newRow(); pRow.setColImage(getProcedureLateralityImg(voPatientProcedureShort.getProcLaterality(), voPatientProcedureShort.getProcedureStatus())); pRow.setColText(getProcedureText(voPatientProcedureShort)); pRow.setTooltipForColText(voPatientProcedureShort.createTooltipForPatientSummary()); pRow.setColDatePerformed(getDate(voPatientProcedureShort)); if (voPatientProcedureShort.getSysInfoIsNotNull() && voPatientProcedureShort.getSysInfo().getLastupdateUser() != null) pRow.setcolHasAudit(form.getImages().Core.EditDisabled); pRow.setTooltip(voPatientProcedureShort.getDiAssociationsTooltip()); pRow.setColStatus(getStatus(voPatientProcedureShort)); pRow.setValue(voPatientProcedureShort); } } } } }
private PatientProcedureShortVoCollection listProcedureByEpisodeOfCare(EpisodeOfCareRefVo episodeOfCareRefVo, PatientProcedureStatus status) { if(episodeOfCareRefVo == null) throw new DomainRuntimeException("Invalid Episode Context Ref"); DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer("from PatientProcedure p "); hql.append(" where p.careContext.episodeOfCare.id = " + episodeOfCareRefVo.getID_EpisodeOfCare()); if(status != null) hql.append(" and p.procedureStatus.id = " + status.getId()); return PatientProcedureShortVoAssembler.createPatientProcedureShortVoCollectionFromPatientProcedure(factory.find(hql.toString())); }
private PatientProcedureShortVoCollection listProcedureByCareSpell(CareSpellRefVo careSpellRefVo, PatientProcedureStatus status) { if(careSpellRefVo == null) throw new DomainRuntimeException("Invalid Care Spell Context Ref"); DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer("from PatientProcedure p "); hql.append(" where p.careContext.episodeOfCare.careSpell.id = " + careSpellRefVo.getID_CareSpell()); if(status != null) hql.append(" and p.procedureStatus.id = " + status.getId()); return PatientProcedureShortVoAssembler.createPatientProcedureShortVoCollectionFromPatientProcedure(factory.find(hql.toString())); }
private PatientProcedureShortVoCollection listProcedureByCareContext(CareContextRefVo careContextRefVo, PatientProcedureStatus status) { if(careContextRefVo == null) throw new DomainRuntimeException("Invalid Care Context Context Ref"); DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer("from PatientProcedure p "); hql.append(" where p.careContext.id = " + careContextRefVo.getID_CareContext()); if(status != null) hql.append(" and p.procedureStatus.id = " + status.getId()); return PatientProcedureShortVoAssembler.createPatientProcedureShortVoCollectionFromPatientProcedure(factory.find(hql.toString())); }
public PatientProcedureShortVoCollection listPatientProcedures(PatientRefVo patrefvo) { return listProceduresForPatient(patrefvo, true); }
private DiagnosisManagementVo populateData(DiagnosisManagementVo voDiagnosisManagement) { if(voDiagnosisManagement == null) voDiagnosisManagement = new ims.RefMan.vo.DiagnosisManagementVo(); if (form.chkFirstDefinitiveSystem().getValue() && form.dteFirstDefinitiveSystem().getValue() == null) { engine.showMessage("If First Definitive Treatment is checked DateTime is mandatory"); return null; } voDiagnosisManagement.setID_DiagnosisManagement(null); voDiagnosisManagement.setAdviceAndInfoGiven(form.richTextAdviceAndInformationGiven().getValue()); voDiagnosisManagement.setActionRequiredByGPNotes(form.richTextActionRequiredByGP().getValue()); voDiagnosisManagement.setInvestigationsAndResults(form.richTextSummaryOfInvestigationsAndResults().getValue()); if (form.chkFirstDefinitiveSystem().getValue() && form.dteFirstDefinitiveSystem().getValue() != null) { voDiagnosisManagement.setFirstDefinitiveTreatmentDate(form.dteFirstDefinitiveSystem().getValue()); } else { voDiagnosisManagement.setFirstDefinitiveTreatmentDate(null); } PatientDiagnosisAtConsultationVoCollection coll = new PatientDiagnosisAtConsultationVoCollection(); for(int x = 0; x < this.form.grdDiagnosis().getRows().size(); x++) { coll.add(form.grdDiagnosis().getRows().get(x).getValue()); } if(coll.size()>0) voDiagnosisManagement.setDiagnosis(coll); else voDiagnosisManagement.setDiagnosis(null); PatientProcedureShortVoCollection collProc = new PatientProcedureShortVoCollection(); for(int x = 0; x < this.form.grdProcedures().getRows().size(); x++) { collProc.add(form.grdProcedures().getRows().get(x).getValue()); } if(collProc.size()>0) voDiagnosisManagement.setProcedures(collProc); else voDiagnosisManagement.setProcedures(null); if(form.GroupAction().getValue().equals(GenForm.GroupActionEnumeration.rdoActionYes)) voDiagnosisManagement.setActionRequiredByGP(YesNo.YES); else voDiagnosisManagement.setActionRequiredByGP(YesNo.NO); if(form.GroupConsent().getValue().equals(GenForm.GroupConsentEnumeration.rdoConsentYes)) voDiagnosisManagement.setPatientConsent(YesNo.YES); else voDiagnosisManagement.setPatientConsent(YesNo.NO); voDiagnosisManagement.setCatsReferral(form.getGlobalContext().RefMan.getCatsReferral()); voDiagnosisManagement.setLastAuthoringHCP(form.ccLastUpdating().getValue()); voDiagnosisManagement.setRecordingInformation(populateRecordinfInfo()); return voDiagnosisManagement; }
@Override protected void onContextMenuItemClick(int menuItemID, Control sender) throws PresentationLogicException { if (sender.equals(form.grdDiagnosis())) { switch (menuItemID) { case GenForm.ContextMenus.RefManNamespace.AtConsultationDiagnosisGrid.NEW://wdev-12531 addDiagnosis(); break; case GenForm.ContextMenus.RefManNamespace.AtConsultationDiagnosisGrid.EDIT://wdev-12531 updateDiagnosis(); break; case GenForm.ContextMenus.RefManNamespace.AtConsultationDiagnosisGrid.REMOVE://wdev-12531 removeDiagnosis(); break; default : } } if (sender.equals(form.grdProcedures())) { switch (menuItemID) { case GenForm.ContextMenus.RefManNamespace.AtConsultationProceduresGrid.NEW://wdev-12531 if (domain.getHcpLiteUser() == null) { engine.showMessage("Logged in user is not a HCP."); return; } PatientProcedureShortVoCollection collProc = new PatientProcedureShortVoCollection(); for (int i = 0; i < form.grdProcedures().getRows().size(); i++) { collProc.add(form.grdProcedures().getRows().get(i).getValue()); } form.getGlobalContext().Core.setProceduresAtConsultation(collProc); engine.open(form.getForms().Clinical.ProceduresDialog); break; case GenForm.ContextMenus.RefManNamespace.AtConsultationProceduresGrid.REMOVE://wdev-12531 removeProcedures(); break; default : } } }
public PatientProcedureShortVoCollection listProcedures(PatientRefVo patient, PatientProcedureStatus status) { Procedures impl = (Procedures) getDomainImpl(PlannedProcedureImpl.class); return impl.listProcedureByPatientAndStatus(patient, status); }
private void initialiseClinicalData() { form.lyrDetails().tabRecipents().treCDI().clear(); //patient problems PatientProblemVoCollection listProblems = domain.listProblemsByPatient(form.getGlobalContext().Core.getPatientShort()); TreeNode parent = form.lyrDetails().tabRecipents().treCDI().getNodes().add(problemsString, problemsString); parent.setCollapsedImage(form.getImages().COE.BlueViolet); parent.setExpandedImage(form.getImages().COE.BlueViolet); parent.setExpanded(true); parent.setCheckBoxVisible(false); for (int i = 0; i < listProblems.size(); i++) { PatientProblemVo problem = listProblems.get(i); parent.getNodes().add(problem, problem.getPatientProblem()); } //patient diagnosis PatientDiagnosisShortVoCollection listDiagnosis = domain.listDiagnosisComplicationsByPatient(form.getGlobalContext().Core.getPatientShort()); parent = form.lyrDetails().tabRecipents().treCDI().getNodes().add(diagnosisString, diagnosisString); parent.setCollapsedImage(form.getImages().COE.Blue); parent.setExpandedImage(form.getImages().COE.Blue); parent.setExpanded(true); parent.setCheckBoxVisible(false); for (int i = 0; i < listDiagnosis.size(); i++) { PatientDiagnosisShortVo diagnosis = listDiagnosis.get(i); parent.getNodes().add(diagnosis, diagnosis.getDiagnosisDescription()); } //patient procedures PatientProcedureShortVoCollection listProcedures = domain.listProceduresByPatient(form.getGlobalContext().Core.getPatientShort()); parent = form.lyrDetails().tabServices().treProcedure().getNodes().add(proceduresString, proceduresString); parent.setCollapsedImage(form.getImages().COE.DarkCyan); parent.setExpandedImage(form.getImages().COE.DarkCyan); parent.setExpanded(true); parent.setCheckBoxVisible(false); for (int i = 0; i < listProcedures.size(); i++) { PatientProcedureShortVo procedure = listProcedures.get(i); parent.getNodes().add(procedure, procedure.getProcedureDescription()); } }
private PatientProcedureShortVo getLastPatientProcedureFromCollection(ProcedureLiteVo procedure, PatientProcedureShortVoCollection coll) { PatientProcedureShortVo mostRecentItem = null; for(int i = 0; i < coll.size(); i++) { PatientProcedureShortVo item = coll.get(i); if(item.getProcedure().equals(procedure)) { if(mostRecentItem == null) mostRecentItem = item; else { if(item.getProcDateIsNotNull()) { if(mostRecentItem.getProcDateIsNotNull()) { if(item.getProcDate().isDate() && item.getProcDate().toDate().compareTo(mostRecentItem.getProcDate().toDate()) > 0) mostRecentItem = item; } else { mostRecentItem = item; } } else { if(!mostRecentItem.getProcDateIsNotNull()) { //if both dates are null we compare by id if(item.getID_PatientProcedure().intValue() > mostRecentItem.getID_PatientProcedure().intValue()) mostRecentItem = item; } } } } } return mostRecentItem; }
/** * listProcedureByClinalContact */ public ims.core.vo.PatientProcedureShortVoCollection listProcedureByClinalContact(ims.core.admin.vo.ClinicalContactRefVo clinicalContactRefVo) { List list = listProcedures(clinicalContactRefVo, null); return PatientProcedureShortVoAssembler.createPatientProcedureShortVoCollectionFromPatientProcedure(list); }
/** * listProcedureByPatient */ public ims.core.vo.PatientProcedureShortVoCollection listProcedureByPatient(ims.core.patient.vo.PatientRefVo patientRefVo) { List list = listProcedures(null, patientRefVo); return PatientProcedureShortVoAssembler.createPatientProcedureShortVoCollectionFromPatientProcedure(list); }
public PatientProcedureShortVoCollection listProcedureByPatientAndStatus(PatientRefVo patientRefVo, PatientProcedureStatus status) { List list = listProcedures(null, patientRefVo, status); return PatientProcedureShortVoAssembler.createPatientProcedureShortVoCollectionFromPatientProcedure(list); }