@Override protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException { //Only allow one PTP for a Clinical Problem if (form.getLocalContext().getSelectedProblemProtocolAssessment() == null) { if(domain.checkForConfiguredClinicalProblem((ClinicalProblemShortVo)form.grdList().getSelectedRow().getcolProblem().getValue()) == true) { engine.showMessage("There is already a saved protocol record for this Clinical Problem. Your record will not be saved."); return; } if(domain.checkForConfiguredAssessment((UserAssessmentShortVo) form.grdList().getSelectedRow().getcolAssessment().getValue()) == true) { engine.showMessage("There is already a saved protocol record for this Assessment. Your record will not be saved."); return; } } if(save()) { form.setMode(FormMode.VIEW); open(); } }
private void populateItemFromRow(PatientProblemVo item, grdProblemsRow childRow) { if(item == null) return; item.setCareContext(form.getGlobalContext().Core.getCurrentCareContext()); item.setIsActive(Boolean.TRUE); item.setIsPresentingProblem(Boolean.TRUE); item.setOnset(childRow.getcolOnset()); item.setPatientProblem(((ClinicalProblemShortVo)childRow.getValue()).getPCName()); item.setProblem((ClinicalProblemShortVo) childRow.getValue()); item.setProblemNote(childRow.getcolNotes()); item.setSpecialty((Specialty) childRow.getParentRow().getValue()); if(item.getAuthoringInformation() == null) { item.setAuthoringInformation(getAuthoringInfo()); } }
private void populateGridProblems(ClinicalProblemShortVoCollection collProblems) { if (collProblems == null) return; for (int i = 0; i < collProblems.size(); i++) { ClinicalProblemShortVo problem = collProblems.get(i); grdProblemsRow row = form.grdProblems().getRows().newRow(); row.setcolProblem(problem.getPCName()); row.setcolSelect(false); row.setValue(problem); } }
private void listPresentingProblems(String problemText) //WDEV-17647 { form.qmbPresentingProblem().clear(); ClinicalProblemShortVoCollection problems = domain.listClinicalProblems(problemText); if(problems == null || problems.size() == 0) return; for(ClinicalProblemShortVo problem : problems) { if(problem == null) continue; form.qmbPresentingProblem().newRow(problem, problem.getPCName()); } }
protected void populateProblems(ClinicalProblemShortVoCollection problems) //WDEV-17640 { // Clear problem query combo-box form.qmbProblem().clear(); // Check problem collection if (problems == null) { form.qmbProblem().showOpened(); return; } for (ClinicalProblemShortVo problem : problems) { form.qmbProblem().newRow(problem, problem.getPCName()); } }
private void listPresentingProblems(String problemText) { form.qmbPresentingProblem().clear(); ClinicalProblemShortVoCollection problems = domain.listClinicalProblems(problemText); if(problems == null || problems.size() == 0) return; for(ClinicalProblemShortVo problem : problems) { if(problem == null) continue; form.qmbPresentingProblem().newRow(problem, problem.getPCName()); } form.qmbPresentingProblem().showOpened(); }
private void populateProblemsGrid(ClinicalProblemShortVoCollection collProblems) { form.grdProblems().getRows().clear(); if (collProblems == null) return; collProblems.sort(new ProblemsNameComparator(SortOrder.ASCENDING)); for (int i = 0; i < collProblems.size(); i++) { ClinicalProblemShortVo clinicalProblem = collProblems.get(i); grdProblemsRow row = form.grdProblems().getRows().newRow(); row.setcolProblem(clinicalProblem.getPCName()); row.setValue(clinicalProblem); } }
public int compare(Object ob1, Object ob2) { String p1Name = null; String p2Name = null; if(ob1 instanceof ClinicalProblemShortVo ) { ClinicalProblemShortVo problem1Name = (ClinicalProblemShortVo)ob1; p1Name = problem1Name != null ? problem1Name.getPCName():null; } if(ob2 instanceof ClinicalProblemShortVo ) { ClinicalProblemShortVo problem2Name = (ClinicalProblemShortVo)ob2; p2Name = problem2Name != null ? problem2Name.getPCName():null; } if(p1Name != null ) return p1Name.toUpperCase().compareTo(p2Name.toUpperCase())*direction; if(p2Name != null) return (-1)*direction; return 0; }
protected void onBtnOKClick() throws ims.framework.exceptions.PresentationLogicException { if(form.grdSelectedItems().getRows().size() == 0) { engine.showMessage("No items were selected."); return; } ProcedureLiteVoCollection procColl = new ProcedureLiteVoCollection(); DiagLiteVoCollection diagColl = new DiagLiteVoCollection(); ClinicalProblemShortVoCollection probColl = new ClinicalProblemShortVoCollection(); VaccineLiteVoCollection vaccColl = new VaccineLiteVoCollection(); for (int j = 0; j < form.grdSelectedItems().getRows().size(); j++) { grdSelectedItemsRow selRow = form.grdSelectedItems().getRows().get(j); if(selRow.getValue() instanceof ProcedureLiteVo) procColl.add((ProcedureLiteVo)selRow.getValue()); else if(selRow.getValue() instanceof DiagLiteVo) diagColl.add((DiagLiteVo)selRow.getValue()); else if(selRow.getValue() instanceof ClinicalProblemShortVo) probColl.add((ClinicalProblemShortVo)selRow.getValue()); else if(selRow.getValue() instanceof VaccineLiteVo) vaccColl.add((VaccineLiteVo) selRow.getValue()); } if(form.getGlobalContext().Clinical.getPMHConfigSearchTypeIsNotNull() && form.getGlobalContext().Clinical.getPMHConfigSearchType().equalsIgnoreCase("P")) form.getGlobalContext().Clinical.setSelectedProcedures(procColl); else if(form.getGlobalContext().Clinical.getPMHConfigSearchTypeIsNotNull() && form.getGlobalContext().Clinical.getPMHConfigSearchType().equalsIgnoreCase("D")) form.getGlobalContext().Clinical.setSelectedDiagnosis(diagColl); else if(form.getGlobalContext().Clinical.getPMHConfigSearchTypeIsNotNull() && form.getGlobalContext().Clinical.getPMHConfigSearchType().equalsIgnoreCase("PR")) form.getGlobalContext().Clinical.setSelectedProblems(probColl); else if(form.getGlobalContext().Clinical.getPMHConfigSearchTypeIsNotNull() && form.getGlobalContext().Clinical.getPMHConfigSearchType().equalsIgnoreCase("VACCINE")) form.getGlobalContext().Clinical.CCISearch.setSelectedVaccines(vaccColl); engine.close(DialogResult.OK); }
public ClinicalProblemShortVoCollection listProblems(String filter) throws DomainInterfaceException { ClinicalProblemShortVoCollection coll = new ClinicalProblemShortVoCollection(); IGenericItem[] items = listIGenericItems(filter, CciType.PROBLEM, true); if (items != null) { for ( int i = 0; i < items.length; i++) { coll.add((ClinicalProblemShortVo)items[i]); } return coll; } return null; }
private int getProblemIndex(ClinicalProblemShortVo problem, Specialty specialty, PatientProblemVoCollection list) { if(list == null) return -1; for (int i = 0; i < list.size(); i++) { if(list.get(i).getSpecialtyIsNotNull() && list.get(i).getSpecialty().equals(specialty) && list.get(i).getProblemIsNotNull() && list.get(i).getProblem().getID_ClinicalProblem().equals(problem.getID_ClinicalProblem())) return i; } return -1; }
private void populateOtherDetails(PatientForTriageVo patient) { populateOtherProblems(); form.ccAllergy().refresh(); form.ccAlert().refresh(); populateAttendanceHistory(patient); form.imgTriagePriority().setValue(getPriorityImageByTriagePriority()); form.lblPresentingComplaint().setValue((form.getLocalContext().getSelectedTriagePatient() != null && form.getLocalContext().getSelectedTriagePatient().getEpisode().getPresentingComplaint() != null) ? form.getLocalContext().getSelectedTriagePatient().getEpisode().getPresentingComplaint().getText() : ""); form.qmbPresentingProblem().clear(); if(form.getLocalContext().getSelectedTriagePatient() != null && form.getLocalContext().getSelectedTriagePatient().getTriageDetails() != null && form.getLocalContext().getSelectedTriagePatient().getTriageDetails().getMainPresentingProblem() != null) { ClinicalProblemShortVo problem = form.getLocalContext().getSelectedTriagePatient().getTriageDetails().getMainPresentingProblem().getProblem(); if(problem != null) { form.qmbPresentingProblem().newRow(problem, problem.getPCName()); form.qmbPresentingProblem().setValue(problem); } } form.lblDiscriminator().setValue((form.getLocalContext().getSelectedTriagePatient() != null && form.getLocalContext().getSelectedTriagePatient().getTriageDetails() != null && form.getLocalContext().getSelectedTriagePatient().getTriageDetails().getCurrentTriageAssessment() != null && form.getLocalContext().getSelectedTriagePatient().getTriageDetails().getCurrentTriageAssessment().getDiscriminator() != null && form.getLocalContext().getSelectedTriagePatient().getTriageDetails().getCurrentTriageAssessment().getDiscriminator().getDiscriminator() != null) ? form.getLocalContext().getSelectedTriagePatient().getTriageDetails().getCurrentTriageAssessment().getDiscriminator().getDiscriminator().getDiscriminatorName() : ""); populateAttendanceTimes(); }
private void updateControlsState() { form.ccReportTemplateSearch().setEnabled(FormMode.VIEW.equals(form.getMode())); form.btnEdit().setVisible(FormMode.VIEW.equals(form.getMode()) && form.ccReportTemplateSearch().getSelectedTemplate() instanceof TemplateForReportTemplateSearchVo); //form.btnAdd().setVisible(FormMode.EDIT.equals(form.getMode())); //form.btnRemove().setVisible(FormMode.EDIT.equals(form.getMode()) && form.grdProblems().getValue() instanceof ClinicalProblemShortVo); form.btnAdd().setEnabled(FormMode.EDIT.equals(form.getMode()) && !form.chkTemplateAvailable().getValue()); form.btnRemove().setEnabled(FormMode.EDIT.equals(form.getMode()) && !form.chkTemplateAvailable().getValue() && form.grdProblems().getValue() instanceof ClinicalProblemShortVo); form.grdProblems().setEnabled(FormMode.EDIT.equals(form.getMode()) && !form.chkTemplateAvailable().getValue()); form.chkTemplateAvailable().setEnabled(FormMode.EDIT.equals(form.getMode())); }
private void listProblemSearch(String value) { ClinicalProblemShortVoCollection coll = null; coll = domain.listProblems(value); form.qmbProblemSearch().setValue(null); form.qmbProblemSearch().clear(); if (coll != null) { for (int i = 0; i < coll.size(); i++) { ClinicalProblemShortVo vo = coll.get(i); form.qmbProblemSearch().newRow(vo, vo.getPCName()); } if (coll.size() == 1) { form.qmbProblemSearch().setValue(coll.get(0)); } if (coll.size() > 1) { form.qmbProblemSearch().showOpened(); } } }
private void listProblemDiscriminator(String value) { ClinicalProblemShortVoCollection coll = null; coll = domain.listProblems(value); form.qmbProblem().setValue(null); form.qmbProblem().clear(); if (coll != null) { for (int i = 0; i < coll.size(); i++) { ClinicalProblemShortVo vo = coll.get(i); form.qmbProblem().newRow(vo, vo.getPCName()); } } if (coll.size() == 1) { form.qmbProblem().setValue(coll.get(0)); } if (coll.size() > 1) { form.qmbProblem().showOpened(); } }
/** * Function used to populate ICP Problems * * @param problemsCollection */ private void populateICPProblems(ClinicalProblemShortVoCollection problemsCollection) { // Clear problems form.ctnConfiguration().lyrICPTabs().ICP().qmbICPProblem().clear(); // Terminate function if the list is null if (problemsCollection == null) return; for (ClinicalProblemShortVo problem : problemsCollection) { // Skip null problems if (problem == null) continue; form.ctnConfiguration().lyrICPTabs().ICP().qmbICPProblem().newRow(problem, problem.getPCName()); } if (problemsCollection.size() == 1) { form.ctnConfiguration().lyrICPTabs().ICP().qmbICPProblem().setValue(problemsCollection.get(0)); } else { form.ctnConfiguration().lyrICPTabs().ICP().qmbICPProblem().showOpened(); } }
private ClinicalProblemShortVo getProblem(ValueObject voItem) { ClinicalProblemShortVo voProblem = null; if (voItem instanceof ProblemHotlistItemVo) { ProblemHotlistItemVo hotlistItem = (ProblemHotlistItemVo)voItem; voProblem = hotlistItem.getProblem(); } else if (voItem instanceof ClinicalProblemShortVo) voProblem = ((ClinicalProblemShortVo)voItem); return voProblem; }