private void ccHCPValueChanged() { if (form.lyr1().tabPageDetails().ccHcp().getValue() != null) { form.lyr1().tabPageDetails().treContactTypes().clear(); if (form.lyr1().tabPageDetails().ccHcp().getValue() != null && form.lyr1().tabPageDetails().ccHcp().getValue() instanceof HcpLiteVo) { Hcp voHcp = domain.getHCP((HcpRefVo)form.lyr1().tabPageDetails().ccHcp().getValue()); if (voHcp instanceof MedicVo) form.lyr1().tabPageDetails().cmbDiscipline().setValue(((MedicVo) voHcp).getMedicType()); else if (voHcp instanceof NurseVo) form.lyr1().tabPageDetails().cmbDiscipline().setValue(((NurseVo) voHcp).getNurseType()); else if (voHcp instanceof TherapistVo) form.lyr1().tabPageDetails().cmbDiscipline().setValue(((TherapistVo) voHcp).getTherapistType()); else form.lyr1().tabPageDetails().cmbDiscipline().setValue(voHcp.getHcpType()); } disciplineChanged(); } }
protected void onFormOpen() { form.setMode(form.getGlobalContext().getMosFormMode()); loadAllCombos(); if (form.getGlobalContext().getHcp() != null) { if (form.getGlobalContext().getHcp() instanceof MedicVo) populateScreenFromDataVoSpecific((MedicVo) form.getGlobalContext().getHcp()); else if (form.getGlobalContext().getHcp() instanceof NurseVo) populateScreenFromDataVoSpecific((NurseVo) form.getGlobalContext().getHcp()); else if (form.getGlobalContext().getHcp() instanceof TherapistVo) populateScreenFromDataVoSpecific((TherapistVo) form.getGlobalContext().getHcp()); else populateScreenFromDataVoSpecific(form.getGlobalContext().getHcp()); } fillNameDetails(form.getGlobalContext().getMosFullName()); }
private void populateDataFromScreenVoSpecific(Hcp value) { if (value instanceof NurseVo) { populateDataFromScreenVoSpecific((NurseVo)value); } else if (value instanceof MedicVo) { populateDataFromScreenVoSpecific((MedicVo)value); } else if (value instanceof TherapistVo) { populateDataFromScreenVoSpecific((TherapistVo)value); } else { value.setHcpType(form.lyrDetails().tabHcp().cmbHcpType().getValue()!=null?form.lyrDetails().tabHcp().cmbHcpType().getValue():HcpDisType.OTHER); // WDEV-13888 value.setIsHCPaResponsibleHCP(form.lyrDetails().tabHcp().chkIsOtherDisciplineResponsibleHCP().getValue()); } }
private boolean isHcpType(Hcp voHcpResult) { if (voHcpResult == null) return false; HcpDisType hcpType = form.lyrProServices().tabProfessional().cmbProfessional().getValue(); HcpDisType hcpSubType = form.lyrProServices().tabProfessional().cmbHcpSubType().getValue(); // Don't check "Other Discipline" if (hcpType != null && isOtherDiscipline(hcpType) == false) { if (hcpSubType != null && voHcpResult != null && voHcpResult.getID_HcpIsNotNull()) { HcpFilter filter = new HcpFilter(); filter.setID_Hcp(voHcpResult.getID_Hcp()); Hcp voHcp = domain.getHcp(filter); if (voHcp != null) { if (voHcp instanceof NurseVo) { if (hcpSubType.equals(((NurseVo) voHcp).getNurseType())) return true; } if (voHcp instanceof MedicVo) { if (hcpSubType.equals(((MedicVo) voHcp).getMedicType())) return true; } if (voHcp instanceof TherapistVo) { if (hcpSubType.equals(((TherapistVo) voHcp).getTherapistType())) return true; } return false; } } } return true; }
private boolean isHcpType(Hcp voHcpResult) { if (voHcpResult == null) return false; HcpDisType hcpType = form.lyrSupportServices().tabPageProf().cmbProfessional().getValue(); HcpDisType hcpSubType = form.lyrSupportServices().tabPageProf().cmbHcpSubType().getValue(); // Don't check "Other Discipline" if (hcpType != null && isOtherDiscipline(hcpType) == false) { if (hcpSubType != null && voHcpResult != null && voHcpResult.getID_HcpIsNotNull()) { HcpFilter filter = new HcpFilter(); filter.setID_Hcp(voHcpResult.getID_Hcp()); Hcp voHcp = domain.getHcp(filter); if (voHcp != null) { if (voHcp instanceof NurseVo) { if (hcpSubType.equals(((NurseVo) voHcp).getNurseType())) return true; } if (voHcp instanceof MedicVo) { if (hcpSubType.equals(((MedicVo) voHcp).getMedicType())) return true; } if (voHcp instanceof TherapistVo) { if (hcpSubType.equals(((TherapistVo) voHcp).getTherapistType())) return true; } return false; } } } return true; }
protected void onBtnSaveClick() throws PresentationLogicException { Hcp voHcp = new Hcp(); if (form.getLocalContext().getbHcpDisciplineChangedIsNotNull() && form.getLocalContext().getbHcpDisciplineChanged() == Boolean.TRUE) { deActivateGlobalContextHCP(); // Swap in newly created Hcp to the global context. voHcp = form.getLocalContext().getHcpVo(); } else { if (form.getGlobalContext().getHcpIsNotNull()) voHcp = form.getGlobalContext().getHcp(); } if (voHcp instanceof MedicVo) populateDataFromScreenVoSpecific((MedicVo) voHcp); else if (voHcp instanceof NurseVo) populateDataFromScreenVoSpecific((NurseVo) voHcp); else if (voHcp instanceof TherapistVo) populateDataFromScreenVoSpecific((TherapistVo) voHcp); else populateDataFromScreenVoSpecific(voHcp); form.getGlobalContext().setHcp(voHcp); form.getGlobalContext().setMosFullName(getMosName()); engine.close(DialogResult.OK); }
private void populateDataFromScreenVoSpecific(TherapistVo value) { value.setHcpType(HcpDisType.THERAPY); value.setTherapistType(form.lyrDetails().tabTherapist().cmbTherapistType().getValue()); value.setSpecialty(form.lyrDetails().tabTherapist().cmbTherapistSpecialty().getValue()); // WDEV-13888 value.setIsHCPaResponsibleHCP(form.lyrDetails().tabTherapist().chkIsTherapistResponsibleHCP().getValue()); // WDEV-15899 value.setIsAResponsibleEDClinician(form.lyrDetails().tabTherapist().chkEdResponsibleTabTherapist().getValue()); }
private void populateScreenFromDataVoSpecific(TherapistVo value) { form.lyrDetails().showtabTherapist(); form.lyrDetails().tabTherapist().cmbTherapistType().setValue(value.getTherapistType()); form.lyrDetails().tabTherapist().cmbTherapistSpecialty().setValue(value.getSpecialty()); // WDEV-13888 form.lyrDetails().tabTherapist().chkIsTherapistResponsibleHCP().setValue(value.getIsHCPaResponsibleHCP()); //WDEV-15899 form.lyrDetails().tabTherapist().chkEdResponsibleTabTherapist().setValue(value.getIsAResponsibleEDClinician()); }
/** * Creates a new HCP or updates if it already exists */ public ims.core.vo.Hcp saveHCP(ims.core.vo.Hcp hcp) throws StaleObjectException { if (!hcp.isValidated()) { throw new DomainRuntimeException("HCP VO has not been validated."); } DomainFactory factory = getDomainFactory(); hcp.getName().setUppers(); Hcp doHcp = null; if (hcp instanceof MedicVo) { doHcp = MedicVoAssembler.extractMedic(factory, (MedicVo)hcp); } else if (hcp instanceof TherapistVo) { doHcp = TherapistVoAssembler.extractTherapist(factory, (TherapistVo)hcp); } else if (hcp instanceof NurseVo) { doHcp = NurseVoAssembler.extractNurse(factory, (NurseVo)hcp); } else { doHcp = HcpAssembler.extractHcp(factory, hcp); } factory.save(doHcp); hcp.setID_Hcp(doHcp.getId()); return hcp; }
public ims.core.vo.Hcp saveHcp(ims.core.vo.Hcp hcp) throws ims.domain.exceptions.StaleObjectException { if (!hcp.isValidated()) { throw new DomainRuntimeException("HCP VO has not been validated."); } DomainFactory factory = getDomainFactory(); hcp.getName().setUppers(); Hcp doHcp = null; if (hcp instanceof MedicVo) { doHcp = MedicVoAssembler.extractMedic(factory, (MedicVo) hcp); } else if (hcp instanceof TherapistVo) { doHcp = TherapistVoAssembler.extractTherapist(factory, (TherapistVo) hcp); } else if (hcp instanceof NurseVo) { doHcp = NurseVoAssembler.extractNurse(factory, (NurseVo) hcp); } else { doHcp = HcpAssembler.extractHcp(factory, hcp); } factory.save(doHcp); hcp.setID_Hcp(doHcp.getId()); return hcp; }
private void searchAssesment(Object hcp) { //wdev-16116 Specialty spec = null; if( hcp instanceof MedicVo) spec = ((MedicVo)hcp).getSpecialty(); else if (hcp instanceof NurseVo) spec = ((NurseVo)hcp).getSpecialty(); else if ( hcp instanceof TherapistVo) spec = ((TherapistVo)hcp).getSpecialty(); GraphicAssessmentShortVoCollection assessments = domain.listGraphicalAssesments(spec, form.txtName().getValue()); //wdev-16116 if (assessments == null || assessments.size()==0) { engine.showMessage( "No results found","No Results", MessageButtons.OK, MessageIcon.INFORMATION); return; } if (assessments.size()==1) { populateScreenFromData(assessments.get(0)); form.setMode(FormMode.EDIT); return; } Object[] args = new Object[3]; args[0] = assessments; args[1] = form.txtName().getValue(); args[2] = Boolean.FALSE; engine.open(form.getForms().Clinical.SearchGraphicalAssessment,args); }
private void ccHCPValueChanged() { if (form.lyrContact().tabContactDetails().ccHcp().getValue() != null) { if (form.lyrContact().tabContactDetails().ccHcp().getValue() != null && form.lyrContact().tabContactDetails().ccHcp().getValue() instanceof HcpLiteVo) { Hcp voHcp = domain.getHCP((HcpRefVo)form.lyrContact().tabContactDetails().ccHcp().getValue()); if (voHcp instanceof MedicVo) { form.lyrContact().tabContactDetails().cmbDiscipline().setValue(((MedicVo) voHcp).getMedicType()); } else if (voHcp instanceof NurseVo) { form.lyrContact().tabContactDetails().cmbDiscipline().setValue(((NurseVo) voHcp).getNurseType()); } else if (voHcp instanceof TherapistVo) { form.lyrContact().tabContactDetails().cmbDiscipline().setValue(((TherapistVo) voHcp).getTherapistType()); } else form.lyrContact().tabContactDetails().cmbDiscipline().setValue(voHcp.getHcpType()); } disciplineChanged(); } }