protected void onDyngrdPatientRowSelectionChanged(DynamicGridRow row) { if(row == null) return; if ( row.getValue() instanceof PatientShort) { setPatientFilterDetails(); //form.getGlobalContext().Core.clearPatientShort(); PatientShort ps = (PatientShort)form.dyngrdPatient().getValue(); //form.getGlobalContext().Core.setPatientToBeDisplayed(ps); form.getLocalContext().setSelectedPatient(ps); form.getLocalContext().setLastEvent(PatientSearchEvent.PATIENT_SELECTED); form.fireCustomControlValueChanged(); } }
@Override protected void onChkSwapValueChanged() throws PresentationLogicException { if (Boolean.TRUE.equals(form.chkSwap().getValue()) && (form.Surname().getValue() != null || form.Forename().getValue() != null)) { String temp = form.Surname().getValue(); form.Surname().setValue(form.Forename().getValue()); form.Forename().setValue(temp); doSearch(); } else form.getLocalContext().setLastEvent(PatientSearchEvent.NONE); //WDEV-18590 }
protected void onImbNewPatientClick() throws PresentationLogicException { // WDEV - 9924 // Clear local context for selected patient - we are creating a new one form.getLocalContext().setLastEvent(PatientSearchEvent.NEW_PATIENT); form.getLocalContext().setSelectedPatient(null); setPatientFilterDetails(); PatientShort voPatShort = new PatientShort(); form.getGlobalContext().Core.setPatientToBeDisplayed(voPatShort); form.fireCustomControlValueChanged(); }
public PatientSearchEvent getEvent() { if(!form.getLocalContext().getLastEventIsNotNull()) return PatientSearchEvent.NONE; return form.getLocalContext().getLastEvent(); }
@Override protected void onCcPatientSearchValueChanged() throws ims.framework.exceptions.PresentationLogicException { if (PatientSearchEvent.PATIENT_SELECTED.equals(form.ccPatientSearch().getEvent())) { form.btnSelect().setEnabled(true); } else if (PatientSearchEvent.NONE.equals(form.ccPatientSearch().getEvent())) { form.btnSelect().setEnabled(false); } }
@Override protected void onCcPatientSearchValueChanged() throws PresentationLogicException { if(form.lyrPage().tabPagePatientSearch().ccPatientSearch().getEvent() != PatientSearchEvent.NONE) { form.getGlobalContext().RefMan.setCatsReferral(null); form.getGlobalContext().RefMan.setReferralContractTypeForPatient(null);//wdev-12682 form.getGlobalContext().Core.setPatientShort(null); form.getLocalContext().setbDemographicsSaved(false); form.lyrPage().tabPageReferral().ccReferralDetails().setValue(null, null); form.lyrPage().tabPageReferral().ccReferralDetails().setInitializedBooleanToFalse(); manageTabs(); PatientShort patient = null; if(form.lyrPage().tabPagePatientSearch().ccPatientSearch().getEvent().equals(PatientSearchEvent.PATIENT_SELECTED)) { patient = form.lyrPage().tabPagePatientSearch().ccPatientSearch().getSelectedPatient(); form.lyrPage().tabPageDemographics().ccDemographics().setMode(FormMode.EDIT); } else if(form.lyrPage().tabPagePatientSearch().ccPatientSearch().getEvent().equals(PatientSearchEvent.NEW_PATIENT)) { form.getGlobalContext().Core.setPatientShort(null); form.lyrPage().tabPageDemographics().ccDemographics().setMode(FormMode.EDIT); form.lyrPage().tabPageDemographics().ccDemographics().displayDemographics(); } form.lyrPage().showtabPageDemographics(); form.lyrPage().settabPageDemographicsEnabled(true); form.lyrPage().tabPageDemographics().setHeaderEnabled(true); form.lyrPage().tabPageDemographics().ccDemographics().setValue(patient); form.lyrPage().tabPageDemographics().ccDemographics().setMode(FormMode.EDIT); } }
protected void onImbResetClick() throws PresentationLogicException { clearResults(); form.getLocalContext().setLastEvent(PatientSearchEvent.NONE); }
private void doSearch() { form.dyngrdPatient().getRows().clear(); form.lblTotal().setValue("Total : " + form.dyngrdPatient().getRows().size());//WDEV-15958 if (form.Identifier().getValue() != null && form.Identifier().getValue().length() > 0) { if (form.PatientID().getValue() == null) { engine.showMessage("Please select a Patient ID Type"); form.PatientID().setFocus(); form.getLocalContext().setLastEvent(PatientSearchEvent.NONE);//WDEV-15958 return; } clearSearchFields(false); } else if (form.txtPostCode().getValue() == null || form.txtPostCode().getValue().trim().length() == 0) //WDEV-18576 { // If it is a local search strip out the non-alpha except % chars before validation if ((ConfigFlag.DOM.PATIENT_SEARCH_TYPE.getValue().equals("LOCAL")) && (form.Surname().getValue() == null || form.Surname().getValue().replaceAll("[^a-zA-Z%]", "").length() == 0)) { engine.showMessage("Please enter a valid Surname"); //wdev-17892 form.getLocalContext().setLastEvent(PatientSearchEvent.NONE);//WDEV-15958 return; } else if (form.Surname().getValue() == null || form.Surname().getValue().length() == 0) { engine.showMessage("Please enter a valid Surname"); //wdev-17892 form.getLocalContext().setLastEvent(PatientSearchEvent.NONE);//WDEV-15958 return; } // Mandatory Search on forname if((ConfigFlag.DOM.PATIENT_SEARCH_TYPE.getValue().equals("LOCAL")) &&(ConfigFlag.UI.SEARCH_REQ_FORENAME.getValue()) &&(form.Forename().getValue() == null || form.Forename().getValue().replaceAll("[^a-zA-Z%]", "").length() == 0)) { engine.showMessage("Please enter a valid Forename"); //wdev-17892 form.getLocalContext().setLastEvent(PatientSearchEvent.NONE);//WDEV-15958 return; } else if((ConfigFlag.UI.SEARCH_REQ_FORENAME.getValue())&& (form.Forename().getValue() == null || form.Forename().getValue().length() == 0)) { engine.showMessage("Please enter a valid Forename"); //wdev-17892 form.getLocalContext().setLastEvent(PatientSearchEvent.NONE);//WDEV-15958 return; } } setPatientFilterDetails(); PatientShortCollection psColl = null; try { //psColl = domain.searchPatients(form.getGlobalContext().Core.getPatientFilter()); psColl = domain.searchPatients(form.getLocalContext().getPatientFilter()); } catch (DomainInterfaceException e) { engine.showMessage(e.getMessage()); form.getLocalContext().setLastEvent(PatientSearchEvent.NONE);//WDEV-15958 return; } if (psColl.size() == 0) { engine.showMessage("No patients found"); form.getLocalContext().setLastEvent(PatientSearchEvent.NONE);//WDEV-15958 return; } populateGridWithPatients(psColl); form.getLocalContext().setLastEvent(PatientSearchEvent.NONE); }
public void setSearchAsDefaultButton() //WDEV-19136 { form.imbSearch().setAsDefaultButton(); form.imbSearch().setFocus(); form.getLocalContext().setLastEvent(PatientSearchEvent.NONE); //WDEV-20015 }
@Override protected void onCcPatientSearchValueChanged() throws PresentationLogicException { if (form.lyrPage().tabPagePatientSearch().ccPatientSearch().getEvent() != PatientSearchEvent.NONE) { form.getGlobalContext().RefMan.setCatsReferral(null); form.getGlobalContext().RefMan.setReferralContractTypeForPatient(null);//wdev-12682 form.getGlobalContext().Core.setPatientShort(null); form.getLocalContext().setbDemographicsSaved(false); form.lyrPage().tabPageReferral().ccReferralDetails().setValue(null, null); form.lyrPage().tabPageReferral().ccReferralDetails().setInitializedBooleanToFalse(); manageTabs(); PatientShort patient = null; if(form.lyrPage().tabPagePatientSearch().ccPatientSearch().getEvent().equals(PatientSearchEvent.PATIENT_SELECTED)) { patient = form.lyrPage().tabPagePatientSearch().ccPatientSearch().getSelectedPatient(); form.lyrPage().tabPageDemographics().ccDemographics().setMode(FormMode.EDIT); } else if(form.lyrPage().tabPagePatientSearch().ccPatientSearch().getEvent().equals(PatientSearchEvent.NEW_PATIENT)) { form.getGlobalContext().Core.setPatientShort(null); form.lyrPage().tabPageDemographics().ccDemographics().setMode(FormMode.EDIT); form.lyrPage().tabPageDemographics().ccDemographics().displayDemographics(); } form.lyrPage().showtabPageDemographics(); form.lyrPage().settabPageDemographicsEnabled(true); form.lyrPage().tabPageDemographics().setHeaderEnabled(true); form.lyrPage().tabPageDemographics().ccDemographics().setValue(patient); form.lyrPage().tabPageDemographics().ccDemographics().setMode(FormMode.EDIT); } // WDEV-20015 -- starts here else // on patient search on component clear all contexts for the rest of the tabs { form.getGlobalContext().RefMan.setCatsReferral(null); form.getGlobalContext().RefMan.setReferralContractTypeForPatient(null); form.getGlobalContext().Core.setPatientShort(null); form.getGlobalContext().Core.setPatientFilter(null); form.getGlobalContext().Core.setPatientToBeDisplayed(null); form.getLocalContext().setbDemographicsSaved(false); form.lyrPage().tabPageDemographics().setHeaderEnabled(false); form.lyrPage().tabPageReferral().setHeaderEnabled(false); form.lyrPage().tabPageReferral().ccReferralDetails().setValue(null, null); form.lyrPage().tabPageReferral().ccReferralDetails().setInitializedBooleanToFalse(); } //- WDEV-20015 -- ends here }