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

项目:AvoinApotti    文件:Logic.java   
public CommunityServiceVo populateDataFromScreen(CommunityServiceVo value) 
{
    CommunityServiceVo vo = form.getLocalContext().getSelectedRecord();

    if (vo.getID_CommunityServices() == null)
    {
        vo.setIsCurrentlyActive(Boolean.TRUE);
        vo.setCurrentFrequency(form.ctnServiceDetail().txtCFreq().getValue());
        vo.setDischargeFrequency(form.ctnServiceDetail().txtDFreq().getValue());
        vo.setComments(form.ctnServiceDetail().txtCommentsService().getValue());
        vo.setIsServiceInPlace(new Boolean(form.ctnServiceDetail().chkInplace().getValue()));
        vo.setIsDischargeService(new Boolean(form.ctnServiceDetail().chkReqForDis().getValue()));
        vo.setConfirmedDate(form.ctnServiceDetail().dteConfirmDate().getValue());


        if (form.ctnServiceDetail().chkSupplyServiceDetail().getValue())
        {
            SuppNetworkServiceProfessionDetailVo voProf = new SuppNetworkServiceProfessionDetailVo();

            voProf.setAddress(form.ctnServiceDetail().txtAddressService().getValue());
            voProf.setName(form.ctnServiceDetail().txtContactPerson().getValue());
            voProf.setServiceLocation(form.ctnServiceDetail().txtAreaLoc().getValue());
            voProf.setWorkPhone(form.ctnServiceDetail().txtPhoneNoService().getValue());
            //supplied area/location
            vo.setSuppliedService(voProf);              
        }
        else
        {                   
            if (form.getLocalContext().getlocationService() != null)
                vo.setLocationService(form.getLocalContext().getlocationService());
            vo.setSuppliedService(null);
        }               
    }
    else
    {
        //only update frequecy and comments, in place and confirm date
        vo.setDischargeFrequency(form.ctnServiceDetail().txtDFreq().getValue());
        vo.setComments(form.ctnServiceDetail().txtCommentsService().getValue());
        vo.setIsServiceInPlace(new Boolean(form.ctnServiceDetail().chkInplace().getValue()));
        vo.setConfirmedDate(form.ctnServiceDetail().dteConfirmDate().getValue());
        vo.setIsDischargeService(new Boolean(form.ctnServiceDetail().chkReqForDis().getValue()));
    }

    //set for update as well
    vo.setAuthoringInformation(form.ctnServiceDetail().customControlAuth().getValue());
    vo.setService(form.ctnServiceDetail().cmbService().getValue());

    //default currently active to true
    if(vo.getIsCurrentlyActive() == null)
        vo.setIsCurrentlyActive(Boolean.TRUE);

    if (vo.getCareContext() == null)
        vo.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    if (vo.getClinicalContact() == null)
        vo.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());

    return vo;
}
项目:AvoinApotti    文件:Logic.java   
private void insertServices()
{
    form.grdDetails().getRows().clear();

    Boolean bActiveOnly = Boolean.TRUE;

    SupportNetworkServicesVoCollection voColl = domain.listSupportNetworkServiceByPatient(form.getGlobalContext().Core.getPatientShort(),bActiveOnly);

    if (voColl != null && voColl.size()>0)
    {
        SupportNetworkServicesVo vo = null; 

        GenForm.grdDetailsRow row = null;
        for(int i=0;i<voColl.size();i++)
        {
            vo = voColl.get(i);
            row = form.grdDetails().getRows().newRow();
            if (vo.getSuppliedServiceIsNotNull())
                row.setComunityService(vo.getSuppliedService().getName());
            else if (vo.getServiceIsNotNull())
                row.setComunityService(vo.getService().getServiceName());
            row.setCurrentFrequency(vo.getFrequencyOfService());

            //create Community Service vo
            CommunityServiceVo voComSer = new CommunityServiceVo();
            voComSer.setCurrentFrequency(vo.getFrequencyOfService());

            //copy if supplied
            if (vo.getSuppliedServiceIsNotNull())
            {
                SuppNetworkServiceProfessionDetailVo voSerProfDet = new SuppNetworkServiceProfessionDetailVo();
                voSerProfDet.setAddress(vo.getSuppliedService().getAddress());
                voSerProfDet.setEmailAddress(vo.getSuppliedService().getEmailAddress());
                voSerProfDet.setMobilePhone(vo.getSuppliedService().getMobilePhone());
                voSerProfDet.setName(vo.getSuppliedService().getName());
                voSerProfDet.setServiceLocation(vo.getSuppliedService().getServiceLocation());
                voSerProfDet.setWorkPhone(vo.getSuppliedService().getWorkPhone());
                voComSer.setSuppliedService(voSerProfDet);
            }

            voComSer.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
            voComSer.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
            voComSer.setService(vo.getService());
            voComSer.setLocationService(vo.getLocationService());
            voComSer.setIsCurrentlyActive(new Boolean(true));
            voComSer.setComments(vo.getComments());

            String[] arrErrors = voComSer.validate();
            if(arrErrors != null)
            {
                engine.showErrors(arrErrors);           
            }
            try 
            {
                domain.saveCommunitService(voComSer);
            } 
            catch (StaleObjectException e) 
            {
                engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
                return;
            }

            row.setValue(voComSer);
        }
    }
}
项目: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 populateServiceDataFromScreen()
{
    SupportNetworkServicesVo voService = form.getLocalContext().getsupportNetworkService();

    if (voService.getID_SupportNetworkServices() == null)
    {
        voService.setIsCurrentlyActive(Boolean.TRUE);
        voService.setFrequencyOfService(form.lyrProServices().tabServices().txtFrequency().getValue());
        voService.setComments(form.lyrProServices().tabServices().txtCommentsService().getValue());

        if (form.lyrProServices().tabServices().chkSupplyServiceDetail().getValue())
        {
            SuppNetworkServiceProfessionDetailVo voServiceProf = new SuppNetworkServiceProfessionDetailVo();

            voServiceProf.setAddress(form.lyrProServices().tabServices().txtAddressService().getValue());
            voServiceProf.setName(form.lyrProServices().tabServices().txtContactPerson().getValue());
            voServiceProf.setServiceLocation(form.lyrProServices().tabServices().txtAreaLoc().getValue());
            voServiceProf.setWorkPhone(form.lyrProServices().tabServices().txtPhoneNoService().getValue());
            // supplied area/location
            voService.setSuppliedService(voServiceProf);
        }
        else
        {
            if (form.getLocalContext().getlocationService() != null)
                voService.setLocationService(form.getLocalContext().getlocationService());
            voService.setSuppliedService(null);
        }
        voService.setAuthoringInfo(form.lyrProServices().tabServices().customControlAuthSer().getValue());
        voService.setService(form.lyrProServices().tabServices().cmbService().getValue());
    }
    else
    {
        voService.setFrequencyOfService(form.lyrProServices().tabServices().txtFrequency().getValue());
        voService.setComments(form.lyrProServices().tabServices().txtCommentsService().getValue());

        //WDEV-17560
        if (form.lyrProServices().tabServices().chkSupplyServiceDetail().getValue() && voService.getSuppliedService() != null)
        {
            voService.getSuppliedService().setAddress(form.lyrProServices().tabServices().txtAddressService().getValue());
            voService.getSuppliedService().setName(form.lyrProServices().tabServices().txtContactPerson().getValue());
            voService.getSuppliedService().setServiceLocation(form.lyrProServices().tabServices().txtAreaLoc().getValue());
            voService.getSuppliedService().setWorkPhone(form.lyrProServices().tabServices().txtPhoneNoService().getValue());
        }
    }
    form.getLocalContext().setsupportNetworkService(voService);
}
项目:openMAXIMS    文件:Logic.java   
public CommunityServiceVo populateDataFromScreen(CommunityServiceVo value) 
{
    CommunityServiceVo vo = form.getLocalContext().getSelectedRecord();

    if (vo.getID_CommunityServices() == null)
    {
        vo.setIsCurrentlyActive(Boolean.TRUE);
        vo.setCurrentFrequency(form.ctnServiceDetail().txtCFreq().getValue());
        vo.setDischargeFrequency(form.ctnServiceDetail().txtDFreq().getValue());
        vo.setComments(form.ctnServiceDetail().txtCommentsService().getValue());
        vo.setIsServiceInPlace(new Boolean(form.ctnServiceDetail().chkInplace().getValue()));
        vo.setIsDischargeService(new Boolean(form.ctnServiceDetail().chkReqForDis().getValue()));
        vo.setConfirmedDate(form.ctnServiceDetail().dteConfirmDate().getValue());


        if (form.ctnServiceDetail().chkSupplyServiceDetail().getValue())
        {
            SuppNetworkServiceProfessionDetailVo voProf = new SuppNetworkServiceProfessionDetailVo();

            voProf.setAddress(form.ctnServiceDetail().txtAddressService().getValue());
            voProf.setName(form.ctnServiceDetail().txtContactPerson().getValue());
            voProf.setServiceLocation(form.ctnServiceDetail().txtAreaLoc().getValue());
            voProf.setWorkPhone(form.ctnServiceDetail().txtPhoneNoService().getValue());
            //supplied area/location
            vo.setSuppliedService(voProf);              
        }
        else
        {                   
            if (form.getLocalContext().getlocationService() != null)
                vo.setLocationService(form.getLocalContext().getlocationService());
            vo.setSuppliedService(null);
        }               
    }
    else
    {
        //only update frequecy and comments, in place and confirm date
        vo.setDischargeFrequency(form.ctnServiceDetail().txtDFreq().getValue());
        vo.setComments(form.ctnServiceDetail().txtCommentsService().getValue());
        vo.setIsServiceInPlace(new Boolean(form.ctnServiceDetail().chkInplace().getValue()));
        vo.setConfirmedDate(form.ctnServiceDetail().dteConfirmDate().getValue());
        vo.setIsDischargeService(new Boolean(form.ctnServiceDetail().chkReqForDis().getValue()));
    }

    //set for update as well
    vo.setAuthoringInformation(form.ctnServiceDetail().customControlAuth().getValue());
    vo.setService(form.ctnServiceDetail().cmbService().getValue());

    //default currently active to true
    if(vo.getIsCurrentlyActive() == null)
        vo.setIsCurrentlyActive(Boolean.TRUE);

    if (vo.getCareContext() == null)
        vo.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    if (vo.getClinicalContact() == null)
        vo.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());

    return vo;
}
项目:openMAXIMS    文件:Logic.java   
private void insertServices()
{
    form.grdDetails().getRows().clear();

    Boolean bActiveOnly = Boolean.TRUE;

    SupportNetworkServicesVoCollection voColl = domain.listSupportNetworkServiceByPatient(form.getGlobalContext().Core.getPatientShort(),bActiveOnly);

    if (voColl != null && voColl.size()>0)
    {
        SupportNetworkServicesVo vo = null; 

        GenForm.grdDetailsRow row = null;
        for(int i=0;i<voColl.size();i++)
        {
            vo = voColl.get(i);
            row = form.grdDetails().getRows().newRow();
            if (vo.getSuppliedServiceIsNotNull())
                row.setComunityService(vo.getSuppliedService().getName());
            else if (vo.getServiceIsNotNull())
                row.setComunityService(vo.getService().getServiceName());
            row.setCurrentFrequency(vo.getFrequencyOfService());

            //create Community Service vo
            CommunityServiceVo voComSer = new CommunityServiceVo();
            voComSer.setCurrentFrequency(vo.getFrequencyOfService());

            //copy if supplied
            if (vo.getSuppliedServiceIsNotNull())
            {
                SuppNetworkServiceProfessionDetailVo voSerProfDet = new SuppNetworkServiceProfessionDetailVo();
                voSerProfDet.setAddress(vo.getSuppliedService().getAddress());
                voSerProfDet.setEmailAddress(vo.getSuppliedService().getEmailAddress());
                voSerProfDet.setMobilePhone(vo.getSuppliedService().getMobilePhone());
                voSerProfDet.setName(vo.getSuppliedService().getName());
                voSerProfDet.setServiceLocation(vo.getSuppliedService().getServiceLocation());
                voSerProfDet.setWorkPhone(vo.getSuppliedService().getWorkPhone());
                voComSer.setSuppliedService(voSerProfDet);
            }

            voComSer.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
            voComSer.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
            voComSer.setService(vo.getService());
            voComSer.setLocationService(vo.getLocationService());
            voComSer.setIsCurrentlyActive(new Boolean(true));
            voComSer.setComments(vo.getComments());

            String[] arrErrors = voComSer.validate();
            if(arrErrors != null)
            {
                engine.showErrors(arrErrors);           
            }
            try 
            {
                domain.saveCommunitService(voComSer);
            } 
            catch (StaleObjectException e) 
            {
                engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
                return;
            }

            row.setValue(voComSer);
        }
    }
}
项目: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 populateServiceDataFromScreen()
{
    SupportNetworkServicesVo voService = form.getLocalContext().getsupportNetworkService();

    if (voService.getID_SupportNetworkServices() == null)
    {
        voService.setIsCurrentlyActive(Boolean.TRUE);
        voService.setFrequencyOfService(form.lyrProServices().tabServices().txtFrequency().getValue());
        voService.setComments(form.lyrProServices().tabServices().txtCommentsService().getValue());

        if (form.lyrProServices().tabServices().chkSupplyServiceDetail().getValue())
        {
            SuppNetworkServiceProfessionDetailVo voServiceProf = new SuppNetworkServiceProfessionDetailVo();

            voServiceProf.setAddress(form.lyrProServices().tabServices().txtAddressService().getValue());
            voServiceProf.setName(form.lyrProServices().tabServices().txtContactPerson().getValue());
            voServiceProf.setServiceLocation(form.lyrProServices().tabServices().txtAreaLoc().getValue());
            voServiceProf.setWorkPhone(form.lyrProServices().tabServices().txtPhoneNoService().getValue());
            // supplied area/location
            voService.setSuppliedService(voServiceProf);
        }
        else
        {
            if (form.getLocalContext().getlocationService() != null)
                voService.setLocationService(form.getLocalContext().getlocationService());
            voService.setSuppliedService(null);
        }
        voService.setAuthoringInfo(form.lyrProServices().tabServices().customControlAuthSer().getValue());
        voService.setService(form.lyrProServices().tabServices().cmbService().getValue());
    }
    else
    {
        voService.setFrequencyOfService(form.lyrProServices().tabServices().txtFrequency().getValue());
        voService.setComments(form.lyrProServices().tabServices().txtCommentsService().getValue());

        //WDEV-17560
        if (form.lyrProServices().tabServices().chkSupplyServiceDetail().getValue() && voService.getSuppliedService() != null)
        {
            voService.getSuppliedService().setAddress(form.lyrProServices().tabServices().txtAddressService().getValue());
            voService.getSuppliedService().setName(form.lyrProServices().tabServices().txtContactPerson().getValue());
            voService.getSuppliedService().setServiceLocation(form.lyrProServices().tabServices().txtAreaLoc().getValue());
            voService.getSuppliedService().setWorkPhone(form.lyrProServices().tabServices().txtPhoneNoService().getValue());
        }
    }
    form.getLocalContext().setsupportNetworkService(voService);
}
项目:openMAXIMS    文件:Logic.java   
public CommunityServiceVo populateDataFromScreen(CommunityServiceVo value) 
{
    CommunityServiceVo vo = form.getLocalContext().getSelectedRecord();

    if (vo.getID_CommunityServices() == null)
    {
        vo.setIsCurrentlyActive(Boolean.TRUE);
        vo.setCurrentFrequency(form.ctnServiceDetail().txtCFreq().getValue());
        vo.setDischargeFrequency(form.ctnServiceDetail().txtDFreq().getValue());
        vo.setComments(form.ctnServiceDetail().txtCommentsService().getValue());
        vo.setIsServiceInPlace(new Boolean(form.ctnServiceDetail().chkInplace().getValue()));
        vo.setIsDischargeService(new Boolean(form.ctnServiceDetail().chkReqForDis().getValue()));
        vo.setConfirmedDate(form.ctnServiceDetail().dteConfirmDate().getValue());


        if (form.ctnServiceDetail().chkSupplyServiceDetail().getValue())
        {
            SuppNetworkServiceProfessionDetailVo voProf = new SuppNetworkServiceProfessionDetailVo();

            voProf.setAddress(form.ctnServiceDetail().txtAddressService().getValue());
            voProf.setName(form.ctnServiceDetail().txtContactPerson().getValue());
            voProf.setServiceLocation(form.ctnServiceDetail().txtAreaLoc().getValue());
            voProf.setWorkPhone(form.ctnServiceDetail().txtPhoneNoService().getValue());
            //supplied area/location
            vo.setSuppliedService(voProf);              
        }
        else
        {                   
            if (form.getLocalContext().getlocationService() != null)
                vo.setLocationService(form.getLocalContext().getlocationService());
            vo.setSuppliedService(null);
        }               
    }
    else
    {
        //only update frequecy and comments, in place and confirm date
        vo.setDischargeFrequency(form.ctnServiceDetail().txtDFreq().getValue());
        vo.setComments(form.ctnServiceDetail().txtCommentsService().getValue());
        vo.setIsServiceInPlace(new Boolean(form.ctnServiceDetail().chkInplace().getValue()));
        vo.setConfirmedDate(form.ctnServiceDetail().dteConfirmDate().getValue());
        vo.setIsDischargeService(new Boolean(form.ctnServiceDetail().chkReqForDis().getValue()));
    }

    //set for update as well
    vo.setAuthoringInformation(form.ctnServiceDetail().customControlAuth().getValue());
    vo.setService(form.ctnServiceDetail().cmbService().getValue());

    //default currently active to true
    if(vo.getIsCurrentlyActive() == null)
        vo.setIsCurrentlyActive(Boolean.TRUE);

    if (vo.getCareContext() == null)
        vo.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    if (vo.getClinicalContact() == null)
        vo.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());

    return vo;
}
项目:openMAXIMS    文件:Logic.java   
private void insertServices()
{
    form.grdDetails().getRows().clear();

    Boolean bActiveOnly = Boolean.TRUE;

    SupportNetworkServicesVoCollection voColl = domain.listSupportNetworkServiceByPatient(form.getGlobalContext().Core.getPatientShort(),bActiveOnly);

    if (voColl != null && voColl.size()>0)
    {
        SupportNetworkServicesVo vo = null; 

        GenForm.grdDetailsRow row = null;
        for(int i=0;i<voColl.size();i++)
        {
            vo = voColl.get(i);
            row = form.grdDetails().getRows().newRow();
            if (vo.getSuppliedServiceIsNotNull())
                row.setComunityService(vo.getSuppliedService().getName());
            else if (vo.getServiceIsNotNull())
                row.setComunityService(vo.getService().getServiceName());
            row.setCurrentFrequency(vo.getFrequencyOfService());

            //create Community Service vo
            CommunityServiceVo voComSer = new CommunityServiceVo();
            voComSer.setCurrentFrequency(vo.getFrequencyOfService());

            //copy if supplied
            if (vo.getSuppliedServiceIsNotNull())
            {
                SuppNetworkServiceProfessionDetailVo voSerProfDet = new SuppNetworkServiceProfessionDetailVo();
                voSerProfDet.setAddress(vo.getSuppliedService().getAddress());
                voSerProfDet.setEmailAddress(vo.getSuppliedService().getEmailAddress());
                voSerProfDet.setMobilePhone(vo.getSuppliedService().getMobilePhone());
                voSerProfDet.setName(vo.getSuppliedService().getName());
                voSerProfDet.setServiceLocation(vo.getSuppliedService().getServiceLocation());
                voSerProfDet.setWorkPhone(vo.getSuppliedService().getWorkPhone());
                voComSer.setSuppliedService(voSerProfDet);
            }

            voComSer.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
            voComSer.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
            voComSer.setService(vo.getService());
            voComSer.setLocationService(vo.getLocationService());
            voComSer.setIsCurrentlyActive(new Boolean(true));
            voComSer.setComments(vo.getComments());

            String[] arrErrors = voComSer.validate();
            if(arrErrors != null)
            {
                engine.showErrors(arrErrors);           
            }
            try 
            {
                domain.saveCommunitService(voComSer);
            } 
            catch (StaleObjectException e) 
            {
                engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
                return;
            }

            row.setValue(voComSer);
        }
    }
}
项目: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 populateServiceDataFromScreen()
{
    SupportNetworkServicesVo voService = form.getLocalContext().getsupportNetworkService();

    if (voService.getID_SupportNetworkServices() == null)
    {
        voService.setIsCurrentlyActive(Boolean.TRUE);
        voService.setFrequencyOfService(form.lyrProServices().tabServices().txtFrequency().getValue());
        voService.setComments(form.lyrProServices().tabServices().txtCommentsService().getValue());

        if (form.lyrProServices().tabServices().chkSupplyServiceDetail().getValue())
        {
            SuppNetworkServiceProfessionDetailVo voServiceProf = new SuppNetworkServiceProfessionDetailVo();

            voServiceProf.setAddress(form.lyrProServices().tabServices().txtAddressService().getValue());
            voServiceProf.setName(form.lyrProServices().tabServices().txtContactPerson().getValue());
            voServiceProf.setServiceLocation(form.lyrProServices().tabServices().txtAreaLoc().getValue());
            voServiceProf.setWorkPhone(form.lyrProServices().tabServices().txtPhoneNoService().getValue());
            // supplied area/location
            voService.setSuppliedService(voServiceProf);
        }
        else
        {
            if (form.getLocalContext().getlocationService() != null)
                voService.setLocationService(form.getLocalContext().getlocationService());
            voService.setSuppliedService(null);
        }
        voService.setAuthoringInfo(form.lyrProServices().tabServices().customControlAuthSer().getValue());
        voService.setService(form.lyrProServices().tabServices().cmbService().getValue());
    }
    else
    {
        voService.setFrequencyOfService(form.lyrProServices().tabServices().txtFrequency().getValue());
        voService.setComments(form.lyrProServices().tabServices().txtCommentsService().getValue());

        //WDEV-17560
        if (form.lyrProServices().tabServices().chkSupplyServiceDetail().getValue() && voService.getSuppliedService() != null)
        {
            voService.getSuppliedService().setAddress(form.lyrProServices().tabServices().txtAddressService().getValue());
            voService.getSuppliedService().setName(form.lyrProServices().tabServices().txtContactPerson().getValue());
            voService.getSuppliedService().setServiceLocation(form.lyrProServices().tabServices().txtAreaLoc().getValue());
            voService.getSuppliedService().setWorkPhone(form.lyrProServices().tabServices().txtPhoneNoService().getValue());
        }
    }
    form.getLocalContext().setsupportNetworkService(voService);
}
项目:openmaxims-linux    文件:Logic.java   
public CommunityServiceVo populateDataFromScreen(CommunityServiceVo value) 
{
    CommunityServiceVo vo = form.getLocalContext().getSelectedRecord();

    if (vo.getID_CommunityServices() == null)
    {
        vo.setIsCurrentlyActive(Boolean.TRUE);
        vo.setCurrentFrequency(form.ctnServiceDetail().txtCFreq().getValue());
        vo.setDischargeFrequency(form.ctnServiceDetail().txtDFreq().getValue());
        vo.setComments(form.ctnServiceDetail().txtCommentsService().getValue());
        vo.setIsServiceInPlace(new Boolean(form.ctnServiceDetail().chkInplace().getValue()));
        vo.setIsDischargeService(new Boolean(form.ctnServiceDetail().chkReqForDis().getValue()));
        vo.setConfirmedDate(form.ctnServiceDetail().dteConfirmDate().getValue());


        if (form.ctnServiceDetail().chkSupplyServiceDetail().getValue())
        {
            SuppNetworkServiceProfessionDetailVo voProf = new SuppNetworkServiceProfessionDetailVo();

            voProf.setAddress(form.ctnServiceDetail().txtAddressService().getValue());
            voProf.setName(form.ctnServiceDetail().txtContactPerson().getValue());
            voProf.setServiceLocation(form.ctnServiceDetail().txtAreaLoc().getValue());
            voProf.setWorkPhone(form.ctnServiceDetail().txtPhoneNoService().getValue());
            //supplied area/location
            vo.setSuppliedService(voProf);              
        }
        else
        {                   
            if (form.getLocalContext().getlocationService() != null)
                vo.setLocationService(form.getLocalContext().getlocationService());
            vo.setSuppliedService(null);
        }               
    }
    else
    {
        //only update frequecy and comments, in place and confirm date
        vo.setDischargeFrequency(form.ctnServiceDetail().txtDFreq().getValue());
        vo.setComments(form.ctnServiceDetail().txtCommentsService().getValue());
        vo.setIsServiceInPlace(new Boolean(form.ctnServiceDetail().chkInplace().getValue()));
        vo.setConfirmedDate(form.ctnServiceDetail().dteConfirmDate().getValue());
        vo.setIsDischargeService(new Boolean(form.ctnServiceDetail().chkReqForDis().getValue()));
    }

    //set for update as well
    vo.setAuthoringInformation(form.ctnServiceDetail().customControlAuth().getValue());
    vo.setService(form.ctnServiceDetail().cmbService().getValue());

    //default currently active to true
    if(vo.getIsCurrentlyActive() == null)
        vo.setIsCurrentlyActive(Boolean.TRUE);

    if (vo.getCareContext() == null)
        vo.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    if (vo.getClinicalContact() == null)
        vo.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());

    return vo;
}
项目:openmaxims-linux    文件:Logic.java   
private void insertServices()
{
    form.grdDetails().getRows().clear();

    Boolean bActiveOnly = Boolean.TRUE;

    SupportNetworkServicesVoCollection voColl = domain.listSupportNetworkServiceByPatient(form.getGlobalContext().Core.getPatientShort(),bActiveOnly);

    if (voColl != null && voColl.size()>0)
    {
        SupportNetworkServicesVo vo = null; 

        GenForm.grdDetailsRow row = null;
        for(int i=0;i<voColl.size();i++)
        {
            vo = voColl.get(i);
            row = form.grdDetails().getRows().newRow();
            if (vo.getSuppliedServiceIsNotNull())
                row.setComunityService(vo.getSuppliedService().getName());
            else if (vo.getServiceIsNotNull())
                row.setComunityService(vo.getService().getServiceName());
            row.setCurrentFrequency(vo.getFrequencyOfService());

            //create Community Service vo
            CommunityServiceVo voComSer = new CommunityServiceVo();
            voComSer.setCurrentFrequency(vo.getFrequencyOfService());

            //copy if supplied
            if (vo.getSuppliedServiceIsNotNull())
            {
                SuppNetworkServiceProfessionDetailVo voSerProfDet = new SuppNetworkServiceProfessionDetailVo();
                voSerProfDet.setAddress(vo.getSuppliedService().getAddress());
                voSerProfDet.setEmailAddress(vo.getSuppliedService().getEmailAddress());
                voSerProfDet.setMobilePhone(vo.getSuppliedService().getMobilePhone());
                voSerProfDet.setName(vo.getSuppliedService().getName());
                voSerProfDet.setServiceLocation(vo.getSuppliedService().getServiceLocation());
                voSerProfDet.setWorkPhone(vo.getSuppliedService().getWorkPhone());
                voComSer.setSuppliedService(voSerProfDet);
            }

            voComSer.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
            voComSer.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
            voComSer.setService(vo.getService());
            voComSer.setLocationService(vo.getLocationService());
            voComSer.setIsCurrentlyActive(new Boolean(true));
            voComSer.setComments(vo.getComments());

            String[] arrErrors = voComSer.validate();
            if(arrErrors != null)
            {
                engine.showErrors(arrErrors);           
            }
            try 
            {
                domain.saveCommunitService(voComSer);
            } 
            catch (StaleObjectException e) 
            {
                engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
                return;
            }

            row.setValue(voComSer);
        }
    }
}
项目:openmaxims-linux    文件: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-linux    文件:Logic.java   
private void populateServiceDataFromScreen()
{
    SupportNetworkServicesVo voService = form.getLocalContext().getsupportNetworkService();

    if (voService.getID_SupportNetworkServices() == null)
    {
        voService.setIsCurrentlyActive(Boolean.TRUE);
        voService.setFrequencyOfService(form.lyrProServices().tabServices().txtFrequency().getValue());
        voService.setComments(form.lyrProServices().tabServices().txtCommentsService().getValue());

        if (form.lyrProServices().tabServices().chkSupplyServiceDetail().getValue())
        {
            SuppNetworkServiceProfessionDetailVo voServiceProf = new SuppNetworkServiceProfessionDetailVo();

            voServiceProf.setAddress(form.lyrProServices().tabServices().txtAddressService().getValue());
            voServiceProf.setName(form.lyrProServices().tabServices().txtContactPerson().getValue());
            voServiceProf.setServiceLocation(form.lyrProServices().tabServices().txtAreaLoc().getValue());
            voServiceProf.setWorkPhone(form.lyrProServices().tabServices().txtPhoneNoService().getValue());
            // supplied area/location
            voService.setSuppliedService(voServiceProf);
        }
        else
        {
            if (form.getLocalContext().getlocationService() != null)
                voService.setLocationService(form.getLocalContext().getlocationService());
            voService.setSuppliedService(null);
        }
        voService.setAuthoringInfo(form.lyrProServices().tabServices().customControlAuthSer().getValue());
        voService.setService(form.lyrProServices().tabServices().cmbService().getValue());
    }
    else
    {
        voService.setFrequencyOfService(form.lyrProServices().tabServices().txtFrequency().getValue());
        voService.setComments(form.lyrProServices().tabServices().txtCommentsService().getValue());

        //WDEV-17560
        if (form.lyrProServices().tabServices().chkSupplyServiceDetail().getValue() && voService.getSuppliedService() != null)
        {
            voService.getSuppliedService().setAddress(form.lyrProServices().tabServices().txtAddressService().getValue());
            voService.getSuppliedService().setName(form.lyrProServices().tabServices().txtContactPerson().getValue());
            voService.getSuppliedService().setServiceLocation(form.lyrProServices().tabServices().txtAreaLoc().getValue());
            voService.getSuppliedService().setWorkPhone(form.lyrProServices().tabServices().txtPhoneNoService().getValue());
        }
    }
    form.getLocalContext().setsupportNetworkService(voService);
}