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

项目:AvoinApotti    文件:Logic.java   
/**
 *  WDEV-13999
 *  Event handler for 'Amend' button
 */
protected void onBtnAmendClick() throws PresentationLogicException
{
    // Check if 
    if (form.getLocalContext().getOrderSummary() == null || form.getLocalContext().getOrderSummary().getInvestigations() == null)
        return;

    // Build list of investigations that can be amended
    form.getGlobalContext().OCRR.setRejectedInvestigations(new OrderInvestigationListVoCollection());


    for (OrderInvestigationListVo investigation : form.getLocalContext().getOrderSummary().getInvestigations())
    {
        if (investigation.getOrdInvCurrentStatusIsNotNull() && OrderInvStatus.REJECTED.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus()))
        {
            form.getGlobalContext().OCRR.getRejectedInvestigations().add(investigation);
        }
    }

    // Open dialog to select investigation to amend
    engine.open(form.getForms().OCRR.AmendOrderInvestigationDialog, "Select Investigation to amend");
}
项目:AvoinApotti    文件:Logic.java   
protected void onBtnCancelClick() throws PresentationLogicException
{
    SelectItemVoCollection voCollItems = new SelectItemVoCollection();
    OrderInvestigationListVoCollection voCollOrderInv = form.getLocalContext().getSelectedOrderInvsForCancel();
    if (voCollOrderInv != null)
    {
        for (int i = 0; i < voCollOrderInv.size(); i++)
        {                   
            SelectItemVo voSelectItem = new SelectItemVo();
            voSelectItem.setItem(voCollOrderInv.get(i));
            voSelectItem.setSelected(Boolean.FALSE);
            voCollItems.add(voSelectItem);
        }
    }

    form.getGlobalContext().Core.setItems(voCollItems.size() > 0 ? voCollItems : null);         
    engine.open(form.getForms().OCRR.CancelOrderInvestigationDialog, "Select Investigation");
}
项目:AvoinApotti    文件:Logic.java   
/**
 * WDEV-12345
 * Function used to populate investigation grid
 */
private void populateInvestigation(OrderInvestigationListVoCollection investigations)
{
    // Clear the investigation grid row
    form.lyr1().tabDischargePatient().grdInvestigation().getRows().clear();

    // Terminate for null investigation collection
    if (investigations == null)
        return;

    // Add each investigation to grid
    for (OrderInvestigationListVo investigation : investigations)
    {
        grdInvestigationRow row = form.lyr1().tabDischargePatient().grdInvestigation().getRows().newRow();

        row.setColInvestigation(investigation.getIGenericItemInfoName());
        row.setTooltipForColInvestigation(investigation.getIGenericItemInfoName());
        row.setColInvestigationReadOnly(true);                                          // Make sure the investigation column is read only

        row.setColSelect(false);
        //row.setColSelectReadOnly(false);

        row.setValue(investigation);
    }       
}
项目:AvoinApotti    文件:ReferralOutcomeComponentImpl.java   
/**
 * WDEV-12345
 * Retrieve completed OrderInvestigations for provided Cats Referral record
 */
public OrderInvestigationListVoCollection getInvestigation(CatsReferralRefVo referral)
{
    if (referral == null || !referral.getID_CatsReferralIsNotNull())
        return null;

    String query = "select investig from CatsReferral as cats left join cats.investigationOrders as orders left join orders.investigations as investig left join investig.resultDetails as resDet left join resDet.pathologyResultDetails as pathRes where cats.id = :ID and (resDet.clinicalResultDetails is not null or pathRes.id is not null)";

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    paramNames.add("ID");
    paramValues.add(referral.getID_CatsReferral());

    return OrderInvestigationListVoAssembler.createOrderInvestigationListVoCollectionFromOrderInvestigation(getDomainFactory().find(query, paramNames, paramValues));
}
项目:openMAXIMS    文件:Logic.java   
/**
 *  WDEV-13999
 *  Event handler for 'Amend' button
 */
protected void onBtnAmendClick() throws PresentationLogicException
{
    // Check if 
    if (form.getLocalContext().getOrderSummary() == null || form.getLocalContext().getOrderSummary().getInvestigations() == null)
        return;

    // Build list of investigations that can be amended
    form.getGlobalContext().OCRR.setRejectedInvestigations(new OrderInvestigationListVoCollection());


    for (OrderInvestigationListVo investigation : form.getLocalContext().getOrderSummary().getInvestigations())
    {
        if (investigation.getOrdInvCurrentStatusIsNotNull() && OrderInvStatus.REJECTED.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus()))
        {
            form.getGlobalContext().OCRR.getRejectedInvestigations().add(investigation);
        }
    }

    // Open dialog to select investigation to amend
    engine.open(form.getForms().OCRR.AmendOrderInvestigationDialog, "Select Investigation to amend");
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnCancelClick() throws PresentationLogicException
{
    SelectItemVoCollection voCollItems = new SelectItemVoCollection();
    OrderInvestigationListVoCollection voCollOrderInv = form.getLocalContext().getSelectedOrderInvsForCancel();
    if (voCollOrderInv != null)
    {
        for (int i = 0; i < voCollOrderInv.size(); i++)
        {                   
            SelectItemVo voSelectItem = new SelectItemVo();
            voSelectItem.setItem(voCollOrderInv.get(i));
            voSelectItem.setSelected(Boolean.FALSE);
            voCollItems.add(voSelectItem);
        }
    }

    form.getGlobalContext().Core.setItems(voCollItems.size() > 0 ? voCollItems : null);         
    engine.open(form.getForms().OCRR.CancelOrderInvestigationDialog, "Select Investigation");
}
项目:openMAXIMS    文件:Logic.java   
/**
 * WDEV-12345
 * Function used to populate investigation grid
 */
