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

项目:AvoinApotti    文件:R01VoMapper.java   
/**
 * Returns true if the given status is a pre-resulted status
 * i.e. Ordered, Sent, Received, Rejected, Accepted, Inprogress,
 * Inprogress-SCH
 * @param status
 * @return true or false
 */
//updated http://jira/browse/WDEV-15673
private boolean isPreResult(OrderInvStatus status)
{
    if (status == null)
        return false;

    if (status.equals(OrderInvStatus.ORDERED) || status.equals(OrderInvStatus.SENT) || status.equals(OrderInvStatus.RECEIVED)
            ||status.equals(OrderInvStatus.REJECTED) || status.equals(OrderInvStatus.ACCEPTED)
            ||status.equals(OrderInvStatus.CANCEL_REQUEST) || status.equals(OrderInvStatus.CANCELLED) 
            || status.equals(OrderInvStatus.INPROGRESS) ||status.equals(OrderInvStatus.INPROGRESS_SCH) 
            || status.equals(OrderInvStatus.COMPLETE) || status.equals(OrderInvStatus.AWAITING_AUTHORISATION) 
            || status.equals(OrderInvStatus.ORDERED_AWAITING_APPT)|| status.equals(OrderInvStatus.HELD) 
            || status.equals(OrderInvStatus.CHANGE_REQUESTED)|| status.equals(OrderInvStatus.CHANGED) 
            || status.equals(OrderInvStatus.HOLD_REQUESTED)|| status.equals(OrderInvStatus.PROVIDER_CHANGE_REJECTED) 
            || status.equals(OrderInvStatus.AMENDED))
        return true;

    return false;
}
项目:AvoinApotti    文件:HL7EngineOutbound.java   
private boolean invsMissingOrAllCancelled(IfOrderSpecimenVo spec)
{
    boolean allCancelled=true;
    if(spec!=null&&spec.getInvestigationsIsNotNull())
    {
        for(IfOrderInvestigationVo voOrdInv : spec.getInvestigations())
        {
            if(voOrdInv.getOrdInvCurrentStatusIsNotNull() &&  voOrdInv.getOrdInvCurrentStatus().getOrdInvStatusIsNotNull() && (!voOrdInv.getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.CANCEL_REQUEST) && ! voOrdInv.getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.CANCELLED)))
            {
                allCancelled=false;
                break;
            }
        }
    }
    return allCancelled;
}
项目:AvoinApotti    文件:Logic.java   
private void addClinicalRow(ReferralAppointmentDetailsOcsOrderVo voOrder, ReferralAppointmentDetailsOrderInvestigationVo voOrderInv)
{
    GenForm.grdInvestigationsRow row = form.grdInvestigations().getRows().newRow();
    if(voOrder.getSysInfoIsNotNull() && voOrder.getSysInfo().getCreationDateTime() != null)
        row.setcolDate(voOrder.getSysInfo().getCreationDateTime().toString(false));

    if(voOrderInv.getInvestigationIsNotNull() && voOrderInv.getInvestigation().getInvestigationIndexIsNotNull())
        row.setcolInvestigation(voOrderInv.getInvestigation().getInvestigationIndex().getName());

    if(voOrderInv.getSpecimenIsNotNull() && voOrderInv.getSpecimen().size()>0 && voOrderInv.getSpecimen().get(0).getSpecimenSourceIsNotNull())
        row.setcolSpecimen(voOrderInv.getSpecimen().get(0).getSpecimenSource().getText());

    if(voOrder.getResponsibleClinicianIsNotNull())
        row.setcolResp(voOrder.getResponsibleClinician().toString());

    row.setcolApptDate(voOrderInv.getAppointmentDateIsNotNull() ? voOrderInv.getAppointmentDate().toString() : null);

    if(voOrderInv.getOrdInvCurrentStatusIsNotNull() && voOrderInv.getOrdInvCurrentStatus().getOrdInvStatusIsNotNull()
            && (voOrderInv.getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.CANCEL_REQUEST)
                    || voOrderInv.getOrdInvCurrentStatus().getOrdInvStatus().equals(OrderInvStatus.CANCELLED)))
        row.setBackColor(ConfigFlag.UI.CANCELLED_INVESTIGATION_ROW_COLOUR.getValue());

    row.setValue(voOrderInv);
}
项目:AvoinApotti    文件:Logic.java   
private void populateGridFromData(OrderedInvestigationStatusVoCollection collStatus)
{
    form.grdHistory().getRows().clear();
    for(int i=0;i<collStatus.size();i++)
    {
        OrderedInvestigationStatusVo status = collStatus.get(i);
        GenForm.grdHistoryRow row = form.grdHistory().getRows().newRow();
        if(status.getChangeDateTimeIsNotNull())
            row.setColDateTime(status.getChangeDateTime().toString());
        if(status.getProcessedDateTimeIsNotNull())
            row.setprocessedDateTime(status.getProcessedDateTime().toString());
        row.setColUser(status.getChangeUser());
        row.setColStatus(getStatusText( status.getOrdInvStatus()));
        if(status.getOrdInvStatus().equals(OrderInvStatus.CANCEL_REQUEST)){
            if(status.getStatusChangeReasonIsNotNull())
                row.setColReason(status.getStatusChangeReason().toString());
        }
        else
            row.setColReason(status.getStatusReason());
        row.setTooltipForColReason(status.getStatusReason());
    }
}
项目:AvoinApotti    文件:Logic.java   
private String getStatusText(OrderInvStatus ordInvStatus)
{
    if(ordInvStatus == null || form.cmbInvestigation().getValue() == null)
        return null;
    OcsPathRadResultVo item = form.cmbInvestigation().getValue();

    if(ConfigFlag.UI.ORDER_ENTRY_UI_TYPE.getValue().equals("CARE_UK") || ConfigFlag.UI.ORDER_ENTRY_UI_TYPE.getValue().equals("UKSH")) //WDEV-11881
    {
        if(item.getCategoryIsNotNull())
        {
            if(item.getCategory().equals(Category.CLINICALIMAGING))
            {
                if(ordInvStatus.equals(ordInvStatus.ORDERED))
                {
                    return "Ready";
                }
            }
            else
                ordInvStatus.getText();
        }
    }
    return ordInvStatus.getText();
}
项目: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 String generateStatusTooltip(OrderedInvestigationStatusClinicalVo ordInvCurrentStatus)
{
    if (ordInvCurrentStatus != null && ordInvCurrentStatus.getOrdInvStatus() != null)
    {
        StringBuffer sb = new StringBuffer();
        sb.append("<b>Current status: </b>" + ordInvCurrentStatus.getOrdInvStatus().getText());

        if (ordInvCurrentStatus.getStatusReason() != null && ordInvCurrentStatus.getStatusReason().length() > 0 && ordInvCurrentStatus.getOrdInvStatus().equals(OrderInvStatus.CANCELLED))
            sb.append("<br><b>Current status reason: </b>" + ordInvCurrentStatus.getStatusReason());

        sb.append("<br><b>Date changed: </b>" + ordInvCurrentStatus.getChangeDateTime());
        sb.append("<br><b>Changed by: </b>" + (ordInvCurrentStatus.getChangeUserIsNotNull() ? ordInvCurrentStatus.getChangeUser().toString() : ""));

        return sb.toString();
    }
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void updateControlsState()
{
    form.getContextMenus().OCRR.hideAllClinicalOrdersResultsGridMenuMenuItems();
    ReferralAppointmentDetailsOrderInvestigationVo tempOrderInv = null;

    if (form.grdClinicalResults().getValue()!=null && form.grdClinicalResults().getValue().getOrderInvestigationIsNotNull())
    {
        tempOrderInv=domain.getReferralAppointmentDetailsOrderInv(form.grdClinicalResults().getValue().getOrderInvestigation());
    }

    //Scan/Import visible only if not Manually Resulted
    form.getContextMenus().OCRR.getClinicalOrdersResultsGridMenuSCANIMPORTItem().setVisible(form.grdClinicalResults().getRows().size()>0 && form.grdClinicalResults().getValue() != null 
            && tempOrderInv!=null && OrderInvStatus.ORDERED.equals(tempOrderInv.getOrdInvCurrentStatus().getOrdInvStatus()));
    form.getContextMenus().OCRR.getClinicalOrdersResultsGridMenuVIEW_ORDERItem().setVisible(form.grdClinicalResults().getValue() != null);
    form.getContextMenus().OCRR.getClinicalOrdersResultsGridMenuVIEW_RESULTItem().setVisible(form.grdClinicalResults().getValue() != null && hasResults(form.grdClinicalResults().getSelectedRow()));

}
项目:AvoinApotti    文件:Logic.java   
private String generateStatusTooltip(OrderedInvestigationStatusVo ordInvCurrentStatus)
{
    if (ordInvCurrentStatus != null && ordInvCurrentStatus.getOrdInvStatus() != null)
    {
        StringBuffer sb = new StringBuffer();
        sb.append("<b>Current status: </b>" + ordInvCurrentStatus.getOrdInvStatus().getText());

        if (ordInvCurrentStatus.getStatusReason() != null && ordInvCurrentStatus.getStatusReason().length() > 0 && ordInvCurrentStatus.getOrdInvStatus().equals(OrderInvStatus.CANCELLED))
            sb.append("<br><b>Current status reason: </b>" + ordInvCurrentStatus.getStatusReason());

        sb.append("<br><b>Date changed: </b>" + ordInvCurrentStatus.getChangeDateTime());
        sb.append("<br><b>Changed by: </b>" + (ordInvCurrentStatus.getChangeUserIsNotNull() ? ordInvCurrentStatus.getChangeUser().toString() : ""));

        return sb.toString();
    }
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void viewResult()
{
    OcsPathRadResultVo value = form.grdResults().getValue();
    if (value == null)
        throw new CodingRuntimeException("grid selection is null");

    //  WDEV-17106
    if(OrderInvStatus.COMPLETE.equals(value.getCurrentInvestigationStatus()))
    {
        form.getGlobalContext().OCRR.PathologyResults.setOrder(value.getOrderSummarySession());
        // When populating the grid, patient in row value is PatientRef - so now we have to retrieve the PatientShort
        value.setPatient(domain.getPatient(value.getPatient()));
        form.getGlobalContext().Core.setPatientShort(value.getPatient());
        engine.open(form.getForms().OCRR.OrderSummaryDialog);

        return;
    }

    form.getGlobalContext().OCRR.setCurrentPathRadResult(value);
    form.getGlobalContext().OCRR.setSelectedPathRadResults(getOrderInvestigationFromGrid());//  WDEV-17106
    engine.open(form.getForms().OCRR.ResultDialog, false);
}
项目:AvoinApotti    文件:Logic.java   
private String generateStatusTooltip(OrderedInvestigationStatusVo status)
{
    if (status != null && status.getOrdInvStatus() != null)
    {
        StringBuffer sb = new StringBuffer();
        sb.append("<b>Current status: </b>" + status.getOrdInvStatus().getText());

        if (status.getStatusReason() != null && status.getStatusReason().length() > 0 && status.getOrdInvStatus().equals(OrderInvStatus.CANCELLED))
            sb.append("<br><b>Current status reason: </b>" + status.getStatusReason());

        sb.append("<br><b>Date changed: </b>" + status.getChangeDateTime());
        sb.append("<br><b>Changed by: </b>" + (status.getChangeUserIsNotNull() ? status.getChangeUser().toString() : ""));

        return sb.toString();
    }
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private String generateStatusTooltip(NewResultsListOrderInvestigationStatusVo ordInvCurrentStatus)
{
    if (ordInvCurrentStatus != null && ordInvCurrentStatus.getOrdInvStatus() != null)
    {
        StringBuffer sb = new StringBuffer();
        sb.append("<b>Current status: </b>" + ordInvCurrentStatus.getOrdInvStatus().getText());

        if (ordInvCurrentStatus.getStatusReason() != null && ordInvCurrentStatus.getStatusReason().length() > 0 && ordInvCurrentStatus.getOrdInvStatus().equals(OrderInvStatus.CANCELLED))
            sb.append("<br><b>Current status reason: </b>" + ordInvCurrentStatus.getStatusReason());

        sb.append("<br><b>Date changed: </b>" + ordInvCurrentStatus.getChangeDateTime());
        sb.append("<br><b>Changed by: </b>" + (ordInvCurrentStatus.getChangeUserIsNotNull() ? ordInvCurrentStatus.getChangeUser().toString() : ""));

        return sb.toString();
    }
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private String generateStatusTooltip(OrderedInvestigationStatusVo ordInvCurrentStatus)
{
    if (ordInvCurrentStatus != null && ordInvCurrentStatus.getOrdInvStatus() != null)
    {
        StringBuffer sb = new StringBuffer();
        sb.append("<b>Current status: </b>" + ordInvCurrentStatus.getOrdInvStatus().getText());

        if (ordInvCurrentStatus.getStatusReason() != null && ordInvCurrentStatus.getStatusReason().length() > 0 && ordInvCurrentStatus.getOrdInvStatus().equals(OrderInvStatus.CANCELLED))
            sb.append("<br><b>Current status reason: </b>" + ordInvCurrentStatus.getStatusReason());

        sb.append("<br><b>Date changed: </b>" + ordInvCurrentStatus.getChangeDateTime());
        sb.append("<br><b>Changed by: </b>" + (ordInvCurrentStatus.getChangeUserIsNotNull() ? ordInvCurrentStatus.getChangeUser().toString() : ""));

        return sb.toString();
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private boolean checkCancelledInvestions(OcsOrderInvVo voOcsOrder)
{
    boolean flag = true;
    if( voOcsOrder == null )
        return false;
    if(!voOcsOrder.getInvestigationsIsNotNull())
        return false;
    if(voOcsOrder.getInvestigations().size() < 1)
        return false;
    for(OrderInvestigationOcsOrderVo item : voOcsOrder.getInvestigations())
    {
        if(OrderInvStatus.CANCELLED.equals(item.getOrdInvCurrentStatusIsNotNull() ? item.getOrdInvCurrentStatus().getOrdInvStatus() : null) || OrderInvStatus.CANCEL_REQUEST.equals(item.getOrdInvCurrentStatusIsNotNull() ? item.getOrdInvCurrentStatus().getOrdInvStatus():null))
        {

        }
        else
        {
            flag = false;
        }
    }
    return flag;

}
项目:AvoinApotti    文件:Logic.java   
private boolean doesOrderContainInvType(Category category)
{
    if (category == null)
        return false;

    OrderInvestigationVoCollection voCollOrderInvest = form.getGlobalContext().OCRR.getOrderInvestigationCollection();

    if (voCollOrderInvest == null)
        return false;

    boolean isClinicalImagingFound = false;
    for (int i = 0; i < voCollOrderInvest.size(); i++)
    {
        if (voCollOrderInvest.get(i).getOrdInvCurrentStatus() == null
                || (!OrderInvStatus.CANCEL_REQUEST.equals(voCollOrderInvest.get(i).getOrdInvCurrentStatus().getOrdInvStatus()) && !OrderInvStatus.CANCELLED.equals(voCollOrderInvest.get(i).getOrdInvCurrentStatus().getOrdInvStatus())))
        {
            if (voCollOrderInvest.get(i).getInvestigationIsNotNull() && voCollOrderInvest.get(i).getInvestigation().getInvestigationIndexIsNotNull() && voCollOrderInvest.get(i).getInvestigation().getInvestigationIndex().getCategoryIsNotNull() && voCollOrderInvest.get(i).getInvestigation().getInvestigationIndex().getCategory().equals(category))
            {
                isClinicalImagingFound = true;
                break;
            }
        }
    }

    return isClinicalImagingFound;
}
项目:AvoinApotti    文件:Logic.java   
private OrderInvStatusCollection getRequiredInvStatuses()
{
    OrderInvStatusCollection stColl = new OrderInvStatusCollection();
    if (form.chkNew().getValue())
    {
        stColl.add(OrderInvStatus.NEW_RESULT);
        stColl.add(OrderInvStatus.UPDATED_RESULT);
        stColl.add(OrderInvStatus.RESULTED);
    }
    if (form.chkReview().getValue())
    {
        stColl.add(OrderInvStatus.REVIEW);
    }
    if (form.chkSeen().getValue())
    {
        stColl.add(OrderInvStatus.SEEN);
        stColl.add(OrderInvStatus.CHECKED);
    }
    return stColl;
}
项目:AvoinApotti    文件:Logic.java   
private String generateStatusTooltip(NewResultsListOrderInvestigationStatusVo ordInvCurrentStatus)
{
    if (ordInvCurrentStatus != null && ordInvCurrentStatus.getOrdInvStatus() != null)
    {
        StringBuffer sb = new StringBuffer();
        sb.append("<b>Current status: </b>" + ordInvCurrentStatus.getOrdInvStatus().getText());

        if (ordInvCurrentStatus.getStatusReason() != null && ordInvCurrentStatus.getStatusReason().length() > 0 && ordInvCurrentStatus.getOrdInvStatus().equals(OrderInvStatus.CANCELLED))
            sb.append("<br><b>Current status reason: </b>" + ordInvCurrentStatus.getStatusReason());

        sb.append("<br><b>Date changed: </b>" + ordInvCurrentStatus.getChangeDateTime());
        sb.append("<br><b>Changed by: </b>" + (ordInvCurrentStatus.getChangeUserIsNotNull() ? ordInvCurrentStatus.getChangeUser().toString() : ""));

        return sb.toString();
    }
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private String generateStatusTooltip(OrderedInvestigationStatusClinicalImagingVo ordInvCurrentStatus)
{
    if (ordInvCurrentStatus != null && ordInvCurrentStatus.getOrdInvStatus() != null)
    {
        StringBuffer sb =  new StringBuffer();
        sb.append("<b>Current status: </b>" + ordInvCurrentStatus.getOrdInvStatus().getText());

        if (ordInvCurrentStatus.getStatusReason() != null && ordInvCurrentStatus.getStatusReason().length() > 0 && ordInvCurrentStatus.getOrdInvStatus().equals(OrderInvStatus.CANCELLED))
            sb.append("<br><b>Current status reason: </b>" + ordInvCurrentStatus.getStatusReason());

        sb.append("<br><b>Date changed: </b>" + ordInvCurrentStatus.getChangeDateTime());
        sb.append("<br><b>Changed by: </b>" + (ordInvCurrentStatus.getChangeUserIsNotNull() ? ordInvCurrentStatus.getChangeUser().toString() : ""));

        return sb.toString();
    }
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private String generateStatusTooltip(OrderedInvestigationStatusVo ordInvCurrentStatus)
{
    if (ordInvCurrentStatus != null && ordInvCurrentStatus.getOrdInvStatus() != null)
    {
        StringBuffer sb = new StringBuffer();
        sb.append("<b>Current status: </b>" + ordInvCurrentStatus.getOrdInvStatus().getText());

        if (ordInvCurrentStatus.getStatusReason() != null && ordInvCurrentStatus.getStatusReason().length() > 0 && ordInvCurrentStatus.getOrdInvStatus().equals(OrderInvStatus.CANCELLED))
            sb.append("<br><b>Current status reason: </b>" + ordInvCurrentStatus.getStatusReason());

        sb.append("<br><b>Date changed: </b>" + ordInvCurrentStatus.getChangeDateTime());
        sb.append("<br><b>Changed by: </b>" + (ordInvCurrentStatus.getChangeUserIsNotNull() ? ordInvCurrentStatus.getChangeUser().toString() : ""));

        return sb.toString();
    }
    return null;
}
项目:AvoinApotti    文件:RejectedInvestigationDetailsImpl.java   
public ims.ocrr.vo.OrderInvestigationLiteVoCollection listRejectedInvestigations(ims.RefMan.vo.CatsReferralRefVo catsRefVo)
{
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    StringBuffer sb = new StringBuffer();

    sb.append(" catsref.id = :idCats");
    sb.append(" and invs.ordInvCurrentStatus.ordInvStatus = :id1");

    markers.add("idCats");
    values.add(catsRefVo.getID_CatsReferral());
    markers.add("id1");
    values.add(getDomLookup(OrderInvStatus.REJECTED));

    String hql = "select invs from CatsReferral as catsref join catsref.investigationOrders as invOrd join invOrd.investigations as invs";

    sb.append(" and catsref.isRIE is null");
    hql += " where ";

    hql += sb.toString();
    hql += " order by invs.orderDetails.systemInformation.creationDateTime";

    List list = getDomainFactory().find(hql.toString(), markers, values);
    return OrderInvestigationLiteVoAssembler.createOrderInvestigationLiteVoCollectionFromOrderInvestigation(list);
}
项目:AvoinApotti    文件:OrderSummaryImpl.java   
private String getDFTInvestigationID(OcsOrderSession doOcsOrder)
{
    Iterator<?> investigationIterator = doOcsOrder.getInvestigations().iterator();

    StringBuilder dftIDValues = new StringBuilder();

    while (investigationIterator.hasNext())
    {
        OrderInvestigation investigation = (OrderInvestigation) investigationIterator.next();

        if (!getDomLookup(OrderInvStatus.CANCEL_REQUEST).equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus())
                && !getDomLookup(OrderInvStatus.CANCELLED).equals(investigation.getOrdInvCurrentStatus().getOrdInvStatus()))
        {
            if (getDomLookup(InvEventType.TIME_SERIES).equals(investigation.getInvestigation().getEventType()))
            {
                if (dftIDValues.length() > 0)
                    dftIDValues.append(", ");
                dftIDValues.append(investigation.getId());
            }
        }
    }

    return dftIDValues.toString();
}
项目:AvoinApotti    文件:OrderSummaryImpl.java   
private boolean areAllInvestigationsCancelledForContainer(List orderInvestigation)
{
    if (orderInvestigation == null)
        return true;

    for (int i = 0; i < orderInvestigation.size(); i++)
    {
        OrderInvestigation curentInv = (OrderInvestigation) orderInvestigation.get(i);

        if (curentInv.getOrdInvCurrentStatus() != null)
        {
            if (!(curentInv.getOrdInvCurrentStatus().getOrdInvStatus().equals(getDomLookup(OrderInvStatus.CANCEL_REQUEST)) || curentInv.getOrdInvCurrentStatus().getOrdInvStatus().equals(getDomLookup(OrderInvStatus.CANCEL_REQUEST))))
                return false;
        }
    }

    return true;
}
项目:AvoinApotti    文件:OrderSummaryImpl.java   
/**
 * check that all investigations for the specimen are cancelled
 * @param doOrdSpec
 * @return
 */
private boolean areAllInvestigationsCancelled(OrderSpecimen doOrdSpec)
{
    boolean addToList = false;
    if(doOrdSpec != null &&  doOrdSpec.getInvestigations() != null)
    {
        int cancelledCount = 0;
        Iterator it1 = doOrdSpec.getInvestigations().iterator();
        while(it1.hasNext())
        {
            OrderInvestigation doItem = (OrderInvestigation) it1.next();
            if(doItem.getOrdInvCurrentStatus() != null)
            {
                if(doItem.getOrdInvCurrentStatus().getOrdInvStatus().equals(getDomLookup(OrderInvStatus.CANCEL_REQUEST)) || doItem.getOrdInvCurrentStatus().getOrdInvStatus().equals(getDomLookup(OrderInvStatus.CANCELLED)))
                    cancelledCount++;   
            }
        }

        if(cancelledCount > 0 && (cancelledCount == doOrdSpec.getInvestigations().size()))
            addToList = true;
    }

    return addToList;
}
项目:AvoinApotti    文件:PathologyDialogImpl.java   
private boolean isPreResultStatus(LookupInstance ordInvStatus)
{
    int statusId = ordInvStatus.getId();        
    if (statusId == OrderInvStatus.AWAITING_AUTHORISATION.getId() ||
        statusId == OrderInvStatus.ORDERED.getId() ||
        statusId == OrderInvStatus.SENT.getId() ||
        statusId == OrderInvStatus.RECEIVED.getId() ||
        statusId == OrderInvStatus.REJECTED.getId() ||
        statusId == OrderInvStatus.ACCEPTED.getId() ||
        statusId == OrderInvStatus.CANCEL_REQUEST.getId() ||
        statusId == OrderInvStatus.CANCELLED.getId() ||
        statusId == OrderInvStatus.COMPLETE.getId() ||
        statusId == OrderInvStatus.INPROGRESS.getId() ||
        statusId == OrderInvStatus.INPROGRESS_SCH.getId())
    {
        return true;            
    }
    else
    {
        return false;
    }
}
项目:AvoinApotti    文件:PathologyDialogImpl.java   
@SuppressWarnings("unchecked")
private OrderInvestigation addViewedStatus(OrderInvestigation ordInv)
{
    OrderedInvestigationStatus doStatus = new OrderedInvestigationStatus();

    doStatus.setOrdInvStatus(getDomLookup(OrderInvStatus.VIEWED));
    doStatus.setChangeDateTime(new java.util.Date());
    doStatus.setProcessedDateTime(new java.util.Date());
    if(this.getSession().getUser() != null)
        doStatus.setChangeUser(this.getSession().getUser().getUserRealName());

    doStatus.setStatusReason("Status changed by user.");            

    ordInv.getOrdInvStatusHistory().add(doStatus);

    return ordInv;
}
项目:AvoinApotti    文件:Logic.java   
private String generateStatusTooltip(OrderedInvestigationStatusVo ordInvCurrentStatus)
{
    if (ordInvCurrentStatus != null && ordInvCurrentStatus.getOrdInvStatus() != null)
    {
        StringBuffer sb = new StringBuffer();
        sb.append("<b>Current status: </b>" + ordInvCurrentStatus.getOrdInvStatus().getText());

        if (ordInvCurrentStatus.getStatusReason() != null && ordInvCurrentStatus.getStatusReason().length() > 0 && ordInvCurrentStatus.getOrdInvStatus().equals(OrderInvStatus.CANCELLED))
            sb.append("<br><b>Current status reason: </b>" + ordInvCurrentStatus.getStatusReason());

        sb.append("<br><b>Date changed: </b>" + ordInvCurrentStatus.getChangeDateTime());
        sb.append("<br><b>Changed by: </b>" + (ordInvCurrentStatus.getChangeUserIsNotNull() ? ordInvCurrentStatus.getChangeUser().toString() : ""));

        return sb.toString();
    }
    return null;
}
项目:AvoinApotti    文件:ReferralStatusListImpl.java   
private List<?> domListOrderInvAcceptedApptRequired(String hql, StringBuffer sb, ArrayList<String> markers, ArrayList<Serializable> values, String andStr, String hqlJoin)
{
    hql += "left join catsref.investigationOrders as ocsOrder ";
    hql += "left join ocsOrder.investigations as orderInv ";

    if (hqlJoin != "")
        hql += hqlJoin;

    sb.append(andStr +  "  catsref.isCAB <> :isCABReferral");               
    markers.add("isCABReferral");
    values.add(Boolean.TRUE);
    andStr = " and ";

    sb.append(andStr + "orderInv.ordInvCurrentStatus.ordInvStatus  = :acceptedStatus ");                
    markers.add("acceptedStatus");
    values.add(getDomLookup(OrderInvStatus.ACCEPTED));

    sb.append(" and catsref.orderInvAppts is empty ");
    sb.append(" and catsref.isRIE is null order by refDetails.dateOfReferral asc, refDetails.id asc");

    hql += " where ";

    hql += sb.toString();
    return getDomainFactory().find(hql.toString(), markers, values);    
}
项目:openMAXIMS    文件:Logic.java   
private boolean doesOrderContainInvType(Category category)
{
    if (category == null)
        return false;

    OrderInvestigationVoCollection voCollOrderInvest = form.getGlobalContext().OCRR.getOrderInvestigationCollection();

    if (voCollOrderInvest == null)
        return false;

    boolean isClinicalImagingFound = false;
    for (int i = 0; i < voCollOrderInvest.size(); i++)
    {
        if (voCollOrderInvest.get(i).getOrdInvCurrentStatus() == null
                || (!OrderInvStatus.CANCEL_REQUEST.equals(voCollOrderInvest.get(i).getOrdInvCurrentStatus().getOrdInvStatus()) && !OrderInvStatus.CANCELLED.equals(voCollOrderInvest.get(i).getOrdInvCurrentStatus().getOrdInvStatus())))
        {
            if (voCollOrderInvest.get(i).getInvestigationIsNotNull() && voCollOrderInvest.get(i).getInvestigation().getInvestigationIndexIsNotNull() && voCollOrderInvest.get(i).getInvestigation().getInvestigationIndex().getCategoryIsNotNull() && voCollOrderInvest.get(i).getInvestigation().getInvestigationIndex().getCategory().equals(category))
            {
                isClinicalImagingFound = true;
                break;
            }
        }
    }

    return isClinicalImagingFound;
}
项目:openMAXIMS    文件:Logic.java   
private OrderInvStatusCollection getRequiredInvStatuses()
{
    OrderInvStatusCollection stColl = new OrderInvStatusCollection();
    if (form.chkNew().getValue())
    {
        stColl.add(OrderInvStatus.NEW_RESULT);
        stColl.add(OrderInvStatus.UPDATED_RESULT);
        stColl.add(OrderInvStatus.RESULTED);
    }
    if (form.chkReview().getValue())
    {
        stColl.add(OrderInvStatus.REVIEW);
    }
    if (form.chkSeen().getValue())
    {
        stColl.add(OrderInvStatus.SEEN);
        stColl.add(OrderInvStatus.CHECKED);
    }
    return stColl;
}
项目:openmaxims-linux    文件:Logic.java   
private String generateStatusTooltip(OrderedInvestigationStatusVo status)
{
    if (status != null && status.getOrdInvStatus() != null)
    {
        StringBuffer sb = new StringBuffer();
        sb.append("<b>Current status: </b>" + status.getOrdInvStatus().getText());

        if (status.getStatusReason() != null && status.getStatusReason().length() > 0 && status.getOrdInvStatus().equals(OrderInvStatus.CANCELLED))
            sb.append("<br><b>Current status reason: </b>" + status.getStatusReason());

        sb.append("<br><b>Date changed: </b>" + status.getChangeDateTime());
        sb.append("<br><b>Changed by: </b>" + (status.getChangeUserIsNotNull() ? status.getChangeUser().toString() : ""));

        return sb.toString();
    }
    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private String generateStatusTooltip(OrderedInvestigationStatusClinicalVo ordInvCurrentStatus)
{
    if (ordInvCurrentStatus != null && ordInvCurrentStatus.getOrdInvStatus() != null)
    {
        StringBuffer sb = new StringBuffer();
        sb.append("<b>Current status: </b>" + ordInvCurrentStatus.getOrdInvStatus().getText());

        if (ordInvCurrentStatus.getStatusReason() != null && ordInvCurrentStatus.getStatusReason().length() > 0 && ordInvCurrentStatus.getOrdInvStatus().equals(OrderInvStatus.CANCELLED))
            sb.append("<br><b>Current status reason: </b>" + ordInvCurrentStatus.getStatusReason());

        sb.append("<br><b>Date changed: </b>" + ordInvCurrentStatus.getChangeDateTime());
        sb.append("<br><b>Changed by: </b>" + (ordInvCurrentStatus.getChangeUserIsNotNull() ? ordInvCurrentStatus.getChangeUser().toString() : ""));

        return sb.toString();
    }
    return null;
}
项目: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-linux    文件:Logic.java   
private boolean checkCancelledInvestions(OcsOrderInvVo voOcsOrder)
{
    boolean flag = true;
    if( voOcsOrder == null )
        return false;
    if(!voOcsOrder.getInvestigationsIsNotNull())
        return false;
    if(voOcsOrder.getInvestigations().size() < 1)
        return false;
    for(OrderInvestigationOcsOrderVo item : voOcsOrder.getInvestigations())
    {
        if(OrderInvStatus.CANCELLED.equals(item.getOrdInvCurrentStatusIsNotNull() ? item.getOrdInvCurrentStatus().getOrdInvStatus() : null) || OrderInvStatus.CANCEL_REQUEST.equals(item.getOrdInvCurrentStatusIsNotNull() ? item.getOrdInvCurrentStatus().getOrdInvStatus():null))
        {

        }
        else
        {
            flag = false;
        }
    }
    return flag;

}
项目: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 String generateStatusTooltip(OrderedInvestigationStatusClinicalVo ordInvCurrentStatus)
{
    if (ordInvCurrentStatus != null && ordInvCurrentStatus.getOrdInvStatus() != null)
    {
        StringBuffer sb = new StringBuffer();
        sb.append("<b>Current status: </b>" + ordInvCurrentStatus.getOrdInvStatus().getText());

        if (ordInvCurrentStatus.getStatusReason() != null && ordInvCurrentStatus.getStatusReason().length() > 0 && ordInvCurrentStatus.getOrdInvStatus().equals(OrderInvStatus.CANCELLED))
            sb.append("<br><b>Current status reason: </b>" + ordInvCurrentStatus.getStatusReason());

        sb.append("<br><b>Date changed: </b>" + ordInvCurrentStatus.getChangeDateTime());
        sb.append("<br><b>Changed by: </b>" + (ordInvCurrentStatus.getChangeUserIsNotNull() ? ordInvCurrentStatus.getChangeUser().toString() : ""));

        return sb.toString();
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void updateControlsState()
{
    form.getContextMenus().OCRR.hideAllClinicalOrdersResultsGridMenuMenuItems();
    ReferralAppointmentDetailsOrderInvestigationVo tempOrderInv = null;

    if (form.grdClinicalResults().getValue()!=null && form.grdClinicalResults().getValue().getOrderInvestigationIsNotNull())
    {
        tempOrderInv=domain.getReferralAppointmentDetailsOrderInv(form.grdClinicalResults().getValue().getOrderInvestigation());
    }

    //Scan/Import visible only if not Manually Resulted
    form.getContextMenus().OCRR.getClinicalOrdersResultsGridMenuSCANIMPORTItem().setVisible(form.grdClinicalResults().getRows().size()>0 && form.grdClinicalResults().getValue() != null 
            && tempOrderInv!=null && OrderInvStatus.ORDERED.equals(tempOrderInv.getOrdInvCurrentStatus().getOrdInvStatus()));
    form.getContextMenus().OCRR.getClinicalOrdersResultsGridMenuVIEW_ORDERItem().setVisible(form.grdClinicalResults().getValue() != null);
    form.getContextMenus().OCRR.getClinicalOrdersResultsGridMenuVIEW_RESULTItem().setVisible(form.grdClinicalResults().getValue() != null && hasResults(form.grdClinicalResults().getSelectedRow()));

}
项目:openMAXIMS    文件:Logic.java   
private String generateStatusTooltip(OrderedInvestigationStatusVo ordInvCurrentStatus)
{
    if (ordInvCurrentStatus != null && ordInvCurrentStatus.getOrdInvStatus() != null)
    {
        StringBuffer sb = new StringBuffer();
        sb.append("<b>Current status: </b>" + ordInvCurrentStatus.getOrdInvStatus().getText());

        if (ordInvCurrentStatus.getStatusReason() != null && ordInvCurrentStatus.getStatusReason().length() > 0 && ordInvCurrentStatus.getOrdInvStatus().equals(OrderInvStatus.CANCELLED))
            sb.append("<br><b>Current status reason: </b>" + ordInvCurrentStatus.getStatusReason());

        sb.append("<br><b>Date changed: </b>" + ordInvCurrentStatus.getChangeDateTime());
        sb.append("<br><b>Changed by: </b>" + (ordInvCurrentStatus.getChangeUserIsNotNull() ? ordInvCurrentStatus.getChangeUser().toString() : ""));

        return sb.toString();
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void viewResult()
{
    OcsPathRadResultVo value = form.grdResults().getValue();
    if (value == null)
        throw new CodingRuntimeException("grid selection is null");

    //  WDEV-17106
    if(OrderInvStatus.COMPLETE.equals(value.getCurrentInvestigationStatus()))
    {
        form.getGlobalContext().OCRR.PathologyResults.setOrder(value.getOrderSummarySession());
        // When populating the grid, patient in row value is PatientRef - so now we have to retrieve the PatientShort
        value.setPatient(domain.getPatient(value.getPatient()));
        form.getGlobalContext().Core.setPatientShort(value.getPatient());
        engine.open(form.getForms().OCRR.OrderSummaryDialog);

        return;
    }

    form.getGlobalContext().OCRR.setCurrentPathRadResult(value);
    form.getGlobalContext().OCRR.setSelectedPathRadResults(getOrderInvestigationFromGrid());//  WDEV-17106
    engine.open(form.getForms().OCRR.ResultDialog, false);
}