Java 类ims.nursing.vo.PlanOfCareListVoCollection 实例源码

项目:AvoinApotti    文件:Logic.java   
private void displayTabNewActions() 
{
    form.lyr1().showtabNewActions();
    form.lyr1().tabNewActions().setHeaderVisible(true);
    form.lyr1().tabChronological().setHeaderVisible(false);

    form.setMode(FormMode.EDIT);
    form.lyr1().tabNewActions().grdActions().getRows().clear();;

    form.lyr1().tabNewActions().customAuthoring().initializeComponent();
    form.lyr1().tabNewActions().setcustomAuthoringEnabled(false);

    PlanOfCareListVoCollection list = domain.listPlanOfCare
        (form.getGlobalContext().Core.getCurrentCareContext());

    if(list != null)
    {
        for(int i = 0; i < list.size(); i++)
        {
            addNewActionRowRecord(list.get(i));
        }
    }       
}
项目:openMAXIMS    文件:Logic.java   
private void displayTabNewActions() 
{
    form.lyr1().showtabNewActions();
    form.lyr1().tabNewActions().setHeaderVisible(true);
    form.lyr1().tabChronological().setHeaderVisible(false);

    form.setMode(FormMode.EDIT);
    form.lyr1().tabNewActions().grdActions().getRows().clear();;

    form.lyr1().tabNewActions().customAuthoring().initializeComponent();
    form.lyr1().tabNewActions().setcustomAuthoringEnabled(false);

    PlanOfCareListVoCollection list = domain.listPlanOfCare
        (form.getGlobalContext().Core.getCurrentCareContext());

    if(list != null)
    {
        for(int i = 0; i < list.size(); i++)
        {
            addNewActionRowRecord(list.get(i));
        }
    }       
}
项目:openMAXIMS    文件:Logic.java   
private void displayTabNewActions() 
{
    form.lyr1().showtabNewActions();
    form.lyr1().tabNewActions().setHeaderVisible(true);
    form.lyr1().tabChronological().setHeaderVisible(false);

    form.setMode(FormMode.EDIT);
    form.lyr1().tabNewActions().grdActions().getRows().clear();;

    form.lyr1().tabNewActions().customAuthoring().initializeComponent();
    form.lyr1().tabNewActions().setcustomAuthoringEnabled(false);

    PlanOfCareListVoCollection list = domain.listPlanOfCare
        (form.getGlobalContext().Core.getCurrentCareContext());

    if(list != null)
    {
        for(int i = 0; i < list.size(); i++)
        {
            addNewActionRowRecord(list.get(i));
        }
    }       
}
项目:openmaxims-linux    文件:Logic.java   
private void displayTabNewActions() 
{
    form.lyr1().showtabNewActions();
    form.lyr1().tabNewActions().setHeaderVisible(true);
    form.lyr1().tabChronological().setHeaderVisible(false);

    form.setMode(FormMode.EDIT);
    form.lyr1().tabNewActions().grdActions().getRows().clear();;

    form.lyr1().tabNewActions().customAuthoring().initializeComponent();
    form.lyr1().tabNewActions().setcustomAuthoringEnabled(false);

    PlanOfCareListVoCollection list = domain.listPlanOfCare
        (form.getGlobalContext().Core.getCurrentCareContext());

    if(list != null)
    {
        for(int i = 0; i < list.size(); i++)
        {
            addNewActionRowRecord(list.get(i));
        }
    }       
}
项目:AvoinApotti    文件:Logic.java   
private void listPlansOfCareByStatus(PlanOfCareStatus status)
{
    if (status != null)
    {
        PlanOfCareListVoCollection coll = domain.listPlansofCareByStatus(form.getGlobalContext().Core.getCurrentCareContext(), status);
        NursingSummaryHelper helper = new NursingSummaryHelper(form.lyrPOC().tabPocList().dyngrdPOC(), form.getImages().Core.RedSqaure, form.getImages().Core.GreenSquare, form.getImages().Core.YellowSquare, form.getImages().Core.Information, coll);
        helper.displayActionsGroupByPlan(coll, false);
        updateContextMenuState();
    }
}
项目:AvoinApotti    文件:NursingSummaryHelper.java   
public void displayActionsGroupByPlan(PlanOfCareListVoCollection coll, boolean orderDesc)
{
    if(grid == null)
        throw new CodingRuntimeException("The grid was not passed down in the constructor !");

    clearGrid();
    createGridColumns();

    if (orderDesc)
    {
        sortDesc();
    }

    populateGrid(coll);
}
项目:openMAXIMS    文件:Logic.java   
private void populateActions()
{
    DateTime date1 = null;
    DateTime date2 = null;

    if(form.cmbInterval().getValue() != null)
    {
        date1 = new DateTime();
        date2 = new DateTime();

        int hours = 0;
        if(PlanOfCareInterval.HOURS12.equals(form.cmbInterval().getValue()))
            hours = -12;
        else if(PlanOfCareInterval.HOURS24.equals(form.cmbInterval().getValue()))
            hours = -24;
        else if(PlanOfCareInterval.HOURS36.equals(form.cmbInterval().getValue()))
            hours = -36;
        else if(PlanOfCareInterval.HOURS48.equals(form.cmbInterval().getValue()))
            hours = -48;
        else if(PlanOfCareInterval.HOURS72.equals(form.cmbInterval().getValue()))
            hours = -72;

        date1.addHours(hours);
    }

    PlanOfCareListVoCollection coll = domain.listPlansofCare(form.getGlobalContext().Core.getCurrentCareContext(), null, date1, date2);
    NursingSummaryHelper helper = new NursingSummaryHelper(form.dyngrdActions(), form.getImages().Core.RedSqaure, form.getImages().Core.GreenSquare, form.getImages().Core.YellowSquare, form.getImages().Core.Information, coll);
    helper.displayActionsGroupByPlan(coll, false);
}
项目:openMAXIMS    文件:Logic.java   
private void listPlansOfCareByStatus(PlanOfCareStatus status)
{
    if (status != null)
    {
        PlanOfCareListVoCollection coll = domain.listPlansofCareByStatus(form.getGlobalContext().Core.getCurrentCareContext(), status);
        NursingSummaryHelper helper = new NursingSummaryHelper(form.lyrPOC().tabPocList().dyngrdPOC(), form.getImages().Core.RedSqaure, form.getImages().Core.GreenSquare, form.getImages().Core.YellowSquare, form.getImages().Core.Information, coll);
        helper.displayActionsGroupByPlan(coll, false);
        updateContextMenuState();
    }
}
项目:openMAXIMS    文件:NursingSummaryHelper.java   
public void displayActionsGroupByPlan(PlanOfCareListVoCollection coll, boolean orderDesc)
{
    if(grid == null)
        throw new CodingRuntimeException("The grid was not passed down in the constructor !");

    clearGrid();
    createGridColumns();

    if (orderDesc)
    {
        sortDesc();
    }

    populateGrid(coll);
}
项目:openMAXIMS    文件:Logic.java   
private void populateActions()
{
    DateTime date1 = null;
    DateTime date2 = null;

    if(form.cmbInterval().getValue() != null)
    {
        date1 = new DateTime();
        date2 = new DateTime();

        int hours = 0;
        if(PlanOfCareInterval.HOURS12.equals(form.cmbInterval().getValue()))
            hours = -12;
        else if(PlanOfCareInterval.HOURS24.equals(form.cmbInterval().getValue()))
            hours = -24;
        else if(PlanOfCareInterval.HOURS36.equals(form.cmbInterval().getValue()))
            hours = -36;
        else if(PlanOfCareInterval.HOURS48.equals(form.cmbInterval().getValue()))
            hours = -48;
        else if(PlanOfCareInterval.HOURS72.equals(form.cmbInterval().getValue()))
            hours = -72;

        date1.addHours(hours);
    }

    PlanOfCareListVoCollection coll = domain.listPlansofCare(form.getGlobalContext().Core.getCurrentCareContext(), null, date1, date2);
    NursingSummaryHelper helper = new NursingSummaryHelper(form.dyngrdActions(), form.getImages().Core.RedSqaure, form.getImages().Core.GreenSquare, form.getImages().Core.YellowSquare, form.getImages().Core.Information, coll);
    helper.displayActionsGroupByPlan(coll, false);
}
项目:openMAXIMS    文件:Logic.java   
private void listPlansOfCareByStatus(PlanOfCareStatus status)
{
    if (status != null)
    {
        PlanOfCareListVoCollection coll = domain.listPlansofCareByStatus(form.getGlobalContext().Core.getCurrentCareContext(), status);
        NursingSummaryHelper helper = new NursingSummaryHelper(form.lyrPOC().tabPocList().dyngrdPOC(), form.getImages().Core.RedSqaure, form.getImages().Core.GreenSquare, form.getImages().Core.YellowSquare, form.getImages().Core.Information, coll);
        helper.displayActionsGroupByPlan(coll, false);
        updateContextMenuState();
    }
}
项目:openMAXIMS    文件:NursingSummaryHelper.java   
public void displayActionsGroupByPlan(PlanOfCareListVoCollection coll, boolean orderDesc)
{
    if(grid == null)
        throw new CodingRuntimeException("The grid was not passed down in the constructor !");

    clearGrid();
    createGridColumns();

    if (orderDesc)
    {
        sortDesc();
    }

    populateGrid(coll);
}
项目:openmaxims-linux    文件:Logic.java   
private void populateActions()
{
    DateTime date1 = null;
    DateTime date2 = null;

    if(form.cmbInterval().getValue() != null)
    {
        date1 = new DateTime();
        date2 = new DateTime();

        int hours = 0;
        if(PlanOfCareInterval.HOURS12.equals(form.cmbInterval().getValue()))
            hours = -12;
        else if(PlanOfCareInterval.HOURS24.equals(form.cmbInterval().getValue()))
            hours = -24;
        else if(PlanOfCareInterval.HOURS36.equals(form.cmbInterval().getValue()))
            hours = -36;
        else if(PlanOfCareInterval.HOURS48.equals(form.cmbInterval().getValue()))
            hours = -48;
        else if(PlanOfCareInterval.HOURS72.equals(form.cmbInterval().getValue()))
            hours = -72;

        date1.addHours(hours);
    }

    PlanOfCareListVoCollection coll = domain.listPlansofCare(form.getGlobalContext().Core.getCurrentCareContext(), null, date1, date2);
    NursingSummaryHelper helper = new NursingSummaryHelper(form.dyngrdActions(), form.getImages().Core.RedSqaure, form.getImages().Core.GreenSquare, form.getImages().Core.YellowSquare, form.getImages().Core.Information, coll);
    helper.displayActionsGroupByPlan(coll, false);
}
项目:openmaxims-linux    文件:Logic.java   
private void listPlansOfCareByStatus(PlanOfCareStatus status)
{
    if (status != null)
    {
        PlanOfCareListVoCollection coll = domain.listPlansofCareByStatus(form.getGlobalContext().Core.getCurrentCareContext(), status);
        NursingSummaryHelper helper = new NursingSummaryHelper(form.lyrPOC().tabPocList().dyngrdPOC(), form.getImages().Core.RedSqaure, form.getImages().Core.GreenSquare, form.getImages().Core.YellowSquare, form.getImages().Core.Information, coll);
        helper.displayActionsGroupByPlan(coll, false);
        updateContextMenuState();
    }
}
项目:openmaxims-linux    文件:NursingSummaryHelper.java   
public void displayActionsGroupByPlan(PlanOfCareListVoCollection coll, boolean orderDesc)
{
    if(grid == null)
        throw new CodingRuntimeException("The grid was not passed down in the constructor !");

    clearGrid();
    createGridColumns();

    if (orderDesc)
    {
        sortDesc();
    }

    populateGrid(coll);
}
项目:AvoinApotti    文件:PlanOfCareImpl.java   
public PlanOfCareListVoCollection listPlansofCareByStatus(CareContextRefVo voCareContextRef, PlanOfCareStatus status) 
{
    if(voCareContextRef == null)
        throw new CodingRuntimeException("The 'careContext' parameter cannot be null !");

    DomainFactory factory = getDomainFactory();

    String hql = new String();

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

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    hql = "select p1_1 from PlanOfCare as p1_1 left join p1_1.actions as p2_1 left join p1_1.group as l1_1";

    if(status != null)
    {
        if (status.equals(PlanOfCareStatus.CURRENT))
        {
            condStr.append(andStr + " (p1_1.status.id ='-1089'  or p1_1.status.id='-1091')  ");
            andStr = " and ";   
        }
        else
        {
            condStr.append(andStr + " p1_1.status.id = :STATUS ");
            markers.add("STATUS");
            values.add(new Integer(status.getId()));

            andStr = " and ";
        }
    }

    condStr.append(andStr + " p1_1.careContext.id = :CONTEXT ");
    markers.add("CONTEXT");
    values.add(voCareContextRef.getID_CareContext());

    hql += " where ";

    hql += condStr.toString();
    hql += " order by l1_1.text asc, p1_1.title asc, p2_1.authoringInformation.authoringDateTime desc";

    return (PlanOfCareListVoAssembler.createPlanOfCareListVoCollectionFromPlanOfCare(factory.find(hql,markers,values)));
}
项目:AvoinApotti    文件:PlanOfCareActionsImpl.java   
public PlanOfCareListVoCollection listPlanOfCare(CareContextRefVo voCareContextRef) 
{
    return PlanOfCareListVoAssembler.createPlanOfCareListVoCollectionFromPlanOfCare(
            getDomainFactory().find("from PlanOfCare as poc where poc.status.id <> -1090 and poc.careContext.id = :CARE_CONTEXT", 
                    new String[] {"CARE_CONTEXT"}, new Object[] {voCareContextRef.getID_CareContext()}));
}
项目:AvoinApotti    文件:NursingSummaryImpl.java   
public PlanOfCareListVoCollection listPlansofCare(CareContextRefVo voCareContextRef, PlanOfCareStatus status, ims.framework.utils.DateTime date1, ims.framework.utils.DateTime date2) 
{
    if(voCareContextRef == null)
        throw new CodingRuntimeException("The 'careContext' parameter cannot be null !");

    DomainFactory factory = getDomainFactory();

    String hql = new String();

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

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

    hql = "select p1_1 from PlanOfCare as p1_1 left join p1_1.actions as p2_1 left join p1_1.group as l1_1";

    if(status != null)
    {
        if (status.equals(PlanOfCareStatus.CURRENT))
        {
            condStr.append(andStr + " (p1_1.status.id ='-1089'  or p1_1.status.id='-1091')  ");
            andStr = " and ";   
        }
        else
        {
            condStr.append(andStr + " p1_1.status.id = :STATUS ");
            markers.add("STATUS");
            values.add(new Integer(status.getId()));

            andStr = " and ";
        }
    }

    if(date1 != null && date2 != null)
    {
        condStr.append(andStr + " p1_1.authoringInformation.authoringDateTime between :DATE1 and :DATE2 ");
        markers.add("DATE1");
        values.add(date1.getJavaDate());
        markers.add("DATE2");
        values.add(date2.getJavaDate());

        andStr = " and ";
    }

    condStr.append(andStr + " p1_1.careContext.id = :CONTEXT ");
    markers.add("CONTEXT");
    values.add(voCareContextRef.getID_CareContext());

    hql += " where ";

    hql += condStr.toString();
    hql += " order by l1_1.text asc, p1_1.title asc, p2_1.authoringInformation.authoringDateTime desc";

    return (PlanOfCareListVoAssembler.createPlanOfCareListVoCollectionFromPlanOfCare(factory.find(hql,markers,values)));
}
项目:openMAXIMS    文件:PlanOfCareImpl.java   
public PlanOfCareListVoCollection listPlansofCareByStatus(CareContextRefVo voCareContextRef, PlanOfCareStatus status) 
{
    if(voCareContextRef == null)
        throw new CodingRuntimeException("The 'careContext' parameter cannot be null !");

    DomainFactory factory = getDomainFactory();

    String hql = new String();

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

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    hql = "select p1_1 from PlanOfCare as p1_1 left join p1_1.actions as p2_1 left join p1_1.group as l1_1";

    if(status != null)
    {
        if (status.equals(PlanOfCareStatus.CURRENT))
        {
            condStr.append(andStr + " (p1_1.status.id ='-1089'  or p1_1.status.id='-1091')  ");
            andStr = " and ";   
        }
        else
        {
            condStr.append(andStr + " p1_1.status.id = :STATUS ");
            markers.add("STATUS");
            values.add(new Integer(status.getId()));

            andStr = " and ";
        }
    }

    condStr.append(andStr + " p1_1.careContext.id = :CONTEXT ");
    markers.add("CONTEXT");
    values.add(voCareContextRef.getID_CareContext());

    hql += " where ";

    hql += condStr.toString();
    hql += " order by l1_1.text asc, p1_1.title asc, p2_1.authoringInformation.authoringDateTime desc";

    return (PlanOfCareListVoAssembler.createPlanOfCareListVoCollectionFromPlanOfCare(factory.find(hql,markers,values)));
}
项目:openMAXIMS    文件:PlanOfCareActionsImpl.java   
public PlanOfCareListVoCollection listPlanOfCare(CareContextRefVo voCareContextRef) 
{
    return PlanOfCareListVoAssembler.createPlanOfCareListVoCollectionFromPlanOfCare(
            getDomainFactory().find("from PlanOfCare as poc where poc.status.id <> -1090 and poc.careContext.id = :CARE_CONTEXT", 
                    new String[] {"CARE_CONTEXT"}, new Object[] {voCareContextRef.getID_CareContext()}));
}
项目:openMAXIMS    文件:NursingSummaryImpl.java   
public PlanOfCareListVoCollection listPlansofCare(CareContextRefVo voCareContextRef, PlanOfCareStatus status, ims.framework.utils.DateTime date1, ims.framework.utils.DateTime date2) 
{
    if(voCareContextRef == null)
        throw new CodingRuntimeException("The 'careContext' parameter cannot be null !");

    DomainFactory factory = getDomainFactory();

    String hql = new String();

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

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

    hql = "select p1_1 from PlanOfCare as p1_1 left join p1_1.actions as p2_1 left join p1_1.group as l1_1";

    if(status != null)
    {
        if (status.equals(PlanOfCareStatus.CURRENT))
        {
            condStr.append(andStr + " (p1_1.status.id ='-1089'  or p1_1.status.id='-1091')  ");
            andStr = " and ";   
        }
        else
        {
            condStr.append(andStr + " p1_1.status.id = :STATUS ");
            markers.add("STATUS");
            values.add(new Integer(status.getId()));

            andStr = " and ";
        }
    }

    if(date1 != null && date2 != null)
    {
        condStr.append(andStr + " p1_1.authoringInformation.authoringDateTime between :DATE1 and :DATE2 ");
        markers.add("DATE1");
        values.add(date1.getJavaDate());
        markers.add("DATE2");
        values.add(date2.getJavaDate());

        andStr = " and ";
    }

    condStr.append(andStr + " p1_1.careContext.id = :CONTEXT ");
    markers.add("CONTEXT");
    values.add(voCareContextRef.getID_CareContext());

    hql += " where ";

    hql += condStr.toString();
    hql += " order by l1_1.text asc, p1_1.title asc, p2_1.authoringInformation.authoringDateTime desc";

    return (PlanOfCareListVoAssembler.createPlanOfCareListVoCollectionFromPlanOfCare(factory.find(hql,markers,values)));
}
项目:openMAXIMS    文件:PlanOfCareImpl.java   
public PlanOfCareListVoCollection listPlansofCareByStatus(CareContextRefVo voCareContextRef, PlanOfCareStatus status) 
{
    if(voCareContextRef == null)
        throw new CodingRuntimeException("The 'careContext' parameter cannot be null !");

    DomainFactory factory = getDomainFactory();

    String hql = new String();

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

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    hql = "select p1_1 from PlanOfCare as p1_1 left join p1_1.actions as p2_1 left join p1_1.group as l1_1";

    if(status != null)
    {
        if (status.equals(PlanOfCareStatus.CURRENT))
        {
            condStr.append(andStr + " (p1_1.status.id ='-1089'  or p1_1.status.id='-1091')  ");
            andStr = " and ";   
        }
        else
        {
            condStr.append(andStr + " p1_1.status.id = :STATUS ");
            markers.add("STATUS");
            values.add(new Integer(status.getId()));

            andStr = " and ";
        }
    }

    condStr.append(andStr + " p1_1.careContext.id = :CONTEXT ");
    markers.add("CONTEXT");
    values.add(voCareContextRef.getID_CareContext());

    hql += " where ";

    hql += condStr.toString();
    hql += " order by l1_1.text asc, p1_1.title asc, p2_1.authoringInformation.authoringDateTime desc";

    return (PlanOfCareListVoAssembler.createPlanOfCareListVoCollectionFromPlanOfCare(factory.find(hql,markers,values)));
}
项目:openMAXIMS    文件:PlanOfCareActionsImpl.java   
public PlanOfCareListVoCollection listPlanOfCare(CareContextRefVo voCareContextRef) 
{
    return PlanOfCareListVoAssembler.createPlanOfCareListVoCollectionFromPlanOfCare(
            getDomainFactory().find("from PlanOfCare as poc where poc.status.id <> -1090 and poc.careContext.id = :CARE_CONTEXT", 
                    new String[] {"CARE_CONTEXT"}, new Object[] {voCareContextRef.getID_CareContext()}));
}
项目:openMAXIMS    文件:NursingSummaryImpl.java   
public PlanOfCareListVoCollection listPlansofCare(CareContextRefVo voCareContextRef, PlanOfCareStatus status, ims.framework.utils.DateTime date1, ims.framework.utils.DateTime date2) 
{
    if(voCareContextRef == null)
        throw new CodingRuntimeException("The 'careContext' parameter cannot be null !");

    DomainFactory factory = getDomainFactory();

    String hql = new String();

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

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

    hql = "select p1_1 from PlanOfCare as p1_1 left join p1_1.actions as p2_1 left join p1_1.group as l1_1";

    if(status != null)
    {
        if (status.equals(PlanOfCareStatus.CURRENT))
        {
            condStr.append(andStr + " (p1_1.status.id ='-1089'  or p1_1.status.id='-1091')  ");
            andStr = " and ";   
        }
        else
        {
            condStr.append(andStr + " p1_1.status.id = :STATUS ");
            markers.add("STATUS");
            values.add(new Integer(status.getId()));

            andStr = " and ";
        }
    }

    if(date1 != null && date2 != null)
    {
        condStr.append(andStr + " p1_1.authoringInformation.authoringDateTime between :DATE1 and :DATE2 ");
        markers.add("DATE1");
        values.add(date1.getJavaDate());
        markers.add("DATE2");
        values.add(date2.getJavaDate());

        andStr = " and ";
    }

    condStr.append(andStr + " p1_1.careContext.id = :CONTEXT ");
    markers.add("CONTEXT");
    values.add(voCareContextRef.getID_CareContext());

    hql += " where ";

    hql += condStr.toString();
    hql += " order by l1_1.text asc, p1_1.title asc, p2_1.authoringInformation.authoringDateTime desc";

    return (PlanOfCareListVoAssembler.createPlanOfCareListVoCollectionFromPlanOfCare(factory.find(hql,markers,values)));
}
项目:openmaxims-linux    文件:PlanOfCareImpl.java   
public PlanOfCareListVoCollection listPlansofCareByStatus(CareContextRefVo voCareContextRef, PlanOfCareStatus status) 
{
    if(voCareContextRef == null)
        throw new CodingRuntimeException("The 'careContext' parameter cannot be null !");

    DomainFactory factory = getDomainFactory();

    String hql = new String();

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

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    hql = "select p1_1 from PlanOfCare as p1_1 left join p1_1.actions as p2_1 left join p1_1.group as l1_1";

    if(status != null)
    {
        if (status.equals(PlanOfCareStatus.CURRENT))
        {
            condStr.append(andStr + " (p1_1.status.id ='-1089'  or p1_1.status.id='-1091')  ");
            andStr = " and ";   
        }
        else
        {
            condStr.append(andStr + " p1_1.status.id = :STATUS ");
            markers.add("STATUS");
            values.add(new Integer(status.getId()));

            andStr = " and ";
        }
    }

    condStr.append(andStr + " p1_1.careContext.id = :CONTEXT ");
    markers.add("CONTEXT");
    values.add(voCareContextRef.getID_CareContext());

    hql += " where ";

    hql += condStr.toString();
    hql += " order by l1_1.text asc, p1_1.title asc, p2_1.authoringInformation.authoringDateTime desc";

    return (PlanOfCareListVoAssembler.createPlanOfCareListVoCollectionFromPlanOfCare(factory.find(hql,markers,values)));
}
项目:openmaxims-linux    文件:PlanOfCareActionsImpl.java   
public PlanOfCareListVoCollection listPlanOfCare(CareContextRefVo voCareContextRef) 
{
    return PlanOfCareListVoAssembler.createPlanOfCareListVoCollectionFromPlanOfCare(
            getDomainFactory().find("from PlanOfCare as poc where poc.status.id <> -1090 and poc.careContext.id = :CARE_CONTEXT", 
                    new String[] {"CARE_CONTEXT"}, new Object[] {voCareContextRef.getID_CareContext()}));
}
项目:openmaxims-linux    文件:NursingSummaryImpl.java   
public PlanOfCareListVoCollection listPlansofCare(CareContextRefVo voCareContextRef, PlanOfCareStatus status, ims.framework.utils.DateTime date1, ims.framework.utils.DateTime date2) 
{
    if(voCareContextRef == null)
        throw new CodingRuntimeException("The 'careContext' parameter cannot be null !");

    DomainFactory factory = getDomainFactory();

    String hql = new String();

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

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

    hql = "select p1_1 from PlanOfCare as p1_1 left join p1_1.actions as p2_1 left join p1_1.group as l1_1";

    if(status != null)
    {
        if (status.equals(PlanOfCareStatus.CURRENT))
        {
            condStr.append(andStr + " (p1_1.status.id ='-1089'  or p1_1.status.id='-1091')  ");
            andStr = " and ";   
        }
        else
        {
            condStr.append(andStr + " p1_1.status.id = :STATUS ");
            markers.add("STATUS");
            values.add(new Integer(status.getId()));

            andStr = " and ";
        }
    }

    if(date1 != null && date2 != null)
    {
        condStr.append(andStr + " p1_1.authoringInformation.authoringDateTime between :DATE1 and :DATE2 ");
        markers.add("DATE1");
        values.add(date1.getJavaDate());
        markers.add("DATE2");
        values.add(date2.getJavaDate());

        andStr = " and ";
    }

    condStr.append(andStr + " p1_1.careContext.id = :CONTEXT ");
    markers.add("CONTEXT");
    values.add(voCareContextRef.getID_CareContext());

    hql += " where ";

    hql += condStr.toString();
    hql += " order by l1_1.text asc, p1_1.title asc, p2_1.authoringInformation.authoringDateTime desc";

    return (PlanOfCareListVoAssembler.createPlanOfCareListVoCollectionFromPlanOfCare(factory.find(hql,markers,values)));
}