Java 类ims.core.vo.SupportNetworkProfessionalVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private boolean foundActiveSupportNetworkProfessionals(SupportNetworkProfessionalVo[] voColl)
{
    if (voColl != null)
    {   
        for (int i=0;i< voColl.length; i++)
        {
            if (Boolean.TRUE.equals(voColl[i].getIsCurrActiveProfSupp()))
            {
                return true;
            }
        }
    }
    return false;
}
项目:AvoinApotti    文件:Logic.java   
private void newProfessionalInstance()
{
    form.lyrSupportServices().tabPageProf().btnInactivateProfessional().setVisible(false);

    form.setMode(FormMode.EDIT);
    form.getContextMenus().Emergency.hideAllSupportNetworkProfessionalMenuItems();

    clearProfDetails();

    //WDEV-14594
    form.lyrSupportServices().tabPageProf().cmbHcpSubType().clear();
    form.lyrSupportServices().tabPageProf().qmbHcpName().clear();

    form.lyrSupportServices().tabPageProf().customControlAuth().setIsRequiredPropertyToControls(Boolean.TRUE);
    form.lyrSupportServices().tabPageProf().cmbLocationHcp().clear();

    SupportNetworkProfessionalVo voProf = new SupportNetworkProfessionalVo();

    form.lyrSupportServices().tabPageProf().customControlAuth().initializeComponent();
    form.getLocalContext().setSelectedSupportNetworkProfessional(voProf);
    form.lyrSupportServices().tabPageProf().grdProfessional().setValue(null);

    defaultHCPandLocationControlState();
    form.lyrSupportServices().tabPageProf().chkSupplyHcp().setEnabled(true);
    form.lyrSupportServices().tabPageProf().cmbProfessional().setEnabled(true);
    form.lyrSupportServices().tabPageProf().cmbHcpSubType().setEnabled(true);
    form.lyrSupportServices().tabPageProf().cmbHcpSubType().setVisible(true);

    form.lyrSupportServices().tabPageProf().chkNoneAtPresentPro().setVisible(true);
    if (form.getLocalContext().getPatientNoSupportNetworkStatusInfoIsNotNull())
    {
        form.lyrSupportServices().tabPageProf().chkNoneAtPresentPro().setValue(false);
        form.lyrSupportServices().tabPageProf().chkNoneAtPresentPro().setVisible(false);
    }

    enableAuthoringHCPCustomControls();
    form.lyrSupportServices().tabPageServices().txtFrequency().setEnabled(true);
    form.lyrSupportServices().tabPageServices().txtCommentsService().setEnabled(true    );      
}
项目:openMAXIMS    文件:Logic.java   
private boolean foundActiveSupportNetworkProfessionals(SupportNetworkProfessionalVo[] voColl)
{
    if (voColl != null)
    {   
        for (int i=0;i< voColl.length; i++)
        {
            if (Boolean.TRUE.equals(voColl[i].getIsCurrActiveProfSupp()))
            {
                return true;
            }
        }
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void newProfessionalInstance()
{
    form.lyrSupportServices().tabPageProf().btnInactivateProfessional().setVisible(false);

    form.setMode(FormMode.EDIT);
    form.getContextMenus().Emergency.hideAllSupportNetworkProfessionalMenuItems();

    clearProfDetails();

    //WDEV-14594
    form.lyrSupportServices().tabPageProf().cmbHcpSubType().clear();
    form.lyrSupportServices().tabPageProf().qmbHcpName().clear();

    form.lyrSupportServices().tabPageProf().customControlAuth().setIsRequiredPropertyToControls(Boolean.TRUE);
    form.lyrSupportServices().tabPageProf().cmbLocationHcp().clear();

    SupportNetworkProfessionalVo voProf = new SupportNetworkProfessionalVo();

    form.lyrSupportServices().tabPageProf().customControlAuth().initializeComponent();
    form.getLocalContext().setSelectedSupportNetworkProfessional(voProf);
    form.lyrSupportServices().tabPageProf().grdProfessional().setValue(null);

    defaultHCPandLocationControlState();
    form.lyrSupportServices().tabPageProf().chkSupplyHcp().setEnabled(true);
    form.lyrSupportServices().tabPageProf().cmbProfessional().setEnabled(true);
    form.lyrSupportServices().tabPageProf().cmbHcpSubType().setEnabled(true);
    form.lyrSupportServices().tabPageProf().cmbHcpSubType().setVisible(true);

    form.lyrSupportServices().tabPageProf().chkNoneAtPresentPro().setVisible(true);
    if (form.getLocalContext().getPatientNoSupportNetworkStatusInfoIsNotNull())
    {
        form.lyrSupportServices().tabPageProf().chkNoneAtPresentPro().setValue(false);
        form.lyrSupportServices().tabPageProf().chkNoneAtPresentPro().setVisible(false);
    }

    enableAuthoringHCPCustomControls();
    form.lyrSupportServices().tabPageServices().txtFrequency().setEnabled(true);
    form.lyrSupportServices().tabPageServices().txtCommentsService().setEnabled(true    );      
}
项目:openMAXIMS    文件:Logic.java   
private boolean foundActiveSupportNetworkProfessionals(SupportNetworkProfessionalVo[] voColl)
{
    if (voColl != null)
    {   
        for (int i=0;i< voColl.length; i++)
        {
            if (Boolean.TRUE.equals(voColl[i].getIsCurrActiveProfSupp()))
            {
                return true;
            }
        }
    }
    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void newProfessionalInstance()
{
    form.lyrSupportServices().tabPageProf().btnInactivateProfessional().setVisible(false);

    form.setMode(FormMode.EDIT);
    form.getContextMenus().Emergency.hideAllSupportNetworkProfessionalMenuItems();

    clearProfDetails();

    //WDEV-14594
    form.lyrSupportServices().tabPageProf().cmbHcpSubType().clear();
    form.lyrSupportServices().tabPageProf().qmbHcpName().clear();

    form.lyrSupportServices().tabPageProf().customControlAuth().setIsRequiredPropertyToControls(Boolean.TRUE);
    form.lyrSupportServices().tabPageProf().cmbLocationHcp().clear();

    SupportNetworkProfessionalVo voProf = new SupportNetworkProfessionalVo();

    form.lyrSupportServices().tabPageProf().customControlAuth().initializeComponent();
    form.getLocalContext().setSelectedSupportNetworkProfessional(voProf);
    form.lyrSupportServices().tabPageProf().grdProfessional().setValue(null);

    defaultHCPandLocationControlState();
    form.lyrSupportServices().tabPageProf().chkSupplyHcp().setEnabled(true);
    form.lyrSupportServices().tabPageProf().cmbProfessional().setEnabled(true);
    form.lyrSupportServices().tabPageProf().cmbHcpSubType().setEnabled(true);
    form.lyrSupportServices().tabPageProf().cmbHcpSubType().setVisible(true);

    form.lyrSupportServices().tabPageProf().chkNoneAtPresentPro().setVisible(true);
    if (form.getLocalContext().getPatientNoSupportNetworkStatusInfoIsNotNull())
    {
        form.lyrSupportServices().tabPageProf().chkNoneAtPresentPro().setValue(false);
        form.lyrSupportServices().tabPageProf().chkNoneAtPresentPro().setVisible(false);
    }

    enableAuthoringHCPCustomControls();
    form.lyrSupportServices().tabPageServices().txtFrequency().setEnabled(true);
    form.lyrSupportServices().tabPageServices().txtCommentsService().setEnabled(true    );      
}
项目:openmaxims-linux    文件:Logic.java   
private boolean foundActiveSupportNetworkProfessionals(SupportNetworkProfessionalVo[] voColl)
{
    if (voColl != null)
    {   
        for (int i=0;i< voColl.length; i++)
        {
            if (Boolean.TRUE.equals(voColl[i].getIsCurrActiveProfSupp()))
            {
                return true;
            }
        }
    }
    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private void newProfessionalInstance()
{
    form.lyrSupportServices().tabPageProf().btnInactivateProfessional().setVisible(false);

    form.setMode(FormMode.EDIT);
    form.getContextMenus().Emergency.hideAllSupportNetworkProfessionalMenuItems();

    clearProfDetails();

    //WDEV-14594
    form.lyrSupportServices().tabPageProf().cmbHcpSubType().clear();
    form.lyrSupportServices().tabPageProf().qmbHcpName().clear();

    form.lyrSupportServices().tabPageProf().customControlAuth().setIsRequiredPropertyToControls(Boolean.TRUE);
    form.lyrSupportServices().tabPageProf().cmbLocationHcp().clear();

    SupportNetworkProfessionalVo voProf = new SupportNetworkProfessionalVo();

    form.lyrSupportServices().tabPageProf().customControlAuth().initializeComponent();
    form.getLocalContext().setSelectedSupportNetworkProfessional(voProf);
    form.lyrSupportServices().tabPageProf().grdProfessional().setValue(null);

    defaultHCPandLocationControlState();
    form.lyrSupportServices().tabPageProf().chkSupplyHcp().setEnabled(true);
    form.lyrSupportServices().tabPageProf().cmbProfessional().setEnabled(true);
    form.lyrSupportServices().tabPageProf().cmbHcpSubType().setEnabled(true);
    form.lyrSupportServices().tabPageProf().cmbHcpSubType().setVisible(true);

    form.lyrSupportServices().tabPageProf().chkNoneAtPresentPro().setVisible(true);
    if (form.getLocalContext().getPatientNoSupportNetworkStatusInfoIsNotNull())
    {
        form.lyrSupportServices().tabPageProf().chkNoneAtPresentPro().setValue(false);
        form.lyrSupportServices().tabPageProf().chkNoneAtPresentPro().setVisible(false);
    }

    enableAuthoringHCPCustomControls();
    form.lyrSupportServices().tabPageServices().txtFrequency().setEnabled(true);
    form.lyrSupportServices().tabPageServices().txtCommentsService().setEnabled(true    );      
}
项目:AvoinApotti    文件:Logic.java   
protected void onCmbEpisodeValueChanged() throws PresentationLogicException 
{
    form.grdProfessional().getRows().clear();
    //09/09/2005 - check for null
    CareContextShortVo voCareContextShort = form.cmbEpisode().getValue();
    if(voCareContextShort == null)
        return;
    SupportNetworkProfessionalVoCollection voColl = domain.listSupportNetworkProfessionalByCareContext(voCareContextShort, Boolean.TRUE);

    SupportNetworkProfessionalVo voProf = null;
    GenForm.grdProfessionalRow row = null;


    if(voColl == null)
        return;

    for(int i = 0 ; i < voColl.size() ; i++)
    {
        voProf = voColl.get(i);
        row = form.grdProfessional().getRows().newRow();

        if(voProf.getMOS() != null)
        {
            row.setName(voProf.getMOS().toString());
            if(voProf.getHcpSubType() != null)
                row.setProfession(voProf.getHcpSubType().getText());

            MemberOfStaffVo voMos = domain.getMos(voProf.getMOS());

            if(voMos != null && voMos.getLocations() != null)
            {
                for(int k = 0 ; k < voMos.getLocations().size() ; k++)
                {
                    if (voMos.getLocations().get(k).getIsPrimaryIsNotNull() && voMos.getLocations().get(k).getIsPrimary().equals(Boolean.TRUE))
                        if (voMos.getLocations().get(k).getLocation().getAddressIsNotNull())
                            row.setPhone(voMos.getLocations().get(k).getLocation().getAddress().getPhone());
                }
            }
        }

        row.setSelect(true);
        row.setValue(voProf);
    }           
}
项目:AvoinApotti    文件:Logic.java   
private void listSupportNetworkProfessional(boolean bFromPrevoiousEpisode)
{
    SupportNetworkProfessionalVoCollection voColl = null;
    if (bFromPrevoiousEpisode == false)
    {
        Boolean bActiveOnly = Boolean.FALSE;
        if (form.lyrProServices().tabProfessional().grpProfFilter().getValue().equals(GenForm.lyrProServicesLayer.tabProfessionalContainer.grpProfFilterEnumeration.rdoActiveProf))
            bActiveOnly = Boolean.TRUE;

        /*
         * if(form.getGlobalContext().Core.getCurrentCareContextIsNotNull())
         * voColl =
         * domain.listSupportNetworkProfessionalByCareContext(form.getGlobalContext().Core.getCurrentCareContext(),
         * bActiveOnly); else voColl =
         * domain.listSupportNetworkProfessionalByPatient(bActiveOnly,
         * form.getGlobalContext().Core.getPatientShort());
         */

        // WDEV-2257 - previous commented code did it selectively by
        // CareContext or Patient
        voColl = domain.listSupportNetworkProfessionalByPatient(bActiveOnly, form.getGlobalContext().Core.getPatientShort());
    }
    else
    {
        voColl = form.getGlobalContext().COE.getSupportNetworkProfessionalCollection();
    }

    SupportNetworkProfessionalVo voProf = null;
    GenForm.lyrProServicesLayer.tabProfessionalContainer.grdProfessionalRow row = null;

    form.lyrProServices().tabProfessional().grdProfessional().getRows().clear();

    if (voColl == null)
        return;

    boolean bActiveProfessionals = false;
    for (int i = 0; i < voColl.size(); i++)
    {
        voProf = voColl.get(i);
        row = form.lyrProServices().tabProfessional().grdProfessional().getRows().newRow();

        if (voProf.getMOSIsNotNull())
        {
            row.setColName(voProf.getMOS().toString());
        }
        else if (voProf.getSuppliedProfessionalIsNotNull())
        {
            row.setColName(voProf.getSuppliedProfessional().getName());
            row.setColWorkPhone(voProf.getSuppliedProfessional().getWorkPhone());
        }

        if (voProf.getHcpSubTypeIsNotNull())
            row.setColProfessionService(voProf.getHcpSubType().getText());

        if (voProf.getCurrentLocationIsNotNull() && voProf.getCurrentLocation().getAddressIsNotNull())
        {
            row.setColWorkPhone(voProf.getCurrentLocation().getAddress().getPhone());
        }

        if (voProf.getIsCurrActiveProfSupp().booleanValue()){
            row.setColIsActive(form.getImages().Core.AnswerBox_Yes);
            bActiveProfessionals = true;
        }
        else
        {
            row.setColIsActive(form.getImages().Core.AnswerBox_No);
            row.setBackColor(Color.LightGray);
        }

        row.setValue(voProf);
    }

    form.getLocalContext().setActiveProfessionals(bActiveProfessionals);

    SupportNetworkProfessionalVo voSupportNetworkProfessional = form.getLocalContext().getsupportNetworkProfessional();
    if (voSupportNetworkProfessional != null && form.lyrProServices().tabProfessional().grdProfessional().getRowByValue(voSupportNetworkProfessional) != null)
    {
        form.lyrProServices().tabProfessional().grdProfessional().setValue(voSupportNetworkProfessional);
        grdProSelectionChanged();
    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean saveProfessional()
{
    SupportNetworkProfessionalVo voProf = form.getLocalContext().getsupportNetworkProfessional();

    ArrayList<String> screenErrors = new ArrayList<String>();

    if (form.lyrProServices().tabProfessional().cmbProfessional().getValue() == null)
    {
        screenErrors.add("Profession is mandatory");
    }

    if (form.lyrProServices().tabProfessional().cmbHcpSubType().getValue() == null)
    {
        screenErrors.add("Type is mandatory");
    }

    if ((!form.lyrProServices().tabProfessional().chkSupplyHcp().getValue()) && form.lyrProServices().tabProfessional().qmbHcpName().isEnabled() && form.lyrProServices().tabProfessional().qmbHcpName().getValue() == null)
    {
        screenErrors.add("Hcp Name is mandatory");
    }
    else if ((form.lyrProServices().tabProfessional().chkSupplyHcp().getValue()) && (form.lyrProServices().tabProfessional().txtHcpName().getValue() == null))
    {
        screenErrors.add("Hcp Name is mandatory");
    }

    String[] sScreenErrors = screenErrors(screenErrors);
    String[] arrErrors = voProf.validate(sScreenErrors);
    if(arrErrors!=null)
    {
        engine.showErrors(arrErrors);
        SupportNetworkProfessionalVo voProfessional = new SupportNetworkProfessionalVo();
        form.getLocalContext().setsupportNetworkProfessional(voProfessional);
        return false;
    }

    try
    {
        // WDEV-2257 - save based on Patient Only
        domain.saveSupportNetworkProfessionaForPatient(voProf, form.getGlobalContext().Core.getPatientShort());
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }

    savePatientNoSupportNetworkStatusInfo(false);

    return true;
}
项目:AvoinApotti    文件:Logic.java   
private void populateProfessionalDataFromScreen()
{
    SupportNetworkProfessionalVo voProf = form.getLocalContext().getsupportNetworkProfessional();

    if(voProf.getIsCurrActiveProfSupp()==null)
        voProf.setIsCurrActiveProfSupp(Boolean.TRUE);

    // Professional details
    if (form.lyrProServices().tabProfessional().chkSupplyHcp().getValue())
    {
        if (voProf.getSuppliedProfessional() == null)
        {
            voProf.setProfession(form.lyrProServices().tabProfessional().cmbProfessional().getValue());
            voProf.setHcpSubType(form.lyrProServices().tabProfessional().cmbHcpSubType().getValue());
            voProf.setAuthorngInfo(form.lyrProServices().tabProfessional().customControlAuth().getValue());

            SuppNetworkServiceProfessionDetailVo voNetProfDetail = new SuppNetworkServiceProfessionDetailVo();
            voNetProfDetail.setAddress(form.lyrProServices().tabProfessional().txtAddressPro().getValue());
            voNetProfDetail.setEmailAddress(form.lyrProServices().tabProfessional().txtEmailPro().getValue());
            voNetProfDetail.setMobilePhone(form.lyrProServices().tabProfessional().txtMobilePhPro().getValue());
            voNetProfDetail.setName(form.lyrProServices().tabProfessional().txtHcpName().getValue());
            voNetProfDetail.setServiceLocation(form.lyrProServices().tabProfessional().txtLocation().getValue());
            voNetProfDetail.setWorkPhone(form.lyrProServices().tabProfessional().txtWorkPh().getValue());
            voProf.setSuppliedProfessional(voNetProfDetail);
            voProf.setMOS(null);
            voProf.setCurrentLocation(null);
        }
        else
        {
            // update location & details
            voProf.getSuppliedProfessional().setServiceLocation(form.lyrProServices().tabProfessional().txtLocation().getValue());
            voProf.getSuppliedProfessional().setAddress(form.lyrProServices().tabProfessional().txtAddressPro().getValue());
            voProf.getSuppliedProfessional().setMobilePhone(form.lyrProServices().tabProfessional().txtMobilePhPro().getValue());
            voProf.getSuppliedProfessional().setWorkPhone(form.lyrProServices().tabProfessional().txtWorkPh().getValue());
            voProf.getSuppliedProfessional().setEmailAddress(form.lyrProServices().tabProfessional().txtEmailPro().getValue());
            voProf.getSuppliedProfessional().setName(form.lyrProServices().tabProfessional().txtHcpName().getValue()); //WDEV-17560
        }
    }
    else
    {
        if (voProf.getMOS() == null)
        {
            voProf.setProfession(form.lyrProServices().tabProfessional().cmbProfessional().getValue());
            voProf.setHcpSubType(form.lyrProServices().tabProfessional().cmbHcpSubType().getValue());
            voProf.setAuthorngInfo(form.lyrProServices().tabProfessional().customControlAuth().getValue());

            MemberOfStaffShortVo voMOSShort = new MemberOfStaffShortVo();

            if (form.getLocalContext().getvoMemberOfStaffShort() != null)
                voMOSShort = form.getLocalContext().getvoMemberOfStaffShort();
            else
            {
                voMOSShort.setHcp(form.lyrProServices().tabProfessional().qmbHcpName().getValue());
                if (voMOSShort.getHcpIsNotNull())
                {
                    voMOSShort.setName(voMOSShort.getHcp().getName());
                    if (voMOSShort.getHcp().getMosIsNotNull())
                    {
                        voMOSShort.setPasCode(voMOSShort.getHcp().getMos().getPasCode());
                        voMOSShort.setEmailAddress(voMOSShort.getHcp().getMos().getEmailAddress());
                        voMOSShort.setBleep(voMOSShort.getHcp().getMos().getBleep());
                    }
                }
            }
            voProf.setMOS(voMOSShort.countFieldsWithValue() > 0 ? voMOSShort : null);
            voProf.setSuppliedProfessional(null);
            voProf.setCurrentLocation(form.lyrProServices().tabProfessional().cmbLocationHcp().getValue());
        }
        else
        {
            // update location only
            voProf.setCurrentLocation(form.lyrProServices().tabProfessional().cmbLocationHcp().getValue());
        }
    }

    form.getLocalContext().setsupportNetworkProfessional(voProf);
}
项目:AvoinApotti    文件:Logic.java   
private void populateInstanceControl(SupportNetworkProfessionalVo voProf)
{
    clearProfDetails();
    form.getLocalContext().setRieRecord(voProf);
    form.getContextMenus().getLIPUpdateItem().setVisible(true);

    // profession
    if (voProf.getProfessionIsNotNull())
    {
        form.lyrProServices().tabProfessional().cmbProfessional().newRow(voProf.getProfession(), voProf.getProfession().getText());
        form.lyrProServices().tabProfessional().cmbProfessional().setValue(voProf.getProfession());
    }

    if (voProf.getHcpSubTypeIsNotNull())
    {
        // hcp type
        form.lyrProServices().tabProfessional().cmbHcpSubType().newRow(voProf.getHcpSubType(), voProf.getHcpSubType().getText());
        form.lyrProServices().tabProfessional().cmbHcpSubType().setValue(voProf.getHcpSubType());
    }

    if ((voProf.getSuppliedProfessional() == null) && (voProf.getMOSIsNotNull()))
    {
        form.lyrProServices().tabProfessional().chkSupplyHcp().setValue(false);
        // supplied from ref to MOS
        form.lyrProServices().tabProfessional().qmbHcpName().newRow(voProf.getMOS().getHcp(), voProf.getMOS().getHcp().toString());
        form.lyrProServices().tabProfessional().qmbHcpName().setValue(voProf.getMOS().getHcp());
        form.lyrProServices().tabProfessional().txtEmailPro().setValue(voProf.getMOS().getEmailAddress());
        form.lyrProServices().tabProfessional().txtMobilePhPro().setValue(voProf.getMOS().getMobile());

        form.getGlobalContext().COE.setSupportNetworkSelectedLocation(voProf.getCurrentLocation());

        form.lyrProServices().tabProfessional().txtHcpName().setEnabled(false);
        form.lyrProServices().tabProfessional().qmbHcpName().setEnabled(false);
        form.lyrProServices().tabProfessional().txtHcpName().setVisible(false);
        form.lyrProServices().tabProfessional().txtLocation().setVisible(false);
        form.lyrProServices().tabProfessional().qmbHcpName().setVisible(true);
        form.lyrProServices().tabProfessional().cmbLocationHcp().setVisible(true);

        if (voProf.getCurrentLocationIsNotNull())
        {
            form.lyrProServices().tabProfessional().cmbLocationHcp().newRow(voProf.getCurrentLocation(), voProf.getCurrentLocation().getName(), Color.Black);
            form.lyrProServices().tabProfessional().cmbLocationHcp().setValue(voProf.getCurrentLocation());
            showLocationProf();

        }
    }
    else if (voProf.getSuppliedProfessionalIsNotNull())
    {
        form.lyrProServices().tabProfessional().chkSupplyHcp().setValue(true);

        form.lyrProServices().tabProfessional().txtHcpName().setValue(voProf.getSuppliedProfessional().getName());
        form.lyrProServices().tabProfessional().txtLocation().setValue(voProf.getSuppliedProfessional().getServiceLocation());
        form.lyrProServices().tabProfessional().txtAddressPro().setValue(voProf.getSuppliedProfessional().getAddress());
        form.lyrProServices().tabProfessional().txtWorkPh().setValue(voProf.getSuppliedProfessional().getWorkPhone());
        form.lyrProServices().tabProfessional().txtMobilePhPro().setValue(voProf.getSuppliedProfessional().getMobilePhone());
        form.lyrProServices().tabProfessional().txtEmailPro().setValue(voProf.getSuppliedProfessional().getEmailAddress());

        form.lyrProServices().tabProfessional().txtHcpName().setEnabled(false);
        form.lyrProServices().tabProfessional().qmbHcpName().setEnabled(false);
        form.lyrProServices().tabProfessional().txtHcpName().setVisible(true);
        form.lyrProServices().tabProfessional().txtLocation().setVisible(true);
        form.lyrProServices().tabProfessional().qmbHcpName().setVisible(false);
        form.lyrProServices().tabProfessional().cmbLocationHcp().setVisible(false);

    }

    form.lyrProServices().tabProfessional().customControlAuth().setValue(voProf.getAuthorngInfo());

    form.btnUpdate().setEnabled(true);

}
项目:AvoinApotti    文件:Logic.java   
private void enableProfessionalHCPName()
{
    SupportNetworkProfessionalVo voProf = form.getLocalContext().getsupportNetworkProfessional();
    form.lyrProServices().tabProfessional().txtHcpName().setVisible(voProf != null && voProf.getSuppliedProfessionalIsNotNull() ? true : false);
}
项目:AvoinApotti    文件:Logic.java   
private boolean isProfessionalAuthoringHCPEnabled()
{
    SupportNetworkProfessionalVo voSupportNetworkProfessional = form.getLocalContext().getsupportNetworkProfessional();
    return voSupportNetworkProfessional == null || voSupportNetworkProfessional.getID_SupportNetworkProfessional() == null;
}
项目:AvoinApotti    文件:Logic.java   
private void enableProfessionalHCPName()
{
    SupportNetworkProfessionalVo voProf = form.getLocalContext().getSelectedSupportNetworkProfessional();
    form.lyrSupportServices().tabPageProf().txtHcpName().setVisible(voProf != null && voProf.getSuppliedProfessionalIsNotNull() ? true : false);
}
项目:AvoinApotti    文件:Logic.java   
private boolean isProfessionalAuthoringHCPEnabled()
{
    SupportNetworkProfessionalVo voSupportNetworkProfessional = form.getLocalContext().getSelectedSupportNetworkProfessional();
    return voSupportNetworkProfessional == null || voSupportNetworkProfessional.getID_SupportNetworkProfessional() == null;
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException 
{
    if (formName.equals(form.getForms().Core.YesNoDialog) && result.equals(DialogResult.YES))
    {
        if (form.lyrSupportServices().tabPageFamily().isVisible())
        {
            saveFamily(setRecordActive());
            openFamily();
        }
        else if (form.lyrSupportServices().tabPageProf().isVisible())
        {
            SupportNetworkProfessionalVo voProf = form.getLocalContext().getSelectedSupportNetworkProfessional();
            voProf.setIsCurrActiveProfSupp(Boolean.FALSE);
            form.getLocalContext().setSelectedSupportNetworkProfessional(voProf);
            if (saveProfessional(voProf))
            {
                openProfessional();
            }
        }
        else if (form.lyrSupportServices().tabPageServices().isVisible())
        {
            SupportNetworkServicesVo voService = form.getLocalContext().getSelectedSupportNetworkService();
            voService.setIsCurrentlyActive(Boolean.FALSE);
            form.getLocalContext().setSelectedSupportNetworkService(voService);
            if (saveService(voService))
            {
                openServices();
            }
        }

        //WDEV-17337
        form.getLocalContext().setSelectedEvent(EdAssessment_CustomControlsEvents.SAVE);
        form.fireCustomControlValueChanged();
    }
    else //WDEV-17337
    {
        form.getLocalContext().setSelectedEvent(EdAssessment_CustomControlsEvents.CANCEL);
        form.fireCustomControlValueChanged();
    }

}
项目:AvoinApotti    文件:Logic.java   
private void listSupportNetworkProfessional()
{
    //WDEV-14594
    form.getLocalContext().setSelectedRecord(domain.getSupportServices(form.getLocalContext().getSelectedRecord(), form.getLocalContext().getCareContextRef()));

    SupportNetworkProfessionalVoCollection voColl = form.getLocalContext().getSelectedRecord() != null ? form.getLocalContext().getSelectedRecord().getSupportNetworkProfessionals() : null;
    if(voColl == null)
        return;

    SupportNetworkProfessionalVo voProf = null;
    GenForm.lyrSupportServicesLayer.tabPageProfContainer.grdProfessionalRow row = null;

    form.lyrSupportServices().tabPageProf().grdProfessional().getRows().clear();

    boolean bActiveProfessionals = false;
    for (int i = 0; i < voColl.size(); i++)
    {
        voProf = voColl.get(i);

        if(form.lyrSupportServices().tabPageProf().grpProfFilter().getValue().equals(GenForm.lyrSupportServicesLayer.tabPageProfContainer.grpProfFilterEnumeration.rdoActiveProf)
            && voProf.getIsCurrActiveProfSuppIsNotNull()
            && voProf.getIsCurrActiveProfSupp().equals(Boolean.FALSE))
            continue;

        row = form.lyrSupportServices().tabPageProf().grdProfessional().getRows().newRow();

        if (voProf.getMOSIsNotNull())
        {
            row.setColName(voProf.getMOS().toString());
            row.setTooltipForColName(voProf.getMOS().toString());
        }
        else if (voProf.getSuppliedProfessionalIsNotNull())
        {
            row.setColName(voProf.getSuppliedProfessional().getName());
            row.setTooltipForColName(voProf.getSuppliedProfessional().getName());
            row.setColWorkPhone(voProf.getSuppliedProfessional().getWorkPhone());
            row.setTooltipForColWorkPhone(voProf.getSuppliedProfessional().getWorkPhone());
        }

        if (voProf.getHcpSubTypeIsNotNull())
        {
            row.setColProfessionService(voProf.getHcpSubType().getText());
            row.setTooltipForColProfessionService(voProf.getHcpSubType().getText());
        }

        if (voProf.getCurrentLocationIsNotNull() && voProf.getCurrentLocation().getAddressIsNotNull())
        {
            row.setColWorkPhone(voProf.getCurrentLocation().getAddress().getPhone());
            row.setTooltipForColWorkPhone(voProf.getCurrentLocation().getAddress().getPhone());
        }

        if (voProf.getIsCurrActiveProfSupp().booleanValue())
        {
            row.setColIsActive(form.getImages().Core.AnswerBox_Yes);
            bActiveProfessionals = true;
        }
        else
        {
            row.setColIsActive(form.getImages().Core.AnswerBox_No);
            row.setBackColor(Color.LightGray);
        }

        row.setValue(voProf);
    }

    form.getLocalContext().setActiveProfessionals(bActiveProfessionals);

    SupportNetworkProfessionalVo voSupportNetworkProfessional = form.getLocalContext().getSelectedSupportNetworkProfessional();
    if (voSupportNetworkProfessional != null && form.lyrSupportServices().tabPageProf().grdProfessional().getRowByValue(voSupportNetworkProfessional) != null)
    {
        form.lyrSupportServices().tabPageProf().grdProfessional().setValue(voSupportNetworkProfessional);
        grdProSelectionChanged();
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateProfessionalInstanceControl(SupportNetworkProfessionalVo voProf)
{
    clearProfDetails();
    // profession
    if (voProf.getProfessionIsNotNull())
    {
        form.lyrSupportServices().tabPageProf().cmbProfessional().newRow(voProf.getProfession(), voProf.getProfession().getText());
        form.lyrSupportServices().tabPageProf().cmbProfessional().setValue(voProf.getProfession());
    }

    if (voProf.getHcpSubTypeIsNotNull())
    {
        // hcp type
        form.lyrSupportServices().tabPageProf().cmbHcpSubType().newRow(voProf.getHcpSubType(), voProf.getHcpSubType().getText());
        form.lyrSupportServices().tabPageProf().cmbHcpSubType().setValue(voProf.getHcpSubType());
    }

    if ((voProf.getSuppliedProfessional() == null) && (voProf.getMOSIsNotNull()))
    {
        form.lyrSupportServices().tabPageProf().chkSupplyHcp().setValue(false);

        form.lyrSupportServices().tabPageProf().qmbHcpName().setValue(voProf.getMOS().getHcp());
        if (form.lyrSupportServices().tabPageProf().qmbHcpName().getValue() == null
            && voProf.getMOS().getHcpIsNotNull()
            && voProf.getMOS().getHcp().getName() != null)
        {
            form.lyrSupportServices().tabPageProf().qmbHcpName().newRow(voProf.getMOS().getHcp(), voProf.getMOS().getHcp().getName().toString());
            form.lyrSupportServices().tabPageProf().qmbHcpName().setValue(voProf.getMOS().getHcp());
        }

        form.lyrSupportServices().tabPageProf().txtEmailPro().setValue(voProf.getMOS().getEmailAddress());
        form.lyrSupportServices().tabPageProf().txtMobilePhPro().setValue(voProf.getMOS().getMobile());

        form.getGlobalContext().COE.setSupportNetworkSelectedLocation(voProf.getCurrentLocation());

        form.lyrSupportServices().tabPageProf().txtHcpName().setEnabled(false);
        form.lyrSupportServices().tabPageProf().txtHcpName().setVisible(false);
        form.lyrSupportServices().tabPageProf().qmbHcpName().setEnabled(true);
        form.lyrSupportServices().tabPageProf().qmbHcpName().setVisible(true);
        form.lyrSupportServices().tabPageProf().txtLocation().setVisible(false);
        form.lyrSupportServices().tabPageProf().cmbLocationHcp().setVisible(true);

        if (voProf.getCurrentLocationIsNotNull())
        {
            form.lyrSupportServices().tabPageProf().cmbLocationHcp().newRow(voProf.getCurrentLocation(), voProf.getCurrentLocation().getName(), Color.Black);
            form.lyrSupportServices().tabPageProf().cmbLocationHcp().setValue(voProf.getCurrentLocation());
            showLocationProf();
        }
    }
    else if (voProf.getSuppliedProfessionalIsNotNull())
    {
        form.lyrSupportServices().tabPageProf().chkSupplyHcp().setValue(true);

        form.lyrSupportServices().tabPageProf().txtHcpName().setValue(voProf.getSuppliedProfessional().getName());
        form.lyrSupportServices().tabPageProf().txtLocation().setValue(voProf.getSuppliedProfessional().getServiceLocation());
        form.lyrSupportServices().tabPageProf().txtAddressPro().setValue(voProf.getSuppliedProfessional().getAddress());
        form.lyrSupportServices().tabPageProf().txtWorkPh().setValue(voProf.getSuppliedProfessional().getWorkPhone());
        form.lyrSupportServices().tabPageProf().txtMobilePhPro().setValue(voProf.getSuppliedProfessional().getMobilePhone());
        form.lyrSupportServices().tabPageProf().txtEmailPro().setValue(voProf.getSuppliedProfessional().getEmailAddress());

        form.lyrSupportServices().tabPageProf().txtHcpName().setEnabled(true);
        form.lyrSupportServices().tabPageProf().txtHcpName().setVisible(true);
        form.lyrSupportServices().tabPageProf().qmbHcpName().setEnabled(false);
        form.lyrSupportServices().tabPageProf().qmbHcpName().setVisible(false);
        form.lyrSupportServices().tabPageProf().txtLocation().setVisible(true);
        form.lyrSupportServices().tabPageProf().cmbLocationHcp().setVisible(false);
    }

    form.lyrSupportServices().tabPageProf().customControlAuth().setValue(voProf.getAuthorngInfo());
}
项目:AvoinApotti    文件:Logic.java   
private boolean saveProfessional(SupportNetworkProfessionalVo supportNetworkProf) 
{
    if (form.getLocalContext().getSelectedRecord() == null)
        populateBaseDischargeServices();

    ArrayList<String> screenErrors = new ArrayList<String>();

    if (form.lyrSupportServices().tabPageProf().cmbProfessional().getValue() == null)
        screenErrors.add("Profession is mandatory");

    if (form.lyrSupportServices().tabPageProf().cmbHcpSubType().getValue() == null)
        screenErrors.add("Type is mandatory");

    if (form.lyrSupportServices().tabPageProf().qmbHcpName().isEnabled() && (!form.lyrSupportServices().tabPageProf().chkSupplyHcp().getValue()) && (form.lyrSupportServices().tabPageProf().qmbHcpName().getValue() == null) )
        screenErrors.add("HCP Name is mandatory");
    else if (form.lyrSupportServices().tabPageProf().txtHcpName().isEnabled() && (form.lyrSupportServices().tabPageProf().chkSupplyHcp().getValue()) && (form.lyrSupportServices().tabPageProf().txtHcpName().getValue() == null))
        screenErrors.add("HCP Name is mandatory");

    if (form.lyrSupportServices().tabPageProf().customControlAuth().getValue()==null)
    {
        screenErrors.add("Authoring HCP and Date/Time are mandatory");
    }

    String[] sScreenErrors = screenErrors(screenErrors);
    if(sScreenErrors.length > 0)
    {
        engine.showErrors(sScreenErrors);
        return false;
    }

    SupportNetworkProfessionalVo voSupportProfessional = null;
    if (supportNetworkProf == null)
        voSupportProfessional = populateProfessionalInstanceData();
    else
        voSupportProfessional = supportNetworkProf;

    //WDEV-14594
    String[] arrErrorsProf = voSupportProfessional.validate();
    if(arrErrorsProf != null)
    {
        engine.showErrors(arrErrorsProf);
        return false;
    }

    if (form.getLocalContext().getSelectedRecord().getSupportNetworkProfessionals() == null)
        form.getLocalContext().getSelectedRecord().setSupportNetworkProfessionals(new SupportNetworkProfessionalVoCollection());

    if (form.getLocalContext().getSelectedRecord().getSupportNetworkProfessionals().indexOf(voSupportProfessional) >= 0)
        form.getLocalContext().getSelectedRecord().getSupportNetworkProfessionals().set(form.getLocalContext().getSelectedRecord().getSupportNetworkProfessionals().indexOf(voSupportProfessional), voSupportProfessional);
    else
        form.getLocalContext().getSelectedRecord().getSupportNetworkProfessionals().add(voSupportProfessional);


    String[] arrErrors = form.getLocalContext().getSelectedRecord().validate();
    if(arrErrors != null)
    {
        engine.showErrors(arrErrors);
        return false;
    }

    try 
    {
        form.getLocalContext().setSelectedRecord(domain.saveSupportServices(form.getLocalContext().getSelectedRecord()));
    } 
    catch (StaleObjectException e) 
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        openSupportServices();
        return false;
    }

    savePatientNoSupportNetworkStatusInfo(false);

    return true;
}
项目:openMAXIMS    文件:Logic.java   
protected void onCmbEpisodeValueChanged() throws PresentationLogicException 
{
    form.grdProfessional().getRows().clear();
    //09/09/2005 - check for null
    CareContextShortVo voCareContextShort = form.cmbEpisode().getValue();
    if(voCareContextShort == null)
        return;
    SupportNetworkProfessionalVoCollection voColl = domain.listSupportNetworkProfessionalByCareContext(voCareContextShort, Boolean.TRUE);

    SupportNetworkProfessionalVo voProf = null;
    GenForm.grdProfessionalRow row = null;


    if(voColl == null)
        return;

    for(int i = 0 ; i < voColl.size() ; i++)
    {
        voProf = voColl.get(i);
        row = form.grdProfessional().getRows().newRow();

        if(voProf.getMOS() != null)
        {
            row.setName(voProf.getMOS().toString());
            if(voProf.getHcpSubType() != null)
                row.setProfession(voProf.getHcpSubType().getText());

            MemberOfStaffVo voMos = domain.getMos(voProf.getMOS());

            if(voMos != null && voMos.getLocations() != null)
            {
                for(int k = 0 ; k < voMos.getLocations().size() ; k++)
                {
                    if (voMos.getLocations().get(k).getIsPrimaryIsNotNull() && voMos.getLocations().get(k).getIsPrimary().equals(Boolean.TRUE))
                        if (voMos.getLocations().get(k).getLocation().getAddressIsNotNull())
                            row.setPhone(voMos.getLocations().get(k).getLocation().getAddress().getPhone());
                }
            }
        }

        row.setSelect(true);
        row.setValue(voProf);
    }           
}
项目:openMAXIMS    文件:Logic.java   
private void listSupportNetworkProfessional(boolean bFromPrevoiousEpisode)
{
    SupportNetworkProfessionalVoCollection voColl = null;
    if (bFromPrevoiousEpisode == false)
    {
        Boolean bActiveOnly = Boolean.FALSE;
        if (form.lyrProServices().tabProfessional().grpProfFilter().getValue().equals(GenForm.lyrProServicesLayer.tabProfessionalContainer.grpProfFilterEnumeration.rdoActiveProf))
            bActiveOnly = Boolean.TRUE;

        /*
         * if(form.getGlobalContext().Core.getCurrentCareContextIsNotNull())
         * voColl =
         * domain.listSupportNetworkProfessionalByCareContext(form.getGlobalContext().Core.getCurrentCareContext(),
         * bActiveOnly); else voColl =
         * domain.listSupportNetworkProfessionalByPatient(bActiveOnly,
         * form.getGlobalContext().Core.getPatientShort());
         */

        // WDEV-2257 - previous commented code did it selectively by
        // CareContext or Patient
        voColl = domain.listSupportNetworkProfessionalByPatient(bActiveOnly, form.getGlobalContext().Core.getPatientShort());
    }
    else
    {
        voColl = form.getGlobalContext().COE.getSupportNetworkProfessionalCollection();
    }

    SupportNetworkProfessionalVo voProf = null;
    GenForm.lyrProServicesLayer.tabProfessionalContainer.grdProfessionalRow row = null;

    form.lyrProServices().tabProfessional().grdProfessional().getRows().clear();

    if (voColl == null)
        return;

    boolean bActiveProfessionals = false;
    for (int i = 0; i < voColl.size(); i++)
    {
        voProf = voColl.get(i);
        row = form.lyrProServices().tabProfessional().grdProfessional().getRows().newRow();

        if (voProf.getMOSIsNotNull())
        {
            row.setColName(voProf.getMOS().toString());
        }
        else if (voProf.getSuppliedProfessionalIsNotNull())
        {
            row.setColName(voProf.getSuppliedProfessional().getName());
            row.setColWorkPhone(voProf.getSuppliedProfessional().getWorkPhone());
        }

        if (voProf.getHcpSubTypeIsNotNull())
            row.setColProfessionService(voProf.getHcpSubType().getText());

        if (voProf.getCurrentLocationIsNotNull() && voProf.getCurrentLocation().getAddressIsNotNull())
        {
            row.setColWorkPhone(voProf.getCurrentLocation().getAddress().getPhone());
        }

        if (voProf.getIsCurrActiveProfSupp().booleanValue()){
            row.setColIsActive(form.getImages().Core.AnswerBox_Yes);
            bActiveProfessionals = true;
        }
        else
        {
            row.setColIsActive(form.getImages().Core.AnswerBox_No);
            row.setBackColor(Color.LightGray);
        }

        row.setValue(voProf);
    }

    form.getLocalContext().setActiveProfessionals(bActiveProfessionals);

    SupportNetworkProfessionalVo voSupportNetworkProfessional = form.getLocalContext().getsupportNetworkProfessional();
    if (voSupportNetworkProfessional != null && form.lyrProServices().tabProfessional().grdProfessional().getRowByValue(voSupportNetworkProfessional) != null)
    {
        form.lyrProServices().tabProfessional().grdProfessional().setValue(voSupportNetworkProfessional);
        grdProSelectionChanged();
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean saveProfessional()
{
    SupportNetworkProfessionalVo voProf = form.getLocalContext().getsupportNetworkProfessional();

    ArrayList<String> screenErrors = new ArrayList<String>();

    if (form.lyrProServices().tabProfessional().cmbProfessional().getValue() == null)
    {
        screenErrors.add("Profession is mandatory");
    }

    if (form.lyrProServices().tabProfessional().cmbHcpSubType().getValue() == null)
    {
        screenErrors.add("Type is mandatory");
    }

    if ((!form.lyrProServices().tabProfessional().chkSupplyHcp().getValue()) && form.lyrProServices().tabProfessional().qmbHcpName().isEnabled() && form.lyrProServices().tabProfessional().qmbHcpName().getValue() == null)
    {
        screenErrors.add("Hcp Name is mandatory");
    }
    else if ((form.lyrProServices().tabProfessional().chkSupplyHcp().getValue()) && (form.lyrProServices().tabProfessional().txtHcpName().getValue() == null))
    {
        screenErrors.add("Hcp Name is mandatory");
    }

    String[] sScreenErrors = screenErrors(screenErrors);
    String[] arrErrors = voProf.validate(sScreenErrors);
    if(arrErrors!=null)
    {
        engine.showErrors(arrErrors);
        SupportNetworkProfessionalVo voProfessional = new SupportNetworkProfessionalVo();
        form.getLocalContext().setsupportNetworkProfessional(voProfessional);
        return false;
    }

    try
    {
        // WDEV-2257 - save based on Patient Only
        domain.saveSupportNetworkProfessionaForPatient(voProf, form.getGlobalContext().Core.getPatientShort());
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }

    savePatientNoSupportNetworkStatusInfo(false);

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private void populateProfessionalDataFromScreen()
{
    SupportNetworkProfessionalVo voProf = form.getLocalContext().getsupportNetworkProfessional();

    if(voProf.getIsCurrActiveProfSupp()==null)
        voProf.setIsCurrActiveProfSupp(Boolean.TRUE);

    // Professional details
    if (form.lyrProServices().tabProfessional().chkSupplyHcp().getValue())
    {
        if (voProf.getSuppliedProfessional() == null)
        {
            voProf.setProfession(form.lyrProServices().tabProfessional().cmbProfessional().getValue());
            voProf.setHcpSubType(form.lyrProServices().tabProfessional().cmbHcpSubType().getValue());
            voProf.setAuthorngInfo(form.lyrProServices().tabProfessional().customControlAuth().getValue());

            SuppNetworkServiceProfessionDetailVo voNetProfDetail = new SuppNetworkServiceProfessionDetailVo();
            voNetProfDetail.setAddress(form.lyrProServices().tabProfessional().txtAddressPro().getValue());
            voNetProfDetail.setEmailAddress(form.lyrProServices().tabProfessional().txtEmailPro().getValue());
            voNetProfDetail.setMobilePhone(form.lyrProServices().tabProfessional().txtMobilePhPro().getValue());
            voNetProfDetail.setName(form.lyrProServices().tabProfessional().txtHcpName().getValue());
            voNetProfDetail.setServiceLocation(form.lyrProServices().tabProfessional().txtLocation().getValue());
            voNetProfDetail.setWorkPhone(form.lyrProServices().tabProfessional().txtWorkPh().getValue());
            voProf.setSuppliedProfessional(voNetProfDetail);
            voProf.setMOS(null);
            voProf.setCurrentLocation(null);
        }
        else
        {
            // update location & details
            voProf.getSuppliedProfessional().setServiceLocation(form.lyrProServices().tabProfessional().txtLocation().getValue());
            voProf.getSuppliedProfessional().setAddress(form.lyrProServices().tabProfessional().txtAddressPro().getValue());
            voProf.getSuppliedProfessional().setMobilePhone(form.lyrProServices().tabProfessional().txtMobilePhPro().getValue());
            voProf.getSuppliedProfessional().setWorkPhone(form.lyrProServices().tabProfessional().txtWorkPh().getValue());
            voProf.getSuppliedProfessional().setEmailAddress(form.lyrProServices().tabProfessional().txtEmailPro().getValue());
            voProf.getSuppliedProfessional().setName(form.lyrProServices().tabProfessional().txtHcpName().getValue()); //WDEV-17560
        }
    }
    else
    {
        if (voProf.getMOS() == null)
        {
            voProf.setProfession(form.lyrProServices().tabProfessional().cmbProfessional().getValue());
            voProf.setHcpSubType(form.lyrProServices().tabProfessional().cmbHcpSubType().getValue());
            voProf.setAuthorngInfo(form.lyrProServices().tabProfessional().customControlAuth().getValue());

            MemberOfStaffShortVo voMOSShort = new MemberOfStaffShortVo();

            if (form.getLocalContext().getvoMemberOfStaffShort() != null)
                voMOSShort = form.getLocalContext().getvoMemberOfStaffShort();
            else
            {
                voMOSShort.setHcp(form.lyrProServices().tabProfessional().qmbHcpName().getValue());
                if (voMOSShort.getHcpIsNotNull())
                {
                    voMOSShort.setName(voMOSShort.getHcp().getName());
                    if (voMOSShort.getHcp().getMosIsNotNull())
                    {
                        voMOSShort.setPasCode(voMOSShort.getHcp().getMos().getPasCode());
                        voMOSShort.setEmailAddress(voMOSShort.getHcp().getMos().getEmailAddress());
                        voMOSShort.setBleep(voMOSShort.getHcp().getMos().getBleep());
                    }
                }
            }
            voProf.setMOS(voMOSShort.countFieldsWithValue() > 0 ? voMOSShort : null);
            voProf.setSuppliedProfessional(null);
            voProf.setCurrentLocation(form.lyrProServices().tabProfessional().cmbLocationHcp().getValue());
        }
        else
        {
            // update location only
            voProf.setCurrentLocation(form.lyrProServices().tabProfessional().cmbLocationHcp().getValue());
        }
    }

    form.getLocalContext().setsupportNetworkProfessional(voProf);
}
项目:openMAXIMS    文件:Logic.java   
private void populateInstanceControl(SupportNetworkProfessionalVo voProf)
{
    clearProfDetails();
    form.getLocalContext().setRieRecord(voProf);
    form.getContextMenus().getLIPUpdateItem().setVisible(true);

    // profession
    if (voProf.getProfessionIsNotNull())
    {
        form.lyrProServices().tabProfessional().cmbProfessional().newRow(voProf.getProfession(), voProf.getProfession().getText());
        form.lyrProServices().tabProfessional().cmbProfessional().setValue(voProf.getProfession());
    }

    if (voProf.getHcpSubTypeIsNotNull())
    {
        // hcp type
        form.lyrProServices().tabProfessional().cmbHcpSubType().newRow(voProf.getHcpSubType(), voProf.getHcpSubType().getText());
        form.lyrProServices().tabProfessional().cmbHcpSubType().setValue(voProf.getHcpSubType());
    }

    if ((voProf.getSuppliedProfessional() == null) && (voProf.getMOSIsNotNull()))
    {
        form.lyrProServices().tabProfessional().chkSupplyHcp().setValue(false);
        // supplied from ref to MOS
        form.lyrProServices().tabProfessional().qmbHcpName().newRow(voProf.getMOS().getHcp(), voProf.getMOS().getHcp().toString());
        form.lyrProServices().tabProfessional().qmbHcpName().setValue(voProf.getMOS().getHcp());
        form.lyrProServices().tabProfessional().txtEmailPro().setValue(voProf.getMOS().getEmailAddress());
        form.lyrProServices().tabProfessional().txtMobilePhPro().setValue(voProf.getMOS().getMobile());

        form.getGlobalContext().COE.setSupportNetworkSelectedLocation(voProf.getCurrentLocation());

        form.lyrProServices().tabProfessional().txtHcpName().setEnabled(false);
        form.lyrProServices().tabProfessional().qmbHcpName().setEnabled(false);
        form.lyrProServices().tabProfessional().txtHcpName().setVisible(false);
        form.lyrProServices().tabProfessional().txtLocation().setVisible(false);
        form.lyrProServices().tabProfessional().qmbHcpName().setVisible(true);
        form.lyrProServices().tabProfessional().cmbLocationHcp().setVisible(true);

        if (voProf.getCurrentLocationIsNotNull())
        {
            form.lyrProServices().tabProfessional().cmbLocationHcp().newRow(voProf.getCurrentLocation(), voProf.getCurrentLocation().getName(), Color.Black);
            form.lyrProServices().tabProfessional().cmbLocationHcp().setValue(voProf.getCurrentLocation());
            showLocationProf();

        }
    }
    else if (voProf.getSuppliedProfessionalIsNotNull())
    {
        form.lyrProServices().tabProfessional().chkSupplyHcp().setValue(true);

        form.lyrProServices().tabProfessional().txtHcpName().setValue(voProf.getSuppliedProfessional().getName());
        form.lyrProServices().tabProfessional().txtLocation().setValue(voProf.getSuppliedProfessional().getServiceLocation());
        form.lyrProServices().tabProfessional().txtAddressPro().setValue(voProf.getSuppliedProfessional().getAddress());
        form.lyrProServices().tabProfessional().txtWorkPh().setValue(voProf.getSuppliedProfessional().getWorkPhone());
        form.lyrProServices().tabProfessional().txtMobilePhPro().setValue(voProf.getSuppliedProfessional().getMobilePhone());
        form.lyrProServices().tabProfessional().txtEmailPro().setValue(voProf.getSuppliedProfessional().getEmailAddress());

        form.lyrProServices().tabProfessional().txtHcpName().setEnabled(false);
        form.lyrProServices().tabProfessional().qmbHcpName().setEnabled(false);
        form.lyrProServices().tabProfessional().txtHcpName().setVisible(true);
        form.lyrProServices().tabProfessional().txtLocation().setVisible(true);
        form.lyrProServices().tabProfessional().qmbHcpName().setVisible(false);
        form.lyrProServices().tabProfessional().cmbLocationHcp().setVisible(false);

    }

    form.lyrProServices().tabProfessional().customControlAuth().setValue(voProf.getAuthorngInfo());

    form.btnUpdate().setEnabled(true);

}
项目:openMAXIMS    文件:Logic.java   
private void enableProfessionalHCPName()
{
    SupportNetworkProfessionalVo voProf = form.getLocalContext().getsupportNetworkProfessional();
    form.lyrProServices().tabProfessional().txtHcpName().setVisible(voProf != null && voProf.getSuppliedProfessionalIsNotNull() ? true : false);
}
项目:openMAXIMS    文件:Logic.java   
private boolean isProfessionalAuthoringHCPEnabled()
{
    SupportNetworkProfessionalVo voSupportNetworkProfessional = form.getLocalContext().getsupportNetworkProfessional();
    return voSupportNetworkProfessional == null || voSupportNetworkProfessional.getID_SupportNetworkProfessional() == null;
}
项目:openMAXIMS    文件:Logic.java   
private void enableProfessionalHCPName()
{
    SupportNetworkProfessionalVo voProf = form.getLocalContext().getSelectedSupportNetworkProfessional();
    form.lyrSupportServices().tabPageProf().txtHcpName().setVisible(voProf != null && voProf.getSuppliedProfessionalIsNotNull() ? true : false);
}
项目:openMAXIMS    文件:Logic.java   
private boolean isProfessionalAuthoringHCPEnabled()
{
    SupportNetworkProfessionalVo voSupportNetworkProfessional = form.getLocalContext().getSelectedSupportNetworkProfessional();
    return voSupportNetworkProfessional == null || voSupportNetworkProfessional.getID_SupportNetworkProfessional() == null;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException 
{
    if (formName.equals(form.getForms().Core.YesNoDialog) && result.equals(DialogResult.YES))
    {
        if (form.lyrSupportServices().tabPageFamily().isVisible())
        {
            saveFamily(setRecordActive());
            openFamily();
        }
        else if (form.lyrSupportServices().tabPageProf().isVisible())
        {
            SupportNetworkProfessionalVo voProf = form.getLocalContext().getSelectedSupportNetworkProfessional();
            voProf.setIsCurrActiveProfSupp(Boolean.FALSE);
            form.getLocalContext().setSelectedSupportNetworkProfessional(voProf);
            if (saveProfessional(voProf))
            {
                openProfessional();
            }
        }
        else if (form.lyrSupportServices().tabPageServices().isVisible())
        {
            SupportNetworkServicesVo voService = form.getLocalContext().getSelectedSupportNetworkService();
            voService.setIsCurrentlyActive(Boolean.FALSE);
            form.getLocalContext().setSelectedSupportNetworkService(voService);
            if (saveService(voService))
            {
                openServices();
            }
        }

        //WDEV-17337
        form.getLocalContext().setSelectedEvent(EdAssessment_CustomControlsEvents.SAVE);
        form.fireCustomControlValueChanged();
    }
    else //WDEV-17337
    {
        form.getLocalContext().setSelectedEvent(EdAssessment_CustomControlsEvents.CANCEL);
        form.fireCustomControlValueChanged();
    }

}
项目:openMAXIMS    文件:Logic.java   
private void listSupportNetworkProfessional()
{
    //WDEV-14594
    form.getLocalContext().setSelectedRecord(domain.getSupportServices(form.getLocalContext().getSelectedRecord(), form.getLocalContext().getCareContextRef()));

    SupportNetworkProfessionalVoCollection voColl = form.getLocalContext().getSelectedRecord() != null ? form.getLocalContext().getSelectedRecord().getSupportNetworkProfessionals() : null;
    if(voColl == null)
        return;

    SupportNetworkProfessionalVo voProf = null;
    GenForm.lyrSupportServicesLayer.tabPageProfContainer.grdProfessionalRow row = null;

    form.lyrSupportServices().tabPageProf().grdProfessional().getRows().clear();

    boolean bActiveProfessionals = false;
    for (int i = 0; i < voColl.size(); i++)
    {
        voProf = voColl.get(i);

        if(form.lyrSupportServices().tabPageProf().grpProfFilter().getValue().equals(GenForm.lyrSupportServicesLayer.tabPageProfContainer.grpProfFilterEnumeration.rdoActiveProf)
            && voProf.getIsCurrActiveProfSuppIsNotNull()
            && voProf.getIsCurrActiveProfSupp().equals(Boolean.FALSE))
            continue;

        row = form.lyrSupportServices().tabPageProf().grdProfessional().getRows().newRow();

        if (voProf.getMOSIsNotNull())
        {
            row.setColName(voProf.getMOS().toString());
            row.setTooltipForColName(voProf.getMOS().toString());
        }
        else if (voProf.getSuppliedProfessionalIsNotNull())
        {
            row.setColName(voProf.getSuppliedProfessional().getName());
            row.setTooltipForColName(voProf.getSuppliedProfessional().getName());
            row.setColWorkPhone(voProf.getSuppliedProfessional().getWorkPhone());
            row.setTooltipForColWorkPhone(voProf.getSuppliedProfessional().getWorkPhone());
        }

        if (voProf.getHcpSubTypeIsNotNull())
        {
            row.setColProfessionService(voProf.getHcpSubType().getText());
            row.setTooltipForColProfessionService(voProf.getHcpSubType().getText());
        }

        if (voProf.getCurrentLocationIsNotNull() && voProf.getCurrentLocation().getAddressIsNotNull())
        {
            row.setColWorkPhone(voProf.getCurrentLocation().getAddress().getPhone());
            row.setTooltipForColWorkPhone(voProf.getCurrentLocation().getAddress().getPhone());
        }

        if (voProf.getIsCurrActiveProfSupp().booleanValue())
        {
            row.setColIsActive(form.getImages().Core.AnswerBox_Yes);
            bActiveProfessionals = true;
        }
        else
        {
            row.setColIsActive(form.getImages().Core.AnswerBox_No);
            row.setBackColor(Color.LightGray);
        }

        row.setValue(voProf);
    }

    form.getLocalContext().setActiveProfessionals(bActiveProfessionals);

    SupportNetworkProfessionalVo voSupportNetworkProfessional = form.getLocalContext().getSelectedSupportNetworkProfessional();
    if (voSupportNetworkProfessional != null && form.lyrSupportServices().tabPageProf().grdProfessional().getRowByValue(voSupportNetworkProfessional) != null)
    {
        form.lyrSupportServices().tabPageProf().grdProfessional().setValue(voSupportNetworkProfessional);
        grdProSelectionChanged();
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateProfessionalInstanceControl(SupportNetworkProfessionalVo voProf)
{
    clearProfDetails();
    // profession
    if (voProf.getProfessionIsNotNull())
    {
        form.lyrSupportServices().tabPageProf().cmbProfessional().newRow(voProf.getProfession(), voProf.getProfession().getText());
        form.lyrSupportServices().tabPageProf().cmbProfessional().setValue(voProf.getProfession());
    }

    if (voProf.getHcpSubTypeIsNotNull())
    {
        // hcp type
        form.lyrSupportServices().tabPageProf().cmbHcpSubType().newRow(voProf.getHcpSubType(), voProf.getHcpSubType().getText());
        form.lyrSupportServices().tabPageProf().cmbHcpSubType().setValue(voProf.getHcpSubType());
    }

    if ((voProf.getSuppliedProfessional() == null) && (voProf.getMOSIsNotNull()))
    {
        form.lyrSupportServices().tabPageProf().chkSupplyHcp().setValue(false);

        form.lyrSupportServices().tabPageProf().qmbHcpName().setValue(voProf.getMOS().getHcp());
        if (form.lyrSupportServices().tabPageProf().qmbHcpName().getValue() == null
            && voProf.getMOS().getHcpIsNotNull()
            && voProf.getMOS().getHcp().getName() != null)
        {
            form.lyrSupportServices().tabPageProf().qmbHcpName().newRow(voProf.getMOS().getHcp(), voProf.getMOS().getHcp().getName().toString());
            form.lyrSupportServices().tabPageProf().qmbHcpName().setValue(voProf.getMOS().getHcp());
        }

        form.lyrSupportServices().tabPageProf().txtEmailPro().setValue(voProf.getMOS().getEmailAddress());
        form.lyrSupportServices().tabPageProf().txtMobilePhPro().setValue(voProf.getMOS().getMobile());

        form.getGlobalContext().COE.setSupportNetworkSelectedLocation(voProf.getCurrentLocation());

        form.lyrSupportServices().tabPageProf().txtHcpName().setEnabled(false);
        form.lyrSupportServices().tabPageProf().txtHcpName().setVisible(false);
        form.lyrSupportServices().tabPageProf().qmbHcpName().setEnabled(true);
        form.lyrSupportServices().tabPageProf().qmbHcpName().setVisible(true);
        form.lyrSupportServices().tabPageProf().txtLocation().setVisible(false);
        form.lyrSupportServices().tabPageProf().cmbLocationHcp().setVisible(true);

        if (voProf.getCurrentLocationIsNotNull())
        {
            form.lyrSupportServices().tabPageProf().cmbLocationHcp().newRow(voProf.getCurrentLocation(), voProf.getCurrentLocation().getName(), Color.Black);
            form.lyrSupportServices().tabPageProf().cmbLocationHcp().setValue(voProf.getCurrentLocation());
            showLocationProf();
        }
    }
    else if (voProf.getSuppliedProfessionalIsNotNull())
    {
        form.lyrSupportServices().tabPageProf().chkSupplyHcp().setValue(true);

        form.lyrSupportServices().tabPageProf().txtHcpName().setValue(voProf.getSuppliedProfessional().getName());
        form.lyrSupportServices().tabPageProf().txtLocation().setValue(voProf.getSuppliedProfessional().getServiceLocation());
        form.lyrSupportServices().tabPageProf().txtAddressPro().setValue(voProf.getSuppliedProfessional().getAddress());
        form.lyrSupportServices().tabPageProf().txtWorkPh().setValue(voProf.getSuppliedProfessional().getWorkPhone());
        form.lyrSupportServices().tabPageProf().txtMobilePhPro().setValue(voProf.getSuppliedProfessional().getMobilePhone());
        form.lyrSupportServices().tabPageProf().txtEmailPro().setValue(voProf.getSuppliedProfessional().getEmailAddress());

        form.lyrSupportServices().tabPageProf().txtHcpName().setEnabled(true);
        form.lyrSupportServices().tabPageProf().txtHcpName().setVisible(true);
        form.lyrSupportServices().tabPageProf().qmbHcpName().setEnabled(false);
        form.lyrSupportServices().tabPageProf().qmbHcpName().setVisible(false);
        form.lyrSupportServices().tabPageProf().txtLocation().setVisible(true);
        form.lyrSupportServices().tabPageProf().cmbLocationHcp().setVisible(false);
    }

    form.lyrSupportServices().tabPageProf().customControlAuth().setValue(voProf.getAuthorngInfo());
}
项目:openMAXIMS    文件:Logic.java   
private boolean saveProfessional(SupportNetworkProfessionalVo supportNetworkProf) 
{
    if (form.getLocalContext().getSelectedRecord() == null)
        populateBaseDischargeServices();

    ArrayList<String> screenErrors = new ArrayList<String>();

    if (form.lyrSupportServices().tabPageProf().cmbProfessional().getValue() == null)
        screenErrors.add("Profession is mandatory");

    if (form.lyrSupportServices().tabPageProf().cmbHcpSubType().getValue() == null)
        screenErrors.add("Type is mandatory");

    if (form.lyrSupportServices().tabPageProf().qmbHcpName().isEnabled() && (!form.lyrSupportServices().tabPageProf().chkSupplyHcp().getValue()) && (form.lyrSupportServices().tabPageProf().qmbHcpName().getValue() == null) )
        screenErrors.add("HCP Name is mandatory");
    else if (form.lyrSupportServices().tabPageProf().txtHcpName().isEnabled() && (form.lyrSupportServices().tabPageProf().chkSupplyHcp().getValue()) && (form.lyrSupportServices().tabPageProf().txtHcpName().getValue() == null))
        screenErrors.add("HCP Name is mandatory");

    if (form.lyrSupportServices().tabPageProf().customControlAuth().getValue()==null)
    {
        screenErrors.add("Authoring HCP and Date/Time are mandatory");
    }

    String[] sScreenErrors = screenErrors(screenErrors);
    if(sScreenErrors.length > 0)
    {
        engine.showErrors(sScreenErrors);
        return false;
    }

    SupportNetworkProfessionalVo voSupportProfessional = null;
    if (supportNetworkProf == null)
        voSupportProfessional = populateProfessionalInstanceData();
    else
        voSupportProfessional = supportNetworkProf;

    //WDEV-14594
    String[] arrErrorsProf = voSupportProfessional.validate();
    if(arrErrorsProf != null)
    {
        engine.showErrors(arrErrorsProf);
        return false;
    }

    if (form.getLocalContext().getSelectedRecord().getSupportNetworkProfessionals() == null)
        form.getLocalContext().getSelectedRecord().setSupportNetworkProfessionals(new SupportNetworkProfessionalVoCollection());

    if (form.getLocalContext().getSelectedRecord().getSupportNetworkProfessionals().indexOf(voSupportProfessional) >= 0)
        form.getLocalContext().getSelectedRecord().getSupportNetworkProfessionals().set(form.getLocalContext().getSelectedRecord().getSupportNetworkProfessionals().indexOf(voSupportProfessional), voSupportProfessional);
    else
        form.getLocalContext().getSelectedRecord().getSupportNetworkProfessionals().add(voSupportProfessional);


    String[] arrErrors = form.getLocalContext().getSelectedRecord().validate();
    if(arrErrors != null)
    {
        engine.showErrors(arrErrors);
        return false;
    }

    try 
    {
        form.getLocalContext().setSelectedRecord(domain.saveSupportServices(form.getLocalContext().getSelectedRecord()));
    } 
    catch (StaleObjectException e) 
    {
        engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        openSupportServices();
        return false;
    }

    savePatientNoSupportNetworkStatusInfo(false);

    return true;
}
项目:openMAXIMS    文件:Logic.java   
protected void onCmbEpisodeValueChanged() throws PresentationLogicException 
{
    form.grdProfessional().getRows().clear();
    //09/09/2005 - check for null
    CareContextShortVo voCareContextShort = form.cmbEpisode().getValue();
    if(voCareContextShort == null)
        return;
    SupportNetworkProfessionalVoCollection voColl = domain.listSupportNetworkProfessionalByCareContext(voCareContextShort, Boolean.TRUE);

    SupportNetworkProfessionalVo voProf = null;
    GenForm.grdProfessionalRow row = null;


    if(voColl == null)
        return;

    for(int i = 0 ; i < voColl.size() ; i++)
    {
        voProf = voColl.get(i);
        row = form.grdProfessional().getRows().newRow();

        if(voProf.getMOS() != null)
        {
            row.setName(voProf.getMOS().toString());
            if(voProf.getHcpSubType() != null)
                row.setProfession(voProf.getHcpSubType().getText());

            MemberOfStaffVo voMos = domain.getMos(voProf.getMOS());

            if(voMos != null && voMos.getLocations() != null)
            {
                for(int k = 0 ; k < voMos.getLocations().size() ; k++)
                {
                    if (voMos.getLocations().get(k).getIsPrimaryIsNotNull() && voMos.getLocations().get(k).getIsPrimary().equals(Boolean.TRUE))
                        if (voMos.getLocations().get(k).getLocation().getAddressIsNotNull())
                            row.setPhone(voMos.getLocations().get(k).getLocation().getAddress().getPhone());
                }
            }
        }

        row.setSelect(true);
        row.setValue(voProf);
    }           
}
项目:openMAXIMS    文件:Logic.java   
private void listSupportNetworkProfessional(boolean bFromPrevoiousEpisode)
{
    SupportNetworkProfessionalVoCollection voColl = null;
    if (bFromPrevoiousEpisode == false)
    {
        Boolean bActiveOnly = Boolean.FALSE;
        if (form.lyrProServices().tabProfessional().grpProfFilter().getValue().equals(GenForm.lyrProServicesLayer.tabProfessionalContainer.grpProfFilterEnumeration.rdoActiveProf))
            bActiveOnly = Boolean.TRUE;

        /*
         * if(form.getGlobalContext().Core.getCurrentCareContextIsNotNull())
         * voColl =
         * domain.listSupportNetworkProfessionalByCareContext(form.getGlobalContext().Core.getCurrentCareContext(),
         * bActiveOnly); else voColl =
         * domain.listSupportNetworkProfessionalByPatient(bActiveOnly,
         * form.getGlobalContext().Core.getPatientShort());
         */

        // WDEV-2257 - previous commented code did it selectively by
        // CareContext or Patient
        voColl = domain.listSupportNetworkProfessionalByPatient(bActiveOnly, form.getGlobalContext().Core.getPatientShort());
    }
    else
    {
        voColl = form.getGlobalContext().COE.getSupportNetworkProfessionalCollection();
    }

    SupportNetworkProfessionalVo voProf = null;
    GenForm.lyrProServicesLayer.tabProfessionalContainer.grdProfessionalRow row = null;

    form.lyrProServices().tabProfessional().grdProfessional().getRows().clear();

    if (voColl == null)
        return;

    boolean bActiveProfessionals = false;
    for (int i = 0; i < voColl.size(); i++)
    {
        voProf = voColl.get(i);
        row = form.lyrProServices().tabProfessional().grdProfessional().getRows().newRow();

        if (voProf.getMOSIsNotNull())
        {
            row.setColName(voProf.getMOS().toString());
        }
        else if (voProf.getSuppliedProfessionalIsNotNull())
        {
            row.setColName(voProf.getSuppliedProfessional().getName());
            row.setColWorkPhone(voProf.getSuppliedProfessional().getWorkPhone());
        }

        if (voProf.getHcpSubTypeIsNotNull())
            row.setColProfessionService(voProf.getHcpSubType().getText());

        if (voProf.getCurrentLocationIsNotNull() && voProf.getCurrentLocation().getAddressIsNotNull())
        {
            row.setColWorkPhone(voProf.getCurrentLocation().getAddress().getPhone());
        }

        if (voProf.getIsCurrActiveProfSupp().booleanValue()){
            row.setColIsActive(form.getImages().Core.AnswerBox_Yes);
            bActiveProfessionals = true;
        }
        else
        {
            row.setColIsActive(form.getImages().Core.AnswerBox_No);
            row.setBackColor(Color.LightGray);
        }

        row.setValue(voProf);
    }

    form.getLocalContext().setActiveProfessionals(bActiveProfessionals);

    SupportNetworkProfessionalVo voSupportNetworkProfessional = form.getLocalContext().getsupportNetworkProfessional();
    if (voSupportNetworkProfessional != null && form.lyrProServices().tabProfessional().grdProfessional().getRowByValue(voSupportNetworkProfessional) != null)
    {
        form.lyrProServices().tabProfessional().grdProfessional().setValue(voSupportNetworkProfessional);
        grdProSelectionChanged();
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean saveProfessional()
{
    SupportNetworkProfessionalVo voProf = form.getLocalContext().getsupportNetworkProfessional();

    ArrayList<String> screenErrors = new ArrayList<String>();

    if (form.lyrProServices().tabProfessional().cmbProfessional().getValue() == null)
    {
        screenErrors.add("Profession is mandatory");
    }

    if (form.lyrProServices().tabProfessional().cmbHcpSubType().getValue() == null)
    {
        screenErrors.add("Type is mandatory");
    }

    if ((!form.lyrProServices().tabProfessional().chkSupplyHcp().getValue()) && form.lyrProServices().tabProfessional().qmbHcpName().isEnabled() && form.lyrProServices().tabProfessional().qmbHcpName().getValue() == null)
    {
        screenErrors.add("Hcp Name is mandatory");
    }
    else if ((form.lyrProServices().tabProfessional().chkSupplyHcp().getValue()) && (form.lyrProServices().tabProfessional().txtHcpName().getValue() == null))
    {
        screenErrors.add("Hcp Name is mandatory");
    }

    String[] sScreenErrors = screenErrors(screenErrors);
    String[] arrErrors = voProf.validate(sScreenErrors);
    if(arrErrors!=null)
    {
        engine.showErrors(arrErrors);
        SupportNetworkProfessionalVo voProfessional = new SupportNetworkProfessionalVo();
        form.getLocalContext().setsupportNetworkProfessional(voProfessional);
        return false;
    }

    try
    {
        // WDEV-2257 - save based on Patient Only
        domain.saveSupportNetworkProfessionaForPatient(voProf, form.getGlobalContext().Core.getPatientShort());
    }
    catch (StaleObjectException e)
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }

    savePatientNoSupportNetworkStatusInfo(false);

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private void populateProfessionalDataFromScreen()
{
    SupportNetworkProfessionalVo voProf = form.getLocalContext().getsupportNetworkProfessional();

    if(voProf.getIsCurrActiveProfSupp()==null)
        voProf.setIsCurrActiveProfSupp(Boolean.TRUE);

    // Professional details
    if (form.lyrProServices().tabProfessional().chkSupplyHcp().getValue())
    {
        if (voProf.getSuppliedProfessional() == null)
        {
            voProf.setProfession(form.lyrProServices().tabProfessional().cmbProfessional().getValue());
            voProf.setHcpSubType(form.lyrProServices().tabProfessional().cmbHcpSubType().getValue());
            voProf.setAuthorngInfo(form.lyrProServices().tabProfessional().customControlAuth().getValue());

            SuppNetworkServiceProfessionDetailVo voNetProfDetail = new SuppNetworkServiceProfessionDetailVo();
            voNetProfDetail.setAddress(form.lyrProServices().tabProfessional().txtAddressPro().getValue());
            voNetProfDetail.setEmailAddress(form.lyrProServices().tabProfessional().txtEmailPro().getValue());
            voNetProfDetail.setMobilePhone(form.lyrProServices().tabProfessional().txtMobilePhPro().getValue());
            voNetProfDetail.setName(form.lyrProServices().tabProfessional().txtHcpName().getValue());
            voNetProfDetail.setServiceLocation(form.lyrProServices().tabProfessional().txtLocation().getValue());
            voNetProfDetail.setWorkPhone(form.lyrProServices().tabProfessional().txtWorkPh().getValue());
            voProf.setSuppliedProfessional(voNetProfDetail);
            voProf.setMOS(null);
            voProf.setCurrentLocation(null);
        }
        else
        {
            // update location & details
            voProf.getSuppliedProfessional().setServiceLocation(form.lyrProServices().tabProfessional().txtLocation().getValue());
            voProf.getSuppliedProfessional().setAddress(form.lyrProServices().tabProfessional().txtAddressPro().getValue());
            voProf.getSuppliedProfessional().setMobilePhone(form.lyrProServices().tabProfessional().txtMobilePhPro().getValue());
            voProf.getSuppliedProfessional().setWorkPhone(form.lyrProServices().tabProfessional().txtWorkPh().getValue());
            voProf.getSuppliedProfessional().setEmailAddress(form.lyrProServices().tabProfessional().txtEmailPro().getValue());
            voProf.getSuppliedProfessional().setName(form.lyrProServices().tabProfessional().txtHcpName().getValue()); //WDEV-17560
        }
    }
    else
    {
        if (voProf.getMOS() == null)
        {
            voProf.setProfession(form.lyrProServices().tabProfessional().cmbProfessional().getValue());
            voProf.setHcpSubType(form.lyrProServices().tabProfessional().cmbHcpSubType().getValue());
            voProf.setAuthorngInfo(form.lyrProServices().tabProfessional().customControlAuth().getValue());

            MemberOfStaffShortVo voMOSShort = new MemberOfStaffShortVo();

            if (form.getLocalContext().getvoMemberOfStaffShort() != null)
                voMOSShort = form.getLocalContext().getvoMemberOfStaffShort();
            else
            {
                voMOSShort.setHcp(form.lyrProServices().tabProfessional().qmbHcpName().getValue());
                if (voMOSShort.getHcpIsNotNull())
                {
                    voMOSShort.setName(voMOSShort.getHcp().getName());
                    if (voMOSShort.getHcp().getMosIsNotNull())
                    {
                        voMOSShort.setPasCode(voMOSShort.getHcp().getMos().getPasCode());
                        voMOSShort.setEmailAddress(voMOSShort.getHcp().getMos().getEmailAddress());
                        voMOSShort.setBleep(voMOSShort.getHcp().getMos().getBleep());
                    }
                }
            }
            voProf.setMOS(voMOSShort.countFieldsWithValue() > 0 ? voMOSShort : null);
            voProf.setSuppliedProfessional(null);
            voProf.setCurrentLocation(form.lyrProServices().tabProfessional().cmbLocationHcp().getValue());
        }
        else
        {
            // update location only
            voProf.setCurrentLocation(form.lyrProServices().tabProfessional().cmbLocationHcp().getValue());
        }
    }

    form.getLocalContext().setsupportNetworkProfessional(voProf);
}
项目:openMAXIMS    文件:Logic.java   
private void populateInstanceControl(SupportNetworkProfessionalVo voProf)
{
    clearProfDetails();
    form.getLocalContext().setRieRecord(voProf);
    form.getContextMenus().getLIPUpdateItem().setVisible(true);

    // profession
    if (voProf.getProfessionIsNotNull())
    {
        form.lyrProServices().tabProfessional().cmbProfessional().newRow(voProf.getProfession(), voProf.getProfession().getText());
        form.lyrProServices().tabProfessional().cmbProfessional().setValue(voProf.getProfession());
    }

    if (voProf.getHcpSubTypeIsNotNull())
    {
        // hcp type
        form.lyrProServices().tabProfessional().cmbHcpSubType().newRow(voProf.getHcpSubType(), voProf.getHcpSubType().getText());
        form.lyrProServices().tabProfessional().cmbHcpSubType().setValue(voProf.getHcpSubType());
    }

    if ((voProf.getSuppliedProfessional() == null) && (voProf.getMOSIsNotNull()))
    {
        form.lyrProServices().tabProfessional().chkSupplyHcp().setValue(false);
        // supplied from ref to MOS
        form.lyrProServices().tabProfessional().qmbHcpName().newRow(voProf.getMOS().getHcp(), voProf.getMOS().getHcp().toString());
        form.lyrProServices().tabProfessional().qmbHcpName().setValue(voProf.getMOS().getHcp());
        form.lyrProServices().tabProfessional().txtEmailPro().setValue(voProf.getMOS().getEmailAddress());
        form.lyrProServices().tabProfessional().txtMobilePhPro().setValue(voProf.getMOS().getMobile());

        form.getGlobalContext().COE.setSupportNetworkSelectedLocation(voProf.getCurrentLocation());

        form.lyrProServices().tabProfessional().txtHcpName().setEnabled(false);
        form.lyrProServices().tabProfessional().qmbHcpName().setEnabled(false);
        form.lyrProServices().tabProfessional().txtHcpName().setVisible(false);
        form.lyrProServices().tabProfessional().txtLocation().setVisible(false);
        form.lyrProServices().tabProfessional().qmbHcpName().setVisible(true);
        form.lyrProServices().tabProfessional().cmbLocationHcp().setVisible(true);

        if (voProf.getCurrentLocationIsNotNull())
        {
            form.lyrProServices().tabProfessional().cmbLocationHcp().newRow(voProf.getCurrentLocation(), voProf.getCurrentLocation().getName(), Color.Black);
            form.lyrProServices().tabProfessional().cmbLocationHcp().setValue(voProf.getCurrentLocation());
            showLocationProf();

        }
    }
    else if (voProf.getSuppliedProfessionalIsNotNull())
    {
        form.lyrProServices().tabProfessional().chkSupplyHcp().setValue(true);

        form.lyrProServices().tabProfessional().txtHcpName().setValue(voProf.getSuppliedProfessional().getName());
        form.lyrProServices().tabProfessional().txtLocation().setValue(voProf.getSuppliedProfessional().getServiceLocation());
        form.lyrProServices().tabProfessional().txtAddressPro().setValue(voProf.getSuppliedProfessional().getAddress());
        form.lyrProServices().tabProfessional().txtWorkPh().setValue(voProf.getSuppliedProfessional().getWorkPhone());
        form.lyrProServices().tabProfessional().txtMobilePhPro().setValue(voProf.getSuppliedProfessional().getMobilePhone());
        form.lyrProServices().tabProfessional().txtEmailPro().setValue(voProf.getSuppliedProfessional().getEmailAddress());

        form.lyrProServices().tabProfessional().txtHcpName().setEnabled(false);
        form.lyrProServices().tabProfessional().qmbHcpName().setEnabled(false);
        form.lyrProServices().tabProfessional().txtHcpName().setVisible(true);
        form.lyrProServices().tabProfessional().txtLocation().setVisible(true);
        form.lyrProServices().tabProfessional().qmbHcpName().setVisible(false);
        form.lyrProServices().tabProfessional().cmbLocationHcp().setVisible(false);

    }

    form.lyrProServices().tabProfessional().customControlAuth().setValue(voProf.getAuthorngInfo());

    form.btnUpdate().setEnabled(true);

}
项目:openMAXIMS    文件:Logic.java   
private void enableProfessionalHCPName()
{
    SupportNetworkProfessionalVo voProf = form.getLocalContext().getsupportNetworkProfessional();
    form.lyrProServices().tabProfessional().txtHcpName().setVisible(voProf != null && voProf.getSuppliedProfessionalIsNotNull() ? true : false);
}