private void populateInvestigation(OrderInvestigationListVoCollection investigations)
{
    // Clear the investigation grid row
    form.lyr1().tabDischargePatient().grdInvestigation().getRows().clear();

    // Terminate for null investigation collection
    if (investigations == null)
        return;

    // Add each investigation to grid
    for (OrderInvestigationListVo investigation : investigations)
    {
        grdInvestigationRow row = form.lyr1().tabDischargePatient().grdInvestigation().getRows().newRow();

        row.setColInvestigation(investigation.getIGenericItemInfoName());
        row.setTooltipForColInvestigation(investigation.getIGenericItemInfoName());
        row.setColInvestigationReadOnly(true);                                          // Make sure the investigation column is read only

        row.setColSelect(false);
        //row.setColSelectReadOnly(false);

        row.setValue(investigation);
    }       
}
项目:openMAXIMS    文件:ReferralOutcomeComponentImpl.java   
/**
 * WDEV-12345
 * Retrieve completed OrderInvestigations for provided Cats Referral record
 */
public OrderInvestigationListVoCollection getInvestigation(CatsReferralRefVo referral)
{
    if (referral == null || !referral.getID_CatsReferralIsNotNull())
        return null;

    String query = "select investig from CatsReferral as cats left join cats.investigationOrders as orders left join orders.investigations as investig left join investig.resultDetails as resDet left join resDet.pathologyResultDetails as pathRes where cats.id = :ID and (resDet.clinicalResultDetails is not null or pathRes.id is not null)";

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    paramNames.add("ID");
    paramValues.add(referral.getID_CatsReferral());

    return OrderInvestigationListVoAssembler.createOrderInvestigationListVoCollectionFromOrderInvestigation(getDomainFactory().find(query, paramNames, paramValues));
}
项目:openMAXIMS    文件:Logic.java   
/**
 *  WDEV-13999
 *  Event handler for 'Amend' button
 */
protected void onBtnAmendClick() throws PresentationLogicException
{
    // Check if 
    if (form.getLocalContext().getOrderSummary() == null || form.getLocalContext().getOrderSummary().getInvestigations() == null)
        return;

    // Build list of investigations that can be amended
    form.getGlobalContext().OCRR.setRejectedInvestigations(new OrderInvestigationListVoCollection());


    for (OrderInvestigationListVo investigation : form.getLocalContext().getOrderSummary().getInvestigations())
    {
        if (investigation.getOrdInvCurrentStatusIsNotNull() && OrderInvStatus.REJECTED.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus()))
        {
            form.getGlobalContext().OCRR.getRejectedInvestigations().add(investigation);
        }
    }

    // Open dialog to select investigation to amend
    engine.open(form.getForms().OCRR.AmendOrderInvestigationDialog, "Select Investigation to amend");
}
项目:openMAXIMS    文件:Logic.java   
protected void onBtnCancelClick() throws PresentationLogicException
{
    SelectItemVoCollection voCollItems = new SelectItemVoCollection();
    OrderInvestigationListVoCollection voCollOrderInv = form.getLocalContext().getSelectedOrderInvsForCancel();
    if (voCollOrderInv != null)
    {
        for (int i = 0; i < voCollOrderInv.size(); i++)
        {                   
            SelectItemVo voSelectItem = new SelectItemVo();
            voSelectItem.setItem(voCollOrderInv.get(i));
            voSelectItem.setSelected(Boolean.FALSE);
            voCollItems.add(voSelectItem);
        }
    }

    form.getGlobalContext().Core.setItems(voCollItems.size() > 0 ? voCollItems : null);         
    engine.open(form.getForms().OCRR.CancelOrderInvestigationDialog, "Select Investigation");
}
项目:openMAXIMS    文件:Logic.java   
/**
 * WDEV-12345
 * Function used to populate investigation grid
 */
private void populateInvestigation(OrderInvestigationListVoCollection investigations)
{
    // Clear the investigation grid row
    form.lyr1().tabDischargePatient().grdInvestigation().getRows().clear();

    // Terminate for null investigation collection
    if (investigations == null)
        return;

    // Add each investigation to grid
    for (OrderInvestigationListVo investigation : investigations)
    {
        grdInvestigationRow row = form.lyr1().tabDischargePatient().grdInvestigation().getRows().newRow();

        row.setColInvestigation(investigation.getIGenericItemInfoName());
        row.setTooltipForColInvestigation(investigation.getIGenericItemInfoName());
        row.setColInvestigationReadOnly(true);                                          // Make sure the investigation column is read only

        row.setColSelect(false);
        //row.setColSelectReadOnly(false);

        row.setValue(investigation);
    }       
}
项目:openMAXIMS    文件:ReferralOutcomeComponentImpl.java   
/**
 * WDEV-12345
 * Retrieve completed OrderInvestigations for provided Cats Referral record
 */
