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

项目:AvoinApotti    文件:Logic.java   
private void populateGrdOrdersFromData(OcsOrderInvVoCollection voCollOrders, boolean bShowMessage)
{ 
    form.grdOrders().getRows().clear();
    if(voCollOrders != null && voCollOrders.size() > 0)
    {
        for(int i=0;i<voCollOrders.size();i++)
        {
            OcsOrderInvVo voOcsOrder = voCollOrders.get(i);
            if(checkCancelledInvestions(voOcsOrder) == true)    //wdev-13275
                continue;
            GenForm.grdOrdersRow row = form.grdOrders().getRows().newRow();

            row.setcolDateTime(voOcsOrder.getSysInfo().getCreationDateTime().toString());

            PatientShort voPatient = voOcsOrder.getPatient();
            if(voPatient != null)
            {
                if (voPatient.getDisplayId() != null)
                    row.setcolHospNo(voPatient.getDisplayId().getValue());

                if(voPatient.getNameIsNotNull())
                    row.setcolPatName(voPatient.getName().toString());

                if(voPatient.getSexIsNotNull())
                    row.setcolSex(voPatient.getSex().getText());
            }

            if(voOcsOrder.getPatientClinicIsNotNull())
                row.setcolLocation(voOcsOrder.getPatientClinic().getClinicName());
            else if(voOcsOrder.getPatientLocationIsNotNull())
                row.setcolLocation(voOcsOrder.getPatientLocation().getName());
            else if (voOcsOrder.getOutpatientDepartmentIsNotNull())
            {
                row.setcolLocation(voOcsOrder.getOutpatientDepartment().getName());
            }

            if(voOcsOrder.getOrderedByIsNotNull())
                row.setcolRequester(voOcsOrder.getOrderedBy().toString());

            row.setTooltip(getOrderTooltip(voOcsOrder));
            row.setValue(voOcsOrder);
        }
    }
    else
    {
        if(bShowMessage)
            engine.showMessage("No matching orders found");
    }

}
项目:AvoinApotti    文件:OrdersRequiringAuthorisationImpl.java   
/**
* list from OcsOrder where OrderAuthorisaton = AWAITING_AUTHORISATION
*/
public OcsOrderInvVoCollection listOrdersRequiringAuthorisation(Date dateFrom, Date dateTo, ClinicRefVo clinic, LocationRefVo location, HcpRefVo responsibleClinician)
{
    DomainFactory factory = getDomainFactory();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList values = new ArrayList();

    String hql = "from OcsOrderSession ocsOrder where ocsOrder.authorisationOrderStatus = :status "; 
    markers.add("status");
    values.add(getDomLookup(AuthorisationOrderStatus.AWAITING_AUTHORISATION));

    StringBuffer condStr = new StringBuffer();
    String andStr = " and ";

    if(dateFrom != null)
    {
        condStr.append(andStr + " ocsOrder.systemInformation.creationDateTime >= :dateFrom");
            markers.add("dateFrom");
        values.add(dateFrom.getDate());
    }   

    if(dateTo != null)
    {
        condStr.append(andStr + " ocsOrder.systemInformation.creationDateTime <= :dateTo");
            markers.add("dateTo");
        values.add(dateTo.addDay(1).getDate());
    }

    if(clinic != null)
    {
        condStr.append(andStr + " ocsOrder.patientClinic.id = :clinicId");
        markers.add("clinicId");
        values.add(clinic.getID_Clinic());
    }

    if(location != null)
    {
        condStr.append(andStr + " ocsOrder.patientLocation.id = :locationId");
        markers.add("locationId");
        values.add(location.getID_Location());
    }

    if(responsibleClinician != null)
    {
        condStr.append(andStr + " ocsOrder.responsibleClinician.id = :hcpId");
        markers.add("hcpId");
        values.add(responsibleClinician.getID_Hcp());
    }

    hql += condStr.toString();
    return OcsOrderInvVoAssembler.createOcsOrderInvVoCollectionFromOcsOrderSession(factory.find(hql,markers,values)).sort();//WDEV-16232
}
项目:openMAXIMS    文件:Logic.java   
private void populateGrdOrdersFromData(OcsOrderInvVoCollection voCollOrders, boolean bShowMessage)
{ 
    form.grdOrders().getRows().clear();
    if(voCollOrders != null && voCollOrders.size() > 0)
    {
        for(int i=0;i<voCollOrders.size();i++)
        {
            OcsOrderInvVo voOcsOrder = voCollOrders.get(i);
            if(checkCancelledInvestions(voOcsOrder) == true)    //wdev-13275
                continue;
            GenForm.grdOrdersRow row = form.grdOrders().getRows().newRow();

            row.setcolDateTime(voOcsOrder.getSysInfo().getCreationDateTime().toString());

            PatientShort voPatient = voOcsOrder.getPatient();
            if(voPatient != null)
            {
                if (voPatient.getDisplayId() != null)
                    row.setcolHospNo(voPatient.getDisplayId().getValue());

                if(voPatient.getNameIsNotNull())
                    row.setcolPatName(voPatient.getName().toString());

                if(voPatient.getSexIsNotNull())
                    row.setcolSex(voPatient.getSex().getText());
            }

            if(voOcsOrder.getPatientClinicIsNotNull())
                row.setcolLocation(voOcsOrder.getPatientClinic().getClinicName());
            else if(voOcsOrder.getPatientLocationIsNotNull())
                row.setcolLocation(voOcsOrder.getPatientLocation().getName());
            else if (voOcsOrder.getOutpatientDepartmentIsNotNull())
            {
                row.setcolLocation(voOcsOrder.getOutpatientDepartment().getName());
            }

            if(voOcsOrder.getOrderedByIsNotNull())
                row.setcolRequester(voOcsOrder.getOrderedBy().toString());

            row.setTooltip(getOrderTooltip(voOcsOrder));
            row.setValue(voOcsOrder);
        }
    }
    else
    {
        if(bShowMessage)
            engine.showMessage("No matching orders found");
    }

}
项目:openMAXIMS    文件:OrdersRequiringAuthorisationImpl.java   
/**
* list from OcsOrder where OrderAuthorisaton = AWAITING_AUTHORISATION
*/
public OcsOrderInvVoCollection listOrdersRequiringAuthorisation(Date dateFrom, Date dateTo, ClinicRefVo clinic, LocationRefVo location, HcpRefVo responsibleClinician)
{
    DomainFactory factory = getDomainFactory();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList values = new ArrayList();

    String hql = "from OcsOrderSession ocsOrder where ocsOrder.authorisationOrderStatus = :status "; 
    markers.add("status");
    values.add(getDomLookup(AuthorisationOrderStatus.AWAITING_AUTHORISATION));

    StringBuffer condStr = new StringBuffer();
    String andStr = " and ";

    if(dateFrom != null)
    {
        condStr.append(andStr + " ocsOrder.systemInformation.creationDateTime >= :dateFrom");
            markers.add("dateFrom");
        values.add(dateFrom.getDate());
    }   

    if(dateTo != null)
    {
        condStr.append(andStr + " ocsOrder.systemInformation.creationDateTime <= :dateTo");
            markers.add("dateTo");
            Date toDate = (Date) dateTo.clone(); //WDEV-19389 
        values.add(toDate.addDay(1).getDate().clone());
    }

    if(clinic != null)
    {
        condStr.append(andStr + " ocsOrder.patientClinic.id = :clinicId");
        markers.add("clinicId");
        values.add(clinic.getID_Clinic());
    }

    if(location != null)
    {
        condStr.append(andStr + " ocsOrder.patientLocation.id = :locationId");
        markers.add("locationId");
        values.add(location.getID_Location());
    }

    if(responsibleClinician != null)
    {
        condStr.append(andStr + " ocsOrder.responsibleClinician.id = :hcpId");
        markers.add("hcpId");
        values.add(responsibleClinician.getID_Hcp());
    }

    hql += condStr.toString();
    return OcsOrderInvVoAssembler.createOcsOrderInvVoCollectionFromOcsOrderSession(factory.find(hql,markers,values)).sort();//WDEV-16232
}
项目:openMAXIMS    文件:Logic.java   
private void populateGrdOrdersFromData(OcsOrderInvVoCollection voCollOrders, boolean bShowMessage)
{ 
    form.grdOrders().getRows().clear();
    if(voCollOrders != null && voCollOrders.size() > 0)
    {
        for(int i=0;i<voCollOrders.size();i++)
        {
            OcsOrderInvVo voOcsOrder = voCollOrders.get(i);
            if(checkCancelledInvestions(voOcsOrder) == true)    //wdev-13275
                continue;
            GenForm.grdOrdersRow row = form.grdOrders().getRows().newRow();

            row.setcolDateTime(voOcsOrder.getSysInfo().getCreationDateTime().toString());

            PatientShort voPatient = voOcsOrder.getPatient();
            if(voPatient != null)
            {
                if (voPatient.getDisplayId() != null)
                    row.setcolHospNo(voPatient.getDisplayId().getValue());

                if(voPatient.getNameIsNotNull())
                    row.setcolPatName(voPatient.getName().toString());

                if(voPatient.getSexIsNotNull())
                    row.setcolSex(voPatient.getSex().getText());
            }

            if(voOcsOrder.getPatientClinicIsNotNull())
                row.setcolLocation(voOcsOrder.getPatientClinic().getClinicName());
            else if(voOcsOrder.getPatientLocationIsNotNull())
                row.setcolLocation(voOcsOrder.getPatientLocation().getName());
            else if (voOcsOrder.getOutpatientDepartmentIsNotNull())
            {
                row.setcolLocation(voOcsOrder.getOutpatientDepartment().getName());
            }

            if(voOcsOrder.getOrderedByIsNotNull())
                row.setcolRequester(voOcsOrder.getOrderedBy().toString());

            row.setTooltip(getOrderTooltip(voOcsOrder));
            row.setValue(voOcsOrder);
        }
    }
    else
    {
        if(bShowMessage)
            engine.showMessage("No matching orders found");
    }

}
项目:openMAXIMS    文件:OrdersRequiringAuthorisationImpl.java   
/**
* list from OcsOrder where OrderAuthorisaton = AWAITING_AUTHORISATION
*/
public OcsOrderInvVoCollection listOrdersRequiringAuthorisation(Date dateFrom, Date dateTo, ClinicRefVo clinic, LocationRefVo location, HcpRefVo responsibleClinician)
{
    DomainFactory factory = getDomainFactory();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList values = new ArrayList();

    String hql = "from OcsOrderSession ocsOrder where ocsOrder.authorisationOrderStatus = :status "; 
    markers.add("status");
    values.add(getDomLookup(AuthorisationOrderStatus.AWAITING_AUTHORISATION));

    StringBuffer condStr = new StringBuffer();
    String andStr = " and ";

    if(dateFrom != null)
    {
        condStr.append(andStr + " ocsOrder.systemInformation.creationDateTime >= :dateFrom");
            markers.add("dateFrom");
        values.add(dateFrom.getDate());
    }   

    if(dateTo != null)
    {
        condStr.append(andStr + " ocsOrder.systemInformation.creationDateTime <= :dateTo");
            markers.add("dateTo");
        values.add(dateTo.addDay(1).getDate());
    }

    if(clinic != null)
    {
        condStr.append(andStr + " ocsOrder.patientClinic.id = :clinicId");
        markers.add("clinicId");
        values.add(clinic.getID_Clinic());
    }

    if(location != null)
    {
        condStr.append(andStr + " ocsOrder.patientLocation.id = :locationId");
        markers.add("locationId");
        values.add(location.getID_Location());
    }

    if(responsibleClinician != null)
    {
        condStr.append(andStr + " ocsOrder.responsibleClinician.id = :hcpId");
        markers.add("hcpId");
        values.add(responsibleClinician.getID_Hcp());
    }

    hql += condStr.toString();
    return OcsOrderInvVoAssembler.createOcsOrderInvVoCollectionFromOcsOrderSession(factory.find(hql,markers,values)).sort();//WDEV-16232
}
项目:openmaxims-linux    文件:Logic.java   
private void populateGrdOrdersFromData(OcsOrderInvVoCollection voCollOrders, boolean bShowMessage)
{ 
    form.grdOrders().getRows().clear();
    if(voCollOrders != null && voCollOrders.size() > 0)
    {
        for(int i=0;i<voCollOrders.size();i++)
        {
            OcsOrderInvVo voOcsOrder = voCollOrders.get(i);
            if(checkCancelledInvestions(voOcsOrder) == true)    //wdev-13275
                continue;
            GenForm.grdOrdersRow row = form.grdOrders().getRows().newRow();

            row.setcolDateTime(voOcsOrder.getSysInfo().getCreationDateTime().toString());

            PatientShort voPatient = voOcsOrder.getPatient();
            if(voPatient != null)
            {
                if (voPatient.getDisplayId() != null)
                    row.setcolHospNo(voPatient.getDisplayId().getValue());

                if(voPatient.getNameIsNotNull())
                    row.setcolPatName(voPatient.getName().toString());

                if(voPatient.getSexIsNotNull())
                    row.setcolSex(voPatient.getSex().getText());
            }

            if(voOcsOrder.getPatientClinicIsNotNull())
                row.setcolLocation(voOcsOrder.getPatientClinic().getClinicName());
            else if(voOcsOrder.getPatientLocationIsNotNull())
                row.setcolLocation(voOcsOrder.getPatientLocation().getName());
            else if (voOcsOrder.getOutpatientDepartmentIsNotNull())
            {
                row.setcolLocation(voOcsOrder.getOutpatientDepartment().getName());
            }

            if(voOcsOrder.getOrderedByIsNotNull())
                row.setcolRequester(voOcsOrder.getOrderedBy().toString());

            row.setTooltip(getOrderTooltip(voOcsOrder));
            row.setValue(voOcsOrder);
        }
    }
    else
    {
        if(bShowMessage)
            engine.showMessage("No matching orders found");
    }

}
项目:openmaxims-linux    文件:OrdersRequiringAuthorisationImpl.java   
/**
* list from OcsOrder where OrderAuthorisaton = AWAITING_AUTHORISATION
*/
public OcsOrderInvVoCollection listOrdersRequiringAuthorisation(Date dateFrom, Date dateTo, ClinicRefVo clinic, LocationRefVo location, HcpRefVo responsibleClinician)
{
    DomainFactory factory = getDomainFactory();

    ArrayList<String> markers = new ArrayList<String>();
    ArrayList values = new ArrayList();

    String hql = "from OcsOrderSession ocsOrder where ocsOrder.authorisationOrderStatus = :status "; 
    markers.add("status");
    values.add(getDomLookup(AuthorisationOrderStatus.AWAITING_AUTHORISATION));

    StringBuffer condStr = new StringBuffer();
    String andStr = " and ";

    if(dateFrom != null)
    {
        condStr.append(andStr + " ocsOrder.systemInformation.creationDateTime >= :dateFrom");
            markers.add("dateFrom");
        values.add(dateFrom.getDate());
    }   

    if(dateTo != null)
    {
        condStr.append(andStr + " ocsOrder.systemInformation.creationDateTime <= :dateTo");
            markers.add("dateTo");
        values.add(dateTo.addDay(1).getDate());
    }

    if(clinic != null)
    {
        condStr.append(andStr + " ocsOrder.patientClinic.id = :clinicId");
        markers.add("clinicId");
        values.add(clinic.getID_Clinic());
    }

    if(location != null)
    {
        condStr.append(andStr + " ocsOrder.patientLocation.id = :locationId");
        markers.add("locationId");
        values.add(location.getID_Location());
    }

    if(responsibleClinician != null)
    {
        condStr.append(andStr + " ocsOrder.responsibleClinician.id = :hcpId");
        markers.add("hcpId");
        values.add(responsibleClinician.getID_Hcp());
    }

    hql += condStr.toString();
    return OcsOrderInvVoAssembler.createOcsOrderInvVoCollectionFromOcsOrderSession(factory.find(hql,markers,values)).sort();//WDEV-16232
}