Java 类ims.ocrr.vo.lookups.SelectAndOrderComponentType 实例源码

项目:AvoinApotti    文件:Logic.java   
private boolean selectionIsEmpty()
{
    SelectedComponentFromSelectOrderVoCollection selection = form.getLocalContext().getSelectedComponents();
    if (selection == null || selection.size() == 0)
        return true;

    for (int x = 0; x < selection.size(); x++)
    {
        SelectedComponentFromSelectOrderVo component = selection.get(x);
        if (component != null && component.getComponentTypeIsNotNull()
                && component.getComponentType().equals(SelectAndOrderComponentType.INVESTIGATION))
            return false;
    }

    return true;
}
项目:AvoinApotti    文件:Logic.java   
private GenderInvestigationVo getGenderInvestigationFromSelectedComponentFromSelectOrder(SelectedComponentFromSelectOrderVo component) 
{
    if(component == null)
        return null;

    GenderInvestigationVo inv = new GenderInvestigationVo();
    inv.setID_Investigation(component.getID());

    InvestigationIndexForGenderInvestigationVo invIndex = new InvestigationIndexForGenderInvestigationVo();
    invIndex.setName(component.getText());
    invIndex.setIsProfile(SelectAndOrderComponentType.PROFILE.equals(component.getComponentType()));

    inv.setInvestigationIndex(invIndex);

    return inv;
}
项目:AvoinApotti    文件:Logic.java   
private void removeFromRefusedInvestigationsList(SelectedComponentFromSelectOrderVo newComponent) 
{
    if(newComponent == null)
        return;

    if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null ||form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
        return;

    if(SelectAndOrderComponentType.INVESTIGATION.equals(newComponent.getComponentType()) || SelectAndOrderComponentType.PROFILE.equals(newComponent.getComponentType()))
    {
        removeComponentFromRefusedInvestigations(newComponent.getID());
    }

    if(newComponent.getAssociatedInvestigations() != null)
    {
        for(int i=0; i<newComponent.getAssociatedInvestigations().size(); i++)
        {
            InvestigationRefVo invId = newComponent.getAssociatedInvestigations().get(i);

            if(invId == null)
                continue;

            removeComponentFromRefusedInvestigations(invId.getID_Investigation());
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void removeProfilesWithoutAnyInvestigationsSelected() 
{
    SelectedComponentFromSelectOrderVoCollection selectedComponents = form.getLocalContext().getSelectedComponents();

    if(selectedComponents == null || selectedComponents.size() == 0)
        return;

    for(int i = selectedComponents.size() - 1; i >= 0; i--)
    {
        SelectedComponentFromSelectOrderVo selectedComponent = selectedComponents.get(i);

        if(selectedComponent == null || !SelectAndOrderComponentType.PROFILE.equals(selectedComponent.getComponentType()))
            continue;

        if(!doesProfileHasInvestigationsSelected(selectedComponent))
        {
            selectedComponents.remove(selectedComponent);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean componentIsInRefusedList(SelectedComponentFromSelectOrderVo newComponent) 
{
    if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null || form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
        return false;

    if(newComponent == null || SelectAndOrderComponentType.ORDERSET.equals(newComponent.getComponentType()))//  WDEV-16762
        return false;

    for(InvestigationRefVo refusedInv : form.getGlobalContext().OCRR.getRefusedInvestigation())
    {
        if(refusedInv == null || refusedInv.getID_Investigation() == null)
            continue;

        if(refusedInv.getID_Investigation().equals(newComponent.getID()) || (refusedInv.getID_Investigation().equals(newComponent.getParentInvestigationId())))
            return true;
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private boolean selectionIsEmpty()
{
    SelectedComponentFromSelectOrderVoCollection selection = form.getLocalContext().getSelectedComponents();
    if (selection == null || selection.size() == 0)
        return true;

    for (int x = 0; x < selection.size(); x++)
    {
        SelectedComponentFromSelectOrderVo component = selection.get(x);
        if (component != null && component.getComponentTypeIsNotNull()
                && component.getComponentType().equals(SelectAndOrderComponentType.INVESTIGATION))
            return false;
    }

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private GenderInvestigationVo getGenderInvestigationFromSelectedComponentFromSelectOrder(SelectedComponentFromSelectOrderVo component) 
{
    if(component == null)
        return null;

    GenderInvestigationVo inv = new GenderInvestigationVo();
    inv.setID_Investigation(component.getID());

    InvestigationIndexForGenderInvestigationVo invIndex = new InvestigationIndexForGenderInvestigationVo();
    invIndex.setName(component.getText());
    invIndex.setIsProfile(SelectAndOrderComponentType.PROFILE.equals(component.getComponentType()));

    inv.setInvestigationIndex(invIndex);

    return inv;
}
项目:openMAXIMS    文件:Logic.java   
private void removeFromRefusedInvestigationsList(SelectedComponentFromSelectOrderVo newComponent) 
{
    if(newComponent == null)
        return;

    if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null ||form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
        return;

    if(SelectAndOrderComponentType.INVESTIGATION.equals(newComponent.getComponentType()) || SelectAndOrderComponentType.PROFILE.equals(newComponent.getComponentType()))
    {
        removeComponentFromRefusedInvestigations(newComponent.getID());
    }

    if(newComponent.getAssociatedInvestigations() != null)
    {
        for(int i=0; i<newComponent.getAssociatedInvestigations().size(); i++)
        {
            InvestigationRefVo invId = newComponent.getAssociatedInvestigations().get(i);

            if(invId == null)
                continue;

            removeComponentFromRefusedInvestigations(invId.getID_Investigation());
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void removeProfilesWithoutAnyInvestigationsSelected() 
{
    SelectedComponentFromSelectOrderVoCollection selectedComponents = form.getLocalContext().getSelectedComponents();

    if(selectedComponents == null || selectedComponents.size() == 0)
        return;

    for(int i = selectedComponents.size() - 1; i >= 0; i--)
    {
        SelectedComponentFromSelectOrderVo selectedComponent = selectedComponents.get(i);

        if(selectedComponent == null || !SelectAndOrderComponentType.PROFILE.equals(selectedComponent.getComponentType()))
            continue;

        if(!doesProfileHasInvestigationsSelected(selectedComponent))
        {
            selectedComponents.remove(selectedComponent);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean componentIsInRefusedList(SelectedComponentFromSelectOrderVo newComponent) 
{
    if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null || form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
        return false;

    if(newComponent == null || SelectAndOrderComponentType.ORDERSET.equals(newComponent.getComponentType()))//  WDEV-16762
        return false;

    for(InvestigationRefVo refusedInv : form.getGlobalContext().OCRR.getRefusedInvestigation())
    {
        if(refusedInv == null || refusedInv.getID_Investigation() == null)
            continue;

        if(refusedInv.getID_Investigation().equals(newComponent.getID()) || (refusedInv.getID_Investigation().equals(newComponent.getParentInvestigationId())))
            return true;
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private boolean selectionIsEmpty()
{
    SelectedComponentFromSelectOrderVoCollection selection = form.getLocalContext().getSelectedComponents();
    if (selection == null || selection.size() == 0)
        return true;

    for (int x = 0; x < selection.size(); x++)
    {
        SelectedComponentFromSelectOrderVo component = selection.get(x);
        if (component != null && component.getComponentTypeIsNotNull()
                && component.getComponentType().equals(SelectAndOrderComponentType.INVESTIGATION))
            return false;
    }

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private GenderInvestigationVo getGenderInvestigationFromSelectedComponentFromSelectOrder(SelectedComponentFromSelectOrderVo component) 
{
    if(component == null)
        return null;

    GenderInvestigationVo inv = new GenderInvestigationVo();
    inv.setID_Investigation(component.getID());

    InvestigationIndexForGenderInvestigationVo invIndex = new InvestigationIndexForGenderInvestigationVo();
    invIndex.setName(component.getText());
    invIndex.setIsProfile(SelectAndOrderComponentType.PROFILE.equals(component.getComponentType()));

    inv.setInvestigationIndex(invIndex);

    return inv;
}
项目:openMAXIMS    文件:Logic.java   
private void removeFromRefusedInvestigationsList(SelectedComponentFromSelectOrderVo newComponent) 
{
    if(newComponent == null)
        return;

    if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null ||form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
        return;

    if(SelectAndOrderComponentType.INVESTIGATION.equals(newComponent.getComponentType()) || SelectAndOrderComponentType.PROFILE.equals(newComponent.getComponentType()))
    {
        removeComponentFromRefusedInvestigations(newComponent.getID());
    }

    if(newComponent.getAssociatedInvestigations() != null)
    {
        for(int i=0; i<newComponent.getAssociatedInvestigations().size(); i++)
        {
            InvestigationRefVo invId = newComponent.getAssociatedInvestigations().get(i);

            if(invId == null)
                continue;

            removeComponentFromRefusedInvestigations(invId.getID_Investigation());
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void removeProfilesWithoutAnyInvestigationsSelected() 
{
    SelectedComponentFromSelectOrderVoCollection selectedComponents = form.getLocalContext().getSelectedComponents();

    if(selectedComponents == null || selectedComponents.size() == 0)
        return;

    for(int i = selectedComponents.size() - 1; i >= 0; i--)
    {
        SelectedComponentFromSelectOrderVo selectedComponent = selectedComponents.get(i);

        if(selectedComponent == null || !SelectAndOrderComponentType.PROFILE.equals(selectedComponent.getComponentType()))
            continue;

        if(!doesProfileHasInvestigationsSelected(selectedComponent))
        {
            selectedComponents.remove(selectedComponent);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean componentIsInRefusedList(SelectedComponentFromSelectOrderVo newComponent) 
{
    if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null || form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
        return false;

    if(newComponent == null || SelectAndOrderComponentType.ORDERSET.equals(newComponent.getComponentType()))//  WDEV-16762
        return false;

    for(InvestigationRefVo refusedInv : form.getGlobalContext().OCRR.getRefusedInvestigation())
    {
        if(refusedInv == null || refusedInv.getID_Investigation() == null)
            continue;

        if(refusedInv.getID_Investigation().equals(newComponent.getID()) || (refusedInv.getID_Investigation().equals(newComponent.getParentInvestigationId())))
            return true;
    }

    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private boolean selectionIsEmpty()
{
    SelectedComponentFromSelectOrderVoCollection selection = form.getLocalContext().getSelectedComponents();
    if (selection == null || selection.size() == 0)
        return true;

    for (int x = 0; x < selection.size(); x++)
    {
        SelectedComponentFromSelectOrderVo component = selection.get(x);
        if (component != null && component.getComponentTypeIsNotNull()
                && component.getComponentType().equals(SelectAndOrderComponentType.INVESTIGATION))
            return false;
    }

    return true;
}
项目:openmaxims-linux    文件:Logic.java   
private GenderInvestigationVo getGenderInvestigationFromSelectedComponentFromSelectOrder(SelectedComponentFromSelectOrderVo component) 
{
    if(component == null)
        return null;

    GenderInvestigationVo inv = new GenderInvestigationVo();
    inv.setID_Investigation(component.getID());

    InvestigationIndexForGenderInvestigationVo invIndex = new InvestigationIndexForGenderInvestigationVo();
    invIndex.setName(component.getText());
    invIndex.setIsProfile(SelectAndOrderComponentType.PROFILE.equals(component.getComponentType()));

    inv.setInvestigationIndex(invIndex);

    return inv;
}
项目:openmaxims-linux    文件:Logic.java   
private void removeFromRefusedInvestigationsList(SelectedComponentFromSelectOrderVo newComponent) 
{
    if(newComponent == null)
        return;

    if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null ||form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
        return;

    if(SelectAndOrderComponentType.INVESTIGATION.equals(newComponent.getComponentType()) || SelectAndOrderComponentType.PROFILE.equals(newComponent.getComponentType()))
    {
        removeComponentFromRefusedInvestigations(newComponent.getID());
    }

    if(newComponent.getAssociatedInvestigations() != null)
    {
        for(int i=0; i<newComponent.getAssociatedInvestigations().size(); i++)
        {
            InvestigationRefVo invId = newComponent.getAssociatedInvestigations().get(i);

            if(invId == null)
                continue;

            removeComponentFromRefusedInvestigations(invId.getID_Investigation());
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void removeProfilesWithoutAnyInvestigationsSelected() 
{
    SelectedComponentFromSelectOrderVoCollection selectedComponents = form.getLocalContext().getSelectedComponents();

    if(selectedComponents == null || selectedComponents.size() == 0)
        return;

    for(int i = selectedComponents.size() - 1; i >= 0; i--)
    {
        SelectedComponentFromSelectOrderVo selectedComponent = selectedComponents.get(i);

        if(selectedComponent == null || !SelectAndOrderComponentType.PROFILE.equals(selectedComponent.getComponentType()))
            continue;

        if(!doesProfileHasInvestigationsSelected(selectedComponent))
        {
            selectedComponents.remove(selectedComponent);
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private boolean componentIsInRefusedList(SelectedComponentFromSelectOrderVo newComponent) 
{
    if(form.getGlobalContext().OCRR.getRefusedInvestigation() == null || form.getGlobalContext().OCRR.getRefusedInvestigation().size() == 0)
        return false;

    if(newComponent == null || SelectAndOrderComponentType.ORDERSET.equals(newComponent.getComponentType()))//  WDEV-16762
        return false;

    for(InvestigationRefVo refusedInv : form.getGlobalContext().OCRR.getRefusedInvestigation())
    {
        if(refusedInv == null || refusedInv.getID_Investigation() == null)
            continue;

        if(refusedInv.getID_Investigation().equals(newComponent.getID()) || (refusedInv.getID_Investigation().equals(newComponent.getParentInvestigationId())))
            return true;
    }

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private boolean wasAnalyzed(Integer id, SelectAndOrderComponentType type)
{
    SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
    component.setID(id);
    component.setComponentType(type);
    return wasAnalyzed(component);
}
项目:AvoinApotti    文件:Logic.java   
private void markAsAnalyzed(Integer id, SelectAndOrderComponentType type)
{
    SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
    component.setID(id);
    component.setComponentType(type);
    markAsAnalyzed(component);
}
项目:AvoinApotti    文件:Logic.java   
private void markUnmarkComponent(InvestShortVo item, boolean isProfile, boolean mark, boolean isChildComponent, String reorderReason)
{
    if (item != null && item.getID_InvestigationIsNotNull() && item.getInvestigationIndexIsNotNull())
    {
        SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
        component.setID(item.getID_Investigation());
        component.setComponentType(isProfile ? SelectAndOrderComponentType.PROFILE : SelectAndOrderComponentType.INVESTIGATION);
        component.setText(item.getInvestigationIndex().getName());
        component.setCategory(item.getInvestigationIndex().getCategory());
        component.setTooltip(getComponentInvestigationTooltip(item));
        component.setIsAddon(item.getIsAddon());
        component.setRequiresSite(item.getInvestigationIndex().getRequiresSiteSpecifier());
        component.setMinReOrderPeriod(item.getMinReorderPeriodUnit());
        component.setMinReOrderVal(item.getMinReorderPeriodVal());
        component.setMinReOrderFemalePeriod(item.getFemaleMinReorderPeriodUnit());
        component.setMinReOrderFemaleVal(item.getFemaleMinReorderPeriodVal());
        component.setPhlebMayCollect(item.getInvestigationIndex().getPhlebMayCollect());
        component.setGenderSpecific(item.getInvestigationIndex().getGenderSpecific());
        component.setReOrderReason(reorderReason);//WDEV-16624
        component.setAssociatedInvestigations(item.getAssocInvestigations());//WDEV-16624

        if (item.getProviderServiceIsNotNull() && item.getProviderService().getLocationServiceIsNotNull() && item.getProviderService().getLocationService().getServiceIsNotNull())
            component.setServiceID(item.getProviderService().getLocationService().getService().getID_Service());
        if (item.getActiveStatusIsNotNull() && item.getActiveStatus().equals(PreActiveActiveInactiveStatus.ACTIVE))
            addRemoveSelection(component, mark, isChildComponent);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void markUnmarkComponent(OrderSetForHelpTextVo item, boolean mark, boolean isChildComponent)//WDEV-16624
{
    if (item != null && item.getID_OrderSetIsNotNull())
    {
        SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
        component.setID(item.getID_OrderSet());
        component.setComponentType(SelectAndOrderComponentType.ORDERSET);
        component.setText(item.getName());
        component.setTooltip(escapeAmpersandInTooltip(item.getDescription()));
        component.setAssociatedInvestigations(getInvestigationsFromOrderSet(item));//WDEV-16624
        addRemoveSelection(component, mark, isChildComponent);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void checkIfTemplatesNeedUnchecked(SelectedComponentFromSelectOrderVoCollection selectedComponents, SelectedComponentFromSelectOrderVoCollection selectedLinkedComponents)
{
    if (selectedComponents == null || selectedLinkedComponents == null)
    {
        return;
    }

    Boolean exists;

    for (int a = 0; a < selectedComponents.size(); a++)
    {
        exists = Boolean.FALSE;

        if (SelectAndOrderComponentType.ORDERSET.equals(selectedComponents.get(a).getComponentType()))
        {
            ComponentSelectOrderVoCollection childComponents = domain.getChildComponentsForOrderSet(selectedComponents.get(a).getID(), form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());

            for (int b = 0; b < selectedLinkedComponents.size(); b++)
            {
                for (int c = 0; c < childComponents.size(); c++)
                {
                    if (selectedLinkedComponents.get(b).getID().equals(childComponents.get(c).getInvestigation().getID_Investigation()))
                    {
                        exists = Boolean.TRUE;
                        break;
                    }
                }

                if (exists)
                    break;
            }

            if (!exists)
            {
                selectedComponents.remove(selectedComponents.get(a));
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void removeFromBreachedInvestigationsList(SelectedComponentFromSelectOrderVo newComponent) 
{
    if(newComponent == null)
        return;

    if(form.getLocalContext().getBreachedInvestigations() == null || form.getLocalContext().getBreachedInvestigations().size() == 0)
        return;

    if(SelectAndOrderComponentType.INVESTIGATION.equals(newComponent.getComponentType()))
    {
        removeComponentFromBreachedInvestigations(newComponent.getID());//  WDEV-16762
    }
    else
    {
        if(newComponent.getAssociatedInvestigations() != null)
        {
            for(int i=0; i<newComponent.getAssociatedInvestigations().size(); i++)
            {
                InvestigationRefVo invId = newComponent.getAssociatedInvestigations().get(i);

                if(invId == null)
                    continue;

                removeComponentFromBreachedInvestigations(invId.getID_Investigation());//   WDEV-16762
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private Integer[] getInvestigationIdCollection(SelectedComponentFromSelectOrderVoCollection voColl)
{
    List<Integer> ids = new ArrayList<Integer>();
    for (int i = 0; voColl != null && i < voColl.size(); i++)
    {
        //WDEV-3306
        if(voColl.get(i).getComponentTypeIsNotNull() && voColl.get(i).getComponentType().equals(SelectAndOrderComponentType.PROFILE))
        {
            InvestigationSelectOrderVo voInvSelOrder = domain.getChildComponentsForInvestigationOrProfile(voColl.get(i).getID(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());
            for (int j = 0; voInvSelOrder != null && voInvSelOrder.getAssocInvestigationsIsNotNull() && j < voInvSelOrder.getAssocInvestigations().size(); j++)
            {
                //WDEV-16762
                if(voInvSelOrder.getAssocInvestigations().get(j) == null || voInvSelOrder.getAssocInvestigations().get(j).getID_Investigation() == null)
                    continue;

                //WDEV-16762
                if(!investigationIdIsInRefusedList(voInvSelOrder.getAssocInvestigations().get(j).getID_Investigation()))
                {
                    ids.add(voInvSelOrder.getAssocInvestigations().get(j).getID_Investigation());
                }
            }
        }
        else
        {
            if(voColl.get(i).getIDIsNotNull() && voColl.get(i).getParentInvestigationId() == null && (voColl.get(i).getComponentTypeIsNotNull() && !voColl.get(i).getComponentType().equals(SelectAndOrderComponentType.ORDERSET))) //WDEV-11408
                ids.add(voColl.get(i).getID());
        }
    }

    if (ids.size() > 0)
    {
        Integer[] intValues = new Integer[ids.size()];
        ids.toArray(intValues);
        return intValues;
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void rebuildComponentsFromData(OcsOrderVo voOcsOrder)
{
    // gather the orderinvestigation records and populate the
    // MyOrderComponents Global Context
    MyOrderComponentVoCollection components = new MyOrderComponentVoCollection();

    if (voOcsOrder.getInvestigationsIsNotNull())
    {
        for (int i = 0; i < voOcsOrder.getInvestigations().size(); i++)
        {
            OrderInvestigationVo voOrderInv = voOcsOrder.getInvestigations().get(i);

            if (OrderInvStatus.CANCELLED.equals(voOrderInv.getOrdInvCurrentStatus().getOrdInvStatus())
                    || OrderInvStatus.CANCEL_REQUEST.equals(voOrderInv.getOrdInvCurrentStatus().getOrdInvStatus()))
                continue;

            MyOrderComponentVo component = new MyOrderComponentVo();
            component.setCategory(voOrderInv.getInvestigation().getInvestigationIndex().getCategory());
            component.setAdditionalLocationInfo(voOrderInv.getInvestigation().getNameWithLocationInfo());
            component.setComponentType(SelectAndOrderComponentType.INVESTIGATION);
            component.setGenderSpecific(voOrderInv.getInvestigation().getInvestigationIndex().getGenderSpecific());
            component.setHelpText(voOrderInv.getInvestigation().buildHelpTextTooltip());
            component.setID(voOrderInv.getInvestigation().getID_Investigation());
            component.setIsAddon(voOrderInv.getInvestigation().getIsAddon());
            component.setPhlebMayCollect(voOrderInv.getInvestigation().getInvestigationIndex().getPhlebMayCollect());
            component.setRequiresSite(voOrderInv.getInvestigation().getInvestigationIndex().getRequiresSiteSpecifier());
            component.setServiceID(voOrderInv.getInvestigation().getProviderService() != null && voOrderInv.getInvestigation().getProviderService().getLocationService() != null ? voOrderInv.getInvestigation().getProviderService().getLocationService().getService().getID_Service() : null);
            component.setText(voOrderInv.getInvestigation().getInvestigationIndex().getName());
            component.setTooltip(voOrderInv.getInvestigation().getInvestigationIndex().getDescription());

            components.add(component);
        }

        components.sort(new MyOrderComponentComparator());//WDEV-14912
        form.getGlobalContext().OCRR.setMyOrderComponents(components);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void loadComponents(MyOrderComponentVoCollection components)
{
    for (int x = 0; x < components.size(); x++)
    {
        MyOrderComponentVo component = components.get(x);

        if (component != null)
        {
            boolean isProfile = false;
            TreeNode node = form.treeComponents().getNodes().add(component, component.getText());
            if (component.getTooltipIsNotNull())
                node.setTooltip(component.getTooltip());
            isProfile = component.getComponentTypeIsNotNull() && component.getComponentType().equals(SelectAndOrderComponentType.PROFILE);
            node.setExpandedImage(isProfile ? form.getImages().OCRR.Profile : form.getImages().OCRR.Investigation);
            node.setCollapsedImage(isProfile ? form.getImages().OCRR.Profile : form.getImages().OCRR.Investigation);
            node.setExpanded(true);

            if (component.getComponentsIsNotNull())
            {
                for (int y = 0; y < component.getComponents().size(); y++)
                {
                    MyOrderChildComponentVo childComponent = component.getComponents().get(y);

                    TreeNode childNode = node.getNodes().add(childComponent, childComponent.getText());
                    if (childComponent.getTooltipIsNotNull())
                        childNode.setTooltip(childComponent.getTooltip());
                    isProfile = childComponent.getComponentTypeIsNotNull() && childComponent.getComponentType().equals(SelectAndOrderComponentType.PROFILE);
                    childNode.setExpandedImage(isProfile ? form.getImages().OCRR.Profile : form.getImages().OCRR.Investigation);
                    childNode.setCollapsedImage(isProfile ? form.getImages().OCRR.Profile : form.getImages().OCRR.Investigation);
                }
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean wasAnalyzed(Integer id, SelectAndOrderComponentType type)
{
    SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
    component.setID(id);
    component.setComponentType(type);
    return wasAnalyzed(component);
}
项目:openMAXIMS    文件:Logic.java   
private void markAsAnalyzed(Integer id, SelectAndOrderComponentType type)
{
    SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
    component.setID(id);
    component.setComponentType(type);
    markAsAnalyzed(component);
}
项目:openMAXIMS    文件:Logic.java   
private void markUnmarkComponent(InvestShortVo item, boolean isProfile, boolean mark, boolean isChildComponent, String reorderReason)
{
    if (item != null && item.getID_InvestigationIsNotNull() && item.getInvestigationIndexIsNotNull())
    {
        SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
        component.setID(item.getID_Investigation());
        component.setComponentType(isProfile ? SelectAndOrderComponentType.PROFILE : SelectAndOrderComponentType.INVESTIGATION);
        component.setText(item.getInvestigationIndex().getName());
        component.setCategory(item.getInvestigationIndex().getCategory());
        component.setTooltip(getComponentInvestigationTooltip(item));
        component.setIsAddon(item.getIsAddon());
        component.setRequiresSite(item.getInvestigationIndex().getRequiresSiteSpecifier());
        component.setMinReOrderPeriod(item.getMinReorderPeriodUnit());
        component.setMinReOrderVal(item.getMinReorderPeriodVal());
        component.setMinReOrderFemalePeriod(item.getFemaleMinReorderPeriodUnit());
        component.setMinReOrderFemaleVal(item.getFemaleMinReorderPeriodVal());
        component.setPhlebMayCollect(item.getInvestigationIndex().getPhlebMayCollect());
        component.setGenderSpecific(item.getInvestigationIndex().getGenderSpecific());
        component.setReOrderReason(reorderReason);//WDEV-16624
        component.setAssociatedInvestigations(item.getAssocInvestigations());//WDEV-16624

        if (item.getProviderServiceIsNotNull() && item.getProviderService().getLocationServiceIsNotNull() && item.getProviderService().getLocationService().getServiceIsNotNull())
            component.setServiceID(item.getProviderService().getLocationService().getService().getID_Service());
        if (item.getActiveStatusIsNotNull() && item.getActiveStatus().equals(PreActiveActiveInactiveStatus.ACTIVE))
            addRemoveSelection(component, mark, isChildComponent);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void markUnmarkComponent(OrderSetForHelpTextVo item, boolean mark, boolean isChildComponent)//WDEV-16624
{
    if (item != null && item.getID_OrderSetIsNotNull())
    {
        SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
        component.setID(item.getID_OrderSet());
        component.setComponentType(SelectAndOrderComponentType.ORDERSET);
        component.setText(item.getName());
        component.setTooltip(escapeAmpersandInTooltip(item.getDescription()));
        component.setAssociatedInvestigations(getInvestigationsFromOrderSet(item));//WDEV-16624
        addRemoveSelection(component, mark, isChildComponent);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void checkIfTemplatesNeedUnchecked(SelectedComponentFromSelectOrderVoCollection selectedComponents, SelectedComponentFromSelectOrderVoCollection selectedLinkedComponents)
{
    if (selectedComponents == null || selectedLinkedComponents == null)
    {
        return;
    }

    Boolean exists;

    for (int a = 0; a < selectedComponents.size(); a++)
    {
        exists = Boolean.FALSE;

        if (SelectAndOrderComponentType.ORDERSET.equals(selectedComponents.get(a).getComponentType()))
        {
            ComponentSelectOrderVoCollection childComponents = domain.getChildComponentsForOrderSet(selectedComponents.get(a).getID(), form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());

            for (int b = 0; b < selectedLinkedComponents.size(); b++)
            {
                for (int c = 0; c < childComponents.size(); c++)
                {
                    if (selectedLinkedComponents.get(b).getID().equals(childComponents.get(c).getInvestigation().getID_Investigation()))
                    {
                        exists = Boolean.TRUE;
                        break;
                    }
                }

                if (exists)
                    break;
            }

            if (!exists)
            {
                selectedComponents.remove(selectedComponents.get(a));
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void removeFromBreachedInvestigationsList(SelectedComponentFromSelectOrderVo newComponent) 
{
    if(newComponent == null)
        return;

    if(form.getLocalContext().getBreachedInvestigations() == null || form.getLocalContext().getBreachedInvestigations().size() == 0)
        return;

    if(SelectAndOrderComponentType.INVESTIGATION.equals(newComponent.getComponentType()))
    {
        removeComponentFromBreachedInvestigations(newComponent.getID());//  WDEV-16762
    }
    else
    {
        if(newComponent.getAssociatedInvestigations() != null)
        {
            for(int i=0; i<newComponent.getAssociatedInvestigations().size(); i++)
            {
                InvestigationRefVo invId = newComponent.getAssociatedInvestigations().get(i);

                if(invId == null)
                    continue;

                removeComponentFromBreachedInvestigations(invId.getID_Investigation());//   WDEV-16762
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private Integer[] getInvestigationIdCollection(SelectedComponentFromSelectOrderVoCollection voColl)
{
    List<Integer> ids = new ArrayList<Integer>();
    for (int i = 0; voColl != null && i < voColl.size(); i++)
    {
        //WDEV-3306
        if(voColl.get(i).getComponentTypeIsNotNull() && voColl.get(i).getComponentType().equals(SelectAndOrderComponentType.PROFILE))
        {
            InvestigationSelectOrderVo voInvSelOrder = domain.getChildComponentsForInvestigationOrProfile(voColl.get(i).getID(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());
            for (int j = 0; voInvSelOrder != null && voInvSelOrder.getAssocInvestigationsIsNotNull() && j < voInvSelOrder.getAssocInvestigations().size(); j++)
            {
                //WDEV-16762
                if(voInvSelOrder.getAssocInvestigations().get(j) == null || voInvSelOrder.getAssocInvestigations().get(j).getID_Investigation() == null)
                    continue;

                //WDEV-16762
                if(!investigationIdIsInRefusedList(voInvSelOrder.getAssocInvestigations().get(j).getID_Investigation()))
                {
                    ids.add(voInvSelOrder.getAssocInvestigations().get(j).getID_Investigation());
                }
            }
        }
        else
        {
            if(voColl.get(i).getIDIsNotNull() && voColl.get(i).getParentInvestigationId() == null && (voColl.get(i).getComponentTypeIsNotNull() && !voColl.get(i).getComponentType().equals(SelectAndOrderComponentType.ORDERSET))) //WDEV-11408
                ids.add(voColl.get(i).getID());
        }
    }

    if (ids.size() > 0)
    {
        Integer[] intValues = new Integer[ids.size()];
        ids.toArray(intValues);
        return intValues;
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void rebuildComponentsFromData(OcsOrderVo voOcsOrder)
{
    // gather the orderinvestigation records and populate the
    // MyOrderComponents Global Context
    MyOrderComponentVoCollection components = new MyOrderComponentVoCollection();

    if (voOcsOrder.getInvestigationsIsNotNull())
    {
        for (int i = 0; i < voOcsOrder.getInvestigations().size(); i++)
        {
            OrderInvestigationVo voOrderInv = voOcsOrder.getInvestigations().get(i);

            if (OrderInvStatus.CANCELLED.equals(voOrderInv.getOrdInvCurrentStatus().getOrdInvStatus())
                    || OrderInvStatus.CANCEL_REQUEST.equals(voOrderInv.getOrdInvCurrentStatus().getOrdInvStatus()))
                continue;

            MyOrderComponentVo component = new MyOrderComponentVo();
            component.setCategory(voOrderInv.getInvestigation().getInvestigationIndex().getCategory());
            component.setAdditionalLocationInfo(voOrderInv.getInvestigation().getNameWithLocationInfo());
            component.setComponentType(SelectAndOrderComponentType.INVESTIGATION);
            component.setGenderSpecific(voOrderInv.getInvestigation().getInvestigationIndex().getGenderSpecific());
            component.setHelpText(voOrderInv.getInvestigation().buildHelpTextTooltip());
            component.setID(voOrderInv.getInvestigation().getID_Investigation());
            component.setIsAddon(voOrderInv.getInvestigation().getIsAddon());
            component.setPhlebMayCollect(voOrderInv.getInvestigation().getInvestigationIndex().getPhlebMayCollect());
            component.setRequiresSite(voOrderInv.getInvestigation().getInvestigationIndex().getRequiresSiteSpecifier());
            component.setServiceID(voOrderInv.getInvestigation().getProviderService() != null && voOrderInv.getInvestigation().getProviderService().getLocationService() != null ? voOrderInv.getInvestigation().getProviderService().getLocationService().getService().getID_Service() : null);
            component.setText(voOrderInv.getInvestigation().getInvestigationIndex().getName());
            component.setTooltip(voOrderInv.getInvestigation().getInvestigationIndex().getDescription());

            components.add(component);
        }

        components.sort(new MyOrderComponentComparator());//WDEV-14912
        form.getGlobalContext().OCRR.setMyOrderComponents(components);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void loadComponents(MyOrderComponentVoCollection components)
{
    for (int x = 0; x < components.size(); x++)
    {
        MyOrderComponentVo component = components.get(x);

        if (component != null)
        {
            boolean isProfile = false;
            TreeNode node = form.treeComponents().getNodes().add(component, component.getText());
            if (component.getTooltipIsNotNull())
                node.setTooltip(component.getTooltip());
            isProfile = component.getComponentTypeIsNotNull() && component.getComponentType().equals(SelectAndOrderComponentType.PROFILE);
            node.setExpandedImage(isProfile ? form.getImages().OCRR.Profile : form.getImages().OCRR.Investigation);
            node.setCollapsedImage(isProfile ? form.getImages().OCRR.Profile : form.getImages().OCRR.Investigation);
            node.setExpanded(true);

            if (component.getComponentsIsNotNull())
            {
                for (int y = 0; y < component.getComponents().size(); y++)
                {
                    MyOrderChildComponentVo childComponent = component.getComponents().get(y);

                    TreeNode childNode = node.getNodes().add(childComponent, childComponent.getText());
                    if (childComponent.getTooltipIsNotNull())
                        childNode.setTooltip(childComponent.getTooltip());
                    isProfile = childComponent.getComponentTypeIsNotNull() && childComponent.getComponentType().equals(SelectAndOrderComponentType.PROFILE);
                    childNode.setExpandedImage(isProfile ? form.getImages().OCRR.Profile : form.getImages().OCRR.Investigation);
                    childNode.setCollapsedImage(isProfile ? form.getImages().OCRR.Profile : form.getImages().OCRR.Investigation);
                }
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean wasAnalyzed(Integer id, SelectAndOrderComponentType type)
{
    SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
    component.setID(id);
    component.setComponentType(type);
    return wasAnalyzed(component);
}
项目:openMAXIMS    文件:Logic.java   
private void markAsAnalyzed(Integer id, SelectAndOrderComponentType type)
{
    SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
    component.setID(id);
    component.setComponentType(type);
    markAsAnalyzed(component);
}