public OrderInvestigationListVoCollection getInvestigation(CatsReferralRefVo referral)
{
    if (referral == null || !referral.getID_CatsReferralIsNotNull())
        return null;

    String query = "select investig from CatsReferral as cats left join cats.investigationOrders as orders left join orders.investigations as investig left join investig.resultDetails as resDet left join resDet.pathologyResultDetails as pathRes where cats.id = :ID and (resDet.clinicalResultDetails is not null or pathRes.id is not null)";

    ArrayList<String> paramNames = new ArrayList<String>();
    ArrayList<Object> paramValues = new ArrayList<Object>();

    paramNames.add("ID");
    paramValues.add(referral.getID_CatsReferral());

    return OrderInvestigationListVoAssembler.createOrderInvestigationListVoCollectionFromOrderInvestigation(getDomainFactory().find(query, paramNames, paramValues));
}
项目:openmaxims-linux    文件:Logic.java   
/**
 *  WDEV-13999
 *  Event handler for 'Amend' button
 */
protected void onBtnAmendClick() throws PresentationLogicException
{
    // Check if 
    if (form.getLocalContext().getOrderSummary() == null || form.getLocalContext().getOrderSummary().getInvestigations() == null)
        return;

    // Build list of investigations that can be amended
    form.getGlobalContext().OCRR.setRejectedInvestigations(new OrderInvestigationListVoCollection());


    for (OrderInvestigationListVo investigation : form.getLocalContext().getOrderSummary().getInvestigations())
    {
        if (investigation.getOrdInvCurrentStatusIsNotNull() && OrderInvStatus.REJECTED.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus()))
        {
            form.getGlobalContext().OCRR.getRejectedInvestigations().add(investigation);
        }
    }

    // Open dialog to select investigation to amend
    engine.open(form.getForms().OCRR.AmendOrderInvestigationDialog, "Select Investigation to amend");
}
项目:openmaxims-linux    文件:Logic.java   
protected void onBtnCancelClick() throws PresentationLogicException
{
    SelectItemVoCollection voCollItems = new SelectItemVoCollection();
    OrderInvestigationListVoCollection voCollOrderInv = form.getLocalContext().getSelectedOrderInvsForCancel();
    if (voCollOrderInv != null)
    {
        for (int i = 0; i < voCollOrderInv.size(); i++)
        {                   
            SelectItemVo voSelectItem = new SelectItemVo();
            voSelectItem.setItem(voCollOrderInv.get(i));
            voSelectItem.setSelected(Boolean.FALSE);
            voCollItems.add(voSelectItem);
        }
    }

    form.getGlobalContext().Core.setItems(voCollItems.size() > 0 ? voCollItems : null);         
    engine.open(form.getForms().OCRR.CancelOrderInvestigationDialog, "Select Investigation");
}
项目:AvoinApotti    文件:Logic.java   
private void populateDFTInvestigations(OrderInvestigationListVoCollection investigations) 
{
    if(investigations == null)
        return;

    for(OrderInvestigationListVo investigation : investigations)
    {
        if(investigation == null)
            continue;

        if (investigation.getOrdInvCurrentStatus() != null && (!OrderInvStatus.CANCEL_REQUEST.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus()) && !OrderInvStatus.CANCELLED.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus())))
        {
            if (isDFT(investigation))
            {
                if (engine.getPreviousNonDialogFormName().equals(form.getForms().OCRR.MyOrder))
                {
                    if (!SpecimenCollectionType.OTHER.equals(investigation.getCollectionType())
                            && !SpecimenCollectionType.PHLEBOTOMY_INPATIENT.equals(investigation.getCollectionType()))
                    {
                        addDFTInvestigationRow(investigation);
                    }
                }
                else
                {
                    addDFTInvestigationRow(investigation);
                }
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private OrderInvestigationListVoCollection getCancelableOrderInvs(OrderInvestigationListVoCollection investigations)
{
    OrderInvestigationListVoCollection voCollOrddInvForCancel = new OrderInvestigationListVoCollection();

    for(OrderInvestigationListVo item : investigations)
    {
        if(item.getOrdInvCurrentStatusIsNotNull() && item.getOrdInvCurrentStatus().getOrdInvStatusIsNotNull())
        {
            if(item.getOrdInvCurrentStatusIsNotNull() & item.getOrdInvCurrentStatus().getOrdInvStatusIsNotNull())
            {
                boolean invAwaitingAuthorisation = item.getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.AWAITING_AUTHORISATION);
                boolean invOrdered = item.getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.ORDERED);
                boolean invAwaitingAppointment = item.getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.ORDERED_AWAITING_APPT);
                boolean invSentRadiologyFromSchedulingService = (Category.CLINICALIMAGING.equals(item.getInvestigation().getInvestigationIndex().getCategory()) 
                        && !isInvestigationCompletedOrResulted(item))
                        && !isCancelledOrCancelRequested(item)
                        && canBeScheduled(item);

                if(invAwaitingAuthorisation || invOrdered || invAwaitingAppointment || invSentRadiologyFromSchedulingService)
                {
                    if(item.getPassesSecurityIsNotNull() && !item.getPassesSecurity())
                        continue;

                    voCollOrddInvForCancel.add(item);
                }
            }               
        }   
    }

    return voCollOrddInvForCancel.size() > 0 ? voCollOrddInvForCancel : null;

}
项目:AvoinApotti    文件:Logic.java   
private void populategrdInvestigations(OrderInvestigationListVoCollection ordInvVoColl)
{
    if( ordInvVoColl == null || ordInvVoColl.size() == 0)
        return;
    for(int i = 0; i < ordInvVoColl.size();i++)
    {
        addtogrid(ordInvVoColl.get(i));
    }
}
项目:AvoinApotti    文件:OrderSummaryImpl.java   
public OcsOrderSummaryVo getOrderSummary(OcsOrderSessionRefVo voOcsOrderRef) //WDEV-16232
{
    if(voOcsOrderRef == null || voOcsOrderRef.getID_OcsOrderSession() == null)//WDEV-16232
        throw new DomainRuntimeException("Order ref is null");

    OcsOrderSession doOcsOrder = (OcsOrderSession) getDomainFactory().getDomainObject(voOcsOrderRef);//WDEV-16232
    OcsOrderSummaryVo voOcsOrder = OcsOrderSummaryVoAssembler.create(doOcsOrder);

    //WDEV-12054
    HashMap map = new HashMap();
    List results = new ArrayList(doOcsOrder.getInvestigations()); //convert set to list
    ClinicalImagingResults impl = (ClinicalImagingResults) getDomainImpl(ClinicalImagingResultsImpl.class);
    map = impl.getListXoHistory(map, results);

    OrderInvestigationListVoCollection voCollInvs = OrderInvestigationListVoAssembler.createOrderInvestigationListVoCollectionFromOrderInvestigation(results);

    if(voCollInvs != null)
    {
        for(OrderInvestigationListVo voResult : voCollInvs)
        {
            if(map.containsKey(voResult.getID_OrderInvestigation()))
            {
                voResult.setOrdInvXOStatusHistory((OrdInvXOStatusHistoryLiteVoCollection) map.get(voResult.getID_OrderInvestigation()));
            }
        }
    }

    voOcsOrder.setInvestigations(voCollInvs);
    return voOcsOrder;      
}
项目:openMAXIMS    文件:Logic.java   
private void populateDFTInvestigations(OrderInvestigationListVoCollection investigations) 
{
    if(investigations == null)
        return;

    for(OrderInvestigationListVo investigation : investigations)
    {
        if(investigation == null)
            continue;

        if (investigation.getOrdInvCurrentStatus() != null && (!OrderInvStatus.CANCEL_REQUEST.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus()) && !OrderInvStatus.CANCELLED.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus())))
        {
            if (isDFT(investigation))
            {
                if (engine.getPreviousNonDialogFormName().equals(form.getForms().OCRR.MyOrder))
                {
                    if (!SpecimenCollectionType.OTHER.equals(investigation.getCollectionType())
                            && !SpecimenCollectionType.PHLEBOTOMY_INPATIENT.equals(investigation.getCollectionType()))
                    {
                        addDFTInvestigationRow(investigation);
                    }
                }
                else
                {
                    addDFTInvestigationRow(investigation);
                }
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private OrderInvestigationListVoCollection getCancelableOrderInvs(OrderInvestigationListVoCollection investigations)
{
    OrderInvestigationListVoCollection voCollOrddInvForCancel = new OrderInvestigationListVoCollection();

    for(OrderInvestigationListVo item : investigations)
    {
        if(item.getOrdInvCurrentStatusIsNotNull() && item.getOrdInvCurrentStatus().getOrdInvStatusIsNotNull())
        {
            if(item.getOrdInvCurrentStatusIsNotNull() & item.getOrdInvCurrentStatus().getOrdInvStatusIsNotNull())
            {
                boolean invAwaitingAuthorisation = item.getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.AWAITING_AUTHORISATION);
                boolean invOrdered = item.getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.ORDERED);
                boolean invAwaitingAppointment = item.getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.ORDERED_AWAITING_APPT);
                boolean invSentRadiologyFromSchedulingService = (Category.CLINICALIMAGING.equals(item.getInvestigation().getInvestigationIndex().getCategory()) 
                        && !isInvestigationCompletedOrResulted(item))
                        && !isCancelledOrCancelRequested(item)
                        && canBeScheduled(item);

                if(invAwaitingAuthorisation || invOrdered || invAwaitingAppointment || invSentRadiologyFromSchedulingService)
                {
                    if(item.getPassesSecurityIsNotNull() && !item.getPassesSecurity())
                        continue;

                    voCollOrddInvForCancel.add(item);
                }
            }               
        }   
    }

    return voCollOrddInvForCancel.size() > 0 ? voCollOrddInvForCancel : null;

}
项目:openMAXIMS    文件:Logic.java   
private void populategrdInvestigations(OrderInvestigationListVoCollection ordInvVoColl)
{
    if( ordInvVoColl == null || ordInvVoColl.size() == 0)
        return;
    for(int i = 0; i < ordInvVoColl.size();i++)
    {
        addtogrid(ordInvVoColl.get(i));
    }
}
项目:openMAXIMS    文件:OrderSummaryImpl.java   
public OcsOrderSummaryVo getOrderSummary(OcsOrderSessionRefVo voOcsOrderRef) //WDEV-16232
{
    if(voOcsOrderRef == null || voOcsOrderRef.getID_OcsOrderSession() == null)//WDEV-16232
        throw new DomainRuntimeException("Order ref is null");

    OcsOrderSession doOcsOrder = (OcsOrderSession) getDomainFactory().getDomainObject(voOcsOrderRef);//WDEV-16232
    OcsOrderSummaryVo voOcsOrder = OcsOrderSummaryVoAssembler.create(doOcsOrder);

    //WDEV-12054
    HashMap map = new HashMap();
    List results = new ArrayList(doOcsOrder.getInvestigations()); //convert set to list
    ClinicalImagingResults impl = (ClinicalImagingResults) getDomainImpl(ClinicalImagingResultsImpl.class);
    map = impl.getListXoHistory(map, results);

    OrderInvestigationListVoCollection voCollInvs = OrderInvestigationListVoAssembler.createOrderInvestigationListVoCollectionFromOrderInvestigation(results);

    if(voCollInvs != null)
    {
        for(OrderInvestigationListVo voResult : voCollInvs)
        {
            if(map.containsKey(voResult.getID_OrderInvestigation()))
            {
                voResult.setOrdInvXOStatusHistory((OrdInvXOStatusHistoryLiteVoCollection) map.get(voResult.getID_OrderInvestigation()));
            }
        }
    }

    voOcsOrder.setInvestigations(voCollInvs);
    return voOcsOrder;      
}
项目:openMAXIMS    文件:Logic.java   
private void populateDFTInvestigations(OrderInvestigationListVoCollection investigations) 
{
    if(investigations == null)
        return;

    for(OrderInvestigationListVo investigation : investigations)
    {
        if(investigation == null)
            continue;

        if (investigation.getOrdInvCurrentStatus() != null && (!OrderInvStatus.CANCEL_REQUEST.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus()) && !OrderInvStatus.CANCELLED.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus())))
        {
            if (isDFT(investigation))
            {
                if (engine.getPreviousNonDialogFormName().equals(form.getForms().OCRR.MyOrder))
                {
                    if (!SpecimenCollectionType.OTHER.equals(investigation.getCollectionType())
                            && !SpecimenCollectionType.PHLEBOTOMY_INPATIENT.equals(investigation.getCollectionType()))
                    {
                        addDFTInvestigationRow(investigation);
                    }
                }
                else
                {
                    addDFTInvestigationRow(investigation);
                }
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private OrderInvestigationListVoCollection getCancelableOrderInvs(OrderInvestigationListVoCollection investigations)
{
    OrderInvestigationListVoCollection voCollOrddInvForCancel = new OrderInvestigationListVoCollection();

    for(OrderInvestigationListVo item : investigations)
    {
        if(item.getOrdInvCurrentStatusIsNotNull() && item.getOrdInvCurrentStatus().getOrdInvStatusIsNotNull())
        {
            if(item.getOrdInvCurrentStatusIsNotNull() & item.getOrdInvCurrentStatus().getOrdInvStatusIsNotNull())
            {
                boolean invAwaitingAuthorisation = item.getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.AWAITING_AUTHORISATION);
                boolean invOrdered = item.getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.ORDERED);
                boolean invAwaitingAppointment = item.getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.ORDERED_AWAITING_APPT);
                boolean invSentRadiologyFromSchedulingService = (Category.CLINICALIMAGING.equals(item.getInvestigation().getInvestigationIndex().getCategory()) 
                        && !isInvestigationCompletedOrResulted(item))
                        && !isCancelledOrCancelRequested(item)
                        && canBeScheduled(item);

                if(invAwaitingAuthorisation || invOrdered || invAwaitingAppointment || invSentRadiologyFromSchedulingService)
                {
                    if(item.getPassesSecurityIsNotNull() && !item.getPassesSecurity())
                        continue;

                    voCollOrddInvForCancel.add(item);
                }
            }               
        }   
    }

    return voCollOrddInvForCancel.size() > 0 ? voCollOrddInvForCancel : null;

}
项目:openMAXIMS    文件:Logic.java   
private void populategrdInvestigations(OrderInvestigationListVoCollection ordInvVoColl)
{
    if( ordInvVoColl == null || ordInvVoColl.size() == 0)
        return;
    for(int i = 0; i < ordInvVoColl.size();i++)
    {
        addtogrid(ordInvVoColl.get(i));
    }
}
项目:openMAXIMS    文件:OrderSummaryImpl.java   
public OcsOrderSummaryVo getOrderSummary(OcsOrderSessionRefVo voOcsOrderRef) //WDEV-16232
{
    if(voOcsOrderRef == null || voOcsOrderRef.getID_OcsOrderSession() == null)//WDEV-16232
        throw new DomainRuntimeException("Order ref is null");

    OcsOrderSession doOcsOrder = (OcsOrderSession) getDomainFactory().getDomainObject(voOcsOrderRef);//WDEV-16232
    OcsOrderSummaryVo voOcsOrder = OcsOrderSummaryVoAssembler.create(doOcsOrder);

    //WDEV-12054
    HashMap map = new HashMap();
    List results = new ArrayList(doOcsOrder.getInvestigations()); //convert set to list
    ClinicalImagingResults impl = (ClinicalImagingResults) getDomainImpl(ClinicalImagingResultsImpl.class);
    map = impl.getListXoHistory(map, results);

    OrderInvestigationListVoCollection voCollInvs = OrderInvestigationListVoAssembler.createOrderInvestigationListVoCollectionFromOrderInvestigation(results);

    if(voCollInvs != null)
    {
        for(OrderInvestigationListVo voResult : voCollInvs)
        {
            if(map.containsKey(voResult.getID_OrderInvestigation()))
            {
                voResult.setOrdInvXOStatusHistory((OrdInvXOStatusHistoryLiteVoCollection) map.get(voResult.getID_OrderInvestigation()));
            }
        }
    }

    voOcsOrder.setInvestigations(voCollInvs);
    return voOcsOrder;      
}
项目:openmaxims-linux    文件:Logic.java   
private void populateDFTInvestigations(OrderInvestigationListVoCollection investigations) 
{
    if(investigations == null)
        return;

    for(OrderInvestigationListVo investigation : investigations)
    {
        if(investigation == null)
            continue;

        if (investigation.getOrdInvCurrentStatus() != null && (!OrderInvStatus.CANCEL_REQUEST.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus()) && !OrderInvStatus.CANCELLED.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus())))
        {
            if (isDFT(investigation))
            {
                if (engine.getPreviousNonDialogFormName().equals(form.getForms().OCRR.MyOrder))
                {
                    if (!SpecimenCollectionType.OTHER.equals(investigation.getCollectionType())
                            && !SpecimenCollectionType.PHLEBOTOMY_INPATIENT.equals(investigation.getCollectionType()))
                    {
                        addDFTInvestigationRow(investigation);
                    }
                }
                else
                {
                    addDFTInvestigationRow(investigation);
                }
            }
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private OrderInvestigationListVoCollection getCancelableOrderInvs(OrderInvestigationListVoCollection investigations)
{
    OrderInvestigationListVoCollection voCollOrddInvForCancel = new OrderInvestigationListVoCollection();

    for(OrderInvestigationListVo item : investigations)
    {
        if(item.getOrdInvCurrentStatusIsNotNull() && item.getOrdInvCurrentStatus().getOrdInvStatusIsNotNull())
        {
            if(item.getOrdInvCurrentStatusIsNotNull() & item.getOrdInvCurrentStatus().getOrdInvStatusIsNotNull())
            {
                boolean invAwaitingAuthorisation = item.getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.AWAITING_AUTHORISATION);
                boolean invOrdered = item.getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.ORDERED);
                boolean invAwaitingAppointment = item.getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.ORDERED_AWAITING_APPT);
                boolean invSentRadiologyFromSchedulingService = (Category.CLINICALIMAGING.equals(item.getInvestigation().getInvestigationIndex().getCategory()) 
                        && !isInvestigationCompletedOrResulted(item))
                        && !isCancelledOrCancelRequested(item)
                        && canBeScheduled(item);

                if(invAwaitingAuthorisation || invOrdered || invAwaitingAppointment || invSentRadiologyFromSchedulingService)
                {
                    if(item.getPassesSecurityIsNotNull() && !item.getPassesSecurity())
                        continue;

                    voCollOrddInvForCancel.add(item);
                }
            }               
        }   
    }

    return voCollOrddInvForCancel.size() > 0 ? voCollOrddInvForCancel : null;

}
项目:openmaxims-linux    文件:Logic.java   
private void populategrdInvestigations(OrderInvestigationListVoCollection ordInvVoColl)
{
    if( ordInvVoColl == null || ordInvVoColl.size() == 0)
        return;
    for(int i = 0; i < ordInvVoColl.size();i++)
    {
        addtogrid(ordInvVoColl.get(i));
    }
}
项目:openmaxims-linux    文件:OrderSummaryImpl.java   
public OcsOrderSummaryVo getOrderSummary(OcsOrderSessionRefVo voOcsOrderRef) //WDEV-16232
{
    if(voOcsOrderRef == null || voOcsOrderRef.getID_OcsOrderSession() == null)//WDEV-16232
        throw new DomainRuntimeException("Order ref is null");

    OcsOrderSession doOcsOrder = (OcsOrderSession) getDomainFactory().getDomainObject(voOcsOrderRef);//WDEV-16232
    OcsOrderSummaryVo voOcsOrder = OcsOrderSummaryVoAssembler.create(doOcsOrder);

    //WDEV-12054
    HashMap map = new HashMap();
    List results = new ArrayList(doOcsOrder.getInvestigations()); //convert set to list
    ClinicalImagingResults impl = (ClinicalImagingResults) getDomainImpl(ClinicalImagingResultsImpl.class);
    map = impl.getListXoHistory(map, results);

    OrderInvestigationListVoCollection voCollInvs = OrderInvestigationListVoAssembler.createOrderInvestigationListVoCollectionFromOrderInvestigation(results);

    if(voCollInvs != null)
    {
        for(OrderInvestigationListVo voResult : voCollInvs)
        {
            if(map.containsKey(voResult.getID_OrderInvestigation()))
            {
                voResult.setOrdInvXOStatusHistory((OrdInvXOStatusHistoryLiteVoCollection) map.get(voResult.getID_OrderInvestigation()));
            }
        }
    }

    voOcsOrder.setInvestigations(voCollInvs);
    return voOcsOrder;      
}
项目:AvoinApotti    文件:Logic.java   
@SuppressWarnings({ "rawtypes", "unchecked" })
private void populateInvestigations(OrderInvestigationListVoCollection investigations)
{
    if (investigations == null)
        return;

    HashMap locMap = new HashMap();

    InvestigationIndexRefVoCollection notLocalInvColl = form.getGlobalContext().OCRR.PrintOrder.getNotLocalInvestigations();

    for (int i = 0; i < investigations.size(); i++)
    {
        OrderInvestigationListVo voInvestigation = investigations.get(i);
        if (voInvestigation.getInvestigationIsNotNull() && voInvestigation.getInvestigation().getInvestigationIndexIsNotNull())
        {
            if (voInvestigation.getOrdInvCurrentStatus() != null && (!OrderInvStatus.CANCEL_REQUEST.equals(voInvestigation.getOrdInvCurrentStatus().getOrdInvStatus()) && !OrderInvStatus.CANCELLED.equals(voInvestigation.getOrdInvCurrentStatus().getOrdInvStatus())))
            {
                if (voInvestigation.getInvestigation().getInvestigationIndex().getCategoryIsNotNull() && (voInvestigation.getInvestigation().getInvestigationIndex().getCategory().equals(Category.CLINICALIMAGING) || voInvestigation.getInvestigation().getInvestigationIndex().getCategory().equals(Category.CLINICAL)))//WDEV-16361
                {
                    boolean printLocal = true;
                    for (int j = 0; notLocalInvColl != null && j < notLocalInvColl.size(); j++)
                    {
                        if(voInvestigation.getInvestigation().getInvestigationIndex().getCategoryIsNotNull() && voInvestigation.getInvestigation().getInvestigationIndex().getID_InvestigationIndex().equals(notLocalInvColl.get(j).getID_InvestigationIndex()))
                        {
                            printLocal = false;
                            break;
                        }
                    }

                    if(printLocal == true)
                    {
                        addOrCreateProviderServiceRow(voInvestigation);
                    }
                    else
                    {
                        //WDEV-2820 The default printer is driven by the requested(Physical) location and the investigation's service 
                        String defaultPrinter = domain.getDefaultPrinterByLocationAndService(voInvestigation.getRequestedLocation(), voInvestigation.getInvestigation().getProviderService().getLocationService().getService());
                        if(defaultPrinter == null)
                        {
                            addOrCreateProviderServiceRow(voInvestigation);
                            locMap.put(voInvestigation.getInvestigation().getProviderService().getLocationService().getService().getServiceName(), voInvestigation.getInvestigation().getInvestigationIndex().getName());
                        }

                    }
                }
            }
        }
    }

    if(locMap.size() > 0)
    {
        StringBuffer locs = new StringBuffer("The department for Modality(s): ");

        Set keys = locMap.keySet();

        for (Iterator iter = keys.iterator(); iter.hasNext();)
        {
            String element = (String) iter.next();

            locs.append(element);
            locs.append("; ");
        }

        locs.append("has no configured default printer. Local printers will be used instead.");

        //WDEV-8122
        if(locs.length() > 130)
        {
            form.lblNoPrinter1().setTooltip(locs.toString());
            locs = locs.replace(130, locs.length(), "...");
            form.lblNoPrinter1().setValue(locs.toString());
        }           
        else
            form.lblNoPrinter1().setValue(locs.toString());

        form.lblNoPrinter1().setVisible(true);
    }

    if(form.dyngrdPrint().getRows().size() == 0)
        engine.close(DialogResult.CANCEL);
}
项目:AvoinApotti    文件:Logic.java   
public OrderInvestigationListVoCollection getInvestigations()
{
    return investigations;
}
项目:AvoinApotti    文件:Logic.java   
public ProviderServiceInvestigations(LocSvcProviderSysRefVo providerServ,OrderInvestigationListVoCollection invests, String defaultprinter)
{
    providerService = providerServ;
    investigations = invests;
    printer = defaultprinter;
}
项目:AvoinApotti    文件:Logic.java   
public void setInvestigations(OrderInvestigationListVoCollection investigations)
{
    this.investigations = investigations;
}
项目:openMAXIMS    文件:Logic.java   
@SuppressWarnings({ "rawtypes", "unchecked" })
private void populateInvestigations(OrderInvestigationListVoCollection investigations)
{
    if (investigations == null)
        return;

    HashMap locMap = new HashMap();

    InvestigationIndexRefVoCollection notLocalInvColl = form.getGlobalContext().OCRR.PrintOrder.getNotLocalInvestigations();

    for (int i = 0; i < investigations.size(); i++)
    {
        OrderInvestigationListVo voInvestigation = investigations.get(i);
        if (voInvestigation.getInvestigationIsNotNull() && voInvestigation.getInvestigation().getInvestigationIndexIsNotNull())
        {
            if (voInvestigation.getOrdInvCurrentStatus() != null && (!OrderInvStatus.CANCEL_REQUEST.equals(voInvestigation.getOrdInvCurrentStatus().getOrdInvStatus()) && !OrderInvStatus.CANCELLED.equals(voInvestigation.getOrdInvCurrentStatus().getOrdInvStatus())))
            {
                if (voInvestigation.getInvestigation().getInvestigationIndex().getCategoryIsNotNull() && (voInvestigation.getInvestigation().getInvestigationIndex().getCategory().equals(Category.CLINICALIMAGING) || voInvestigation.getInvestigation().getInvestigationIndex().getCategory().equals(Category.CLINICAL)))//WDEV-16361
                {
                    boolean printLocal = true;
                    for (int j = 0; notLocalInvColl != null && j < notLocalInvColl.size(); j++)
                    {
                        if(voInvestigation.getInvestigation().getInvestigationIndex().getCategoryIsNotNull() && voInvestigation.getInvestigation().getInvestigationIndex().getID_InvestigationIndex().equals(notLocalInvColl.get(j).getID_InvestigationIndex()))
                        {
                            printLocal = false;
                            break;
                        }
                    }

                    if(printLocal == true)
                    {
                        addOrCreateProviderServiceRow(voInvestigation);
                    }
                    else
                    {
                        //WDEV-2820 The default printer is driven by the requested(Physical) location and the investigation's service 
                        String defaultPrinter = domain.getDefaultPrinterByLocationAndService(voInvestigation.getRequestedLocation(), voInvestigation.getInvestigation().getProviderService().getLocationService().getService());
                        if(defaultPrinter == null)
                        {
                            addOrCreateProviderServiceRow(voInvestigation);
                            locMap.put(voInvestigation.getInvestigation().getProviderService().getLocationService().getService().getServiceName(), voInvestigation.getInvestigation().getInvestigationIndex().getName());
                        }

                    }
                }
            }
        }
    }

    if(locMap.size() > 0)
    {
        StringBuffer locs = new StringBuffer("The department for Modality(s): ");

        Set keys = locMap.keySet();

        for (Iterator iter = keys.iterator(); iter.hasNext();)
        {
            String element = (String) iter.next();

            locs.append(element);
            locs.append("; ");
        }

        locs.append("has no configured default printer. Local printers will be used instead.");

        //WDEV-8122
        if(locs.length() > 130)
        {
            form.lblNoPrinter1().setTooltip(locs.toString());
            locs = locs.replace(130, locs.length(), "...");
            form.lblNoPrinter1().setValue(locs.toString());
        }           
        else
            form.lblNoPrinter1().setValue(locs.toString());

        form.lblNoPrinter1().setVisible(true);
    }

    if(form.dyngrdPrint().getRows().size() == 0)
        engine.close(DialogResult.CANCEL);
}
项目:openMAXIMS    文件:Logic.java   
public OrderInvestigationListVoCollection getInvestigations()
{
    return investigations;
}
项目:openMAXIMS    文件:Logic.java   
public ProviderServiceInvestigations(LocSvcProviderSysRefVo providerServ,OrderInvestigationListVoCollection invests, String defaultprinter)
{
    providerService = providerServ;
    investigations = invests;
    printer = defaultprinter;
}
项目:openMAXIMS    文件:Logic.java   
public void setInvestigations(OrderInvestigationListVoCollection investigations)
{
    this.investigations = investigations;
}
项目:openMAXIMS    文件:Logic.java   
@SuppressWarnings({ "rawtypes", "unchecked" })
private void populateInvestigations(OrderInvestigationListVoCollection investigations)
{
    if (investigations == null)
        return;

    HashMap locMap = new HashMap();

    InvestigationIndexRefVoCollection notLocalInvColl = form.getGlobalContext().OCRR.PrintOrder.getNotLocalInvestigations();

    for (int i = 0; i < investigations.size(); i++)
    {
        OrderInvestigationListVo voInvestigation = investigations.get(i);
        if (voInvestigation.getInvestigationIsNotNull() && voInvestigation.getInvestigation().getInvestigationIndexIsNotNull())
        {
            if (voInvestigation.getOrdInvCurrentStatus() != null && (!OrderInvStatus.CANCEL_REQUEST.equals(voInvestigation.getOrdInvCurrentStatus().getOrdInvStatus()) && !OrderInvStatus.CANCELLED.equals(voInvestigation.getOrdInvCurrentStatus().getOrdInvStatus())))
            {
                if (voInvestigation.getInvestigation().getInvestigationIndex().getCategoryIsNotNull() && (voInvestigation.getInvestigation().getInvestigationIndex().getCategory().equals(Category.CLINICALIMAGING) || voInvestigation.getInvestigation().getInvestigationIndex().getCategory().equals(Category.CLINICAL)))//WDEV-16361
                {
                    boolean printLocal = true;
                    for (int j = 0; notLocalInvColl != null && j < notLocalInvColl.size(); j++)
                    {
                        if(voInvestigation.getInvestigation().getInvestigationIndex().getCategoryIsNotNull() && voInvestigation.getInvestigation().getInvestigationIndex().getID_InvestigationIndex().equals(notLocalInvColl.get(j).getID_InvestigationIndex()))
                        {
                            printLocal = false;
                            break;
                        }
                    }

                    if(printLocal == true)
                    {
                        addOrCreateProviderServiceRow(voInvestigation);
                    }
                    else
                    {
                        //WDEV-2820 The default printer is driven by the requested(Physical) location and the investigation's service 
                        String defaultPrinter = domain.getDefaultPrinterByLocationAndService(voInvestigation.getRequestedLocation(), voInvestigation.getInvestigation().getProviderService().getLocationService().getService());
                        if(defaultPrinter == null)
                        {
                            addOrCreateProviderServiceRow(voInvestigation);
                            locMap.put(voInvestigation.getInvestigation().getProviderService().getLocationService().getService().getServiceName(), voInvestigation.getInvestigation().getInvestigationIndex().getName());
                        }

                    }
                }
            }
        }
    }

    if(locMap.size() > 0)
    {
        StringBuffer locs = new StringBuffer("The department for Modality(s): ");

        Set keys = locMap.keySet();

        for (Iterator iter = keys.iterator(); iter.hasNext();)
        {
            String element = (String) iter.next();

            locs.append(element);
            locs.append("; ");
        }

        locs.append("has no configured default printer. Local printers will be used instead.");

        //WDEV-8122
        if(locs.length() > 130)
        {
            form.lblNoPrinter1().setTooltip(locs.toString());
            locs = locs.replace(130, locs.length(), "...");
            form.lblNoPrinter1().setValue(locs.toString());
        }           
        else
            form.lblNoPrinter1().setValue(locs.toString());

        form.lblNoPrinter1().setVisible(true);
    }

    if(form.dyngrdPrint().getRows().size() == 0)
        engine.close(DialogResult.CANCEL);
}
项目:openMAXIMS    文件:Logic.java   
public OrderInvestigationListVoCollection getInvestigations()
{
    return investigations;
}