private void populatePresentProceduresControls(PatientProcedureVoCollection presentProcedures) { for (int i=0; i < presentProcedures.size(); i++){ PatientProcedureVo voPatientProcedure = presentProcedures.get(i); grdChecklistRow row = form.grdChecklist().getRows().newRow(); if(voPatientProcedure.getProcedureIsNotNull()) { row.setColProcedure(voPatientProcedure.getProcedure().getProcedureName()); } row.setColPresentAbsent(PresentAbsentUnknown.PRESENT); if(voPatientProcedure.getInfoSourceIsNotNull()) row.setColSource(voPatientProcedure.getInfoSource()); if(voPatientProcedure.getProcDateIsNotNull()) row.setColProcedureDate(voPatientProcedure.getProcDate()); if(voPatientProcedure.getProcedureDescriptionIsNotNull()) row.setColDescription(voPatientProcedure.getProcedureDescription()); row.setValue(voPatientProcedure); setGridUIForPresent(row); } }
@Override protected void onGrdChecklistSelectionChanged() throws PresentationLogicException { grdChecklistRow row = form.grdChecklist().getSelectedRow(); if (row != null && form.getMode().equals(FormMode.EDIT) && row.getColPresentAbsent() !=null) { if (row.getColPresentAbsent().equals(PresentAbsentUnknown.PRESENT)) enableUnlinkContextMenu(true); } else enableUnlinkContextMenu(false); updateControlsState(); }
private void updateControlsState() { for (int i=0; i < form.grdChecklist().getRows().size(); i++) { if (form.grdChecklist().getRows().get(i).getColPresentAbsent() == null) setGridUIForNone(form.grdChecklist().getRows().get(i)); else if (form.grdChecklist().getRows().get(i).getColPresentAbsent().equals(PresentAbsentUnknown.ABSENT)) setGridUIForAbsent(form.grdChecklist().getRows().get(i)); else setGridUIForPresent(form.grdChecklist().getRows().get(i)); } if (form.getMode().equals(FormMode.VIEW)) { form.btnNew().setVisible(form.getLocalContext().getPatientProcedureChecklistVo() == null); form.btnUpdate().setVisible(form.getLocalContext().getPatientProcedureChecklistVo() != null); } form.getContextMenus().getPresentingProblemsAddCCIfromTaxonomyItem().setEnabled(form.getMode().equals(FormMode.EDIT)); form.getContextMenus().getPresentingProblemsAddCCIfromTaxonomyItem().setVisible(form.getMode().equals(FormMode.EDIT)); form.getContextMenus().getPresentingProblemsAddCCIfromLocalSearchItem().setEnabled(form.getMode().equals(FormMode.EDIT)); form.getContextMenus().getPresentingProblemsAddCCIfromLocalSearchItem().setVisible(form.getMode().equals(FormMode.EDIT)); }
@Override protected void onGrdChecklistSelectionChanged() throws PresentationLogicException { grdChecklistRow row = form.grdChecklist().getSelectedRow(); if (row != null && form.getMode().equals(FormMode.EDIT) && row.getColSelect() !=null) { if (row.getColSelect().equals(PresentAbsentUnknown.PRESENT)) enableUnlinkContextMenu(true); } else enableUnlinkContextMenu(false); updateControlsState(); }
private void updateControlsState() { for (int i=0; i < form.grdChecklist().getRows().size(); i++) { if (form.grdChecklist().getRows().get(i).getColSelect() == null) setGridUIForNone(form.grdChecklist().getRows().get(i)); else if (form.grdChecklist().getRows().get(i).getColSelect().equals(PresentAbsentUnknown.ABSENT)) setGridUIForAbsent(form.grdChecklist().getRows().get(i)); else setGridUIForPresent(form.grdChecklist().getRows().get(i)); } if (form.getMode().equals(FormMode.VIEW)) { form.btnNew().setVisible(form.getLocalContext().getPatientDiagnosisChecklistVo() == null); form.btnUpdate().setVisible(form.getLocalContext().getPatientDiagnosisChecklistVo() != null); } form.getContextMenus().getPresentingProblemsAddCCIfromTaxonomyItem().setEnabled(form.getMode().equals(FormMode.EDIT)); form.getContextMenus().getPresentingProblemsAddCCIfromTaxonomyItem().setVisible(form.getMode().equals(FormMode.EDIT)); form.getContextMenus().getPresentingProblemsAddCCIfromLocalSearchItem().setEnabled(form.getMode().equals(FormMode.EDIT)); form.getContextMenus().getPresentingProblemsAddCCIfromLocalSearchItem().setVisible(form.getMode().equals(FormMode.EDIT)); }
@Override protected void ongrdChecklistGridColPresentAbsentColumnAnswerBoxValueChanged(grdChecklistRow row) throws PresentationLogicException { if (row.getColPresentAbsent() !=null) { if (row.getColPresentAbsent().equals(PresentAbsentUnknown.ABSENT)) { row.setColSource(null); row.setColDescription(null); setGridUIForAbsent(row); } else if (row.getColPresentAbsent().equals(PresentAbsentUnknown.PRESENT)) { if (row.getValue() instanceof PatientAbsentProcedureVo){ PatientAbsentProcedureVo voPatientAbsentProcedure = (PatientAbsentProcedureVo)row.getValue(); if(voPatientAbsentProcedure.getSourceofInformationIsNotNull()) row.setColSource(voPatientAbsentProcedure.getSourceofInformation()); row.setColDescription(row.getColProcedure()); } else if (row.getValue() instanceof PatientProcedureVo){ PatientProcedureVo voPatientProcedure = (PatientProcedureVo)row.getValue(); if(voPatientProcedure.getInfoSourceIsNotNull()) row.setColSource(voPatientProcedure.getInfoSource()); row.setColDescription(row.getColProcedure()); } else { row.setColDescription(row.getColProcedure()); } setGridUIForPresent(row); } } }
private void doAddFromLocalSearch() { ProcedureLiteVoCollection procList = form.getGlobalContext().Clinical.getSelectedProcedures(); for (int i=0; i < procList.size(); i++) { boolean bFound = false; for (int j=0; j < form.grdChecklist().getRows().size(); j++) { if (form.grdChecklist().getRows().get(j).getColProcedure()!=null && form.grdChecklist().getRows().get(j).getColProcedure().equals(procList.get(i).getProcedureName())) { bFound = true; engine.showMessage("Procedure record called \"" + procList.get(i).getProcedureName() + "\" is already in list."); break; } } if(!bFound) { grdChecklistRow row = form.grdChecklist().getRows().newRow(); row.setColProcedure(procList.get(i).getProcedureName()); row.setColPresentAbsent(PresentAbsentUnknown.PRESENT); row.setColDescription(procList.get(i).getProcedureName()); PatientProcedureVo voPatientProcedure = new PatientProcedureVo(); voPatientProcedure.setProcedure(procList.get(i)); voPatientProcedure.setProcedureDescription(procList.get(i).getProcedureName()); row.setValue(voPatientProcedure); } } }
private void populatePresentDiagnosisControls(PatientDiagnosisVoCollection presentDiagnoses) { for (int i=0; i < presentDiagnoses.size(); i++) { PatientDiagnosisVo voPatientDiagnosis = presentDiagnoses.get(i); GenForm.grdChecklistRow row = form.grdChecklist().getRows().newRow(); if(voPatientDiagnosis.getDiagnosisIsNotNull()) { row.setColDiagnosis(voPatientDiagnosis.getDiagnosis().getDiagnosisName()); row.setTooltipForColDiagnosis(voPatientDiagnosis.getDiagnosis().getDiagnosisName()); } row.setColSelect(PresentAbsentUnknown.PRESENT); if(voPatientDiagnosis.getSourceofInformationIsNotNull()) row.setColSource(voPatientDiagnosis.getSourceofInformation()); if(voPatientDiagnosis.getDiagnosedDateIsNotNull()) row.setColDiagnosisDate(voPatientDiagnosis.getDiagnosedDate()); if(voPatientDiagnosis.getDiagnosisDescriptionIsNotNull()) row.setcolDescription(voPatientDiagnosis.getDiagnosisDescription()); row.setValue(voPatientDiagnosis); setGridUIForPresent(row); } }
private void doAddFromLocalSearch() { DiagLiteVoCollection diagList = form.getGlobalContext().Clinical.getSelectedDiagnosis(); for (int i=0; i < diagList.size(); i++) { boolean bFound = false; for (int j=0; j < form.grdChecklist().getRows().size(); j++) { if (form.grdChecklist().getRows().get(j).getColDiagnosis()!=null && form.grdChecklist().getRows().get(j).getColDiagnosis().equals(diagList.get(i).getDiagnosisName())) { bFound = true; engine.showMessage("Diagnosis record called \"" + diagList.get(i).getDiagnosisName() + "\" is already in list."); break; } } if(!bFound) { grdChecklistRow row = form.grdChecklist().getRows().newRow(); row.setColDiagnosis(diagList.get(i).getDiagnosisName()); row.setColSelect(PresentAbsentUnknown.PRESENT); row.setcolDescription(diagList.get(i).getDiagnosisName()); PatientDiagnosisVo voPresentDiagnosis = new PatientDiagnosisVo(); voPresentDiagnosis.setDiagnosis(diagList.get(i)); voPresentDiagnosis.setDiagnosisDescription(diagList.get(i).getDiagnosisName()); row.setValue(voPresentDiagnosis); } } }