Java 类ims.ocrr.vo.InvestigationSelectOrderVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private void analyzeProfile(InvestigationSelectOrderVo profile)
{
    if (profile == null)
        return;

    if (profile.getAssocInvestigationsIsNotNull())
    {
        for (int x = 0; x < profile.getAssocInvestigations().size(); x++)
        {
            analyzeComponents(profile.getAssocInvestigations().get(x));
        }
    }
    if (profile.getInvestigationIndexIsNotNull() && profile.getInvestigationIndex().getInvestigationsIsNotNull())
    {
        for (int x = 0; x < profile.getInvestigationIndex().getInvestigations().size(); x++)
        {
            analyzeComponents(profile.getInvestigationIndex().getInvestigations().get(x));
        }
    }
}
项目:AvoinApotti    文件:OrderEntryTemplatePopulation.java   
private StringBuffer getTurnaround(InvestigationSelectOrderVo investigationSelectOrderVo)
{
    StringBuffer tooltip = new StringBuffer();

    if (investigationSelectOrderVo.getTurnaroundMeasureIsNotNull() && investigationSelectOrderVo.getExpectedTurnaroundIsNotNull())
    {
        tooltip.append(" - Expected Turn Around: ");
        tooltip.append(investigationSelectOrderVo.getExpectedTurnaround().toString());
        tooltip.append(" ").append(investigationSelectOrderVo.getTurnaroundMeasure().getText());
    }
    else if (investigationSelectOrderVo.getProviderServiceIsNotNull() && investigationSelectOrderVo.getProviderService().getLocationServiceIsNotNull() && investigationSelectOrderVo.getProviderService().getLocationService().getServiceIsNotNull() && investigationSelectOrderVo.getProviderService().getLocationService().getService().getExpectedTurnaround() != null)
    {
        tooltip.append(" - Expected Turn Around: ");
        tooltip.append(investigationSelectOrderVo.getProviderService().getLocationService().getService().getExpectedTurnaround().toString());

        if(investigationSelectOrderVo.getProviderService().getLocationService().getService().getTurnaroundMeasure() != null)
            tooltip.append(" ").append(investigationSelectOrderVo.getProviderService().getLocationService().getService().getTurnaroundMeasure().getText());
    }

    return tooltip;
}
项目:openMAXIMS    文件:Logic.java   
private void analyzeProfile(InvestigationSelectOrderVo profile)
{
    if (profile == null)
        return;

    if (profile.getAssocInvestigationsIsNotNull())
    {
        for (int x = 0; x < profile.getAssocInvestigations().size(); x++)
        {
            analyzeComponents(profile.getAssocInvestigations().get(x));
        }
    }
    if (profile.getInvestigationIndexIsNotNull() && profile.getInvestigationIndex().getInvestigationsIsNotNull())
    {
        for (int x = 0; x < profile.getInvestigationIndex().getInvestigations().size(); x++)
        {
            analyzeComponents(profile.getInvestigationIndex().getInvestigations().get(x));
        }
    }
}
项目:openMAXIMS    文件:OrderEntryTemplatePopulation.java   
private StringBuffer getTurnaround(InvestigationSelectOrderVo investigationSelectOrderVo)
{
    StringBuffer tooltip = new StringBuffer();

    if (investigationSelectOrderVo.getTurnaroundMeasureIsNotNull() && investigationSelectOrderVo.getExpectedTurnaroundIsNotNull())
    {
        tooltip.append(" - Expected Turn Around: ");
        tooltip.append(investigationSelectOrderVo.getExpectedTurnaround().toString());
        tooltip.append(" ").append(investigationSelectOrderVo.getTurnaroundMeasure().getText());
    }
    else if (investigationSelectOrderVo.getProviderServiceIsNotNull() && investigationSelectOrderVo.getProviderService().getLocationServiceIsNotNull() && investigationSelectOrderVo.getProviderService().getLocationService().getServiceIsNotNull() && investigationSelectOrderVo.getProviderService().getLocationService().getService().getExpectedTurnaround() != null)
    {
        tooltip.append(" - Expected Turn Around: ");
        tooltip.append(investigationSelectOrderVo.getProviderService().getLocationService().getService().getExpectedTurnaround().toString());

        if(investigationSelectOrderVo.getProviderService().getLocationService().getService().getTurnaroundMeasure() != null)
            tooltip.append(" ").append(investigationSelectOrderVo.getProviderService().getLocationService().getService().getTurnaroundMeasure().getText());
    }

    return tooltip;
}
项目:openMAXIMS    文件:Logic.java   
private void analyzeProfile(InvestigationSelectOrderVo profile)
{
    if (profile == null)
        return;

    if (profile.getAssocInvestigationsIsNotNull())
    {
        for (int x = 0; x < profile.getAssocInvestigations().size(); x++)
        {
            analyzeComponents(profile.getAssocInvestigations().get(x));
        }
    }
    if (profile.getInvestigationIndexIsNotNull() && profile.getInvestigationIndex().getInvestigationsIsNotNull())
    {
        for (int x = 0; x < profile.getInvestigationIndex().getInvestigations().size(); x++)
        {
            analyzeComponents(profile.getInvestigationIndex().getInvestigations().get(x));
        }
    }
}
项目:openMAXIMS    文件:OrderEntryTemplatePopulation.java   
private StringBuffer getTurnaround(InvestigationSelectOrderVo investigationSelectOrderVo)
{
    StringBuffer tooltip = new StringBuffer();

    if (investigationSelectOrderVo.getTurnaroundMeasureIsNotNull() && investigationSelectOrderVo.getExpectedTurnaroundIsNotNull())
    {
        tooltip.append(" - Expected Turn Around: ");
        tooltip.append(investigationSelectOrderVo.getExpectedTurnaround().toString());
        tooltip.append(" ").append(investigationSelectOrderVo.getTurnaroundMeasure().getText());
    }
    else if (investigationSelectOrderVo.getProviderServiceIsNotNull() && investigationSelectOrderVo.getProviderService().getLocationServiceIsNotNull() && investigationSelectOrderVo.getProviderService().getLocationService().getServiceIsNotNull() && investigationSelectOrderVo.getProviderService().getLocationService().getService().getExpectedTurnaround() != null)
    {
        tooltip.append(" - Expected Turn Around: ");
        tooltip.append(investigationSelectOrderVo.getProviderService().getLocationService().getService().getExpectedTurnaround().toString());

        if(investigationSelectOrderVo.getProviderService().getLocationService().getService().getTurnaroundMeasure() != null)
            tooltip.append(" ").append(investigationSelectOrderVo.getProviderService().getLocationService().getService().getTurnaroundMeasure().getText());
    }

    return tooltip;
}
项目:openmaxims-linux    文件:Logic.java   
private void analyzeProfile(InvestigationSelectOrderVo profile)
{
    if (profile == null)
        return;

    if (profile.getAssocInvestigationsIsNotNull())
    {
        for (int x = 0; x < profile.getAssocInvestigations().size(); x++)
        {
            analyzeComponents(profile.getAssocInvestigations().get(x));
        }
    }
    if (profile.getInvestigationIndexIsNotNull() && profile.getInvestigationIndex().getInvestigationsIsNotNull())
    {
        for (int x = 0; x < profile.getInvestigationIndex().getInvestigations().size(); x++)
        {
            analyzeComponents(profile.getInvestigationIndex().getInvestigations().get(x));
        }
    }
}
项目:openmaxims-linux    文件:OrderEntryTemplatePopulation.java   
private StringBuffer getTurnaround(InvestigationSelectOrderVo investigationSelectOrderVo)
{
    StringBuffer tooltip = new StringBuffer();

    if (investigationSelectOrderVo.getTurnaroundMeasureIsNotNull() && investigationSelectOrderVo.getExpectedTurnaroundIsNotNull())
    {
        tooltip.append(" - Expected Turn Around: ");
        tooltip.append(investigationSelectOrderVo.getExpectedTurnaround().toString());
        tooltip.append(" ").append(investigationSelectOrderVo.getTurnaroundMeasure().getText());
    }
    else if (investigationSelectOrderVo.getProviderServiceIsNotNull() && investigationSelectOrderVo.getProviderService().getLocationServiceIsNotNull() && investigationSelectOrderVo.getProviderService().getLocationService().getServiceIsNotNull() && investigationSelectOrderVo.getProviderService().getLocationService().getService().getExpectedTurnaround() != null)
    {
        tooltip.append(" - Expected Turn Around: ");
        tooltip.append(investigationSelectOrderVo.getProviderService().getLocationService().getService().getExpectedTurnaround().toString());

        if(investigationSelectOrderVo.getProviderService().getLocationService().getService().getTurnaroundMeasure() != null)
            tooltip.append(" ").append(investigationSelectOrderVo.getProviderService().getLocationService().getService().getTurnaroundMeasure().getText());
    }

    return tooltip;
}
项目:AvoinApotti    文件:Logic.java   
private void doSelection(DynamicGridCell cell, SelectedComponentFromSelectOrderVo component)
{
    addRemoveSelection(component, ((Boolean) cell.getValue()).booleanValue(), false);

    //if (((Boolean) cell.getValue()).booleanValue())
    {
        InvestigationSelectOrderVo investigation = domain.getChildComponentsForInvestigationOrProfile(component.getID(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());

        clearAnalyzedChildComponents();
        markUnmarkChildComponentsRecursive(investigation, false, component.getID(), null, 0, ((Boolean) cell.getValue()).booleanValue(), component.getReOrderReason());//WDEV-16624
        clearAnalyzedChildComponents();
    }
}
项目:AvoinApotti    文件:Logic.java   
private InvestigationRefVoCollection getInvestigationsFromOrderSet(OrderSetForHelpTextVo item) 
{
    if(item == null || item.getComponent() == null)
        return null;

    InvestigationRefVoCollection coll = new InvestigationRefVoCollection();

    for(int i=0; i<item.getComponent().size(); i++)
    {
        OrderSetComponentForHelpTextVo component = item.getComponent().get(i);

        if(component == null)
            continue;

        InvestigationSelectOrderVo inv = component.getInvestigation();

        if(inv.getInvestigationIndex().getIsProfile())
        {
            if(inv.getAssocInvestigations() != null)
            {
                for(int j=0; j<inv.getAssocInvestigations().size(); j++)
                {
                    InvestigationSelectOrderVo invinv = inv.getAssocInvestigations().get(j);

                    if(invinv == null)
                        continue;

                    coll.add(invinv);
                }
            }
        }
        else
        {
            coll.add(inv);
        }
    }

    return coll;
}
项目: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 String getComponentInvestigationTooltip(InvestigationSelectOrderVo investigation)
{
    if (investigation == null)
        return "";

    StringBuilder tooltip = new StringBuilder();

    tooltip.append(investigation.getInvestigationIndex().getDescription());

    if (investigation.getTurnaroundMeasureIsNotNull() && investigation.getExpectedTurnaroundIsNotNull())
    {
        tooltip.append(" - Expected Turn Around: ");
        tooltip.append(investigation.getExpectedTurnaround().toString());
        tooltip.append(" ").append(investigation.getTurnaroundMeasure().getText());
    }
    else if (investigation.getProviderServiceIsNotNull() && investigation.getProviderService().getLocationServiceIsNotNull() && investigation.getProviderService().getLocationService().getServiceIsNotNull() && investigation.getProviderService().getLocationService().getService().getExpectedTurnaround() != null)
    {
        tooltip.append(" - Expected Turn Around: ");
        tooltip.append(investigation.getProviderService().getLocationService().getService().getExpectedTurnaround().toString());
        tooltip.append(" ").append(investigation.getProviderService().getLocationService().getService().getTurnaroundMeasure().getText());
    }

    // Amend '&' characters with space not to cause problems in tool tip boxes
    // as these are HTML and '&' is a special character
    for (int i = tooltip.length() - 1; i >= 0; i--)
    {
        if (tooltip.charAt(i) == '&' && i < tooltip.length() - 1 && tooltip.charAt(i + 1) != ' ')
            tooltip.insert(i, " ");
    }

    return tooltip.toString();
}
项目:AvoinApotti    文件:OrderEntryTemplatePopulation.java   
private TreeSet<String> getInvestigationNamesFromOrderSet(OrderSetForHelpTextVo orderSet, TreeSet<String> investigationNames, ArrayList<OrderSetForHelpTextVo> visitedOrderSet) 
{
    if(orderSet == null || orderSet.getComponent() == null || visitedOrderSet.indexOf(orderSet) >=0)
        return investigationNames;

    visitedOrderSet.add(orderSet);
    OrderSetComponentForHelpTextVoCollection orderSetComponent = orderSet.getComponent();

    for(int i=0; i<orderSetComponent.size(); i++)
    {
        OrderSetComponentForHelpTextVo component = orderSetComponent.get(i);

        if(component == null)
            continue;

        if(component.getInvestigationIsNotNull() && component.getInvestigation().getInvestigationIndexIsNotNull() && (component.getInvestigation().getInvestigationIndex().getIsProfile() == null || Boolean.FALSE.equals(component.getInvestigation().getInvestigationIndex().getIsProfile())))
            investigationNames.add(component.getInvestigation().getInvestigationIndex().getName() + getTurnaround(component.getInvestigation())); //WDEV-16863

        if(component.getInvestigationIsNotNull() && component.getInvestigation().getAssocInvestigationsIsNotNull())
        {
            for(int j=0; j<component.getInvestigation().getAssocInvestigations().size(); j++)
            {
                InvestigationSelectOrderVo investigationChild = component.getInvestigation().getAssocInvestigations().get(j);

                if(!investigationChild.getInvestigationIndexIsNotNull())
                    continue;

                if(investigationChild.getInvestigationIndex().getIsProfile() == null || Boolean.FALSE.equals(investigationChild.getInvestigationIndex().getIsProfile()))
                    investigationNames.add(investigationChild.getInvestigationIndex().getName() + getTurnaround(investigationChild)); //WDEV-16863
            }
        }

        getInvestigationNamesFromOrderSet(component.getOrderSet(), investigationNames, visitedOrderSet);
    }

    return investigationNames;
}
项目:openMAXIMS    文件:Logic.java   
private void doSelection(DynamicGridCell cell, SelectedComponentFromSelectOrderVo component)
{
    addRemoveSelection(component, ((Boolean) cell.getValue()).booleanValue(), false);

    //if (((Boolean) cell.getValue()).booleanValue())
    {
        InvestigationSelectOrderVo investigation = domain.getChildComponentsForInvestigationOrProfile(component.getID(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());

        clearAnalyzedChildComponents();
        markUnmarkChildComponentsRecursive(investigation, false, component.getID(), null, 0, ((Boolean) cell.getValue()).booleanValue(), component.getReOrderReason());//WDEV-16624
        clearAnalyzedChildComponents();
    }
}
项目:openMAXIMS    文件:Logic.java   
private InvestigationRefVoCollection getInvestigationsFromOrderSet(OrderSetForHelpTextVo item) 
{
    if(item == null || item.getComponent() == null)
        return null;

    InvestigationRefVoCollection coll = new InvestigationRefVoCollection();

    for(int i=0; i<item.getComponent().size(); i++)
    {
        OrderSetComponentForHelpTextVo component = item.getComponent().get(i);

        if(component == null)
            continue;

        InvestigationSelectOrderVo inv = component.getInvestigation();

        if(inv.getInvestigationIndex().getIsProfile())
        {
            if(inv.getAssocInvestigations() != null)
            {
                for(int j=0; j<inv.getAssocInvestigations().size(); j++)
                {
                    InvestigationSelectOrderVo invinv = inv.getAssocInvestigations().get(j);

                    if(invinv == null)
                        continue;

                    coll.add(invinv);
                }
            }
        }
        else
        {
            coll.add(inv);
        }
    }

    return coll;
}
项目: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 String getComponentInvestigationTooltip(InvestigationSelectOrderVo investigation)
{
    if (investigation == null)
        return "";

    StringBuilder tooltip = new StringBuilder();

    tooltip.append(investigation.getInvestigationIndex().getDescription());

    if (investigation.getTurnaroundMeasureIsNotNull() && investigation.getExpectedTurnaroundIsNotNull())
    {
        tooltip.append(" - Expected Turn Around: ");
        tooltip.append(investigation.getExpectedTurnaround().toString());
        tooltip.append(" ").append(investigation.getTurnaroundMeasure().getText());
    }
    else if (investigation.getProviderServiceIsNotNull() && investigation.getProviderService().getLocationServiceIsNotNull() && investigation.getProviderService().getLocationService().getServiceIsNotNull() && investigation.getProviderService().getLocationService().getService().getExpectedTurnaround() != null)
    {
        tooltip.append(" - Expected Turn Around: ");
        tooltip.append(investigation.getProviderService().getLocationService().getService().getExpectedTurnaround().toString());
        tooltip.append(" ").append(investigation.getProviderService().getLocationService().getService().getTurnaroundMeasure().getText());
    }

    // Amend '&' characters with space not to cause problems in tool tip boxes
    // as these are HTML and '&' is a special character
    for (int i = tooltip.length() - 1; i >= 0; i--)
    {
        if (tooltip.charAt(i) == '&' && i < tooltip.length() - 1 && tooltip.charAt(i + 1) != ' ')
            tooltip.insert(i, " ");
    }

    return tooltip.toString();
}
项目:openMAXIMS    文件:OrderEntryTemplatePopulation.java   
private TreeSet<String> getInvestigationNamesFromOrderSet(OrderSetForHelpTextVo orderSet, TreeSet<String> investigationNames, ArrayList<OrderSetForHelpTextVo> visitedOrderSet) 
{
    if(orderSet == null || orderSet.getComponent() == null || visitedOrderSet.indexOf(orderSet) >=0)
        return investigationNames;

    visitedOrderSet.add(orderSet);
    OrderSetComponentForHelpTextVoCollection orderSetComponent = orderSet.getComponent();

    for(int i=0; i<orderSetComponent.size(); i++)
    {
        OrderSetComponentForHelpTextVo component = orderSetComponent.get(i);

        if(component == null)
            continue;

        if(component.getInvestigationIsNotNull() && component.getInvestigation().getInvestigationIndexIsNotNull() && (component.getInvestigation().getInvestigationIndex().getIsProfile() == null || Boolean.FALSE.equals(component.getInvestigation().getInvestigationIndex().getIsProfile())))
            investigationNames.add(component.getInvestigation().getInvestigationIndex().getName() + getTurnaround(component.getInvestigation())); //WDEV-16863

        if(component.getInvestigationIsNotNull() && component.getInvestigation().getAssocInvestigationsIsNotNull())
        {
            for(int j=0; j<component.getInvestigation().getAssocInvestigations().size(); j++)
            {
                InvestigationSelectOrderVo investigationChild = component.getInvestigation().getAssocInvestigations().get(j);

                if(!investigationChild.getInvestigationIndexIsNotNull())
                    continue;

                if(investigationChild.getInvestigationIndex().getIsProfile() == null || Boolean.FALSE.equals(investigationChild.getInvestigationIndex().getIsProfile()))
                    investigationNames.add(investigationChild.getInvestigationIndex().getName() + getTurnaround(investigationChild)); //WDEV-16863
            }
        }

        getInvestigationNamesFromOrderSet(component.getOrderSet(), investigationNames, visitedOrderSet);
    }

    return investigationNames;
}
项目:openMAXIMS    文件:Logic.java   
private void doSelection(DynamicGridCell cell, SelectedComponentFromSelectOrderVo component)
{
    addRemoveSelection(component, ((Boolean) cell.getValue()).booleanValue(), false);

    //if (((Boolean) cell.getValue()).booleanValue())
    {
        InvestigationSelectOrderVo investigation = domain.getChildComponentsForInvestigationOrProfile(component.getID(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());

        clearAnalyzedChildComponents();
        markUnmarkChildComponentsRecursive(investigation, false, component.getID(), null, 0, ((Boolean) cell.getValue()).booleanValue(), component.getReOrderReason());//WDEV-16624
        clearAnalyzedChildComponents();
    }
}
项目:openMAXIMS    文件:Logic.java   
private InvestigationRefVoCollection getInvestigationsFromOrderSet(OrderSetForHelpTextVo item) 
{
    if(item == null || item.getComponent() == null)
        return null;

    InvestigationRefVoCollection coll = new InvestigationRefVoCollection();

    for(int i=0; i<item.getComponent().size(); i++)
    {
        OrderSetComponentForHelpTextVo component = item.getComponent().get(i);

        if(component == null)
            continue;

        InvestigationSelectOrderVo inv = component.getInvestigation();

        if(inv.getInvestigationIndex().getIsProfile())
        {
            if(inv.getAssocInvestigations() != null)
            {
                for(int j=0; j<inv.getAssocInvestigations().size(); j++)
                {
                    InvestigationSelectOrderVo invinv = inv.getAssocInvestigations().get(j);

                    if(invinv == null)
                        continue;

                    coll.add(invinv);
                }
            }
        }
        else
        {
            coll.add(inv);
        }
    }

    return coll;
}
项目: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 String getComponentInvestigationTooltip(InvestigationSelectOrderVo investigation)
{
    if (investigation == null)
        return "";

    StringBuilder tooltip = new StringBuilder();

    tooltip.append(investigation.getInvestigationIndex().getDescription());

    if (investigation.getTurnaroundMeasureIsNotNull() && investigation.getExpectedTurnaroundIsNotNull())
    {
        tooltip.append(" - Expected Turn Around: ");
        tooltip.append(investigation.getExpectedTurnaround().toString());
        tooltip.append(" ").append(investigation.getTurnaroundMeasure().getText());
    }
    else if (investigation.getProviderServiceIsNotNull() && investigation.getProviderService().getLocationServiceIsNotNull() && investigation.getProviderService().getLocationService().getServiceIsNotNull() && investigation.getProviderService().getLocationService().getService().getExpectedTurnaround() != null)
    {
        tooltip.append(" - Expected Turn Around: ");
        tooltip.append(investigation.getProviderService().getLocationService().getService().getExpectedTurnaround().toString());
        tooltip.append(" ").append(investigation.getProviderService().getLocationService().getService().getTurnaroundMeasure().getText());
    }

    // Amend '&' characters with space not to cause problems in tool tip boxes
    // as these are HTML and '&' is a special character
    for (int i = tooltip.length() - 1; i >= 0; i--)
    {
        if (tooltip.charAt(i) == '&' && i < tooltip.length() - 1 && tooltip.charAt(i + 1) != ' ')
            tooltip.insert(i, " ");
    }

    return tooltip.toString();
}
项目:openMAXIMS    文件:OrderEntryTemplatePopulation.java   
private TreeSet<String> getInvestigationNamesFromOrderSet(OrderSetForHelpTextVo orderSet, TreeSet<String> investigationNames, ArrayList<OrderSetForHelpTextVo> visitedOrderSet) 
{
    if(orderSet == null || orderSet.getComponent() == null || visitedOrderSet.indexOf(orderSet) >=0)
        return investigationNames;

    visitedOrderSet.add(orderSet);
    OrderSetComponentForHelpTextVoCollection orderSetComponent = orderSet.getComponent();

    for(int i=0; i<orderSetComponent.size(); i++)
    {
        OrderSetComponentForHelpTextVo component = orderSetComponent.get(i);

        if(component == null)
            continue;

        if(component.getInvestigationIsNotNull() && component.getInvestigation().getInvestigationIndexIsNotNull() && (component.getInvestigation().getInvestigationIndex().getIsProfile() == null || Boolean.FALSE.equals(component.getInvestigation().getInvestigationIndex().getIsProfile())))
            investigationNames.add(component.getInvestigation().getInvestigationIndex().getName() + getTurnaround(component.getInvestigation())); //WDEV-16863

        if(component.getInvestigationIsNotNull() && component.getInvestigation().getAssocInvestigationsIsNotNull())
        {
            for(int j=0; j<component.getInvestigation().getAssocInvestigations().size(); j++)
            {
                InvestigationSelectOrderVo investigationChild = component.getInvestigation().getAssocInvestigations().get(j);

                if(!investigationChild.getInvestigationIndexIsNotNull())
                    continue;

                if(investigationChild.getInvestigationIndex().getIsProfile() == null || Boolean.FALSE.equals(investigationChild.getInvestigationIndex().getIsProfile()))
                    investigationNames.add(investigationChild.getInvestigationIndex().getName() + getTurnaround(investigationChild)); //WDEV-16863
            }
        }

        getInvestigationNamesFromOrderSet(component.getOrderSet(), investigationNames, visitedOrderSet);
    }

    return investigationNames;
}
项目:openmaxims-linux    文件:Logic.java   
private void doSelection(DynamicGridCell cell, SelectedComponentFromSelectOrderVo component)
{
    addRemoveSelection(component, ((Boolean) cell.getValue()).booleanValue(), false);

    //if (((Boolean) cell.getValue()).booleanValue())
    {
        InvestigationSelectOrderVo investigation = domain.getChildComponentsForInvestigationOrProfile(component.getID(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());

        clearAnalyzedChildComponents();
        markUnmarkChildComponentsRecursive(investigation, false, component.getID(), null, 0, ((Boolean) cell.getValue()).booleanValue(), component.getReOrderReason());//WDEV-16624
        clearAnalyzedChildComponents();
    }
}
项目:openmaxims-linux    文件:Logic.java   
private InvestigationRefVoCollection getInvestigationsFromOrderSet(OrderSetForHelpTextVo item) 
{
    if(item == null || item.getComponent() == null)
        return null;

    InvestigationRefVoCollection coll = new InvestigationRefVoCollection();

    for(int i=0; i<item.getComponent().size(); i++)
    {
        OrderSetComponentForHelpTextVo component = item.getComponent().get(i);

        if(component == null)
            continue;

        InvestigationSelectOrderVo inv = component.getInvestigation();

        if(inv.getInvestigationIndex().getIsProfile())
        {
            if(inv.getAssocInvestigations() != null)
            {
                for(int j=0; j<inv.getAssocInvestigations().size(); j++)
                {
                    InvestigationSelectOrderVo invinv = inv.getAssocInvestigations().get(j);

                    if(invinv == null)
                        continue;

                    coll.add(invinv);
                }
            }
        }
        else
        {
            coll.add(inv);
        }
    }

    return coll;
}
项目:openmaxims-linux    文件: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-linux    文件:Logic.java   
private String getComponentInvestigationTooltip(InvestigationSelectOrderVo investigation)
{
    if (investigation == null)
        return "";

    StringBuilder tooltip = new StringBuilder();

    tooltip.append(investigation.getInvestigationIndex().getDescription());

    if (investigation.getTurnaroundMeasureIsNotNull() && investigation.getExpectedTurnaroundIsNotNull())
    {
        tooltip.append(" - Expected Turn Around: ");
        tooltip.append(investigation.getExpectedTurnaround().toString());
        tooltip.append(" ").append(investigation.getTurnaroundMeasure().getText());
    }
    else if (investigation.getProviderServiceIsNotNull() && investigation.getProviderService().getLocationServiceIsNotNull() && investigation.getProviderService().getLocationService().getServiceIsNotNull() && investigation.getProviderService().getLocationService().getService().getExpectedTurnaround() != null)
    {
        tooltip.append(" - Expected Turn Around: ");
        tooltip.append(investigation.getProviderService().getLocationService().getService().getExpectedTurnaround().toString());
        tooltip.append(" ").append(investigation.getProviderService().getLocationService().getService().getTurnaroundMeasure().getText());
    }

    // Amend '&' characters with space not to cause problems in tool tip boxes
    // as these are HTML and '&' is a special character
    for (int i = tooltip.length() - 1; i >= 0; i--)
    {
        if (tooltip.charAt(i) == '&' && i < tooltip.length() - 1 && tooltip.charAt(i + 1) != ' ')
            tooltip.insert(i, " ");
    }

    return tooltip.toString();
}
项目:openmaxims-linux    文件:OrderEntryTemplatePopulation.java   
private TreeSet<String> getInvestigationNamesFromOrderSet(OrderSetForHelpTextVo orderSet, TreeSet<String> investigationNames, ArrayList<OrderSetForHelpTextVo> visitedOrderSet) 
{
    if(orderSet == null || orderSet.getComponent() == null || visitedOrderSet.indexOf(orderSet) >=0)
        return investigationNames;

    visitedOrderSet.add(orderSet);
    OrderSetComponentForHelpTextVoCollection orderSetComponent = orderSet.getComponent();

    for(int i=0; i<orderSetComponent.size(); i++)
    {
        OrderSetComponentForHelpTextVo component = orderSetComponent.get(i);

        if(component == null)
            continue;

        if(component.getInvestigationIsNotNull() && component.getInvestigation().getInvestigationIndexIsNotNull() && (component.getInvestigation().getInvestigationIndex().getIsProfile() == null || Boolean.FALSE.equals(component.getInvestigation().getInvestigationIndex().getIsProfile())))
            investigationNames.add(component.getInvestigation().getInvestigationIndex().getName() + getTurnaround(component.getInvestigation())); //WDEV-16863

        if(component.getInvestigationIsNotNull() && component.getInvestigation().getAssocInvestigationsIsNotNull())
        {
            for(int j=0; j<component.getInvestigation().getAssocInvestigations().size(); j++)
            {
                InvestigationSelectOrderVo investigationChild = component.getInvestigation().getAssocInvestigations().get(j);

                if(!investigationChild.getInvestigationIndexIsNotNull())
                    continue;

                if(investigationChild.getInvestigationIndex().getIsProfile() == null || Boolean.FALSE.equals(investigationChild.getInvestigationIndex().getIsProfile()))
                    investigationNames.add(investigationChild.getInvestigationIndex().getName() + getTurnaround(investigationChild)); //WDEV-16863
            }
        }

        getInvestigationNamesFromOrderSet(component.getOrderSet(), investigationNames, visitedOrderSet);
    }

    return investigationNames;
}
项目:AvoinApotti    文件:Logic.java   
private void markUnmarkComponent(OrderEntryTemplateComponentShortVo component, boolean mark, String reorderReason)//WDEV-16624
{
    if (component.getInvestigationIsNotNull())
    {
        // Investigation or profile selected, will check the type now
        boolean isProfile = false;
        if (component.getInvestigation().getInvestigationIndexIsNotNull())
        {
            if (component.getInvestigation().getInvestigationIndex().getIsProfileIsNotNull())
                isProfile = component.getInvestigation().getInvestigationIndex().getIsProfile().booleanValue();
        }

        markUnmarkComponent(component.getInvestigation(), isProfile, mark, false, reorderReason);//WDEV-16624

        // mark/unmark all child components
        //if (mark)
        {
            InvestigationSelectOrderVo investigation = domain.getChildComponentsForInvestigationOrProfile(component.getInvestigation().getID_Investigation(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());

            clearAnalyzedChildComponents();
            markUnmarkChildComponentsRecursive(investigation, false, null, null, 0, mark, reorderReason);//WDEV-16624
            clearAnalyzedChildComponents();
        }
    }
    else if (component.getOrderSetIsNotNull())
    {
        // Order set selected
        markUnmarkComponent(component.getOrderSet(), mark, false);

        // mark/unmark all child components
        //if (mark)
        {
            ComponentSelectOrderVoCollection childComponents = domain.getChildComponentsForOrderSet(component.getOrderSet().getID_OrderSet(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());
            if (childComponents != null)
            {
                for (int x = 0; x < childComponents.size(); x++)
                {
                    if (childComponents.get(x) != null)
                    {
                        clearAnalyzedChildComponents();
                        markUnmarkChildComponentsRecursive(childComponents.get(x).getInvestigation(), null, new Integer(0), 0, component.getOrderSetIsNotNull(), mark, reorderReason);//WDEV-16624
                        clearAnalyzedChildComponents();
                    }
                }
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void markUnmarkChildComponentsRecursive(InvestigationSelectOrderVo childInvestigation, Integer parentInvId, Integer idCurrentInvestigation, int level, boolean fromOrderSet, boolean mark, String reorderReason)//WDEV-16624
{
    markUnmarkChildComponentsRecursive(childInvestigation, true, parentInvId, idCurrentInvestigation, level, fromOrderSet, mark, reorderReason);
}
项目:AvoinApotti    文件:Logic.java   
private void markUnmarkChildComponentsRecursive(InvestigationSelectOrderVo childInvestigation, boolean addRoot, Integer parentInvId, Integer idCurrentInvestigation, int level, boolean mark, String reorderReason)//WDEV-16624
{
    markUnmarkChildComponentsRecursive(childInvestigation, addRoot, parentInvId, idCurrentInvestigation, level, false, mark, reorderReason);
}
项目:AvoinApotti    文件:Logic.java   
private void markUnmarkChildComponentsRecursive(InvestigationSelectOrderVo childInvestigation, boolean addRoot, Integer parentInvId, Integer idCurrentInvestigation, int level, boolean fromOrderSet, boolean mark, String reorderReason)//WDEV-16624
{
    if (childInvestigation == null || childInvestigation.getInvestigationIndex() == null)
        return;

    SelectAndOrderComponentType type = SelectAndOrderComponentType.INVESTIGATION;
    if (childInvestigation.getInvestigationIndex().getIsProfileIsNotNull() && childInvestigation.getInvestigationIndex().getIsProfile().booleanValue())
        type = SelectAndOrderComponentType.PROFILE;

    int requiredLevel = fromOrderSet ? -1 : 1; // WDEV-4821

    if (!wasAnalyzed(childInvestigation.getID_Investigation(), type))
    {
        markAsAnalyzed(childInvestigation.getID_Investigation(), type);
        if (addRoot)
        {
            SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
            component.setID(childInvestigation.getID_Investigation());
            component.setComponentType(type);
            component.setText(childInvestigation.getInvestigationIndex().getName());
            component.setCategory(childInvestigation.getInvestigationIndex().getCategory());
            component.setTooltip(getComponentInvestigationTooltip(childInvestigation));
            component.setParentInvestigationId(parentInvId);
            component.setIsAddon(childInvestigation.getIsAddon());
            component.setRequiresSite(childInvestigation.getInvestigationIndex().getRequiresSiteSpecifier());
            component.setPhlebMayCollect(childInvestigation.getInvestigationIndex().getPhlebMayCollect());
            component.setGenderSpecific(childInvestigation.getInvestigationIndex().getGenderSpecific());

            if (childInvestigation.getProviderServiceIsNotNull() && childInvestigation.getProviderService().getLocationServiceIsNotNull() && childInvestigation.getProviderService().getLocationService().getServiceIsNotNull())
                component.setServiceID(childInvestigation.getProviderService().getLocationService().getService().getID_Service());

            //WDEV-16624
            if(checkIfInvestigationIsInBreachedList(childInvestigation.getID_Investigation()))
            {
                component.setReOrderReason(reorderReason);
            }

            if (childInvestigation.getInvestigationIndex().getActiveStatusIsNotNull() && childInvestigation.getInvestigationIndex().getActiveStatus().equals(PreActiveActiveInactiveStatus.ACTIVE))
                addRemoveSelection(component, mark, true);
        }

        if (childInvestigation.getAssocInvestigationsIsNotNull())
        {
            for (int x = 0; x < childInvestigation.getAssocInvestigations().size(); x++)
            {
                if (idCurrentInvestigation != null && (idCurrentInvestigation != childInvestigation.getID_Investigation()))
                    level++;

                if (level < requiredLevel || requiredLevel == -1) // WDEV-4821
                    markUnmarkChildComponentsRecursive(childInvestigation.getAssocInvestigations().get(x), true, childInvestigation.getID_Investigation(), childInvestigation.getID_Investigation(), level, mark, reorderReason);//WDEV-16624
            }
        }
    }
}
项目:AvoinApotti    文件:SelectandOrderImpl.java   
/**
 * method will filter any items that don't pass security checks WDEV-11071,WDEV-11109
 */
public InvestigationSelectOrderVo getChildComponentsForInvestigationOrProfile(Integer investigationID, RoleDisciplineSecurityLevelLiteGCVo voSecurity) 
{
    Investigation doInvest = (Investigation)getDomainFactory().getDomainObject(Investigation.class, investigationID.intValue());
    boolean isProfile =  doInvest.getInvestigationIndex().isIsProfile();

    InvestigationSelectOrderVo invest = InvestigationSelectOrderVoAssembler.create((Investigation)getDomainFactory().getDomainObject(Investigation.class, investigationID.intValue()));

    //enforce Security here for profiles to filter out children that do not pass the security check
    if(isProfile)
    {
        InvestigationSelectOrderVoCollection removableComponenets = new InvestigationSelectOrderVoCollection();
        for(InvestigationSelectOrderVo comp : invest.getAssocInvestigations())
        {
            if(voSecurity != null)
            {
                SecurityLevelAndServiceCheckVo voSecLevelAndService = getSecurityLevelAndServiceForInvestigation(comp.getID_Investigation());
                if(voSecLevelAndService != null && voSecLevelAndService.getSecurityLevelIsNotNull() && voSecLevelAndService.getServiceIsNotNull())
                {
                    if(!voSecurity.doesInvPassSecurityCheck(voSecLevelAndService.getService(),voSecLevelAndService.getSecurityLevel(),true)) //WDEV-11622
                    {
                        removableComponenets.add(comp);
                        continue;
                    }
                }
            }
        }

        if(removableComponenets.size() > 0)
        {
            for(InvestigationSelectOrderVo compToRemove : removableComponenets)
            {
                invest.getAssocInvestigations().remove(compToRemove);
            }
        }

        //if the profile now has no secure children return null which will tell ui that none of the children passed the security check
        if(invest.getAssocInvestigations().size() == 0)
            return null;
    }

    return invest;
}
项目:openMAXIMS    文件:Logic.java   
private void markUnmarkComponent(OrderEntryTemplateComponentShortVo component, boolean mark, String reorderReason)//WDEV-16624
{
    if (component.getInvestigationIsNotNull())
    {
        // Investigation or profile selected, will check the type now
        boolean isProfile = false;
        if (component.getInvestigation().getInvestigationIndexIsNotNull())
        {
            if (component.getInvestigation().getInvestigationIndex().getIsProfileIsNotNull())
                isProfile = component.getInvestigation().getInvestigationIndex().getIsProfile().booleanValue();
        }

        markUnmarkComponent(component.getInvestigation(), isProfile, mark, false, reorderReason);//WDEV-16624

        // mark/unmark all child components
        //if (mark)
        {
            InvestigationSelectOrderVo investigation = domain.getChildComponentsForInvestigationOrProfile(component.getInvestigation().getID_Investigation(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());

            clearAnalyzedChildComponents();
            markUnmarkChildComponentsRecursive(investigation, false, null, null, 0, mark, reorderReason);//WDEV-16624
            clearAnalyzedChildComponents();
        }
    }
    else if (component.getOrderSetIsNotNull())
    {
        // Order set selected
        markUnmarkComponent(component.getOrderSet(), mark, false);

        // mark/unmark all child components
        //if (mark)
        {
            ComponentSelectOrderVoCollection childComponents = domain.getChildComponentsForOrderSet(component.getOrderSet().getID_OrderSet(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());
            if (childComponents != null)
            {
                for (int x = 0; x < childComponents.size(); x++)
                {
                    if (childComponents.get(x) != null)
                    {
                        clearAnalyzedChildComponents();
                        markUnmarkChildComponentsRecursive(childComponents.get(x).getInvestigation(), null, new Integer(0), 0, component.getOrderSetIsNotNull(), mark, reorderReason);//WDEV-16624
                        clearAnalyzedChildComponents();
                    }
                }
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void markUnmarkChildComponentsRecursive(InvestigationSelectOrderVo childInvestigation, Integer parentInvId, Integer idCurrentInvestigation, int level, boolean fromOrderSet, boolean mark, String reorderReason)//WDEV-16624
{
    markUnmarkChildComponentsRecursive(childInvestigation, true, parentInvId, idCurrentInvestigation, level, fromOrderSet, mark, reorderReason);
}
项目:openMAXIMS    文件:Logic.java   
private void markUnmarkChildComponentsRecursive(InvestigationSelectOrderVo childInvestigation, boolean addRoot, Integer parentInvId, Integer idCurrentInvestigation, int level, boolean mark, String reorderReason)//WDEV-16624
{
    markUnmarkChildComponentsRecursive(childInvestigation, addRoot, parentInvId, idCurrentInvestigation, level, false, mark, reorderReason);
}
项目:openMAXIMS    文件:Logic.java   
private void markUnmarkChildComponentsRecursive(InvestigationSelectOrderVo childInvestigation, boolean addRoot, Integer parentInvId, Integer idCurrentInvestigation, int level, boolean fromOrderSet, boolean mark, String reorderReason)//WDEV-16624
{
    if (childInvestigation == null || childInvestigation.getInvestigationIndex() == null)
        return;

    SelectAndOrderComponentType type = SelectAndOrderComponentType.INVESTIGATION;
    if (childInvestigation.getInvestigationIndex().getIsProfileIsNotNull() && childInvestigation.getInvestigationIndex().getIsProfile().booleanValue())
        type = SelectAndOrderComponentType.PROFILE;

    int requiredLevel = fromOrderSet ? -1 : 1; // WDEV-4821

    if (!wasAnalyzed(childInvestigation.getID_Investigation(), type))
    {
        markAsAnalyzed(childInvestigation.getID_Investigation(), type);
        if (addRoot)
        {
            SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
            component.setID(childInvestigation.getID_Investigation());
            component.setComponentType(type);
            component.setText(childInvestigation.getInvestigationIndex().getName());
            component.setCategory(childInvestigation.getInvestigationIndex().getCategory());
            component.setTooltip(getComponentInvestigationTooltip(childInvestigation));
            component.setParentInvestigationId(parentInvId);
            component.setIsAddon(childInvestigation.getIsAddon());
            component.setRequiresSite(childInvestigation.getInvestigationIndex().getRequiresSiteSpecifier());
            component.setPhlebMayCollect(childInvestigation.getInvestigationIndex().getPhlebMayCollect());
            component.setGenderSpecific(childInvestigation.getInvestigationIndex().getGenderSpecific());

            if (childInvestigation.getProviderServiceIsNotNull() && childInvestigation.getProviderService().getLocationServiceIsNotNull() && childInvestigation.getProviderService().getLocationService().getServiceIsNotNull())
                component.setServiceID(childInvestigation.getProviderService().getLocationService().getService().getID_Service());

            //WDEV-16624
            if(checkIfInvestigationIsInBreachedList(childInvestigation.getID_Investigation()))
            {
                component.setReOrderReason(reorderReason);
            }

            if (childInvestigation.getInvestigationIndex().getActiveStatusIsNotNull() && childInvestigation.getInvestigationIndex().getActiveStatus().equals(PreActiveActiveInactiveStatus.ACTIVE))
                addRemoveSelection(component, mark, true);
        }

        if (childInvestigation.getAssocInvestigationsIsNotNull())
        {
            for (int x = 0; x < childInvestigation.getAssocInvestigations().size(); x++)
            {
                if (idCurrentInvestigation != null && (idCurrentInvestigation != childInvestigation.getID_Investigation()))
                    level++;

                if (level < requiredLevel || requiredLevel == -1) // WDEV-4821
                    markUnmarkChildComponentsRecursive(childInvestigation.getAssocInvestigations().get(x), true, childInvestigation.getID_Investigation(), childInvestigation.getID_Investigation(), level, mark, reorderReason);//WDEV-16624
            }
        }
    }
}
项目:openMAXIMS    文件:SelectandOrderImpl.java   
/**
 * method will filter any items that don't pass security checks WDEV-11071,WDEV-11109
 */
public InvestigationSelectOrderVo getChildComponentsForInvestigationOrProfile(Integer investigationID, RoleDisciplineSecurityLevelLiteGCVo voSecurity) 
{
    Investigation doInvest = (Investigation)getDomainFactory().getDomainObject(Investigation.class, investigationID.intValue());
    boolean isProfile =  doInvest.getInvestigationIndex().isIsProfile();

    InvestigationSelectOrderVo invest = InvestigationSelectOrderVoAssembler.create((Investigation)getDomainFactory().getDomainObject(Investigation.class, investigationID.intValue()));

    //enforce Security here for profiles to filter out children that do not pass the security check
    if(isProfile)
    {
        InvestigationSelectOrderVoCollection removableComponenets = new InvestigationSelectOrderVoCollection();
        for(InvestigationSelectOrderVo comp : invest.getAssocInvestigations())
        {
            if(voSecurity != null)
            {
                SecurityLevelAndServiceCheckVo voSecLevelAndService = getSecurityLevelAndServiceForInvestigation(comp.getID_Investigation());
                if(voSecLevelAndService != null && voSecLevelAndService.getSecurityLevelIsNotNull() && voSecLevelAndService.getServiceIsNotNull())
                {
                    if(!voSecurity.doesInvPassSecurityCheck(voSecLevelAndService.getService(),voSecLevelAndService.getSecurityLevel(),true)) //WDEV-11622
                    {
                        removableComponenets.add(comp);
                        continue;
                    }
                }
            }
        }

        if(removableComponenets.size() > 0)
        {
            for(InvestigationSelectOrderVo compToRemove : removableComponenets)
            {
                invest.getAssocInvestigations().remove(compToRemove);
            }
        }

        //if the profile now has no secure children return null which will tell ui that none of the children passed the security check
        if(invest.getAssocInvestigations().size() == 0)
            return null;
    }

    return invest;
}
项目:openMAXIMS    文件:Logic.java   
private void markUnmarkComponent(OrderEntryTemplateComponentShortVo component, boolean mark, String reorderReason)//WDEV-16624
{
    if (component.getInvestigationIsNotNull())
    {
        // Investigation or profile selected, will check the type now
        boolean isProfile = false;
        if (component.getInvestigation().getInvestigationIndexIsNotNull())
        {
            if (component.getInvestigation().getInvestigationIndex().getIsProfileIsNotNull())
                isProfile = component.getInvestigation().getInvestigationIndex().getIsProfile().booleanValue();
        }

        markUnmarkComponent(component.getInvestigation(), isProfile, mark, false, reorderReason);//WDEV-16624

        // mark/unmark all child components
        //if (mark)
        {
            InvestigationSelectOrderVo investigation = domain.getChildComponentsForInvestigationOrProfile(component.getInvestigation().getID_Investigation(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());

            clearAnalyzedChildComponents();
            markUnmarkChildComponentsRecursive(investigation, false, null, null, 0, mark, reorderReason);//WDEV-16624
            clearAnalyzedChildComponents();
        }
    }
    else if (component.getOrderSetIsNotNull())
    {
        // Order set selected
        markUnmarkComponent(component.getOrderSet(), mark, false);

        // mark/unmark all child components
        //if (mark)
        {
            ComponentSelectOrderVoCollection childComponents = domain.getChildComponentsForOrderSet(component.getOrderSet().getID_OrderSet(),form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels());
            if (childComponents != null)
            {
                for (int x = 0; x < childComponents.size(); x++)
                {
                    if (childComponents.get(x) != null)
                    {
                        clearAnalyzedChildComponents();
                        markUnmarkChildComponentsRecursive(childComponents.get(x).getInvestigation(), null, new Integer(0), 0, component.getOrderSetIsNotNull(), mark, reorderReason);//WDEV-16624
                        clearAnalyzedChildComponents();
                    }
                }
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void markUnmarkChildComponentsRecursive(InvestigationSelectOrderVo childInvestigation, Integer parentInvId, Integer idCurrentInvestigation, int level, boolean fromOrderSet, boolean mark, String reorderReason)//WDEV-16624
{
    markUnmarkChildComponentsRecursive(childInvestigation, true, parentInvId, idCurrentInvestigation, level, fromOrderSet, mark, reorderReason);
}