private void checkNoAlertStatus(PatientNoAlertInfoVo voPatientNoAlertInfo) { if(voPatientNoAlertInfo != null && voPatientNoAlertInfo.getAlertStatusIsNotNull() && voPatientNoAlertInfo.getAlertStatus().equals(PatientAlertStatus.NOKNOWNALERTS)) { form.lblNoKnownAllerts().setVisible(true); form.lblNoKnownAllerts().setTooltip(voPatientNoAlertInfo.createInfoTooltip().toString()); if (form.getMode().equals(FormMode.VIEW)) form.btnUpdate().setEnabled(true); populateScreenFromData(voPatientNoAlertInfo); } else { form.lblNoKnownAllerts().setVisible(false); form.lblNoKnownAllerts().setTooltip(""); form.btnUpdate().setEnabled(false); } }
private void updatePatientNoAlertInfo(PatientRefVo patient) throws StaleObjectException { DomainFactory factory = getDomainFactory(); String hql = new String("from PatientNoAlertInfo alertInfo where alertInfo.patient.id = :patient"); List<?> list = factory.find(hql,new String[]{ "patient"},new Object[]{patient.getBoId()}); if (list!=null||list.isEmpty()) { for (Object object : list) { PatientNoAlertInfo alertInfo =(PatientNoAlertInfo)object; if(alertInfo.getAlertStatus()==null ||alertInfo.getAlertStatus().equals(getDomLookup(PatientAlertStatus.NOKNOWNALERTS))) { alertInfo.setAlertStatus(getDomLookup(PatientAlertStatus.HASALERTS)); factory.save(alertInfo); } } } }
private void updatePatientNoAlertInfo(PatientRefVo patient) throws StaleObjectException { DomainFactory factory = getDomainFactory(); String hql = new String("from PatientNoAlertInfo alertInfo where alertInfo.patient.id = :patient"); List<?> list = factory.find(hql,new String[]{ "patient"},new Object[]{patient.getBoId()}); if (list!=null) { for (Object object : list) { PatientNoAlertInfo alertInfo =(PatientNoAlertInfo)object; if(alertInfo.getAlertStatus()==null ||alertInfo.getAlertStatus().equals(getDomLookup(PatientAlertStatus.NOKNOWNALERTS))) { alertInfo.setAlertStatus(getDomLookup(PatientAlertStatus.HASALERTS)); factory.save(alertInfo); } } } }
private void editAlert() { form.ctnDetails().cmbSource().setFocus(); form.setMode(FormMode.EDIT); if (form.getLocalContext().getPatientNoAlertInfoVoIsNotNull() && form.getLocalContext().getPatientNoAlertInfoVo().getAlertStatusIsNotNull() && form.getLocalContext().getPatientNoAlertInfoVo().getAlertStatus().equals(PatientAlertStatus.NOKNOWNALERTS)) { form.ctnDetails().chkNoKnownAlerts().setVisible(true); form.ctnDetails().chkNoKnownAlerts().setEnabled(false); form.ctnDetails().chkNoKnownAlerts().setValue(true); } form.btnUpdate().setEnabled(false); form.btnInactivate().setVisible(false); enableDetailsControls(true); form.getLocalContext().setAlertRecord(form.grdAlerts().getValue()); form.ctnDetails().setcustomControlAuthoringInfoEnabled(false); form.getContextMenus().hideAllGenericGridMenuItems(); checkNoAlertStatus(form.getLocalContext().getPatientNoAlertInfoVo()); if(form.ctnDetails().chkNoKnownAlerts().getValue()) enableDetailsControls(false); alertsValueChanged(); }
public void refresh() { if(form.getGlobalContext().Core.getPatientShort() == null) return; form.getLocalContext().setNoAlert(domain.getPatientNoAlertInfo(form.getGlobalContext().Core.getPatientShort())); form.chkNoAlerts().setValue(form.getLocalContext().getNoAlertIsNotNull() && PatientAlertStatus.NOKNOWNALERTS.equals((form.getLocalContext().getNoAlert().getAlertStatus()))); populateAlertsGrid(domain.listAlerts(form.getGlobalContext().Core.getPatientShort())); updateControlsState(); }
private void editAlert() { AlertType cat = form.ctnDetails().cmbCategory().getValue(); loadCategories(true); form.ctnDetails().cmbCategory().setValue(cat); form.ctnDetails().cmbSource().setFocus(); form.setMode(FormMode.EDIT); if (form.getLocalContext().getPatientNoAlertInfoVoIsNotNull() && form.getLocalContext().getPatientNoAlertInfoVo().getAlertStatusIsNotNull() && form.getLocalContext().getPatientNoAlertInfoVo().getAlertStatus().equals(PatientAlertStatus.NOKNOWNALERTS)) { form.ctnDetails().chkNoKnownAlerts().setVisible(true); form.ctnDetails().chkNoKnownAlerts().setEnabled(false); form.ctnDetails().chkNoKnownAlerts().setValue(true); } form.btnUpdate().setEnabled(false); form.btnInactivate().setVisible(false); enableDetailsControls(true); form.getLocalContext().setAlertRecord(form.grdAlerts().getValue()); form.ctnDetails().setcustomControlAuthoringInfoEnabled(false); form.getContextMenus().hideAllGenericGridMenuItems(); checkNoAlertStatus(form.getLocalContext().getPatientNoAlertInfoVo()); if(form.ctnDetails().chkNoKnownAlerts().getValue()) enableDetailsControls(false); alertsValueChanged(); }
public void refresh() { if(form.getGlobalContext().Core.getPatientShort() == null) return; form.getLocalContext().setNoAlert(domain.getPatientNoAlertInfo(form.getGlobalContext().Core.getPatientShort())); form.chkNoAlerts().setValue(form.getLocalContext().getNoAlertIsNotNull() && PatientAlertStatus.NOKNOWNALERTS.equals((form.getLocalContext().getNoAlert().getAlertStatus()))); populateAlertsGrid(domain.listAlerts(form.getGlobalContext().Core.getPatientShort(), engine.getLoggedInRole())); updateControlsState(); }
private void newAlert() { form.ctnDetails().cmbSource().setFocus(); form.setMode(FormMode.EDIT); if( form.grdAlerts().getRows() != null && form.grdAlerts().getRows().size() > 0) { form.ctnDetails().chkNoKnownAlerts().setVisible(false); form.ctnDetails().chkNoKnownAlerts().setValue(false); } else if(form.getLocalContext().getPatientNoAlertInfoVo() == null) { form.ctnDetails().chkNoKnownAlerts().setVisible(true); form.ctnDetails().chkNoKnownAlerts().setEnabled(true); form.ctnDetails().chkNoKnownAlerts().setValue(false); } else if (form.getLocalContext().getPatientNoAlertInfoVoIsNotNull() && form.getLocalContext().getPatientNoAlertInfoVo().getAlertStatusIsNotNull() && form.getLocalContext().getPatientNoAlertInfoVo().getAlertStatus().equals(PatientAlertStatus.NOKNOWNALERTS)) { form.ctnDetails().chkNoKnownAlerts().setVisible(false); form.ctnDetails().chkNoKnownAlerts().setEnabled(false); form.ctnDetails().chkNoKnownAlerts().setValue(false); } else if(form.getLocalContext().getPatientNoAlertInfoVo().getAlertStatus() == null) { form.ctnDetails().chkNoKnownAlerts().setVisible(true); form.ctnDetails().chkNoKnownAlerts().setEnabled(true); form.ctnDetails().chkNoKnownAlerts().setValue(false); } else if( ! form.getLocalContext().getbActiveAlerts() && form.getLocalContext().getPatientNoAlertInfoVo().getAlertStatus().equals(PatientAlertStatus.HASALERTS)) { form.ctnDetails().chkNoKnownAlerts().setVisible(true); form.ctnDetails().chkNoKnownAlerts().setEnabled(true); form.ctnDetails().chkNoKnownAlerts().setValue(false); } else { form.ctnDetails().chkNoKnownAlerts().setVisible(false); form.ctnDetails().chkNoKnownAlerts().setValue(false); } this.clearCurScreen(); form.btnUpdate().setEnabled(false); form.btnInactivate().setVisible(false); enableDetailsControls(true); form.ctnDetails().customControlAuthoringInfo().initializeComponent(); form.ctnDetails().setcustomControlAuthoringInfoEnabled(true); form.ctnDetails().customControlAuthoringInfo().setIsRequiredPropertyToControls(Boolean.TRUE); Object mos = domain.getMosUser(); if(mos != null){ form.ctnDetails().cmbRecordingHCP().newRow((MemberOfStaffLiteVo)mos, mos.toString()); form.ctnDetails().cmbRecordingHCP().setValue((MemberOfStaffLiteVo)mos); } form.ctnDetails().dtimRecordingDateTime().setValue(new DateTime()); form.getLocalContext().setAlertRecord(new PatientAlert()); form.ctnDetails().setCollapsed(false); form.getContextMenus().hideAllGenericGridMenuItems(); }
private void newAlert() { form.getLocalContext().setAlertRecord(new PatientAlert()); //WDEV-22977 loadCategories(true); form.ctnDetails().cmbSource().setFocus(); form.setMode(FormMode.EDIT); if( form.grdAlerts().getRows() != null && form.grdAlerts().getRows().size() > 0) { form.ctnDetails().chkNoKnownAlerts().setVisible(false); form.ctnDetails().chkNoKnownAlerts().setValue(false); } else if(form.getLocalContext().getPatientNoAlertInfoVo() == null) { form.ctnDetails().chkNoKnownAlerts().setVisible(true); form.ctnDetails().chkNoKnownAlerts().setEnabled(true); form.ctnDetails().chkNoKnownAlerts().setValue(false); } else if (form.getLocalContext().getPatientNoAlertInfoVoIsNotNull() && form.getLocalContext().getPatientNoAlertInfoVo().getAlertStatusIsNotNull() && form.getLocalContext().getPatientNoAlertInfoVo().getAlertStatus().equals(PatientAlertStatus.NOKNOWNALERTS)) { form.ctnDetails().chkNoKnownAlerts().setVisible(false); form.ctnDetails().chkNoKnownAlerts().setEnabled(false); form.ctnDetails().chkNoKnownAlerts().setValue(false); } else if(form.getLocalContext().getPatientNoAlertInfoVo().getAlertStatus() == null) { form.ctnDetails().chkNoKnownAlerts().setVisible(true); form.ctnDetails().chkNoKnownAlerts().setEnabled(true); form.ctnDetails().chkNoKnownAlerts().setValue(false); } else if( ! form.getLocalContext().getbActiveAlerts() && form.getLocalContext().getPatientNoAlertInfoVo().getAlertStatus().equals(PatientAlertStatus.HASALERTS)) { form.ctnDetails().chkNoKnownAlerts().setVisible(true); form.ctnDetails().chkNoKnownAlerts().setEnabled(true); form.ctnDetails().chkNoKnownAlerts().setValue(false); } else { form.ctnDetails().chkNoKnownAlerts().setVisible(false); form.ctnDetails().chkNoKnownAlerts().setValue(false); } this.clearCurScreen(); form.btnUpdate().setEnabled(false); form.btnInactivate().setVisible(false); enableDetailsControls(true); form.ctnDetails().customControlAuthoringInfo().initializeComponent(); form.ctnDetails().setcustomControlAuthoringInfoEnabled(true); form.ctnDetails().customControlAuthoringInfo().setIsRequiredPropertyToControls(Boolean.TRUE); Object mos = domain.getMosUser(); if(mos != null){ form.ctnDetails().cmbRecordingHCP().newRow((MemberOfStaffLiteVo)mos, mos.toString()); form.ctnDetails().cmbRecordingHCP().setValue((MemberOfStaffLiteVo)mos); } form.ctnDetails().dtimRecordingDateTime().setValue(new DateTime()); form.ctnDetails().setCollapsed(false); form.getContextMenus().hideAllGenericGridMenuItems(); }