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

项目:AvoinApotti    文件:Logic.java   
private void addDFTInvestigationRow(OrderInvestigationListVo investigation)
{
    String invName = getInvName(investigation);

    DynamicGridRow parRow = form.dyngrdPrint().getRows().newRow();
    parRow.setSelectable(false);
    DynamicGridCell cell = parRow.getCells().newCell(getColumn(COL_INVESTIGATION), DynamicCellType.STRING);
    cell.setTooltip(invName);
    cell.setReadOnly(true);
    cell.setValue(invName);

    cell = parRow.getCells().newCell(getColumn(COL_NO_OF_LABELS_SETS), DynamicCellType.INT);
    cell.setReadOnly(false);
    cell.setValue(investigation.getInvestigation() != null ? investigation.getInvestigation().getNoLabelSets() : null);
    cell.setIntMaxLength(2); //restrict to 2 digits WDEV-16746

    cell = parRow.getCells().newCell(getColumn(COL_PRINTER), DynamicCellType.ENUMERATION);
    populateLocalPrinters(cell);

    cell = parRow.getCells().newCell(getColumn(COL_PREVIEW), DynamicCellType.IMAGEBUTTON);
    cell.setValue(form.getImages().Core.ZoomInEnabled16);
    cell.setAutoPostBack(true);

    parRow.setTextColor(ims.framework.utils.Color.Blue);
    parRow.setValue(investigation);
}
项目: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   
/**
 * WDEV-13999
 * Function used to determine if the order can be amended
 * This works of analysing the local context value
 */
private boolean canOrderBeAmmended()
{
    if (form.getLocalContext().getOrderSummary() == null)
        return false;

    OcsOrderSummaryVo orderSummary = form.getLocalContext().getOrderSummary();

    if (orderSummary.getInvestigations() == null)
        return false;

    for (OrderInvestigationListVo investigation : orderSummary.getInvestigations())
    {
        if (investigation.getOrdInvCurrentStatusIsNotNull() && OrderInvStatus.REJECTED.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus()))
            return true;
    }

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private boolean isInvestigationCompletedOrResulted(OrderInvestigationListVo inv)
{
    if (inv!=null&&inv.getOrdInvStatusHistoryIsNotNull())
    {
        for (OrderedInvestigationStatusVo status : inv.getOrdInvStatusHistory())
        {
            if(status.getOrdInvStatusIsNotNull()
                    &&(OrderInvStatus.NEW_RESULT.equals(status.getOrdInvStatus())
                            ||OrderInvStatus.UPDATED_RESULT.equals(status.getOrdInvStatus())
                            ||OrderInvStatus.RESULTED.equals(status.getOrdInvStatus())
                            ||OrderInvStatus.COMPLETE.equals(status.getOrdInvStatus())))
                    {
                        return true;
                    }
        } 
    }

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private Boolean canBeScheduled(OrderInvestigationListVo item)
{
    if (item == null)
        return false;

    if (item.getInvestigation() == null || item.getInvestigation().getProviderService() == null)
        return false;

    if (item.getInvestigation().getProviderService().getLocationService() == null || item.getInvestigation().getProviderService().getLocationService().getService() == null)
        return false;
    //WDEV-15487 
    if ( ServiceCategory.PATHOLOGY_DISCIPLINE.equals(item.getInvestigation().getProviderService().getLocationService().getService().getServiceCategory()))
        return false;

    return Boolean.TRUE.equals(item.getInvestigation().getProviderService().getLocationService().getService().getCanBeScheduled());
}
项目: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);
    }       
}
项目:openMAXIMS    文件:Logic.java   
private void addDFTInvestigationRow(OrderInvestigationListVo investigation)
{
    String invName = getInvName(investigation);

    DynamicGridRow parRow = form.dyngrdPrint().getRows().newRow();
    parRow.setSelectable(false);
    DynamicGridCell cell = parRow.getCells().newCell(getColumn(COL_INVESTIGATION), DynamicCellType.STRING);
    cell.setTooltip(invName);
    cell.setReadOnly(true);
    cell.setValue(invName);

    cell = parRow.getCells().newCell(getColumn(COL_NO_OF_LABELS_SETS), DynamicCellType.INT);
    cell.setReadOnly(false);
    cell.setValue(investigation.getInvestigation() != null ? investigation.getInvestigation().getNoLabelSets() : null);
    cell.setIntMaxLength(2); //restrict to 2 digits WDEV-16746

    cell = parRow.getCells().newCell(getColumn(COL_PRINTER), DynamicCellType.ENUMERATION);
    populateLocalPrinters(cell);

    cell = parRow.getCells().newCell(getColumn(COL_PREVIEW), DynamicCellType.IMAGEBUTTON);
    cell.setValue(form.getImages().Core.ZoomInEnabled16);
    cell.setAutoPostBack(true);

    parRow.setTextColor(ims.framework.utils.Color.Blue);
    parRow.setValue(investigation);
}
项目: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   
/**
 * WDEV-13999
 * Function used to determine if the order can be amended
 * This works of analysing the local context value
 */
