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

项目:AvoinApotti    文件:Logic.java   
private void menuActivityUpdatePriceClick()
{
    TreeNode node = form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode();
    if (node == null)
        return;

    if (node.getParent() == null)
        return;

    form.getLocalContext().setSelectedLocationServiceActivity((LocationServiceActivityVo) node.getParent().getValue());
    form.getGlobalContext().Admin.setActivityContextPricingDetail((ActivityContextPricingDetailsVo) node.getValue());

    form.getGlobalContext().Admin.setLSAPricingAction(Integer.valueOf(PRICING_UPDATE));
    form.getGlobalContext().Admin.setActivityContextPricingDetailCollection(((LocationServiceActivityVo) node.getParent().getValue()).getActivityContextPricings());

    engine.open(form.getForms().Admin.ActivityContextPricingDetails);
}
项目:openMAXIMS    文件:Logic.java   
private void menuActivityUpdatePriceClick()
{
    TreeNode node = form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode();
    if (node == null)
        return;

    if (node.getParent() == null)
        return;

    form.getLocalContext().setSelectedLocationServiceActivity((LocationServiceActivityVo) node.getParent().getValue());
    form.getGlobalContext().Admin.setActivityContextPricingDetail((ActivityContextPricingDetailsVo) node.getValue());

    form.getGlobalContext().Admin.setLSAPricingAction(Integer.valueOf(PRICING_UPDATE));
    form.getGlobalContext().Admin.setActivityContextPricingDetailCollection(((LocationServiceActivityVo) node.getParent().getValue()).getActivityContextPricings());

    engine.open(form.getForms().Admin.ActivityContextPricingDetails);
}
项目:openMAXIMS    文件:Logic.java   
private void menuActivityUpdatePriceClick()
{
    TreeNode node = form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode();
    if (node == null)
        return;

    if (node.getParent() == null)
        return;

    form.getLocalContext().setSelectedLocationServiceActivity((LocationServiceActivityVo) node.getParent().getValue());
    form.getGlobalContext().Admin.setActivityContextPricingDetail((ActivityContextPricingDetailsVo) node.getValue());

    form.getGlobalContext().Admin.setLSAPricingAction(Integer.valueOf(PRICING_UPDATE));
    form.getGlobalContext().Admin.setActivityContextPricingDetailCollection(((LocationServiceActivityVo) node.getParent().getValue()).getActivityContextPricings());

    engine.open(form.getForms().Admin.ActivityContextPricingDetails);
}
项目:openmaxims-linux    文件:Logic.java   
private void menuActivityUpdatePriceClick()
{
    TreeNode node = form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode();
    if (node == null)
        return;

    if (node.getParent() == null)
        return;

    form.getLocalContext().setSelectedLocationServiceActivity((LocationServiceActivityVo) node.getParent().getValue());
    form.getGlobalContext().Admin.setActivityContextPricingDetail((ActivityContextPricingDetailsVo) node.getValue());

    form.getGlobalContext().Admin.setLSAPricingAction(Integer.valueOf(PRICING_UPDATE));
    form.getGlobalContext().Admin.setActivityContextPricingDetailCollection(((LocationServiceActivityVo) node.getParent().getValue()).getActivityContextPricings());

    engine.open(form.getForms().Admin.ActivityContextPricingDetails);
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onTrePricingTreeViewSelectionChanged(TreeNode node) throws PresentationLogicException
{
    if (node == null)
        return;

    form.getContextMenus().getLocationServiceActivityGridUPDATE_PRICINGItem().setVisible(false);
    form.getContextMenus().getLocationServiceActivityGridNEW_PRICEItem().setVisible((node.getValue() instanceof LocationServiceActivityVo) && form.getMode().equals(FormMode.EDIT));

    if (node.getValue() instanceof ActivityContextPricingDetailsVo)
    {
        ActivityContextPricingDetailsVo voACP = (ActivityContextPricingDetailsVo) node.getValue();
        if (voACP.getEffectiveTo() == null || (voACP.getEffectiveToIsNotNull() && voACP.getIsPreActiveIsNotNull() && voACP.getIsPreActive().booleanValue()))
            form.getContextMenus().getLocationServiceActivityGridUPDATE_PRICINGItem().setVisible((node.getValue() instanceof ActivityContextPricingDetailsVo) && form.getMode().equals(FormMode.EDIT));

        if (!voACP.getID_ActivityContextPricingDetailsIsNotNull())
        {
            form.getContextMenus().getLocationServiceActivityGridUPDATE_PRICINGItem().setText("No Update until saved");
            form.getContextMenus().getLocationServiceActivityGridUPDATE_PRICINGItem().setEnabled(false);
        }
        else
        {
            form.getContextMenus().getLocationServiceActivityGridUPDATE_PRICINGItem().setText("Update Pricing");
            form.getContextMenus().getLocationServiceActivityGridUPDATE_PRICINGItem().setEnabled(true);
        }
    }
    form.getContextMenus().getLocationServiceActivityGridVIEW_PRICINGItem().setVisible(node.getValue() instanceof ActivityContextPricingDetailsVo);

    if (node.getValue() instanceof LocationServiceActivityVo)
        form.getLocalContext().setSelectedLocationServiceActivity((LocationServiceActivityVo) node.getValue());

    if (node.getValue() instanceof ActivityContextPricingDetailsVo)
        form.getLocalContext().setSelectedLocationServiceActivity((LocationServiceActivityVo) node.getParent().getValue());
}
项目:AvoinApotti    文件:NTPFExchequerCodingChecks.java   
public static String ValidHospitalSpecialtyProcedure(LocationServiceActivityVo voLocServiceActivity)
{
    //Check Specialty / proceedure is Active and has an Exchequer code
    if (voLocServiceActivity != null && voLocServiceActivity.getServiceActivityIsNotNull())
    {
        if (voLocServiceActivity.getServiceActivity().getTaxonomyMapIsNotNull())
        {
            if (voLocServiceActivity.getIsActiveIsNotNull() 
                && ! voLocServiceActivity.getIsActive().booleanValue())
                return "\r\nThe Hospital / Specialty / Procedure link is not active. No editing is allowed";

            boolean bFound  = false;
            for(int i=0;i < voLocServiceActivity.getServiceActivity().getTaxonomyMap().size() ; i++)
            {
                //Has it an Exchequer code
                if (voLocServiceActivity.getServiceActivity().getTaxonomyMap().get(i).getTaxonomyNameIsNotNull()
                    && voLocServiceActivity.getServiceActivity().getTaxonomyMap().get(i).getTaxonomyName().equals(TaxonomyType.EXCH))
                {
                    if ( ! checkCodeIs60NNNNNorNNNN(voLocServiceActivity.getServiceActivity().getTaxonomyMap().get(i).getTaxonomyCode()) )
                        return "\r\nThe Specialty / procedure Link Exchequer code is not of the format 60 N NNNN/9NNNN. No editing is allowed";

                    bFound = true; //Is has a valid Exchequer code
                }
            }
            if ( ! bFound)
                return "\r\nThere is no Exchequer code found for this Specialty / Procedure. No editing is allowed";
        }
        if (voLocServiceActivity.getServiceActivity().getIsActiveIsNotNull() 
            && ! voLocServiceActivity.getServiceActivity().getIsActive().booleanValue())
            return "\r\nThe Specialty / Procedure link is not active. No editing is allowed";
    }
    return "";
}
项目:AvoinApotti    文件:ServiceImpl.java   
public String checkLSALinks(ServiceActivityVo voServiceActivity) throws DomainInterfaceException
{
    if (voServiceActivity != null)
    {
        // check if an active Location Service Activity records
        LocationService impl = (LocationService) getDomainImpl(LocationServiceImpl.class);
        LocationServiceActivityVo voLocSerAct = new LocationServiceActivityVo();
        voLocSerAct.setServiceActivity(voServiceActivity);
        voLocSerAct.setIsActive(new Boolean(true));
        LocationServiceVo voLocSer = new LocationServiceVo();
        ServiceVo voSer = new ServiceVo();
        voSer.setID_Service(voServiceActivity.getService().getID_Service());
        voSer.setIsActive(voServiceActivity.getService().getIsActive());
        voLocSer.setService(voSer);
        voLocSerAct.setLocationService(voLocSer);
        LocationServiceActivityVoCollection voColl = impl.listLocationServiceActivity(voLocSerAct.getLocationService(), voLocSerAct.getServiceActivity().getActivity());
        if (voColl != null && voColl.size() > 0)
        {
            String activeMessage = "The following " + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(false) + "," + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + "," + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false) + " links are still active.\r\n";
            for (int j = 0; j < voColl.size(); j++)
            {
                activeMessage += "\r\n" + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(false) + " : " + (voColl.get(j).getLocationService().getLocation().getNameIsNotNull() ? voColl.get(j).getLocationService().getLocation().getName() : "");
                activeMessage += "  " + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + " : " + (voColl.get(j).getLocationService().getService().getServiceNameIsNotNull() ? voColl.get(j).getLocationService().getService().getServiceName() : "");
                for (int k = 0; k < voColl.get(j).getLocationService().getActivities().size(); k++)
                {
                    if (voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivityIsNotNull())
                    {
                        activeMessage += "\r\n" + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false) + " : " + (voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivity().getNameIsNotNull() ? voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivity().getName() : "");
                    }
                }
            }
            return activeMessage;
        }
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onTrePricingTreeViewSelectionChanged(TreeNode node) throws PresentationLogicException
{
    if (node == null)
        return;

    form.getContextMenus().getLocationServiceActivityGridUPDATE_PRICINGItem().setVisible(false);
    form.getContextMenus().getLocationServiceActivityGridNEW_PRICEItem().setVisible((node.getValue() instanceof LocationServiceActivityVo) && form.getMode().equals(FormMode.EDIT));

    if (node.getValue() instanceof ActivityContextPricingDetailsVo)
    {
        ActivityContextPricingDetailsVo voACP = (ActivityContextPricingDetailsVo) node.getValue();
        if (voACP.getEffectiveTo() == null || (voACP.getEffectiveToIsNotNull() && voACP.getIsPreActiveIsNotNull() && voACP.getIsPreActive().booleanValue()))
            form.getContextMenus().getLocationServiceActivityGridUPDATE_PRICINGItem().setVisible((node.getValue() instanceof ActivityContextPricingDetailsVo) && form.getMode().equals(FormMode.EDIT));

        if (!voACP.getID_ActivityContextPricingDetailsIsNotNull())
        {
            form.getContextMenus().getLocationServiceActivityGridUPDATE_PRICINGItem().setText("No Update until saved");
            form.getContextMenus().getLocationServiceActivityGridUPDATE_PRICINGItem().setEnabled(false);
        }
        else
        {
            form.getContextMenus().getLocationServiceActivityGridUPDATE_PRICINGItem().setText("Update Pricing");
            form.getContextMenus().getLocationServiceActivityGridUPDATE_PRICINGItem().setEnabled(true);
        }
    }
    form.getContextMenus().getLocationServiceActivityGridVIEW_PRICINGItem().setVisible(node.getValue() instanceof ActivityContextPricingDetailsVo);

    if (node.getValue() instanceof LocationServiceActivityVo)
        form.getLocalContext().setSelectedLocationServiceActivity((LocationServiceActivityVo) node.getValue());

    if (node.getValue() instanceof ActivityContextPricingDetailsVo)
        form.getLocalContext().setSelectedLocationServiceActivity((LocationServiceActivityVo) node.getParent().getValue());
}
项目:openMAXIMS    文件:NTPFExchequerCodingChecks.java   
public static String ValidHospitalSpecialtyProcedure(LocationServiceActivityVo voLocServiceActivity)
{
    //Check Specialty / proceedure is Active and has an Exchequer code
    if (voLocServiceActivity != null && voLocServiceActivity.getServiceActivityIsNotNull())
    {
        if (voLocServiceActivity.getServiceActivity().getTaxonomyMapIsNotNull())
        {
            if (voLocServiceActivity.getIsActiveIsNotNull() 
                && ! voLocServiceActivity.getIsActive().booleanValue())
                return "\r\nThe Hospital / Specialty / Procedure link is not active. No editing is allowed";

            boolean bFound  = false;
            for(int i=0;i < voLocServiceActivity.getServiceActivity().getTaxonomyMap().size() ; i++)
            {
                //Has it an Exchequer code
                if (voLocServiceActivity.getServiceActivity().getTaxonomyMap().get(i).getTaxonomyNameIsNotNull()
                    && voLocServiceActivity.getServiceActivity().getTaxonomyMap().get(i).getTaxonomyName().equals(TaxonomyType.EXCH))
                {
                    if ( ! checkCodeIs60NNNNNorNNNN(voLocServiceActivity.getServiceActivity().getTaxonomyMap().get(i).getTaxonomyCode()) )
                        return "\r\nThe Specialty / procedure Link Exchequer code is not of the format 60 N NNNN/9NNNN. No editing is allowed";

                    bFound = true; //Is has a valid Exchequer code
                }
            }
            if ( ! bFound)
                return "\r\nThere is no Exchequer code found for this Specialty / Procedure. No editing is allowed";
        }
        if (voLocServiceActivity.getServiceActivity().getIsActiveIsNotNull() 
            && ! voLocServiceActivity.getServiceActivity().getIsActive().booleanValue())
            return "\r\nThe Specialty / Procedure link is not active. No editing is allowed";
    }
    return "";
}
项目:openMAXIMS    文件:ServiceImpl.java   
public String checkLSALinks(ServiceActivityVo voServiceActivity) throws DomainInterfaceException
{
    if (voServiceActivity != null)
    {
        // check if an active Location Service Activity records
        LocationService impl = (LocationService) getDomainImpl(LocationServiceImpl.class);
        LocationServiceActivityVo voLocSerAct = new LocationServiceActivityVo();
        voLocSerAct.setServiceActivity(voServiceActivity);
        voLocSerAct.setIsActive(new Boolean(true));
        LocationServiceVo voLocSer = new LocationServiceVo();
        ServiceVo voSer = new ServiceVo();
        voSer.setID_Service(voServiceActivity.getService().getID_Service());
        voSer.setIsActive(voServiceActivity.getService().getIsActive());
        voLocSer.setService(voSer);
        voLocSerAct.setLocationService(voLocSer);
        LocationServiceActivityVoCollection voColl = impl.listLocationServiceActivity(voLocSerAct.getLocationService(), voLocSerAct.getServiceActivity().getActivity());
        if (voColl != null && voColl.size() > 0)
        {
            String activeMessage = "The following " + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(false) + "," + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + "," + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false) + " links are still active.\r\n";
            for (int j = 0; j < voColl.size(); j++)
            {
                activeMessage += "\r\n" + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(false) + " : " + (voColl.get(j).getLocationService().getLocation().getNameIsNotNull() ? voColl.get(j).getLocationService().getLocation().getName() : "");
                activeMessage += "  " + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + " : " + (voColl.get(j).getLocationService().getService().getServiceNameIsNotNull() ? voColl.get(j).getLocationService().getService().getServiceName() : "");
                for (int k = 0; k < voColl.get(j).getLocationService().getActivities().size(); k++)
                {
                    if (voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivityIsNotNull())
                    {
                        activeMessage += "\r\n" + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false) + " : " + (voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivity().getNameIsNotNull() ? voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivity().getName() : "");
                    }
                }
            }
            return activeMessage;
        }
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
@Override
protected void onTrePricingTreeViewSelectionChanged(TreeNode node) throws PresentationLogicException
{
    if (node == null)
        return;

    form.getContextMenus().getLocationServiceActivityGridUPDATE_PRICINGItem().setVisible(false);
    form.getContextMenus().getLocationServiceActivityGridNEW_PRICEItem().setVisible((node.getValue() instanceof LocationServiceActivityVo) && form.getMode().equals(FormMode.EDIT));

    if (node.getValue() instanceof ActivityContextPricingDetailsVo)
    {
        ActivityContextPricingDetailsVo voACP = (ActivityContextPricingDetailsVo) node.getValue();
        if (voACP.getEffectiveTo() == null || (voACP.getEffectiveToIsNotNull() && voACP.getIsPreActiveIsNotNull() && voACP.getIsPreActive().booleanValue()))
            form.getContextMenus().getLocationServiceActivityGridUPDATE_PRICINGItem().setVisible((node.getValue() instanceof ActivityContextPricingDetailsVo) && form.getMode().equals(FormMode.EDIT));

        if (!voACP.getID_ActivityContextPricingDetailsIsNotNull())
        {
            form.getContextMenus().getLocationServiceActivityGridUPDATE_PRICINGItem().setText("No Update until saved");
            form.getContextMenus().getLocationServiceActivityGridUPDATE_PRICINGItem().setEnabled(false);
        }
        else
        {
            form.getContextMenus().getLocationServiceActivityGridUPDATE_PRICINGItem().setText("Update Pricing");
            form.getContextMenus().getLocationServiceActivityGridUPDATE_PRICINGItem().setEnabled(true);
        }
    }
    form.getContextMenus().getLocationServiceActivityGridVIEW_PRICINGItem().setVisible(node.getValue() instanceof ActivityContextPricingDetailsVo);

    if (node.getValue() instanceof LocationServiceActivityVo)
        form.getLocalContext().setSelectedLocationServiceActivity((LocationServiceActivityVo) node.getValue());

    if (node.getValue() instanceof ActivityContextPricingDetailsVo)
        form.getLocalContext().setSelectedLocationServiceActivity((LocationServiceActivityVo) node.getParent().getValue());
}
项目:openMAXIMS    文件:NTPFExchequerCodingChecks.java   
public static String ValidHospitalSpecialtyProcedure(LocationServiceActivityVo voLocServiceActivity)
{
    //Check Specialty / proceedure is Active and has an Exchequer code
    if (voLocServiceActivity != null && voLocServiceActivity.getServiceActivityIsNotNull())
    {
        if (voLocServiceActivity.getServiceActivity().getTaxonomyMapIsNotNull())
        {
            if (voLocServiceActivity.getIsActiveIsNotNull() 
                && ! voLocServiceActivity.getIsActive().booleanValue())
                return "\r\nThe Hospital / Specialty / Procedure link is not active. No editing is allowed";

            boolean bFound  = false;
            for(int i=0;i < voLocServiceActivity.getServiceActivity().getTaxonomyMap().size() ; i++)
            {
                //Has it an Exchequer code
                if (voLocServiceActivity.getServiceActivity().getTaxonomyMap().get(i).getTaxonomyNameIsNotNull()
                    && voLocServiceActivity.getServiceActivity().getTaxonomyMap().get(i).getTaxonomyName().equals(TaxonomyType.EXCH))
                {
                    if ( ! checkCodeIs60NNNNNorNNNN(voLocServiceActivity.getServiceActivity().getTaxonomyMap().get(i).getTaxonomyCode()) )
                        return "\r\nThe Specialty / procedure Link Exchequer code is not of the format 60 N NNNN/9NNNN. No editing is allowed";

                    bFound = true; //Is has a valid Exchequer code
                }
            }
            if ( ! bFound)
                return "\r\nThere is no Exchequer code found for this Specialty / Procedure. No editing is allowed";
        }
        if (voLocServiceActivity.getServiceActivity().getIsActiveIsNotNull() 
            && ! voLocServiceActivity.getServiceActivity().getIsActive().booleanValue())
            return "\r\nThe Specialty / Procedure link is not active. No editing is allowed";
    }
    return "";
}
项目:openMAXIMS    文件:ServiceImpl.java   
public String checkLSALinks(ServiceActivityVo voServiceActivity) throws DomainInterfaceException
{
    if (voServiceActivity != null)
    {
        // check if an active Location Service Activity records
        LocationService impl = (LocationService) getDomainImpl(LocationServiceImpl.class);
        LocationServiceActivityVo voLocSerAct = new LocationServiceActivityVo();
        voLocSerAct.setServiceActivity(voServiceActivity);
        voLocSerAct.setIsActive(new Boolean(true));
        LocationServiceVo voLocSer = new LocationServiceVo();
        ServiceVo voSer = new ServiceVo();
        voSer.setID_Service(voServiceActivity.getService().getID_Service());
        voSer.setIsActive(voServiceActivity.getService().getIsActive());
        voLocSer.setService(voSer);
        voLocSerAct.setLocationService(voLocSer);
        LocationServiceActivityVoCollection voColl = impl.listLocationServiceActivity(voLocSerAct.getLocationService(), voLocSerAct.getServiceActivity().getActivity());
        if (voColl != null && voColl.size() > 0)
        {
            String activeMessage = "The following " + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(false) + "," + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + "," + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false) + " links are still active.\r\n";
            for (int j = 0; j < voColl.size(); j++)
            {
                activeMessage += "\r\n" + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(false) + " : " + (voColl.get(j).getLocationService().getLocation().getNameIsNotNull() ? voColl.get(j).getLocationService().getLocation().getName() : "");
                activeMessage += "  " + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + " : " + (voColl.get(j).getLocationService().getService().getServiceNameIsNotNull() ? voColl.get(j).getLocationService().getService().getServiceName() : "");
                for (int k = 0; k < voColl.get(j).getLocationService().getActivities().size(); k++)
                {
                    if (voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivityIsNotNull())
                    {
                        activeMessage += "\r\n" + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false) + " : " + (voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivity().getNameIsNotNull() ? voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivity().getName() : "");
                    }
                }
            }
            return activeMessage;
        }
    }

    return null;
}
项目:openmaxims-linux    文件:Logic.java   
@Override
protected void onTrePricingTreeViewSelectionChanged(TreeNode node) throws PresentationLogicException
{
    if (node == null)
        return;

    form.getContextMenus().getLocationServiceActivityGridUPDATE_PRICINGItem().setVisible(false);
    form.getContextMenus().getLocationServiceActivityGridNEW_PRICEItem().setVisible((node.getValue() instanceof LocationServiceActivityVo) && form.getMode().equals(FormMode.EDIT));

    if (node.getValue() instanceof ActivityContextPricingDetailsVo)
    {
        ActivityContextPricingDetailsVo voACP = (ActivityContextPricingDetailsVo) node.getValue();
        if (voACP.getEffectiveTo() == null || (voACP.getEffectiveToIsNotNull() && voACP.getIsPreActiveIsNotNull() && voACP.getIsPreActive().booleanValue()))
            form.getContextMenus().getLocationServiceActivityGridUPDATE_PRICINGItem().setVisible((node.getValue() instanceof ActivityContextPricingDetailsVo) && form.getMode().equals(FormMode.EDIT));

        if (!voACP.getID_ActivityContextPricingDetailsIsNotNull())
        {
            form.getContextMenus().getLocationServiceActivityGridUPDATE_PRICINGItem().setText("No Update until saved");
            form.getContextMenus().getLocationServiceActivityGridUPDATE_PRICINGItem().setEnabled(false);
        }
        else
        {
            form.getContextMenus().getLocationServiceActivityGridUPDATE_PRICINGItem().setText("Update Pricing");
            form.getContextMenus().getLocationServiceActivityGridUPDATE_PRICINGItem().setEnabled(true);
        }
    }
    form.getContextMenus().getLocationServiceActivityGridVIEW_PRICINGItem().setVisible(node.getValue() instanceof ActivityContextPricingDetailsVo);

    if (node.getValue() instanceof LocationServiceActivityVo)
        form.getLocalContext().setSelectedLocationServiceActivity((LocationServiceActivityVo) node.getValue());

    if (node.getValue() instanceof ActivityContextPricingDetailsVo)
        form.getLocalContext().setSelectedLocationServiceActivity((LocationServiceActivityVo) node.getParent().getValue());
}
项目:openmaxims-linux    文件:NTPFExchequerCodingChecks.java   
public static String ValidHospitalSpecialtyProcedure(LocationServiceActivityVo voLocServiceActivity)
{
    //Check Specialty / proceedure is Active and has an Exchequer code
    if (voLocServiceActivity != null && voLocServiceActivity.getServiceActivityIsNotNull())
    {
        if (voLocServiceActivity.getServiceActivity().getTaxonomyMapIsNotNull())
        {
            if (voLocServiceActivity.getIsActiveIsNotNull() 
                && ! voLocServiceActivity.getIsActive().booleanValue())
                return "\r\nThe Hospital / Specialty / Procedure link is not active. No editing is allowed";

            boolean bFound  = false;
            for(int i=0;i < voLocServiceActivity.getServiceActivity().getTaxonomyMap().size() ; i++)
            {
                //Has it an Exchequer code
                if (voLocServiceActivity.getServiceActivity().getTaxonomyMap().get(i).getTaxonomyNameIsNotNull()
                    && voLocServiceActivity.getServiceActivity().getTaxonomyMap().get(i).getTaxonomyName().equals(TaxonomyType.EXCH))
                {
                    if ( ! checkCodeIs60NNNNNorNNNN(voLocServiceActivity.getServiceActivity().getTaxonomyMap().get(i).getTaxonomyCode()) )
                        return "\r\nThe Specialty / procedure Link Exchequer code is not of the format 60 N NNNN/9NNNN. No editing is allowed";

                    bFound = true; //Is has a valid Exchequer code
                }
            }
            if ( ! bFound)
                return "\r\nThere is no Exchequer code found for this Specialty / Procedure. No editing is allowed";
        }
        if (voLocServiceActivity.getServiceActivity().getIsActiveIsNotNull() 
            && ! voLocServiceActivity.getServiceActivity().getIsActive().booleanValue())
            return "\r\nThe Specialty / Procedure link is not active. No editing is allowed";
    }
    return "";
}
项目:openmaxims-linux    文件:ServiceImpl.java   
public String checkLSALinks(ServiceActivityVo voServiceActivity) throws DomainInterfaceException
{
    if (voServiceActivity != null)
    {
        // check if an active Location Service Activity records
        LocationService impl = (LocationService) getDomainImpl(LocationServiceImpl.class);
        LocationServiceActivityVo voLocSerAct = new LocationServiceActivityVo();
        voLocSerAct.setServiceActivity(voServiceActivity);
        voLocSerAct.setIsActive(new Boolean(true));
        LocationServiceVo voLocSer = new LocationServiceVo();
        ServiceVo voSer = new ServiceVo();
        voSer.setID_Service(voServiceActivity.getService().getID_Service());
        voSer.setIsActive(voServiceActivity.getService().getIsActive());
        voLocSer.setService(voSer);
        voLocSerAct.setLocationService(voLocSer);
        LocationServiceActivityVoCollection voColl = impl.listLocationServiceActivity(voLocSerAct.getLocationService(), voLocSerAct.getServiceActivity().getActivity());
        if (voColl != null && voColl.size() > 0)
        {
            String activeMessage = "The following " + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(false) + "," + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + "," + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false) + " links are still active.\r\n";
            for (int j = 0; j < voColl.size(); j++)
            {
                activeMessage += "\r\n" + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(false) + " : " + (voColl.get(j).getLocationService().getLocation().getNameIsNotNull() ? voColl.get(j).getLocationService().getLocation().getName() : "");
                activeMessage += "  " + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + " : " + (voColl.get(j).getLocationService().getService().getServiceNameIsNotNull() ? voColl.get(j).getLocationService().getService().getServiceName() : "");
                for (int k = 0; k < voColl.get(j).getLocationService().getActivities().size(); k++)
                {
                    if (voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivityIsNotNull())
                    {
                        activeMessage += "\r\n" + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false) + " : " + (voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivity().getNameIsNotNull() ? voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivity().getName() : "");
                    }
                }
            }
            return activeMessage;
        }
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException
{
    if (formName.equals(form.getForms().Admin.ActivityContextPricingDetails) && result.equals(DialogResult.OK))
    {
        LocationServiceActivityVo lsaVo = form.getLocalContext().getSelectedLocationServiceActivity();
        if (lsaVo == null)
            return;

        if (!NTPFExchequerCodingChecks.validatePricingIsUnique(form.getLocalContext().getSelectedLocationServiceActivity().getActivityContextPricings(), form.getGlobalContext().Admin.getActivityContextPricingDetail()))
            return;

        if (form.getGlobalContext().Admin.getLSAPricingAction().equals(Integer.valueOf(PRICING_NEW)))
        {
            lsaVo.getActivityContextPricings().add(form.getGlobalContext().Admin.getActivityContextPricingDetail());
            populatePricing(form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode(), lsaVo.getActivityContextPricings());

        }
        else if (form.getGlobalContext().Admin.getLSAPricingAction().equals(Integer.valueOf(PRICING_UPDATE)))
        {
            // Replace the object in the collection
            for (int i = 0; i < lsaVo.getActivityContextPricings().size(); i++)
            {
                if (lsaVo.getActivityContextPricings().get(i).equals(form.getGlobalContext().Admin.getActivityContextPricingDetail()))
                {
                    lsaVo.getActivityContextPricings().set(i, form.getGlobalContext().Admin.getActivityContextPricingDetail());
                    break;
                }
            }
            populatePricing(form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode().getParent(), lsaVo.getActivityContextPricings());
        }

        form.getLocalContext().setSelectedLocationServiceActivity(lsaVo);

        if (form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode() != null)
        {
            if (form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode().getValue() instanceof ActivityContextPricingDetailsVo)
                form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode().getParent().setValue(lsaVo);
            else if (form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode().getValue() instanceof LocationServiceActivityVo)
                form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode().setValue(lsaVo);
        }

        if (form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode() == null)//wdev-7106
            form.getContextMenus().hideAllLocationServiceActivityGridMenuItems();

        form.lyr1().Edit().lyrLocationDetail().showtabPagePricing();
    }
    if (formName.equals(form.getForms().Admin.ProcedurePriceIncrease) && result.equals(DialogResult.OK))
    {
        populateLocationServices(form.treHeader().getSelectedNode(), (LocShortVo) form.treHeader().getSelectedNode().getValue());
        managePricingMenuOptions(((LocShortVo) form.treHeader().getSelectedNode().getValue()).getTreatingHosp());
    }

    if (formName.equals(form.getForms().Admin.NTPFBatchPriceSelectionDialog) && result.equals(DialogResult.OK))
    {
        engine.open(form.getForms().Admin.ProcedurePriceIncrease);
    }

    if (formName.equals(form.getForms().Core.NewPriceBatchDialog) && result.equals(DialogResult.OK))
    {
        form.getGlobalContext().NTPF.setConfirmPriceIncreases(false);
        engine.open(form.getForms().Admin.ProcedurePriceIncrease, new Object[]{FormMode.EDIT});
    }
}
项目:AvoinApotti    文件:Logic.java   
protected void onContextMenuItemClick(int menuItemID, Control sender) throws PresentationLogicException
{
    if (sender.equals(form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing()))
    {
        setHospitalSpecialtyProcedure();
        switch (menuItemID)
        {
            case GenForm.ContextMenus.LocationServiceActivityGrid.NEW_PRICE :
                menuActivityNewPriceClick();
            break;
            case GenForm.ContextMenus.LocationServiceActivityGrid.UPDATE_PRICING :
                menuActivityUpdatePriceClick();
            break;
            case GenForm.ContextMenus.LocationServiceActivityGrid.VIEW_PRICING :
                menuActivityViewPriceClick();
            break;
        }
    }

    switch (menuItemID)
    {
        case GenForm.ContextMenus.GenericGrid.Add :
            newInstance();
        break;
        case GenForm.ContextMenus.GenericGrid.Update :
            updateInstance();
        break;
        case GenForm.ContextMenus.GenericGrid.Remove :
        {
            if (form.treHeader().getSelectedNode().getValue() instanceof LocationServiceVo)
            {
                removeService();
            }
            else if (form.treHeader().getSelectedNode().getValue() instanceof LocationServiceFunctionsVo)
                removeFunction();
            else if (form.treHeader().getSelectedNode().getValue() instanceof LocationServiceActivityVo)
                removeActivity();
            break;
        }
        case GenForm.ContextMenus.GenericGrid.Confirm :
            activatePrices();
        break;
        case GenForm.ContextMenus.GenericGrid.Replace :
            priceIncrease();
        break;
        default :
        break;
    }
}
项目:AvoinApotti    文件:LocationServiceImpl.java   
public ActivityVoCollection listActivity(LocationServiceActivityVo locationServiceActivity) throws DomainInterfaceException
{
    DomainFactory factory = getDomainFactory();

    if (locationServiceActivity == null)
        return ActivityVoAssembler.createActivityVoCollectionFromActivity(factory.listDomainObjects(Activity.class));

    ActivityVoCollection voCollActivity = new ActivityVoCollection();

    String hql = "select locServiceActivity from LocationServiceActivity locServiceActivity, Procedure proc join proc.keywords as kw";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    condStr.append(andStr + " where locServiceActivity.serviceActivity is not null and locServiceActivity.serviceActivity.activity = proc.activity");
    andStr = " and ";

    if (locationServiceActivity.getLocationService() != null)
    {
        condStr.append(andStr + " locServiceActivity.locationService.id = :locService");
        markers.add("locService");
        values.add(locationServiceActivity.getLocationService().getID_LocationService());
        andStr = " and ";
    }

    if ((locationServiceActivity.getServiceActivityIsNotNull()) && (locationServiceActivity.getServiceActivity().getActivityIsNotNull()) && (locationServiceActivity.getServiceActivity().getActivity().getIsActiveIsNotNull()))
    {
        condStr.append(andStr + " locServiceActivity.serviceActivity.activity.isActive = :isActive");
        markers.add("isActive");
        values.add(locationServiceActivity.getServiceActivity().getActivity().getIsActive());
        andStr = " and ";
    }

    if ((locationServiceActivity.getLocationServiceIsNotNull()) && (locationServiceActivity.getLocationService().getIsActiveIsNotNull()))
    {
        condStr.append(andStr + " locServiceActivity.isActive = :isLSActive");
        markers.add("isLSActive");
        values.add(locationServiceActivity.getLocationService().getIsActive());
        andStr = " and ";
    }

    hql += condStr.toString();

    LocationServiceActivityVoCollection voCollLocServiceActivity = null;
    voCollLocServiceActivity = LocationServiceActivityVoAssembler.createLocationServiceActivityVoCollectionFromLocationServiceActivity(Keywords.searchByKeywords(factory, locationServiceActivity.getServiceActivity().getActivity().getName(), hql.toString(), markers, values));
    factory.getDomainSession().clearMessages();

    for (int i = 0; i < voCollLocServiceActivity.size(); i++)
    {
        if (voCollLocServiceActivity.get(i).getServiceActivityIsNotNull())
            voCollActivity.add(voCollLocServiceActivity.get(i).getServiceActivity().getActivity());
    }
    return voCollActivity.sort();
}
项目:AvoinApotti    文件:ServiceImpl.java   
private String checkActiveLSALinksForInactiveSA(ims.core.vo.ServiceActivityVoCollection voCollServiceActivity) throws DomainInterfaceException
{
    // for all inactive records, check that there are no active
    // LocationServiceActivity links
    for (int i = 0; i < voCollServiceActivity.size(); i++)
    {
        if (!voCollServiceActivity.get(i).getIsActive().booleanValue())
        {
            // check if an active Location Service Activity records
            LocationService impl = (LocationService) getDomainImpl(LocationServiceImpl.class);
            LocationServiceActivityVo voLocSerAct = new LocationServiceActivityVo();
            voLocSerAct.setServiceActivity(voCollServiceActivity.get(i));
            voLocSerAct.setIsActive(new Boolean(true));
            LocationServiceVo voLocSer = new LocationServiceVo();
            ServiceVo voService = new ServiceVo();
            voService.setID_Service(voCollServiceActivity.get(i).getService().getID_Service());
            voService.setIsActive(voCollServiceActivity.get(i).getService().getIsActive());
            voLocSer.setService(voService);
            voLocSerAct.setLocationService(voLocSer);
            LocationServiceActivityVoCollection voColl = impl.listLocationServiceActivity(voLocSerAct.getLocationService(), voLocSerAct.getServiceActivity().getActivity());

            if (voColl != null && voColl.size() > 0 && voLocSerAct.getIsActiveIsNotNull())
            {
                String text = "The following " + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(false) + "," + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + "," + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false) + " links are still used and active.\r\n";
                String activeMessage = null;

                for (int j = 0; j < voColl.size(); j++)
                {
                    if (voColl.get(j).getIsActiveIsNotNull() && voColl.get(j).getIsActive().booleanValue())
                    {
                        activeMessage += "\r\n" + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(false) + " : " + (voColl.get(j).getLocationService().getLocation().getNameIsNotNull() ? voColl.get(j).getLocationService().getLocation().getName() : "");
                        activeMessage += "  " + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + " : " + (voColl.get(j).getLocationService().getService().getServiceNameIsNotNull() ? voColl.get(j).getLocationService().getService().getServiceName() : "");
                        for (int k = 0; k < voColl.get(j).getLocationService().getActivities().size(); k++)
                        {
                            if (voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivityIsNotNull() && voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().equals(voCollServiceActivity.get(i)) && voColl.get(j).getLocationService().getActivities().get(k).getLocationService().getActivities().get(k).getIsActive().booleanValue() && !voCollServiceActivity.get(i).getIsActive().booleanValue())
                            {
                                activeMessage += "\r\n" + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false) + " : " + (voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivity().getNameIsNotNull() ? voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivity().getName() : "");
                            }
                        }
                    }

                }
                if (activeMessage != null)
                    return text + activeMessage.replace("null", "");
            }
        }
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException
{
    if (formName.equals(form.getForms().Admin.ActivityContextPricingDetails) && result.equals(DialogResult.OK))
    {
        LocationServiceActivityVo lsaVo = form.getLocalContext().getSelectedLocationServiceActivity();
        if (lsaVo == null)
            return;

        if (!NTPFExchequerCodingChecks.validatePricingIsUnique(form.getLocalContext().getSelectedLocationServiceActivity().getActivityContextPricings(), form.getGlobalContext().Admin.getActivityContextPricingDetail()))
            return;

        if (form.getGlobalContext().Admin.getLSAPricingAction().equals(Integer.valueOf(PRICING_NEW)))
        {
            lsaVo.getActivityContextPricings().add(form.getGlobalContext().Admin.getActivityContextPricingDetail());
            populatePricing(form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode(), lsaVo.getActivityContextPricings());

        }
        else if (form.getGlobalContext().Admin.getLSAPricingAction().equals(Integer.valueOf(PRICING_UPDATE)))
        {
            // Replace the object in the collection
            for (int i = 0; i < lsaVo.getActivityContextPricings().size(); i++)
            {
                if (lsaVo.getActivityContextPricings().get(i).equals(form.getGlobalContext().Admin.getActivityContextPricingDetail()))
                {
                    lsaVo.getActivityContextPricings().set(i, form.getGlobalContext().Admin.getActivityContextPricingDetail());
                    break;
                }
            }
            populatePricing(form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode().getParent(), lsaVo.getActivityContextPricings());
        }

        form.getLocalContext().setSelectedLocationServiceActivity(lsaVo);

        if (form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode() != null)
        {
            if (form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode().getValue() instanceof ActivityContextPricingDetailsVo)
                form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode().getParent().setValue(lsaVo);
            else if (form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode().getValue() instanceof LocationServiceActivityVo)
                form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode().setValue(lsaVo);
        }

        if (form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode() == null)//wdev-7106
            form.getContextMenus().hideAllLocationServiceActivityGridMenuItems();

        form.lyr1().Edit().lyrLocationDetail().showtabPagePricing();
    }
    if (formName.equals(form.getForms().Admin.ProcedurePriceIncrease) && result.equals(DialogResult.OK))
    {
        populateLocationServices(form.treHeader().getSelectedNode(), (LocShortVo) form.treHeader().getSelectedNode().getValue());
        managePricingMenuOptions(((LocShortVo) form.treHeader().getSelectedNode().getValue()).getTreatingHosp());
    }

    if (formName.equals(form.getForms().Admin.NTPFBatchPriceSelectionDialog) && result.equals(DialogResult.OK))
    {
        engine.open(form.getForms().Admin.ProcedurePriceIncrease);
    }

    if (formName.equals(form.getForms().Core.NewPriceBatchDialog) && result.equals(DialogResult.OK))
    {
        form.getGlobalContext().NTPF.setConfirmPriceIncreases(false);
        engine.open(form.getForms().Admin.ProcedurePriceIncrease, new Object[]{FormMode.EDIT});
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onContextMenuItemClick(int menuItemID, Control sender) throws PresentationLogicException
{
    if (sender.equals(form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing()))
    {
        setHospitalSpecialtyProcedure();
        switch (menuItemID)
        {
            case GenForm.ContextMenus.LocationServiceActivityGrid.NEW_PRICE :
                menuActivityNewPriceClick();
            break;
            case GenForm.ContextMenus.LocationServiceActivityGrid.UPDATE_PRICING :
                menuActivityUpdatePriceClick();
            break;
            case GenForm.ContextMenus.LocationServiceActivityGrid.VIEW_PRICING :
                menuActivityViewPriceClick();
            break;
        }
    }

    switch (menuItemID)
    {
        case GenForm.ContextMenus.GenericGrid.Add :
            newInstance();
        break;
        case GenForm.ContextMenus.GenericGrid.Update :
            updateInstance();
        break;
        case GenForm.ContextMenus.GenericGrid.Remove :
        {
            if (form.treHeader().getSelectedNode().getValue() instanceof LocationServiceVo)
            {
                removeService();
            }
            else if (form.treHeader().getSelectedNode().getValue() instanceof LocationServiceFunctionsVo)
                removeFunction();
            else if (form.treHeader().getSelectedNode().getValue() instanceof LocationServiceActivityVo)
                removeActivity();
            break;
        }
        case GenForm.ContextMenus.GenericGrid.Confirm :
            activatePrices();
        break;
        case GenForm.ContextMenus.GenericGrid.Replace :
            priceIncrease();
        break;
        default :
        break;
    }
}
项目:openMAXIMS    文件:LocationServiceImpl.java   
public ActivityVoCollection listActivity(LocationServiceActivityVo locationServiceActivity) throws DomainInterfaceException
{
    DomainFactory factory = getDomainFactory();

    if (locationServiceActivity == null)
        return ActivityVoAssembler.createActivityVoCollectionFromActivity(factory.listDomainObjects(Activity.class));

    ActivityVoCollection voCollActivity = new ActivityVoCollection();

    String hql = "select locServiceActivity from LocationServiceActivity locServiceActivity, Procedure proc join proc.keywords as kw";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    condStr.append(andStr + " where locServiceActivity.serviceActivity is not null and locServiceActivity.serviceActivity.activity = proc.activity");
    andStr = " and ";

    if (locationServiceActivity.getLocationService() != null)
    {
        condStr.append(andStr + " locServiceActivity.locationService.id = :locService");
        markers.add("locService");
        values.add(locationServiceActivity.getLocationService().getID_LocationService());
        andStr = " and ";
    }

    if ((locationServiceActivity.getServiceActivityIsNotNull()) && (locationServiceActivity.getServiceActivity().getActivityIsNotNull()) && (locationServiceActivity.getServiceActivity().getActivity().getIsActiveIsNotNull()))
    {
        condStr.append(andStr + " locServiceActivity.serviceActivity.activity.isActive = :isActive");
        markers.add("isActive");
        values.add(locationServiceActivity.getServiceActivity().getActivity().getIsActive());
        andStr = " and ";
    }

    if ((locationServiceActivity.getLocationServiceIsNotNull()) && (locationServiceActivity.getLocationService().getIsActiveIsNotNull()))
    {
        condStr.append(andStr + " locServiceActivity.isActive = :isLSActive");
        markers.add("isLSActive");
        values.add(locationServiceActivity.getLocationService().getIsActive());
        andStr = " and ";
    }

    hql += condStr.toString();

    LocationServiceActivityVoCollection voCollLocServiceActivity = null;
    voCollLocServiceActivity = LocationServiceActivityVoAssembler.createLocationServiceActivityVoCollectionFromLocationServiceActivity(Keywords.searchByKeywords(factory, locationServiceActivity.getServiceActivity().getActivity().getName(), hql.toString(), markers, values));
    factory.getDomainSession().clearMessages();

    for (int i = 0; i < voCollLocServiceActivity.size(); i++)
    {
        if (voCollLocServiceActivity.get(i).getServiceActivityIsNotNull())
            voCollActivity.add(voCollLocServiceActivity.get(i).getServiceActivity().getActivity());
    }
    return voCollActivity.sort();
}
项目:openMAXIMS    文件:ServiceImpl.java   
private String checkActiveLSALinksForInactiveSA(ims.core.vo.ServiceActivityVoCollection voCollServiceActivity) throws DomainInterfaceException
{
    // for all inactive records, check that there are no active
    // LocationServiceActivity links
    for (int i = 0; i < voCollServiceActivity.size(); i++)
    {
        if (!voCollServiceActivity.get(i).getIsActive().booleanValue())
        {
            // check if an active Location Service Activity records
            LocationService impl = (LocationService) getDomainImpl(LocationServiceImpl.class);
            LocationServiceActivityVo voLocSerAct = new LocationServiceActivityVo();
            voLocSerAct.setServiceActivity(voCollServiceActivity.get(i));
            voLocSerAct.setIsActive(new Boolean(true));
            LocationServiceVo voLocSer = new LocationServiceVo();
            ServiceVo voService = new ServiceVo();
            voService.setID_Service(voCollServiceActivity.get(i).getService().getID_Service());
            voService.setIsActive(voCollServiceActivity.get(i).getService().getIsActive());
            voLocSer.setService(voService);
            voLocSerAct.setLocationService(voLocSer);
            LocationServiceActivityVoCollection voColl = impl.listLocationServiceActivity(voLocSerAct.getLocationService(), voLocSerAct.getServiceActivity().getActivity());

            if (voColl != null && voColl.size() > 0 && voLocSerAct.getIsActiveIsNotNull())
            {
                String text = "The following " + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(false) + "," + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + "," + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false) + " links are still used and active.\r\n";
                String activeMessage = null;

                for (int j = 0; j < voColl.size(); j++)
                {
                    if (voColl.get(j).getIsActiveIsNotNull() && voColl.get(j).getIsActive().booleanValue())
                    {
                        activeMessage += "\r\n" + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(false) + " : " + (voColl.get(j).getLocationService().getLocation().getNameIsNotNull() ? voColl.get(j).getLocationService().getLocation().getName() : "");
                        activeMessage += "  " + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + " : " + (voColl.get(j).getLocationService().getService().getServiceNameIsNotNull() ? voColl.get(j).getLocationService().getService().getServiceName() : "");
                        for (int k = 0; k < voColl.get(j).getLocationService().getActivities().size(); k++)
                        {
                            if (voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivityIsNotNull() && voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().equals(voCollServiceActivity.get(i)) && voColl.get(j).getLocationService().getActivities().get(k).getLocationService().getActivities().get(k).getIsActive().booleanValue() && !voCollServiceActivity.get(i).getIsActive().booleanValue())
                            {
                                activeMessage += "\r\n" + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false) + " : " + (voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivity().getNameIsNotNull() ? voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivity().getName() : "");
                            }
                        }
                    }

                }
                if (activeMessage != null)
                    return text + activeMessage.replace("null", "");
            }
        }
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException
{
    if (formName.equals(form.getForms().Admin.ActivityContextPricingDetails) && result.equals(DialogResult.OK))
    {
        LocationServiceActivityVo lsaVo = form.getLocalContext().getSelectedLocationServiceActivity();
        if (lsaVo == null)
            return;

        if (!NTPFExchequerCodingChecks.validatePricingIsUnique(form.getLocalContext().getSelectedLocationServiceActivity().getActivityContextPricings(), form.getGlobalContext().Admin.getActivityContextPricingDetail()))
            return;

        if (form.getGlobalContext().Admin.getLSAPricingAction().equals(Integer.valueOf(PRICING_NEW)))
        {
            lsaVo.getActivityContextPricings().add(form.getGlobalContext().Admin.getActivityContextPricingDetail());
            populatePricing(form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode(), lsaVo.getActivityContextPricings());

        }
        else if (form.getGlobalContext().Admin.getLSAPricingAction().equals(Integer.valueOf(PRICING_UPDATE)))
        {
            // Replace the object in the collection
            for (int i = 0; i < lsaVo.getActivityContextPricings().size(); i++)
            {
                if (lsaVo.getActivityContextPricings().get(i).equals(form.getGlobalContext().Admin.getActivityContextPricingDetail()))
                {
                    lsaVo.getActivityContextPricings().set(i, form.getGlobalContext().Admin.getActivityContextPricingDetail());
                    break;
                }
            }
            populatePricing(form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode().getParent(), lsaVo.getActivityContextPricings());
        }

        form.getLocalContext().setSelectedLocationServiceActivity(lsaVo);

        if (form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode() != null)
        {
            if (form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode().getValue() instanceof ActivityContextPricingDetailsVo)
                form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode().getParent().setValue(lsaVo);
            else if (form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode().getValue() instanceof LocationServiceActivityVo)
                form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode().setValue(lsaVo);
        }

        if (form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode() == null)//wdev-7106
            form.getContextMenus().hideAllLocationServiceActivityGridMenuItems();

        form.lyr1().Edit().lyrLocationDetail().showtabPagePricing();
    }
    if (formName.equals(form.getForms().Admin.ProcedurePriceIncrease) && result.equals(DialogResult.OK))
    {
        populateLocationServices(form.treHeader().getSelectedNode(), (LocShortVo) form.treHeader().getSelectedNode().getValue());
        managePricingMenuOptions(((LocShortVo) form.treHeader().getSelectedNode().getValue()).getTreatingHosp());
    }

    if (formName.equals(form.getForms().Admin.NTPFBatchPriceSelectionDialog) && result.equals(DialogResult.OK))
    {
        engine.open(form.getForms().Admin.ProcedurePriceIncrease);
    }

    if (formName.equals(form.getForms().Core.NewPriceBatchDialog) && result.equals(DialogResult.OK))
    {
        form.getGlobalContext().NTPF.setConfirmPriceIncreases(false);
        engine.open(form.getForms().Admin.ProcedurePriceIncrease, new Object[]{FormMode.EDIT});
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onContextMenuItemClick(int menuItemID, Control sender) throws PresentationLogicException
{
    if (sender.equals(form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing()))
    {
        setHospitalSpecialtyProcedure();
        switch (menuItemID)
        {
            case GenForm.ContextMenus.LocationServiceActivityGrid.NEW_PRICE :
                menuActivityNewPriceClick();
            break;
            case GenForm.ContextMenus.LocationServiceActivityGrid.UPDATE_PRICING :
                menuActivityUpdatePriceClick();
            break;
            case GenForm.ContextMenus.LocationServiceActivityGrid.VIEW_PRICING :
                menuActivityViewPriceClick();
            break;
        }
    }

    switch (menuItemID)
    {
        case GenForm.ContextMenus.GenericGrid.Add :
            newInstance();
        break;
        case GenForm.ContextMenus.GenericGrid.Update :
            updateInstance();
        break;
        case GenForm.ContextMenus.GenericGrid.Remove :
        {
            if (form.treHeader().getSelectedNode().getValue() instanceof LocationServiceVo)
            {
                removeService();
            }
            else if (form.treHeader().getSelectedNode().getValue() instanceof LocationServiceFunctionsVo)
                removeFunction();
            else if (form.treHeader().getSelectedNode().getValue() instanceof LocationServiceActivityVo)
                removeActivity();
            break;
        }
        case GenForm.ContextMenus.GenericGrid.Confirm :
            activatePrices();
        break;
        case GenForm.ContextMenus.GenericGrid.Replace :
            priceIncrease();
        break;
        default :
        break;
    }
}
项目:openMAXIMS    文件:LocationServiceImpl.java   
public ActivityVoCollection listActivity(LocationServiceActivityVo locationServiceActivity) throws DomainInterfaceException
{
    DomainFactory factory = getDomainFactory();

    if (locationServiceActivity == null)
        return ActivityVoAssembler.createActivityVoCollectionFromActivity(factory.listDomainObjects(Activity.class));

    ActivityVoCollection voCollActivity = new ActivityVoCollection();

    String hql = "select locServiceActivity from LocationServiceActivity locServiceActivity, Procedure proc join proc.keywords as kw";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    condStr.append(andStr + " where locServiceActivity.serviceActivity is not null and locServiceActivity.serviceActivity.activity = proc.activity");
    andStr = " and ";

    if (locationServiceActivity.getLocationService() != null)
    {
        condStr.append(andStr + " locServiceActivity.locationService.id = :locService");
        markers.add("locService");
        values.add(locationServiceActivity.getLocationService().getID_LocationService());
        andStr = " and ";
    }

    if ((locationServiceActivity.getServiceActivityIsNotNull()) && (locationServiceActivity.getServiceActivity().getActivityIsNotNull()) && (locationServiceActivity.getServiceActivity().getActivity().getIsActiveIsNotNull()))
    {
        condStr.append(andStr + " locServiceActivity.serviceActivity.activity.isActive = :isActive");
        markers.add("isActive");
        values.add(locationServiceActivity.getServiceActivity().getActivity().getIsActive());
        andStr = " and ";
    }

    if ((locationServiceActivity.getLocationServiceIsNotNull()) && (locationServiceActivity.getLocationService().getIsActiveIsNotNull()))
    {
        condStr.append(andStr + " locServiceActivity.isActive = :isLSActive");
        markers.add("isLSActive");
        values.add(locationServiceActivity.getLocationService().getIsActive());
        andStr = " and ";
    }

    hql += condStr.toString();

    LocationServiceActivityVoCollection voCollLocServiceActivity = null;
    voCollLocServiceActivity = LocationServiceActivityVoAssembler.createLocationServiceActivityVoCollectionFromLocationServiceActivity(Keywords.searchByKeywords(factory, locationServiceActivity.getServiceActivity().getActivity().getName(), hql.toString(), markers, values));
    factory.getDomainSession().clearMessages();

    for (int i = 0; i < voCollLocServiceActivity.size(); i++)
    {
        if (voCollLocServiceActivity.get(i).getServiceActivityIsNotNull())
            voCollActivity.add(voCollLocServiceActivity.get(i).getServiceActivity().getActivity());
    }
    return voCollActivity.sort();
}
项目:openMAXIMS    文件:ServiceImpl.java   
private String checkActiveLSALinksForInactiveSA(ims.core.vo.ServiceActivityVoCollection voCollServiceActivity) throws DomainInterfaceException
{
    // for all inactive records, check that there are no active
    // LocationServiceActivity links
    for (int i = 0; i < voCollServiceActivity.size(); i++)
    {
        if (!voCollServiceActivity.get(i).getIsActive().booleanValue())
        {
            // check if an active Location Service Activity records
            LocationService impl = (LocationService) getDomainImpl(LocationServiceImpl.class);
            LocationServiceActivityVo voLocSerAct = new LocationServiceActivityVo();
            voLocSerAct.setServiceActivity(voCollServiceActivity.get(i));
            voLocSerAct.setIsActive(new Boolean(true));
            LocationServiceVo voLocSer = new LocationServiceVo();
            ServiceVo voService = new ServiceVo();
            voService.setID_Service(voCollServiceActivity.get(i).getService().getID_Service());
            voService.setIsActive(voCollServiceActivity.get(i).getService().getIsActive());
            voLocSer.setService(voService);
            voLocSerAct.setLocationService(voLocSer);
            LocationServiceActivityVoCollection voColl = impl.listLocationServiceActivity(voLocSerAct.getLocationService(), voLocSerAct.getServiceActivity().getActivity());

            if (voColl != null && voColl.size() > 0 && voLocSerAct.getIsActiveIsNotNull())
            {
                String text = "The following " + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(false) + "," + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + "," + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false) + " links are still used and active.\r\n";
                String activeMessage = null;

                for (int j = 0; j < voColl.size(); j++)
                {
                    if (voColl.get(j).getIsActiveIsNotNull() && voColl.get(j).getIsActive().booleanValue())
                    {
                        activeMessage += "\r\n" + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(false) + " : " + (voColl.get(j).getLocationService().getLocation().getNameIsNotNull() ? voColl.get(j).getLocationService().getLocation().getName() : "");
                        activeMessage += "  " + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + " : " + (voColl.get(j).getLocationService().getService().getServiceNameIsNotNull() ? voColl.get(j).getLocationService().getService().getServiceName() : "");
                        for (int k = 0; k < voColl.get(j).getLocationService().getActivities().size(); k++)
                        {
                            if (voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivityIsNotNull() && voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().equals(voCollServiceActivity.get(i)) && voColl.get(j).getLocationService().getActivities().get(k).getLocationService().getActivities().get(k).getIsActive().booleanValue() && !voCollServiceActivity.get(i).getIsActive().booleanValue())
                            {
                                activeMessage += "\r\n" + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false) + " : " + (voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivity().getNameIsNotNull() ? voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivity().getName() : "");
                            }
                        }
                    }

                }
                if (activeMessage != null)
                    return text + activeMessage.replace("null", "");
            }
        }
    }
    return null;
}
项目:openmaxims-linux    文件:Logic.java   
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException
{
    if (formName.equals(form.getForms().Admin.ActivityContextPricingDetails) && result.equals(DialogResult.OK))
    {
        LocationServiceActivityVo lsaVo = form.getLocalContext().getSelectedLocationServiceActivity();
        if (lsaVo == null)
            return;

        if (!NTPFExchequerCodingChecks.validatePricingIsUnique(form.getLocalContext().getSelectedLocationServiceActivity().getActivityContextPricings(), form.getGlobalContext().Admin.getActivityContextPricingDetail()))
            return;

        if (form.getGlobalContext().Admin.getLSAPricingAction().equals(Integer.valueOf(PRICING_NEW)))
        {
            lsaVo.getActivityContextPricings().add(form.getGlobalContext().Admin.getActivityContextPricingDetail());
            populatePricing(form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode(), lsaVo.getActivityContextPricings());

        }
        else if (form.getGlobalContext().Admin.getLSAPricingAction().equals(Integer.valueOf(PRICING_UPDATE)))
        {
            // Replace the object in the collection
            for (int i = 0; i < lsaVo.getActivityContextPricings().size(); i++)
            {
                if (lsaVo.getActivityContextPricings().get(i).equals(form.getGlobalContext().Admin.getActivityContextPricingDetail()))
                {
                    lsaVo.getActivityContextPricings().set(i, form.getGlobalContext().Admin.getActivityContextPricingDetail());
                    break;
                }
            }
            populatePricing(form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode().getParent(), lsaVo.getActivityContextPricings());
        }

        form.getLocalContext().setSelectedLocationServiceActivity(lsaVo);

        if (form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode() != null)
        {
            if (form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode().getValue() instanceof ActivityContextPricingDetailsVo)
                form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode().getParent().setValue(lsaVo);
            else if (form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode().getValue() instanceof LocationServiceActivityVo)
                form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode().setValue(lsaVo);
        }

        if (form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing().getSelectedNode() == null)//wdev-7106
            form.getContextMenus().hideAllLocationServiceActivityGridMenuItems();

        form.lyr1().Edit().lyrLocationDetail().showtabPagePricing();
    }
    if (formName.equals(form.getForms().Admin.ProcedurePriceIncrease) && result.equals(DialogResult.OK))
    {
        populateLocationServices(form.treHeader().getSelectedNode(), (LocShortVo) form.treHeader().getSelectedNode().getValue());
        managePricingMenuOptions(((LocShortVo) form.treHeader().getSelectedNode().getValue()).getTreatingHosp());
    }

    if (formName.equals(form.getForms().Admin.NTPFBatchPriceSelectionDialog) && result.equals(DialogResult.OK))
    {
        engine.open(form.getForms().Admin.ProcedurePriceIncrease);
    }

    if (formName.equals(form.getForms().Core.NewPriceBatchDialog) && result.equals(DialogResult.OK))
    {
        form.getGlobalContext().NTPF.setConfirmPriceIncreases(false);
        engine.open(form.getForms().Admin.ProcedurePriceIncrease, new Object[]{FormMode.EDIT});
    }
}
项目:openmaxims-linux    文件:Logic.java   
protected void onContextMenuItemClick(int menuItemID, Control sender) throws PresentationLogicException
{
    if (sender.equals(form.lyr1().Edit().lyrLocationDetail().tabPagePricing().trePricing()))
    {
        setHospitalSpecialtyProcedure();
        switch (menuItemID)
        {
            case GenForm.ContextMenus.LocationServiceActivityGrid.NEW_PRICE :
                menuActivityNewPriceClick();
            break;
            case GenForm.ContextMenus.LocationServiceActivityGrid.UPDATE_PRICING :
                menuActivityUpdatePriceClick();
            break;
            case GenForm.ContextMenus.LocationServiceActivityGrid.VIEW_PRICING :
                menuActivityViewPriceClick();
            break;
        }
    }

    switch (menuItemID)
    {
        case GenForm.ContextMenus.GenericGrid.Add :
            newInstance();
        break;
        case GenForm.ContextMenus.GenericGrid.Update :
            updateInstance();
        break;
        case GenForm.ContextMenus.GenericGrid.Remove :
        {
            if (form.treHeader().getSelectedNode().getValue() instanceof LocationServiceVo)
            {
                removeService();
            }
            else if (form.treHeader().getSelectedNode().getValue() instanceof LocationServiceFunctionsVo)
                removeFunction();
            else if (form.treHeader().getSelectedNode().getValue() instanceof LocationServiceActivityVo)
                removeActivity();
            break;
        }
        case GenForm.ContextMenus.GenericGrid.Confirm :
            activatePrices();
        break;
        case GenForm.ContextMenus.GenericGrid.Replace :
            priceIncrease();
        break;
        default :
        break;
    }
}
项目:openmaxims-linux    文件:LocationServiceImpl.java   
public ActivityVoCollection listActivity(LocationServiceActivityVo locationServiceActivity) throws DomainInterfaceException
{
    DomainFactory factory = getDomainFactory();

    if (locationServiceActivity == null)
        return ActivityVoAssembler.createActivityVoCollectionFromActivity(factory.listDomainObjects(Activity.class));

    ActivityVoCollection voCollActivity = new ActivityVoCollection();

    String hql = "select locServiceActivity from LocationServiceActivity locServiceActivity, Procedure proc join proc.keywords as kw";
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    condStr.append(andStr + " where locServiceActivity.serviceActivity is not null and locServiceActivity.serviceActivity.activity = proc.activity");
    andStr = " and ";

    if (locationServiceActivity.getLocationService() != null)
    {
        condStr.append(andStr + " locServiceActivity.locationService.id = :locService");
        markers.add("locService");
        values.add(locationServiceActivity.getLocationService().getID_LocationService());
        andStr = " and ";
    }

    if ((locationServiceActivity.getServiceActivityIsNotNull()) && (locationServiceActivity.getServiceActivity().getActivityIsNotNull()) && (locationServiceActivity.getServiceActivity().getActivity().getIsActiveIsNotNull()))
    {
        condStr.append(andStr + " locServiceActivity.serviceActivity.activity.isActive = :isActive");
        markers.add("isActive");
        values.add(locationServiceActivity.getServiceActivity().getActivity().getIsActive());
        andStr = " and ";
    }

    if ((locationServiceActivity.getLocationServiceIsNotNull()) && (locationServiceActivity.getLocationService().getIsActiveIsNotNull()))
    {
        condStr.append(andStr + " locServiceActivity.isActive = :isLSActive");
        markers.add("isLSActive");
        values.add(locationServiceActivity.getLocationService().getIsActive());
        andStr = " and ";
    }

    hql += condStr.toString();

    LocationServiceActivityVoCollection voCollLocServiceActivity = null;
    voCollLocServiceActivity = LocationServiceActivityVoAssembler.createLocationServiceActivityVoCollectionFromLocationServiceActivity(Keywords.searchByKeywords(factory, locationServiceActivity.getServiceActivity().getActivity().getName(), hql.toString(), markers, values));
    factory.getDomainSession().clearMessages();

    for (int i = 0; i < voCollLocServiceActivity.size(); i++)
    {
        if (voCollLocServiceActivity.get(i).getServiceActivityIsNotNull())
            voCollActivity.add(voCollLocServiceActivity.get(i).getServiceActivity().getActivity());
    }
    return voCollActivity.sort();
}
项目:openmaxims-linux    文件:ServiceImpl.java   
private String checkActiveLSALinksForInactiveSA(ims.core.vo.ServiceActivityVoCollection voCollServiceActivity) throws DomainInterfaceException
{
    // for all inactive records, check that there are no active
    // LocationServiceActivity links
    for (int i = 0; i < voCollServiceActivity.size(); i++)
    {
        if (!voCollServiceActivity.get(i).getIsActive().booleanValue())
        {
            // check if an active Location Service Activity records
            LocationService impl = (LocationService) getDomainImpl(LocationServiceImpl.class);
            LocationServiceActivityVo voLocSerAct = new LocationServiceActivityVo();
            voLocSerAct.setServiceActivity(voCollServiceActivity.get(i));
            voLocSerAct.setIsActive(new Boolean(true));
            LocationServiceVo voLocSer = new LocationServiceVo();
            ServiceVo voService = new ServiceVo();
            voService.setID_Service(voCollServiceActivity.get(i).getService().getID_Service());
            voService.setIsActive(voCollServiceActivity.get(i).getService().getIsActive());
            voLocSer.setService(voService);
            voLocSerAct.setLocationService(voLocSer);
            LocationServiceActivityVoCollection voColl = impl.listLocationServiceActivity(voLocSerAct.getLocationService(), voLocSerAct.getServiceActivity().getActivity());

            if (voColl != null && voColl.size() > 0 && voLocSerAct.getIsActiveIsNotNull())
            {
                String text = "The following " + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(false) + "," + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + "," + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false) + " links are still used and active.\r\n";
                String activeMessage = null;

                for (int j = 0; j < voColl.size(); j++)
                {
                    if (voColl.get(j).getIsActiveIsNotNull() && voColl.get(j).getIsActive().booleanValue())
                    {
                        activeMessage += "\r\n" + ConfigFlag.UI.DISPLAY_NAME_LOCATION.getValue(false) + " : " + (voColl.get(j).getLocationService().getLocation().getNameIsNotNull() ? voColl.get(j).getLocationService().getLocation().getName() : "");
                        activeMessage += "  " + ConfigFlag.UI.DISPLAY_NAME_SERVICE.getValue(false) + " : " + (voColl.get(j).getLocationService().getService().getServiceNameIsNotNull() ? voColl.get(j).getLocationService().getService().getServiceName() : "");
                        for (int k = 0; k < voColl.get(j).getLocationService().getActivities().size(); k++)
                        {
                            if (voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivityIsNotNull() && voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().equals(voCollServiceActivity.get(i)) && voColl.get(j).getLocationService().getActivities().get(k).getLocationService().getActivities().get(k).getIsActive().booleanValue() && !voCollServiceActivity.get(i).getIsActive().booleanValue())
                            {
                                activeMessage += "\r\n" + ConfigFlag.UI.DISPLAY_NAME_ACTIVITY.getValue(false) + " : " + (voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivity().getNameIsNotNull() ? voColl.get(j).getLocationService().getActivities().get(k).getServiceActivity().getActivity().getName() : "");
                            }
                        }
                    }

                }
                if (activeMessage != null)
                    return text + activeMessage.replace("null", "");
            }
        }
    }
    return null;
}