protected void onDyngrdInpatientsCellButtonClicked(DynamicGridCell cell) { if(cell.getValue() != null ) { InpatientEpisodeVo inpTempVo = (InpatientEpisodeVo) cell.getRow().getValue(); if( inpTempVo != null && inpTempVo.getPasEventIsNotNull() && inpTempVo.getPasEvent().getPatientIsNotNull()) { DementiaForWorklistVo tempvo = domain.getDementia(inpTempVo.getPasEvent().getPatient()); if( tempvo != null ) { engine.open(form.getForms().Clinical.DementiaAssessmentFormDialog, new Object[] { tempvo, DementiaWorklistOpenFormModeEnum.VIEW }); } } } }
public DementiaForWorklistVo getDementia(PatientRefVo patRef) { if( patRef == null ) return null; DomainFactory factory = getDomainFactory(); List lst = factory.find("select d1_1 from Dementia as d1_1 left join d1_1.patient as p1_1 where (p1_1.id = :patId and d1_1.isRIE is null ) order by d1_1.systemInformation.creationDateTime desc", new String[] {"patId"}, new Object[] {patRef.getID_Patient()}); if( lst != null && lst.size() > 0) { DementiaForWorklistVoCollection tempColl = DementiaForWorklistVoAssembler.createDementiaForWorklistVoCollectionFromDementia(lst); if( tempColl != null && tempColl.size() > 0) return tempColl.get(0); } return null; }
protected void onImbDementiaClick() throws PresentationLogicException { if (form.getGlobalContext().Core.getCurrentCareContextIsNotNull() && form.getGlobalContext().Core.getCurrentCareContext().getPasEventIsNotNull() && form.getGlobalContext().Core.getCurrentCareContext().getPasEvent().getPatientIsNotNull()) { DementiaForWorklistVo tempvo = domain.getDementia(form.getGlobalContext().Core.getCurrentCareContext().getPasEvent().getPatient()); if( tempvo != null ) { form.htmPreview().setHTML(""); engine.open(form.getForms().Clinical.DementiaAssessmentFormDialog, new Object[] { tempvo, DementiaWorklistOpenFormModeEnum.VIEW }); } } }
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException { if (args != null) { if (args.length == 1 && args[0] != null && args[0] instanceof DementiaForWorklistVo) form.getLocalContext().setselectedDementia(domain.getDementia((DementiaForWorklistVo) args[0])); } if(form.getLocalContext().getselectedDementiaIsNotNull()&& form.getLocalContext().getselectedDementia().getCurrentWorklistStatusIsNotNull()) { form.cmbReason().setValue(form.getLocalContext().getselectedDementia().getCurrentWorklistStatus().getReasonForExclusion()); } updateControlState(); }
protected void onFormOpen(Object[] args) throws PresentationLogicException { if (args != null) { if (args.length == 1 && args[0] != null && args[0] instanceof DementiaForWorklistVo) form.getLocalContext().setselectedDementia(domain.getDementia((DementiaForWorklistVo) args[0])); } }
protected void onFormOpen(Object[] args) throws PresentationLogicException { if (args != null) { if (args.length == 1 && args[0] != null && args[0] instanceof DementiaForWorklistVo) form.getLocalContext().setselectedDementia(domain.getDementia((DementiaForWorklistVo) args[0])); } if(form.getLocalContext().getselectedDementiaIsNotNull()&& form.getLocalContext().getselectedDementia().getStepTwoAssessIsNotNull() && form.getLocalContext().getselectedDementia().getStepTwoAssess().getAuthoringInformation().getAuthoringDateTimeIsNotNull()) form.lblExistingDisplayed().setValue(form.getLocalContext().getselectedDementia().getStepTwoAssess().getAuthoringInformation().getAuthoringDateTime().toString()); }
@Override protected void onDyngrdPatientsRowSelectionChanged(DynamicGridRow row) throws PresentationLogicException { form.getGlobalContext().Core.setPatientShort(null); DementiaForWorklistVo voDementia = null; if (form.dyngrdPatients().getValue() != null && form.dyngrdPatients().getValue() instanceof DementialManualClassAssemblyVo) voDementia = domain.getDementiaForWorklist(new DementiaRefVo(((DementialManualClassAssemblyVo) form.dyngrdPatients().getValue()).getDementiaId(),0)); else voDementia = domain.getDementiaForWorklist((DementiaForWorklistVo)form.dyngrdPatients().getValue()); if (voDementia == null) // This record could have been RIE'ed and so no longer exists for the worklist { engine.showErrors(new String[]{ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()}); doSearch(); return; } // row.setValue(voDementia); // DementiaForWorklistVo rowValue = (DementiaForWorklistVo) form.dyngrdPatients().getValue(); if (voDementia.getPatientIsNotNull()) { form.getGlobalContext().Core.setPatientShort(domain.getPatient(voDementia.getPatient())); } form.getLocalContext().setSelectedInstance(voDementia); updateControlsState(); }
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException { // TODO Add your code here. if (args != null) { if (args.length == 1 && args[0] != null && args[0] instanceof DementiaForWorklistVo) form.getLocalContext().setselectedDementia(domain.getDementia((DementiaForWorklistVo) args[0])); } if(form.getLocalContext().getselectedDementiaIsNotNull()&& form.getLocalContext().getselectedDementia().getStepOneFindIsNotNull() && form.getLocalContext().getselectedDementia().getStepOneFind().getAuthoringInformation().getAuthoringDateTimeIsNotNull()) form.lblExistingDisplayed().setValue(form.getLocalContext().getselectedDementia().getStepOneFind().getAuthoringInformation().getAuthoringDateTime().toString()); }
public DementiaForWorklistVo getDementiaForWorklist(DementiaRefVo dementiaRef) { if (dementiaRef == null || dementiaRef.getID_Dementia()== null) { throw new CodingRuntimeException("Cannot get DementiaVo on null Id "); } DomainFactory factory = getDomainFactory(); Dementia domainDementia = (Dementia) factory.getDomainObject(Dementia.class, dementiaRef.getID_Dementia()); return DementiaForWorklistVoAssembler.create(domainDementia); }
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException { if (args != null) { if (args.length == 2 && args[0] != null && args[1] != null && args[0] instanceof DementiaForWorklistVo) { form.getLocalContext().setselectedDementia(domain.getDementia((DementiaForWorklistVo) args[0])); if (DementiaWorklistOpenFormModeEnum.STEP1EDIT.equals(args[1])) { form.lyrSteps().showtabPageStep1(); form.lyrSteps().tabPageStep1().ccStep1Find().initialize(form.getLocalContext().getselectedDementia(), FormMode.EDIT, engine.isDialog()); form.lyrSteps().tabPageStep2().setHeaderVisible(form.getLocalContext().getselectedDementia().getStepTwoAssessIsNotNull()); form.lyrSteps().tabPageFollowUp().setHeaderVisible(form.getLocalContext().getselectedDementia().getFollowUpAssessmentsIsNotNull() && form.getLocalContext().getselectedDementia().getFollowUpAssessments().size() > 0); } else if (DementiaWorklistOpenFormModeEnum.VIEW.equals(args[1])) { open(); return; } else if (DementiaWorklistOpenFormModeEnum.STEP2_AMTS_EDIT.equals(args[1])) { form.lyrSteps().showtabPageStep2(); form.lyrSteps().tabPageStep2().ccAMTS().initialize(form.getLocalContext().getselectedDementia(), FormMode.EDIT, null); form.lyrSteps().tabPageStep2().setHeaderVisible(true); form.lyrSteps().tabPageFollowUp().setHeaderVisible(form.getLocalContext().getselectedDementia().getFollowUpAssessmentsIsNotNull() && form.getLocalContext().getselectedDementia().getFollowUpAssessments().size() > 0); } else if (DementiaWorklistOpenFormModeEnum.FOLLOWUP_AMTS_EDIT.equals(args[1])) { form.lyrSteps().showtabPageFollowUp(); form.lyrSteps().tabPageStep1().ccStep1Find().initialize(form.getLocalContext().getselectedDementia(), FormMode.VIEW,engine.isDialog()); form.lyrSteps().tabPageStep2().ccAMTS().initialize(form.getLocalContext().getselectedDementia(), FormMode.VIEW, null); initialiseFollowUp(true); return; } else if (DementiaWorklistOpenFormModeEnum.EDIT.equals(args[1])) //WDEV-16247 { Object hcp = domain.getHcpLiteUser(); HcpLiteVo hcpLiteUser=null; if (hcp != null) hcpLiteUser=((HcpLiteVo) domain.getHcpLiteUser()); DementiaFindVo voStep1Find = (form.getLocalContext().getselectedDementiaIsNotNull()?form.getLocalContext().getselectedDementia().getStepOneFind():null); DementiaAssessAndInvestigateVo voStep2AMTS = (form.getLocalContext().getselectedDementiaIsNotNull()?form.getLocalContext().getselectedDementia().getStepTwoAssess():null); if (form.getLocalContext().getselectedDementiaIsNotNull() && voStep1Find!=null && voStep2AMTS==null && ((voStep1Find.getAuthoringInformationIsNotNull() && voStep1Find.getAuthoringInformationIsNotNull() && voStep1Find.getAuthoringInformation().getAuthoringHcpIsNotNull() && voStep1Find.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser)) || engine.hasRight(AppRight.CAN_EDIT_AND_RIE_DEMENTIA))) { form.lyrSteps().showtabPageStep1(); form.lyrSteps().tabPageStep1().ccStep1Find().initialize(form.getLocalContext().getselectedDementia(), FormMode.EDIT, engine.isDialog()); form.lyrSteps().tabPageStep2().setHeaderVisible(form.getLocalContext().getselectedDementia().getStepTwoAssessIsNotNull()); form.lyrSteps().tabPageFollowUp().setHeaderVisible(form.getLocalContext().getselectedDementia().getFollowUpAssessmentsIsNotNull() && form.getLocalContext().getselectedDementia().getFollowUpAssessments().size() > 0); } else if (form.getLocalContext().getselectedDementiaIsNotNull() && voStep1Find!=null && voStep2AMTS!=null ) { if ((voStep2AMTS.getAuthoringInformationIsNotNull() && voStep2AMTS.getAuthoringInformationIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcpIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser)) || engine.hasRight(AppRight.CAN_EDIT_AND_RIE_DEMENTIA)) { form.lyrSteps().showtabPageStep2(); form.lyrSteps().tabPageStep2().ccAMTS().initialize(form.getLocalContext().getselectedDementia(), FormMode.EDIT, null); form.lyrSteps().tabPageStep2().setHeaderVisible(true); form.lyrSteps().tabPageFollowUp().setHeaderVisible(form.getLocalContext().getselectedDementia().getFollowUpAssessmentsIsNotNull() && form.getLocalContext().getselectedDementia().getFollowUpAssessments().size() > 0); } else if ((voStep2AMTS.getAuthoringInformationIsNotNull() && voStep2AMTS.getAuthoringInformationIsNotNull() && voStep2AMTS.getAuthoringInformation().getAuthoringHcpIsNotNull() && !voStep2AMTS.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser)) && (voStep1Find.getAuthoringInformationIsNotNull() && voStep1Find.getAuthoringInformationIsNotNull() && voStep1Find.getAuthoringInformation().getAuthoringHcpIsNotNull() && voStep1Find.getAuthoringInformation().getAuthoringHcp().equals(hcpLiteUser)) ) { form.lyrSteps().showtabPageStep1(); form.lyrSteps().tabPageStep1().ccStep1Find().initialize(form.getLocalContext().getselectedDementia(), FormMode.EDIT, engine.isDialog()); form.lyrSteps().tabPageStep2().setHeaderVisible(form.getLocalContext().getselectedDementia().getStepTwoAssessIsNotNull()); form.lyrSteps().tabPageFollowUp().setHeaderVisible(form.getLocalContext().getselectedDementia().getFollowUpAssessmentsIsNotNull() && form.getLocalContext().getselectedDementia().getFollowUpAssessments().size() > 0); } } } initialiseFollowUp(false); } } }