private boolean canOrderBeAmmended()
{
    if (form.getLocalContext().getOrderSummary() == null)
        return false;

    OcsOrderSummaryVo orderSummary = form.getLocalContext().getOrderSummary();

    if (orderSummary.getInvestigations() == null)
        return false;

    for (OrderInvestigationListVo investigation : orderSummary.getInvestigations())
    {
        if (investigation.getOrdInvCurrentStatusIsNotNull() && OrderInvStatus.REJECTED.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus()))
            return true;
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private boolean isInvestigationCompletedOrResulted(OrderInvestigationListVo inv)
{
    if (inv!=null&&inv.getOrdInvStatusHistoryIsNotNull())
    {
        for (OrderedInvestigationStatusVo status : inv.getOrdInvStatusHistory())
        {
            if(status.getOrdInvStatusIsNotNull()
                    &&(OrderInvStatus.NEW_RESULT.equals(status.getOrdInvStatus())
                            ||OrderInvStatus.UPDATED_RESULT.equals(status.getOrdInvStatus())
                            ||OrderInvStatus.RESULTED.equals(status.getOrdInvStatus())
                            ||OrderInvStatus.COMPLETE.equals(status.getOrdInvStatus())))
                    {
                        return true;
                    }
        } 
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private Boolean canBeScheduled(OrderInvestigationListVo item)
{
    if (item == null)
        return false;

    if (item.getInvestigation() == null || item.getInvestigation().getProviderService() == null)
        return false;

    if (item.getInvestigation().getProviderService().getLocationService() == null || item.getInvestigation().getProviderService().getLocationService().getService() == null)
        return false;
    //WDEV-15487 
    if ( ServiceCategory.PATHOLOGY_DISCIPLINE.equals(item.getInvestigation().getProviderService().getLocationService().getService().getServiceCategory()))
        return false;

    return Boolean.TRUE.equals(item.getInvestigation().getProviderService().getLocationService().getService().getCanBeScheduled());
}
项目: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    文件:Logic.java   
private void addDFTInvestigationRow(OrderInvestigationListVo investigation)
{
    String invName = getInvName(investigation);

    DynamicGridRow parRow = form.dyngrdPrint().getRows().newRow();
    parRow.setSelectable(false);
    DynamicGridCell cell = parRow.getCells().newCell(getColumn(COL_INVESTIGATION), DynamicCellType.STRING);
    cell.setTooltip(invName);
    cell.setReadOnly(true);
    cell.setValue(invName);

    cell = parRow.getCells().newCell(getColumn(COL_NO_OF_LABELS_SETS), DynamicCellType.INT);
    cell.setReadOnly(false);
    cell.setValue(investigation.getInvestigation() != null ? investigation.getInvestigation().getNoLabelSets() : null);
    cell.setIntMaxLength(2); //restrict to 2 digits WDEV-16746

    cell = parRow.getCells().newCell(getColumn(COL_PRINTER), DynamicCellType.ENUMERATION);
    populateLocalPrinters(cell);

    cell = parRow.getCells().newCell(getColumn(COL_PREVIEW), DynamicCellType.IMAGEBUTTON);
    cell.setValue(form.getImages().Core.ZoomInEnabled16);
    cell.setAutoPostBack(true);

    parRow.setTextColor(ims.framework.utils.Color.Blue);
    parRow.setValue(investigation);
}
项目: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   
/**
 * WDEV-13999
 * Function used to determine if the order can be amended
 * This works of analysing the local context value
 */
private boolean canOrderBeAmmended()
{
    if (form.getLocalContext().getOrderSummary() == null)
        return false;

    OcsOrderSummaryVo orderSummary = form.getLocalContext().getOrderSummary();

    if (orderSummary.getInvestigations() == null)
        return false;

    for (OrderInvestigationListVo investigation : orderSummary.getInvestigations())
    {
        if (investigation.getOrdInvCurrentStatusIsNotNull() && OrderInvStatus.REJECTED.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus()))
            return true;
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private boolean isInvestigationCompletedOrResulted(OrderInvestigationListVo inv)
{
    if (inv!=null&&inv.getOrdInvStatusHistoryIsNotNull())
    {
        for (OrderedInvestigationStatusVo status : inv.getOrdInvStatusHistory())
        {
            if(status.getOrdInvStatusIsNotNull()
                    &&(OrderInvStatus.NEW_RESULT.equals(status.getOrdInvStatus())
                            ||OrderInvStatus.UPDATED_RESULT.equals(status.getOrdInvStatus())
                            ||OrderInvStatus.RESULTED.equals(status.getOrdInvStatus())
                            ||OrderInvStatus.COMPLETE.equals(status.getOrdInvStatus())))
                    {
                        return true;
                    }
        } 
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private Boolean canBeScheduled(OrderInvestigationListVo item)
{
    if (item == null)
        return false;

    if (item.getInvestigation() == null || item.getInvestigation().getProviderService() == null)
        return false;

    if (item.getInvestigation().getProviderService().getLocationService() == null || item.getInvestigation().getProviderService().getLocationService().getService() == null)
        return false;
    //WDEV-15487 
    if ( ServiceCategory.PATHOLOGY_DISCIPLINE.equals(item.getInvestigation().getProviderService().getLocationService().getService().getServiceCategory()))
        return false;

    return Boolean.TRUE.equals(item.getInvestigation().getProviderService().getLocationService().getService().getCanBeScheduled());
}
项目: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-linux    文件:Logic.java   
private void addDFTInvestigationRow(OrderInvestigationListVo investigation)
{
    String invName = getInvName(investigation);

    DynamicGridRow parRow = form.dyngrdPrint().getRows().newRow();
    parRow.setSelectable(false);
    DynamicGridCell cell = parRow.getCells().newCell(getColumn(COL_INVESTIGATION), DynamicCellType.STRING);
    cell.setTooltip(invName);
    cell.setReadOnly(true);
    cell.setValue(invName);

    cell = parRow.getCells().newCell(getColumn(COL_NO_OF_LABELS_SETS), DynamicCellType.INT);
    cell.setReadOnly(false);
    cell.setValue(investigation.getInvestigation() != null ? investigation.getInvestigation().getNoLabelSets() : null);
    cell.setIntMaxLength(2); //restrict to 2 digits WDEV-16746

    cell = parRow.getCells().newCell(getColumn(COL_PRINTER), DynamicCellType.ENUMERATION);
    populateLocalPrinters(cell);

    cell = parRow.getCells().newCell(getColumn(COL_PREVIEW), DynamicCellType.IMAGEBUTTON);
    cell.setValue(form.getImages().Core.ZoomInEnabled16);
    cell.setAutoPostBack(true);

    parRow.setTextColor(ims.framework.utils.Color.Blue);
    parRow.setValue(investigation);
}
项目: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   
/**
 * WDEV-13999
 * Function used to determine if the order can be amended
 * This works of analysing the local context value
 */
private boolean canOrderBeAmmended()
{
    if (form.getLocalContext().getOrderSummary() == null)
        return false;

    OcsOrderSummaryVo orderSummary = form.getLocalContext().getOrderSummary();

    if (orderSummary.getInvestigations() == null)
        return false;

    for (OrderInvestigationListVo investigation : orderSummary.getInvestigations())
    {
        if (investigation.getOrdInvCurrentStatusIsNotNull() && OrderInvStatus.REJECTED.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus()))
            return true;
    }

    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private boolean isInvestigationCompletedOrResulted(OrderInvestigationListVo inv)
{
    if (inv!=null&&inv.getOrdInvStatusHistoryIsNotNull())
    {
        for (OrderedInvestigationStatusVo status : inv.getOrdInvStatusHistory())
        {
            if(status.getOrdInvStatusIsNotNull()
                    &&(OrderInvStatus.NEW_RESULT.equals(status.getOrdInvStatus())
                            ||OrderInvStatus.UPDATED_RESULT.equals(status.getOrdInvStatus())
                            ||OrderInvStatus.RESULTED.equals(status.getOrdInvStatus())
                            ||OrderInvStatus.COMPLETE.equals(status.getOrdInvStatus())))
                    {
                        return true;
                    }
        } 
    }

    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private Boolean canBeScheduled(OrderInvestigationListVo item)
{
    if (item == null)
        return false;

    if (item.getInvestigation() == null || item.getInvestigation().getProviderService() == null)
        return false;

    if (item.getInvestigation().getProviderService().getLocationService() == null || item.getInvestigation().getProviderService().getLocationService().getService() == null)
        return false;
    //WDEV-15487 
    if ( ServiceCategory.PATHOLOGY_DISCIPLINE.equals(item.getInvestigation().getProviderService().getLocationService().getService().getServiceCategory()))
        return false;

    return Boolean.TRUE.equals(item.getInvestigation().getProviderService().getLocationService().getService().getCanBeScheduled());
}
项目: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 String getInvName(OrderInvestigationListVo investigation) 
{
    if(investigation != null && investigation.getInvestigation() != null && investigation.getInvestigation().getInvestigationIndex() != null)
        return investigation.getInvestigation().getInvestigationIndex().getName();

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

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

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private String[] getReportAndTemplateByModality(Object value, HashMap<String, String[]> templateMap)
{
    ServiceLiteVo modality = null;
    Boolean dft = null;
    String key;

    if(value instanceof OrderInvestigationListVo && isDFT((OrderInvestigationListVo)value))
    {
        modality = domain.getModality((OrderInvestigationListVo)value);
        dft = true;
    }
    /*
    else if(value instanceof OrderInvestigationListVo)
    {
        modality = domain.getModality((OrderInvestigationListVo)value);
        dft = false;
    }
    */
    else if(value instanceof OrderSpecimenRefVo)
    {
        modality = domain.getModality((OrderSpecimenRefVo)value);
        dft = false;
    }

    key = modality.getID_Service() + "_" + dft.toString();

    return templateMap.get(key);
}
项目:AvoinApotti    文件:Logic.java   
private boolean isCancelled(OcsOrderSummaryVo orderSummary)
{
    if (orderSummary == null || orderSummary.getInvestigations() == null)
        return false;

    for (OrderInvestigationListVo investigation : orderSummary.getInvestigations())
    {
        if (!OrderInvStatus.CANCEL_REQUEST.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus())
                && !OrderInvStatus.CANCELLED.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus()))
            return false;
    }

    return true;
}
项目:AvoinApotti    文件:Logic.java   
/**
 * Function used to determine if the oder can be authorised
 * This works of analysing the local context value for the order
 */
private boolean canOrderBeAuthorized()
{
    OcsOrderSummaryVo orderSummary = form.getLocalContext().getOrderSummary();

    if (orderSummary == null || orderSummary.getInvestigations() == null)
        return false;

    // Check order status - not to be cancelled
    int ordersAwaitingAuthorization = 0;

    for (OrderInvestigationListVo investigation : orderSummary.getInvestigations())
    {
        if (investigation.getOrdInvCurrentStatus() != null && OrderInvStatus.AWAITING_AUTHORISATION.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus()))
            ordersAwaitingAuthorization++;

        if (Category.PATHOLOGY.equals(investigation.getInvestigation().getInvestigationIndex().getCategory())
                && !engine.hasRight(AppRight.CAN_AUTHORIZE_PATHOLOGY_ORDERS)
                && investigation.getOrdInvCurrentStatus() != null
                && OrderInvStatus.AWAITING_AUTHORISATION.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus()))
            return false;

        if (Category.CLINICALIMAGING.equals(investigation.getInvestigation().getInvestigationIndex().getCategory())
                && !engine.hasRight(AppRight.CAN_AUTHORIZE_CLINICAL_IMAGING_ORDERS)
                && investigation.getOrdInvCurrentStatus() != null
                && OrderInvStatus.AWAITING_AUTHORISATION.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus()))
            return false;
    }

    if (ordersAwaitingAuthorization == 0)
        return false;

    if (engine.hasRight(AppRight.CAN_AUTHORIZE_CLINICAL_IMAGING_ORDERS) && engine.hasRight(AppRight.CAN_AUTHORIZE_PATHOLOGY_ORDERS))
        return true;

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private boolean doesOrderedInvestigationExist() 
{
    if(form.getLocalContext().getOrderSummaryIsNotNull())
    {
        OcsOrderSummaryVo voOrderSummary = form.getLocalContext().getOrderSummary();
        if(voOrderSummary.getInvestigationsIsNotNull())
        {
            for(OrderInvestigationListVo investigation : voOrderSummary.getInvestigations())
            {
                if(investigation.getOrdInvCurrentStatusIsNotNull() && investigation.getOrdInvCurrentStatus().getOrdInvStatusIsNotNull())
                {
                    boolean invSentRadiologyFromSchedulingService = (Category.CLINICALIMAGING.equals(investigation.getInvestigation().getInvestigationIndex().getCategory()) 
                            && !isInvestigationCompletedOrResulted(investigation))
                            && !isCancelledOrCancelRequested(investigation)
                            && canBeScheduled(investigation);


                    if(investigation.getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.AWAITING_AUTHORISATION)
                            ||  investigation.getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.ORDERED)
                            || investigation.getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.ORDERED_AWAITING_APPT)
                            || invSentRadiologyFromSchedulingService)
                    {
                        if(investigation.getPassesSecurity() == null || (investigation.getPassesSecurityIsNotNull() && investigation.getPassesSecurity()))
                            return true;
                    }
                }
            }
        }
    }

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

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

    return false;
}
项目: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 boolean isCancelledOrCancelRequested(OrderInvestigationListVo investigation)
{
    if (investigation == null || investigation.getOrdInvCurrentStatus() == null)
        return false;

    if (OrderInvStatus.CANCEL_REQUEST.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus()))
        return true;

    if (OrderInvStatus.CANCELLED.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus()))
        return true;

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private void addtogrid( OrderInvestigationListVo ordInvVo)
{
    if( ordInvVo == null)
        return;
    if( ordInvVo.getInvestigation().getInvestigationIndex().getCategoryIsNotNull() && (ordInvVo.getInvestigation().getInvestigationIndex().getCategory().equals(Category.CLINICALIMAGING)) )
    {
        StringBuilder szDisplayText = new StringBuilder();
        szDisplayText.append(ordInvVo.getInvestigation().getInvestigationIndex().getName());

        if (ordInvVo.getRequestedLocationIsNotNull())
        {
            szDisplayText.append(" (");
            szDisplayText.append(ordInvVo.getRequestedLocation());
            szDisplayText.append(")");
        }

        if (ordInvVo.getOrdInvCurrentStatus() != null)
        {
            szDisplayText.append(" - Current Status: ").append(ordInvVo.getOrdInvCurrentStatus().getOrdInvStatus().getText());
        }

        //WDEV-16457 
        szDisplayText.append(ordInvVo.getPlacerOrdNum() != null ?  " - OCS Number: " + ordInvVo.getPlacerOrdNum() : "");

        grdInvestigationsRow row = form.grdInvestigations().getRows().newRow();
        row.setColumnInvestigation(szDisplayText.toString());
        row.setCellColumnInvestigationTooltip(szDisplayText.toString());
        row.setValue(ordInvVo);
    }
}
项目: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 String getInvName(OrderInvestigationListVo investigation) 
{
    if(investigation != null && investigation.getInvestigation() != null && investigation.getInvestigation().getInvestigationIndex() != null)
        return investigation.getInvestigation().getInvestigationIndex().getName();

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

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

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private String[] getReportAndTemplateByModality(Object value, HashMap<String, String[]> templateMap)
{
    ServiceLiteVo modality = null;
    Boolean dft = null;
    String key;

    if(value instanceof OrderInvestigationListVo && isDFT((OrderInvestigationListVo)value))
    {
        modality = domain.getModality((OrderInvestigationListVo)value);
        dft = true;
    }
    /*
    else if(value instanceof OrderInvestigationListVo)
    {
        modality = domain.getModality((OrderInvestigationListVo)value);
        dft = false;
    }
    */
    else if(value instanceof OrderSpecimenRefVo)
    {
        modality = domain.getModality((OrderSpecimenRefVo)value);
        dft = false;
    }

    key = modality.getID_Service() + "_" + dft.toString();

    return templateMap.get(key);
}
项目:openMAXIMS    文件:Logic.java   
private boolean isCancelled(OcsOrderSummaryVo orderSummary)
{
    if (orderSummary == null || orderSummary.getInvestigations() == null)
        return false;

    for (OrderInvestigationListVo investigation : orderSummary.getInvestigations())
    {
        if (!OrderInvStatus.CANCEL_REQUEST.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus())
                && !OrderInvStatus.CANCELLED.equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus()))
            return false;
    }

    return true;
}