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

项目:AvoinApotti    文件:Logic.java   
private String getSpecimenDisplayText(OrderSpecimenVo specimen, float totalRequiredVolume)
{
    // If the specimen doesn't have any investigations then display nothing
    if (specimen == null || specimen.getInvestigations() == null || specimen.getInvestigations().size() == 0)
        return "";

    StringBuilder displayText = new StringBuilder();

    // Get the first investigation
    OrderInvestigationVo firstInvestigation = (OrderInvestigationVo) specimen.getInvestigations().get(0);
    // Display the service name from first investigation
    displayText.append(firstInvestigation.getInvestigation().getProviderService().getLocationService().getService().getServiceName());
    // Display specimen type
    displayText.append(" (").append(firstInvestigation.getInvestigation().getPathInvDetails().getSpecimens().get(0).getType().getText()).append(") ");

    if (specimen.getSiteCd() != null)
    {
        displayText.append(specimen.getSiteCd().getText());
    }

    displayText.append(" - ").append(String.valueOf(totalRequiredVolume)).append(" mls");

    return displayText.toString();
}
项目:AvoinApotti    文件:Logic.java   
/**
 * WDEV-16498
 * Function used to set the tool tip for Pathology Specimen Details grids
 */
private void setTooltipsForGrid(DynamicGrid dynGrid)
{
    for (int i = 0; i < dynGrid.getRows().size(); i++)
    {
        DynamicGridRow parentRow = dynGrid.getRows().get(i);

        if (!(parentRow.getIdentifier() instanceof OrderInvestigationVoCollection))
            throw new CodingRuntimeException("Logical error - parent row identifier must be an OrderInvestigationVoCollection");

        OrderInvestigationVoCollection investigations = (OrderInvestigationVoCollection) parentRow.getIdentifier();

        StringBuilder tooltip = new StringBuilder();

        for (OrderInvestigationVo investigation : investigations)
        {
            if (tooltip.length() > 0) tooltip.append(", ");
            tooltip.append(investigation.getInvestigation().getInvestigationIndex().getName());
        }

        parentRow.getCells().get(dynGrid.getColumns().getByIdentifier(DISCIPLINE_COLUMN)).setTooltip(tooltip.toString());
    }
}
项目:AvoinApotti    文件:Logic.java   
private OrderPriority getPriorityIfExists(InvestigationIndexShortVo investigationIndex, OrderInvestigationVoCollection orderInvestigations)
{
    if (orderInvestigations == null)
        return null;

    if (investigationIndex == null || investigationIndex.getID_InvestigationIndex() == null)
        return null;

    for (OrderInvestigationVo investigation : orderInvestigations)
    {
        if (investigation.getInvestigation() != null && investigation.getInvestigation().getInvestigationIndex() != null)
        {
            if (investigationIndex.getID_InvestigationIndex() == investigation.getInvestigation().getInvestigationIndex().getID_InvestigationIndex())
                return investigation.getOrderPriority();
        }
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private OrderInvestigationVo getOrderInvestigationFromContextByInvestID(Integer investigationId)
{
    OrderInvestigationVo voOrderInvest = null;
    OrderInvestigationVoCollection voCollOrderInvestigation = form.getGlobalContext().OCRR.getOrderInvestigationCollection();
    if (voCollOrderInvestigation != null && voCollOrderInvestigation.size() > 0)
    {
        for (int i = 0; i < voCollOrderInvestigation.size(); i++)
        {
            if (voCollOrderInvestigation.get(i).getInvestigationIsNotNull() && voCollOrderInvestigation.get(i).getInvestigation().getID_Investigation().equals(investigationId))
            {
                voOrderInvest = voCollOrderInvestigation.get(i);
                return voOrderInvest;
            }
        }
    }
    return null;
}
项目:AvoinApotti    文件:Logic.java   
/**
 * Function used to fill in the OrderInvestigation.Containers field
 * <br>While this function doesn't have a return value, it does have a side-effect as it
 * modifies the OrderInvestigation VO
 */
private void fillInOrderInvestigationContainers(OrderInvestigationVo orderInvestigation, OrderSpecimenContainerVoCollection containers)
{
    if (orderInvestigation == null || containers == null)
        return;

    orderInvestigation.setContainer(new OrderSpecimenContainerVoCollection());

    for (OrderSpecimenContainerVo container : containers)
    {
        if (container.getOrderInvestigation() != null)
        {
            for (OrderInvestigationRefVo investigation : container.getOrderInvestigation())
            {
                if (investigation.equals(orderInvestigation))
                    orderInvestigation.getContainer().add(container);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private String getSpecimenDisplayText(OrderSpecimenVo specimen, float totalRequiredVolume)
{
    // If the specimen doesn't have any investigations then display nothing
    if (specimen == null || specimen.getInvestigations() == null || specimen.getInvestigations().size() == 0)
        return "";

    StringBuilder displayText = new StringBuilder();

    // Get the first investigation
    OrderInvestigationVo firstInvestigation = (OrderInvestigationVo) specimen.getInvestigations().get(0);
    // Display the service name from first investigation
    displayText.append(firstInvestigation.getInvestigation().getProviderService().getLocationService().getService().getServiceName());
    // Display specimen type
    displayText.append(" (").append(firstInvestigation.getInvestigation().getPathInvDetails().getSpecimens().get(0).getType().getText()).append(") ");

    if (specimen.getSiteCd() != null)
    {
        displayText.append(specimen.getSiteCd().getText());
    }

    displayText.append(" - ").append(String.valueOf(totalRequiredVolume)).append(" mls");

    return displayText.toString();
}
项目:openMAXIMS    文件:Logic.java   
/**
 * WDEV-16498
 * Function used to set the tool tip for Pathology Specimen Details grids
 */
private void setTooltipsForGrid(DynamicGrid dynGrid)
{
    for (int i = 0; i < dynGrid.getRows().size(); i++)
    {
        DynamicGridRow parentRow = dynGrid.getRows().get(i);

        if (!(parentRow.getIdentifier() instanceof OrderInvestigationVoCollection))
            throw new CodingRuntimeException("Logical error - parent row identifier must be an OrderInvestigationVoCollection");

        OrderInvestigationVoCollection investigations = (OrderInvestigationVoCollection) parentRow.getIdentifier();

        StringBuilder tooltip = new StringBuilder();

        for (OrderInvestigationVo investigation : investigations)
        {
            if (tooltip.length() > 0) tooltip.append(", ");
            tooltip.append(investigation.getInvestigation().getInvestigationIndex().getName());
        }

        parentRow.getCells().get(dynGrid.getColumns().getByIdentifier(DISCIPLINE_COLUMN)).setTooltip(tooltip.toString());
    }
}
项目:openMAXIMS    文件:Logic.java   
private OrderPriority getPriorityIfExists(InvestigationIndexShortVo investigationIndex, OrderInvestigationVoCollection orderInvestigations)
{
    if (orderInvestigations == null)
        return null;

    if (investigationIndex == null || investigationIndex.getID_InvestigationIndex() == null)
        return null;

    for (OrderInvestigationVo investigation : orderInvestigations)
    {
        if (investigation.getInvestigation() != null && investigation.getInvestigation().getInvestigationIndex() != null)
        {
            if (investigationIndex.getID_InvestigationIndex() == investigation.getInvestigation().getInvestigationIndex().getID_InvestigationIndex())
                return investigation.getOrderPriority();
        }
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private OrderInvestigationVo getOrderInvestigationFromContextByInvestID(Integer investigationId)
{
    OrderInvestigationVo voOrderInvest = null;
    OrderInvestigationVoCollection voCollOrderInvestigation = form.getGlobalContext().OCRR.getOrderInvestigationCollection();
    if (voCollOrderInvestigation != null && voCollOrderInvestigation.size() > 0)
    {
        for (int i = 0; i < voCollOrderInvestigation.size(); i++)
        {
            if (voCollOrderInvestigation.get(i).getInvestigationIsNotNull() && voCollOrderInvestigation.get(i).getInvestigation().getID_Investigation().equals(investigationId))
            {
                voOrderInvest = voCollOrderInvestigation.get(i);
                return voOrderInvest;
            }
        }
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
/**
 * Function used to fill in the OrderInvestigation.Containers field
 * <br>While this function doesn't have a return value, it does have a side-effect as it
 * modifies the OrderInvestigation VO
 */
private void fillInOrderInvestigationContainers(OrderInvestigationVo orderInvestigation, OrderSpecimenContainerVoCollection containers)
{
    if (orderInvestigation == null || containers == null)
        return;

    orderInvestigation.setContainer(new OrderSpecimenContainerVoCollection());

    for (OrderSpecimenContainerVo container : containers)
    {
        if (container.getOrderInvestigation() != null)
        {
            for (OrderInvestigationRefVo investigation : container.getOrderInvestigation())
            {
                if (investigation.equals(orderInvestigation))
                    orderInvestigation.getContainer().add(container);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private String getSpecimenDisplayText(OrderSpecimenVo specimen, float totalRequiredVolume)
{
    // If the specimen doesn't have any investigations then display nothing
    if (specimen == null || specimen.getInvestigations() == null || specimen.getInvestigations().size() == 0)
        return "";

    StringBuilder displayText = new StringBuilder();

    // Get the first investigation
    OrderInvestigationVo firstInvestigation = (OrderInvestigationVo) specimen.getInvestigations().get(0);
    // Display the service name from first investigation
    displayText.append(firstInvestigation.getInvestigation().getProviderService().getLocationService().getService().getServiceName());
    // Display specimen type
    displayText.append(" (").append(firstInvestigation.getInvestigation().getPathInvDetails().getSpecimens().get(0).getType().getText()).append(") ");

    if (specimen.getSiteCd() != null)
    {
        displayText.append(specimen.getSiteCd().getText());
    }

    displayText.append(" - ").append(String.valueOf(totalRequiredVolume)).append(" mls");

    return displayText.toString();
}
项目:openMAXIMS    文件:Logic.java   
/**
 * WDEV-16498
 * Function used to set the tool tip for Pathology Specimen Details grids
 */
private void setTooltipsForGrid(DynamicGrid dynGrid)
{
    for (int i = 0; i < dynGrid.getRows().size(); i++)
    {
        DynamicGridRow parentRow = dynGrid.getRows().get(i);

        if (!(parentRow.getIdentifier() instanceof OrderInvestigationVoCollection))
            throw new CodingRuntimeException("Logical error - parent row identifier must be an OrderInvestigationVoCollection");

        OrderInvestigationVoCollection investigations = (OrderInvestigationVoCollection) parentRow.getIdentifier();

        StringBuilder tooltip = new StringBuilder();

        for (OrderInvestigationVo investigation : investigations)
        {
            if (tooltip.length() > 0) tooltip.append(", ");
            tooltip.append(investigation.getInvestigation().getInvestigationIndex().getName());
        }

        parentRow.getCells().get(dynGrid.getColumns().getByIdentifier(DISCIPLINE_COLUMN)).setTooltip(tooltip.toString());
    }
}
项目:openMAXIMS    文件:Logic.java   
private OrderPriority getPriorityIfExists(InvestigationIndexShortVo investigationIndex, OrderInvestigationVoCollection orderInvestigations)
{
    if (orderInvestigations == null)
        return null;

    if (investigationIndex == null || investigationIndex.getID_InvestigationIndex() == null)
        return null;

    for (OrderInvestigationVo investigation : orderInvestigations)
    {
        if (investigation.getInvestigation() != null && investigation.getInvestigation().getInvestigationIndex() != null)
        {
            if (investigationIndex.getID_InvestigationIndex() == investigation.getInvestigation().getInvestigationIndex().getID_InvestigationIndex())
                return investigation.getOrderPriority();
        }
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private OrderInvestigationVo getOrderInvestigationFromContextByInvestID(Integer investigationId)
{
    OrderInvestigationVo voOrderInvest = null;
    OrderInvestigationVoCollection voCollOrderInvestigation = form.getGlobalContext().OCRR.getOrderInvestigationCollection();
    if (voCollOrderInvestigation != null && voCollOrderInvestigation.size() > 0)
    {
        for (int i = 0; i < voCollOrderInvestigation.size(); i++)
        {
            if (voCollOrderInvestigation.get(i).getInvestigationIsNotNull() && voCollOrderInvestigation.get(i).getInvestigation().getID_Investigation().equals(investigationId))
            {
                voOrderInvest = voCollOrderInvestigation.get(i);
                return voOrderInvest;
            }
        }
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
/**
 * Function used to fill in the OrderInvestigation.Containers field
 * <br>While this function doesn't have a return value, it does have a side-effect as it
 * modifies the OrderInvestigation VO
 */
private void fillInOrderInvestigationContainers(OrderInvestigationVo orderInvestigation, OrderSpecimenContainerVoCollection containers)
{
    if (orderInvestigation == null || containers == null)
        return;

    orderInvestigation.setContainer(new OrderSpecimenContainerVoCollection());

    for (OrderSpecimenContainerVo container : containers)
    {
        if (container.getOrderInvestigation() != null)
        {
            for (OrderInvestigationRefVo investigation : container.getOrderInvestigation())
            {
                if (investigation.equals(orderInvestigation))
                    orderInvestigation.getContainer().add(container);
            }
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private String getSpecimenDisplayText(OrderSpecimenVo specimen, float totalRequiredVolume)
{
    // If the specimen doesn't have any investigations then display nothing
    if (specimen == null || specimen.getInvestigations() == null || specimen.getInvestigations().size() == 0)
        return "";

    StringBuilder displayText = new StringBuilder();

    // Get the first investigation
    OrderInvestigationVo firstInvestigation = (OrderInvestigationVo) specimen.getInvestigations().get(0);
    // Display the service name from first investigation
    displayText.append(firstInvestigation.getInvestigation().getProviderService().getLocationService().getService().getServiceName());
    // Display specimen type
    displayText.append(" (").append(firstInvestigation.getInvestigation().getPathInvDetails().getSpecimens().get(0).getType().getText()).append(") ");

    if (specimen.getSiteCd() != null)
    {
        displayText.append(specimen.getSiteCd().getText());
    }

    displayText.append(" - ").append(String.valueOf(totalRequiredVolume)).append(" mls");

    return displayText.toString();
}
项目:openmaxims-linux    文件:Logic.java   
/**
 * WDEV-16498
 * Function used to set the tool tip for Pathology Specimen Details grids
 */
private void setTooltipsForGrid(DynamicGrid dynGrid)
{
    for (int i = 0; i < dynGrid.getRows().size(); i++)
    {
        DynamicGridRow parentRow = dynGrid.getRows().get(i);

        if (!(parentRow.getIdentifier() instanceof OrderInvestigationVoCollection))
            throw new CodingRuntimeException("Logical error - parent row identifier must be an OrderInvestigationVoCollection");

        OrderInvestigationVoCollection investigations = (OrderInvestigationVoCollection) parentRow.getIdentifier();

        StringBuilder tooltip = new StringBuilder();

        for (OrderInvestigationVo investigation : investigations)
        {
            if (tooltip.length() > 0) tooltip.append(", ");
            tooltip.append(investigation.getInvestigation().getInvestigationIndex().getName());
        }

        parentRow.getCells().get(dynGrid.getColumns().getByIdentifier(DISCIPLINE_COLUMN)).setTooltip(tooltip.toString());
    }
}
项目:openmaxims-linux    文件:Logic.java   
private OrderPriority getPriorityIfExists(InvestigationIndexShortVo investigationIndex, OrderInvestigationVoCollection orderInvestigations)
{
    if (orderInvestigations == null)
        return null;

    if (investigationIndex == null || investigationIndex.getID_InvestigationIndex() == null)
        return null;

    for (OrderInvestigationVo investigation : orderInvestigations)
    {
        if (investigation.getInvestigation() != null && investigation.getInvestigation().getInvestigationIndex() != null)
        {
            if (investigationIndex.getID_InvestigationIndex() == investigation.getInvestigation().getInvestigationIndex().getID_InvestigationIndex())
                return investigation.getOrderPriority();
        }
    }

    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private OrderInvestigationVo getOrderInvestigationFromContextByInvestID(Integer investigationId)
{
    OrderInvestigationVo voOrderInvest = null;
    OrderInvestigationVoCollection voCollOrderInvestigation = form.getGlobalContext().OCRR.getOrderInvestigationCollection();
    if (voCollOrderInvestigation != null && voCollOrderInvestigation.size() > 0)
    {
        for (int i = 0; i < voCollOrderInvestigation.size(); i++)
        {
            if (voCollOrderInvestigation.get(i).getInvestigationIsNotNull() && voCollOrderInvestigation.get(i).getInvestigation().getID_Investigation().equals(investigationId))
            {
                voOrderInvest = voCollOrderInvestigation.get(i);
                return voOrderInvest;
            }
        }
    }
    return null;
}
项目:openmaxims-linux    文件:Logic.java   
/**
 * Function used to fill in the OrderInvestigation.Containers field
 * <br>While this function doesn't have a return value, it does have a side-effect as it
 * modifies the OrderInvestigation VO
 */
private void fillInOrderInvestigationContainers(OrderInvestigationVo orderInvestigation, OrderSpecimenContainerVoCollection containers)
{
    if (orderInvestigation == null || containers == null)
        return;

    orderInvestigation.setContainer(new OrderSpecimenContainerVoCollection());

    for (OrderSpecimenContainerVo container : containers)
    {
        if (container.getOrderInvestigation() != null)
        {
            for (OrderInvestigationRefVo investigation : container.getOrderInvestigation())
            {
                if (investigation.equals(orderInvestigation))
                    orderInvestigation.getContainer().add(container);
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private String getInvestigationDisplayText(OrderInvestigationVo investigation, PathInvDetailsVo pathologyDetails)
{
    if (investigation == null || pathologyDetails == null)
        throw new CodingRuntimeException("Logical error - parameters can't be null");

    StringBuilder displayString = new StringBuilder();

    displayString.append(investigation.getInvestigation().getInvestigationIndex().getName());
    displayString.append(" - ");
    displayString.append(pathologyDetails.getSpecimens().get(0).getPaediatricContainers().get(0).getSpecContainer().getName());
    displayString.append(" (").append(pathologyDetails.getSpecimens().get(0).getPaediatricContainers().get(0).getVolume());
    displayString.append(" mls)");

    return displayString.toString();
}
项目:AvoinApotti    文件:Logic.java   
private boolean specimenHasOptions(HashMap<PathSpecimenContainerDetailVo, OrderInvestigationVoCollection> specimenAlternateContainers)
{
    Set<PathSpecimenContainerDetailVo> keys = specimenAlternateContainers.keySet();

    for (PathSpecimenContainerDetailVo specimenContainer : keys)
    {
        OrderInvestigationVoCollection values = specimenAlternateContainers.get(specimenContainer);

        if (values != null && values.size() > 1)
        {
            for (OrderInvestigationVo investigation : values)
            {
                PathInvDetailsVo pathologyDetails = null;

                if (investigation.getInvestigation().getParentInvestigationPathDetails() != null)
                {
                    pathologyDetails = investigation.getInvestigation().getParentInvestigationPathDetails();
                }
                else
                {
                    pathologyDetails = investigation.getInvestigation().getPathInvDetails();
                }

                SpecimenVo specimenVo = pathologyDetails.getSpecimens().get(0);

                if (specimenVo.getAlternativePaediatricContainers() != null)
                {
                    for (SpecimenContainerVo container : specimenVo.getAlternativePaediatricContainers())
                    {
                        if (container.getSpecContainer().equals(specimenContainer))
                            return true;
                    }
                }
            }
        }
    }

    return false;
}
项目:AvoinApotti    文件:Logic.java   
protected void onGrdTestSelectionChanged() throws PresentationLogicException
{
    OrderInvestigationVo voOrderInv = form.lyrDetails().tabPathDetails().lyrPathology().tabRequestedTests().grdTest().getSelectedRow().getValue();
    boolean notAddon = isNotAddOn(voOrderInv);

    if (notAddon)
    {
        form.getLocalContext().setTestRowBeingModified(form.lyrDetails().tabPathDetails().lyrPathology().tabRequestedTests().grdTest().getSelectedRow());
        setAddOnToDisplay();
        form.getContextMenus().getSelectItemsLINKItem().setVisible(form.getGlobalContext().Core.getItemsIsNotNull() && form.getGlobalContext().Core.getItems().size() > 0);
    }
}
项目:AvoinApotti    文件:Logic.java   
private OrderInvestigationVo getOrderInvestigationFromOriginalOrder(OcsOrderVo orderSession, Integer investigationID)
{
    if (orderSession == null || orderSession.getInvestigations() == null)
        return null;

    for (OrderInvestigationVo orderInvestigation : orderSession.getInvestigations())
    {
        if (orderInvestigation.getID_OrderInvestigation() != null && orderInvestigation.getInvestigation().getID_Investigation().equals(investigationID))   // equals because we are comparing value of objects
            return orderInvestigation;
    }

    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   
/**
 * Function used to determine if the modality has changed
 * It will analyse the first investigation from the new order with the investigation to amend.
 * If in either investigation the modality can not be reached it will consider that modality has changed
 */
private boolean hasModalityChanged(OcsOrderVo newOrder, OrderInvestigationLiteVo investigationToAmend)
{
    // Check new order for investigations
    if (newOrder == null || newOrder.getInvestigations() == null || newOrder.getInvestigations().size() == 0)
        return true;

    OrderInvestigationVo investigation = newOrder.getInvestigations().get(0);

    // Check first OrderInvestigation for modality (Speciality in the Investigation.ProviderService.LocationService.Service)
    // If the modality can not be retrieved - consider that the modality has changed
    if (investigation == null || investigation.getInvestigation() == null || investigation.getInvestigation().getProviderService() == null || investigation.getInvestigation().getProviderService().getLocationService() == null || investigation.getInvestigation().getProviderService().getLocationService().getService() == null)
        return true;

    ServiceVo newModality = investigation.getInvestigation().getProviderService().getLocationService().getService();

    // Check modality for OrderInvestigation to amend
    if (investigationToAmend == null || investigationToAmend.getInvestigation() == null || investigationToAmend.getInvestigation().getProviderService() == null || investigationToAmend.getInvestigation().getProviderService().getLocationService() == null || investigationToAmend.getInvestigation().getProviderService().getLocationService().getService() == null)
        return true;

    ServiceLiteVo oldModality = investigationToAmend.getInvestigation().getProviderService().getLocationService().getService();

    // Keep in mind that the objects are of different types (cast is only to point this out)
    // and use the root of them as base for equals
    if (oldModality.equals((ServiceLiteVo)newModality))
        return false;

    return true;
}
项目:AvoinApotti    文件:Logic.java   
private boolean isDFT(OrderInvestigationVo voInvestigation) 
{
    if(voInvestigation == null || voInvestigation.getInvestigation() == null)
        return false;

    if(InvEventType.TIME_SERIES.equals(voInvestigation.getInvestigation().getEventType()))
        return true;

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private boolean canbeScheduled(OrderInvestigationVo voOrderInv)
{
    if (voOrderInv != null && voOrderInv.getInvestigationIsNotNull() && voOrderInv.getInvestigation().getProviderServiceIsNotNull() && voOrderInv.getInvestigation().getProviderService().getLocationServiceIsNotNull() && voOrderInv.getInvestigation().getProviderService().getLocationService().getServiceIsNotNull() && voOrderInv.getInvestigation().getProviderService().getLocationService().getService().getCanBeScheduledIsNotNull())
        return voOrderInv.getInvestigation().getProviderService().getLocationService().getService().getCanBeScheduled();

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private boolean compareDiscipline(LocationServiceVo discipline, OrderInvestigationVo voOrderInv)
{
    if (discipline == null)
        throw new CodingRuntimeException("discipline parameter not supplied for method compareDiscipline");

    if (voOrderInv == null)
        throw new CodingRuntimeException("voOrderInv parameter not supplied for method compareDiscipline");

    if (voOrderInv.getInvestigationIsNotNull() && voOrderInv.getInvestigation().getProviderServiceIsNotNull() && voOrderInv.getInvestigation().getProviderService().getLocationServiceIsNotNull())
        return discipline.equals(voOrderInv.getInvestigation().getProviderService().getLocationService());

    return false;
}
项目:AvoinApotti    文件:CumulateResultsImpl.java   
public OrderInvestigationVo getOrder(OrderInvestigationRefVo orderRef) 
{
    if(orderRef == null)
        return null;

    return OrderInvestigationVoAssembler.create((OrderInvestigation)getDomainFactory().getDomainObject(orderRef));
}
项目:AvoinApotti    文件:PathologyDialogImpl.java   
/**
 * WDEV-13321
 * Function used to reset the Allocated for review HCP
 */
public OrderInvestigationVo resetAllocatedReviewHCP(OrderInvestigationRefVo investigation) throws StaleObjectException
{
    if (investigation == null || !investigation.getID_OrderInvestigationIsNotNull())
        return null;

    DomainFactory factory = getDomainFactory();

    OrderInvestigation domOrdInv = (OrderInvestigation) factory.getDomainObject(OrderInvestigation.class, investigation.getID_OrderInvestigation());


    if (domOrdInv == null)
        return null;

    if (domOrdInv.getAllocatedHCPforReview() == null)
        return OrderInvestigationVoAssembler.create(domOrdInv);

    HcpLiteVo hcpUser = (HcpLiteVo) getHcpLiteUser();
    ims.core.resource.people.domain.objects.Hcp domHcpUser = HcpLiteVoAssembler.extractHcp(factory, hcpUser);

    if (domOrdInv.getAllocatedHCPforReview().equals(domHcpUser))
    {
        domOrdInv.setAllocatedHCPforReview(null);
        domOrdInv.setAllocatedDateForReview(null);
        domOrdInv.setResultSortDate(domOrdInv.getRepDateTime());//http://jira/browse/WDEV-18025
        domOrdInv.setForReview(null);                           // WDEV-18052
        domOrdInv.setReviewRequestedBy(null);                   // WDEV-18052
    }

    return OrderInvestigationVoAssembler.create(domOrdInv);
}
项目:openMAXIMS    文件:Logic.java   
private String getInvestigationDisplayText(OrderInvestigationVo investigation, PathInvDetailsVo pathologyDetails)
{
    if (investigation == null || pathologyDetails == null)
        throw new CodingRuntimeException("Logical error - parameters can't be null");

    StringBuilder displayString = new StringBuilder();

    displayString.append(investigation.getInvestigation().getInvestigationIndex().getName());
    displayString.append(" - ");
    displayString.append(pathologyDetails.getSpecimens().get(0).getPaediatricContainers().get(0).getSpecContainer().getName());
    displayString.append(" (").append(pathologyDetails.getSpecimens().get(0).getPaediatricContainers().get(0).getVolume());
    displayString.append(" mls)");

    return displayString.toString();
}
项目:openMAXIMS    文件:Logic.java   
private boolean specimenHasOptions(HashMap<PathSpecimenContainerDetailVo, OrderInvestigationVoCollection> specimenAlternateContainers)
{
    Set<PathSpecimenContainerDetailVo> keys = specimenAlternateContainers.keySet();

    for (PathSpecimenContainerDetailVo specimenContainer : keys)
    {
        OrderInvestigationVoCollection values = specimenAlternateContainers.get(specimenContainer);

        if (values != null && values.size() > 1)
        {
            for (OrderInvestigationVo investigation : values)
            {
                PathInvDetailsVo pathologyDetails = null;

                if (investigation.getInvestigation().getParentInvestigationPathDetails() != null)
                {
                    pathologyDetails = investigation.getInvestigation().getParentInvestigationPathDetails();
                }
                else
                {
                    pathologyDetails = investigation.getInvestigation().getPathInvDetails();
                }

                SpecimenVo specimenVo = pathologyDetails.getSpecimens().get(0);

                if (specimenVo.getAlternativePaediatricContainers() != null)
                {
                    for (SpecimenContainerVo container : specimenVo.getAlternativePaediatricContainers())
                    {
                        if (container.getSpecContainer().equals(specimenContainer))
                            return true;
                    }
                }
            }
        }
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
protected void onGrdTestSelectionChanged() throws PresentationLogicException
{
    OrderInvestigationVo voOrderInv = form.lyrDetails().tabPathDetails().lyrPathology().tabRequestedTests().grdTest().getSelectedRow().getValue();
    boolean notAddon = isNotAddOn(voOrderInv);

    if (notAddon)
    {
        form.getLocalContext().setTestRowBeingModified(form.lyrDetails().tabPathDetails().lyrPathology().tabRequestedTests().grdTest().getSelectedRow());
        setAddOnToDisplay();
        form.getContextMenus().getSelectItemsLINKItem().setVisible(form.getGlobalContext().Core.getItemsIsNotNull() && form.getGlobalContext().Core.getItems().size() > 0);
    }
}
项目:openMAXIMS    文件:Logic.java   
private OrderInvestigationVo getOrderInvestigationFromOriginalOrder(OcsOrderVo orderSession, Integer investigationID)
{
    if (orderSession == null || orderSession.getInvestigations() == null)
        return null;

    for (OrderInvestigationVo orderInvestigation : orderSession.getInvestigations())
    {
        if (orderInvestigation.getID_OrderInvestigation() != null && orderInvestigation.getInvestigation().getID_Investigation().equals(investigationID))   // equals because we are comparing value of objects
            return orderInvestigation;
    }

    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   
/**
 * Function used to determine if the modality has changed
 * It will analyse the first investigation from the new order with the investigation to amend.
 * If in either investigation the modality can not be reached it will consider that modality has changed
 */
private boolean hasModalityChanged(OcsOrderVo newOrder, OrderInvestigationLiteVo investigationToAmend)
{
    // Check new order for investigations
    if (newOrder == null || newOrder.getInvestigations() == null || newOrder.getInvestigations().size() == 0)
        return true;

    OrderInvestigationVo investigation = newOrder.getInvestigations().get(0);

    // Check first OrderInvestigation for modality (Speciality in the Investigation.ProviderService.LocationService.Service)
    // If the modality can not be retrieved - consider that the modality has changed
    if (investigation == null || investigation.getInvestigation() == null || investigation.getInvestigation().getProviderService() == null || investigation.getInvestigation().getProviderService().getLocationService() == null || investigation.getInvestigation().getProviderService().getLocationService().getService() == null)
        return true;

    ServiceVo newModality = investigation.getInvestigation().getProviderService().getLocationService().getService();

    // Check modality for OrderInvestigation to amend
    if (investigationToAmend == null || investigationToAmend.getInvestigation() == null || investigationToAmend.getInvestigation().getProviderService() == null || investigationToAmend.getInvestigation().getProviderService().getLocationService() == null || investigationToAmend.getInvestigation().getProviderService().getLocationService().getService() == null)
        return true;

    ServiceLiteVo oldModality = investigationToAmend.getInvestigation().getProviderService().getLocationService().getService();

    // Keep in mind that the objects are of different types (cast is only to point this out)
    // and use the root of them as base for equals
    if (oldModality.equals((ServiceLiteVo)newModality))
        return false;

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private boolean isDFT(OrderInvestigationVo voInvestigation) 
{
    if(voInvestigation == null || voInvestigation.getInvestigation() == null)
        return false;

    if(InvEventType.TIME_SERIES.equals(voInvestigation.getInvestigation().getEventType()))
        return true;

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private boolean canbeScheduled(OrderInvestigationVo voOrderInv)
{
    if (voOrderInv != null && voOrderInv.getInvestigationIsNotNull() && voOrderInv.getInvestigation().getProviderServiceIsNotNull() && voOrderInv.getInvestigation().getProviderService().getLocationServiceIsNotNull() && voOrderInv.getInvestigation().getProviderService().getLocationService().getServiceIsNotNull() && voOrderInv.getInvestigation().getProviderService().getLocationService().getService().getCanBeScheduledIsNotNull())
        return voOrderInv.getInvestigation().getProviderService().getLocationService().getService().getCanBeScheduled();

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private boolean compareDiscipline(LocationServiceVo discipline, OrderInvestigationVo voOrderInv)
{
    if (discipline == null)
        throw new CodingRuntimeException("discipline parameter not supplied for method compareDiscipline");

    if (voOrderInv == null)
        throw new CodingRuntimeException("voOrderInv parameter not supplied for method compareDiscipline");

    if (voOrderInv.getInvestigationIsNotNull() && voOrderInv.getInvestigation().getProviderServiceIsNotNull() && voOrderInv.getInvestigation().getProviderService().getLocationServiceIsNotNull())
        return discipline.equals(voOrderInv.getInvestigation().getProviderService().getLocationService());

    return false;
}