Java 类ims.nursing.vo.lookups.PlanOfCareStatus 实例源码

项目:AvoinApotti    文件:Logic.java   
protected void onChkConfirmValueChanged() throws ims.framework.exceptions.PresentationLogicException
{
    if (form.lyrPOC().tabPocDetails().chkConfirm().getValue() == true)
    {
        showHideCustomComponent(form.lyrPOC().tabPocDetails().customConfirming(), Boolean.TRUE, "Confirm", Boolean.TRUE);
        form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue(PlanOfCareStatus.ACTIVE);
        onCmbStatusPOCValueChanged();
    }

    if (form.lyrPOC().tabPocDetails().chkConfirm().getValue() == false)
    {
        showHideCustomComponent(form.lyrPOC().tabPocDetails().customConfirming(), Boolean.FALSE, "Confirm", Boolean.FALSE);
        form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue(PlanOfCareStatus.REQUIRES_CONFIRMATION);
        onCmbStatusPOCValueChanged();
    }
}
项目:AvoinApotti    文件:Logic.java   
private void updatePlanOfCare(int menuItemID) 
{   
    clearPocDetailsInstanceControls();
    form.setMode(FormMode.EDIT);

    PlanOfCareStatus pocStatus = null;

    if (form.getLocalContext().getSelectedRecordIsNotNull())
    {
        pocStatus = domain.getPlanOfCare(form.getLocalContext().getSelectedRecord()).getStatus();

    }

    populateStatusPocTypeCombo(menuItemID, pocStatus);
    displayPocDetailsTabOnly(menuItemID, pocStatus);
}
项目:openMAXIMS    文件:Logic.java   
protected void onChkConfirmValueChanged() throws ims.framework.exceptions.PresentationLogicException
{
    if (form.lyrPOC().tabPocDetails().chkConfirm().getValue() == true)
    {
        showHideCustomComponent(form.lyrPOC().tabPocDetails().customConfirming(), Boolean.TRUE, "Confirm", Boolean.TRUE);
        form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue(PlanOfCareStatus.ACTIVE);
        onCmbStatusPOCValueChanged();
    }

    if (form.lyrPOC().tabPocDetails().chkConfirm().getValue() == false)
    {
        showHideCustomComponent(form.lyrPOC().tabPocDetails().customConfirming(), Boolean.FALSE, "Confirm", Boolean.FALSE);
        form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue(PlanOfCareStatus.REQUIRES_CONFIRMATION);
        onCmbStatusPOCValueChanged();
    }
}
项目:openMAXIMS    文件:Logic.java   
private void updatePlanOfCare(int menuItemID) 
{   
    clearPocDetailsInstanceControls();
    form.setMode(FormMode.EDIT);

    PlanOfCareStatus pocStatus = null;

    if (form.getLocalContext().getSelectedRecordIsNotNull())
    {
        pocStatus = domain.getPlanOfCare(form.getLocalContext().getSelectedRecord()).getStatus();

    }

    populateStatusPocTypeCombo(menuItemID, pocStatus);
    displayPocDetailsTabOnly(menuItemID, pocStatus);
}
项目:openMAXIMS    文件:Logic.java   
protected void onChkConfirmValueChanged() throws ims.framework.exceptions.PresentationLogicException
{
    if (form.lyrPOC().tabPocDetails().chkConfirm().getValue() == true)
    {
        showHideCustomComponent(form.lyrPOC().tabPocDetails().customConfirming(), Boolean.TRUE, "Confirm", Boolean.TRUE);
        form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue(PlanOfCareStatus.ACTIVE);
        onCmbStatusPOCValueChanged();
    }

    if (form.lyrPOC().tabPocDetails().chkConfirm().getValue() == false)
    {
        showHideCustomComponent(form.lyrPOC().tabPocDetails().customConfirming(), Boolean.FALSE, "Confirm", Boolean.FALSE);
        form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue(PlanOfCareStatus.REQUIRES_CONFIRMATION);
        onCmbStatusPOCValueChanged();
    }
}
项目:openMAXIMS    文件:Logic.java   
private void updatePlanOfCare(int menuItemID) 
{   
    clearPocDetailsInstanceControls();
    form.setMode(FormMode.EDIT);

    PlanOfCareStatus pocStatus = null;

    if (form.getLocalContext().getSelectedRecordIsNotNull())
    {
        pocStatus = domain.getPlanOfCare(form.getLocalContext().getSelectedRecord()).getStatus();

    }

    populateStatusPocTypeCombo(menuItemID, pocStatus);
    displayPocDetailsTabOnly(menuItemID, pocStatus);
}
项目:openmaxims-linux    文件:Logic.java   
protected void onChkConfirmValueChanged() throws ims.framework.exceptions.PresentationLogicException
{
    if (form.lyrPOC().tabPocDetails().chkConfirm().getValue() == true)
    {
        showHideCustomComponent(form.lyrPOC().tabPocDetails().customConfirming(), Boolean.TRUE, "Confirm", Boolean.TRUE);
        form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue(PlanOfCareStatus.ACTIVE);
        onCmbStatusPOCValueChanged();
    }

    if (form.lyrPOC().tabPocDetails().chkConfirm().getValue() == false)
    {
        showHideCustomComponent(form.lyrPOC().tabPocDetails().customConfirming(), Boolean.FALSE, "Confirm", Boolean.FALSE);
        form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue(PlanOfCareStatus.REQUIRES_CONFIRMATION);
        onCmbStatusPOCValueChanged();
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void updatePlanOfCare(int menuItemID) 
{   
    clearPocDetailsInstanceControls();
    form.setMode(FormMode.EDIT);

    PlanOfCareStatus pocStatus = null;

    if (form.getLocalContext().getSelectedRecordIsNotNull())
    {
        pocStatus = domain.getPlanOfCare(form.getLocalContext().getSelectedRecord()).getStatus();

    }

    populateStatusPocTypeCombo(menuItemID, pocStatus);
    displayPocDetailsTabOnly(menuItemID, pocStatus);
}
项目:AvoinApotti    文件:Logic.java   
protected void onCmbStatusValueChanged() throws PresentationLogicException
{
    if (form.lyrPOC().tabPocList().cmbStatus().getValue() !=  null)
    {
        listPlansOfCareByStatus(form.lyrPOC().tabPocList().cmbStatus().getValue()); 
    }
    else
    {
        form.lyrPOC().tabPocList().cmbStatus().setValue(PlanOfCareStatus.CURRENT);
        listPlansOfCareByStatus(PlanOfCareStatus.CURRENT);
    }   
}
项目: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    文件:Logic.java   
protected void onCmbStatusPOCValueChanged() throws PresentationLogicException 
{
    if (form.lyrPOC().tabPocDetails().cmbStatusPOC().getValue() != null)
    {
        if (form.lyrPOC().tabPocDetails().cmbStatusPOC().getValue().equals(PlanOfCareStatus.RESOLVED))
        {
            showHideCustomComponent(form.lyrPOC().tabPocDetails().customResolved(), Boolean.TRUE, null, Boolean.TRUE);
        }
        else
        {
            showHideCustomComponent(form.lyrPOC().tabPocDetails().customResolved(), Boolean.FALSE, null, Boolean.FALSE);
        }
    }
    else
    {
        /*if (!returnFlagStatus()) //WDEV-15094
        {
            form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue((PlanOfCareStatus)form.lyrPOC().tabPocDetails().cmbStatusPOC().getValues().get(0));
        }
        if (returnFlagStatus())
        {
            engine.showMessage("Select Active, Resolved or Requires Confirmation");
            form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue(PlanOfCareStatus.ACTIVE); 
        }*/

        showHideCustomComponent(form.lyrPOC().tabPocDetails().customResolved(), Boolean.FALSE, null, Boolean.FALSE);
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onCmbStatusValueChanged() throws PresentationLogicException
{
    if (form.lyrPOC().tabPocList().cmbStatus().getValue() !=  null)
    {
        listPlansOfCareByStatus(form.lyrPOC().tabPocList().cmbStatus().getValue()); 
    }
    else
    {
        form.lyrPOC().tabPocList().cmbStatus().setValue(PlanOfCareStatus.CURRENT);
        listPlansOfCareByStatus(PlanOfCareStatus.CURRENT);
    }   

    form.getGlobalContext().Nursing.setPlanOfCareSearchCriteria(getSearchCriteria());//WDEV-19389 
}
项目: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    文件:Logic.java   
protected void onCmbStatusPOCValueChanged() throws PresentationLogicException 
{
    if (form.lyrPOC().tabPocDetails().cmbStatusPOC().getValue() != null)
    {
        if (form.lyrPOC().tabPocDetails().cmbStatusPOC().getValue().equals(PlanOfCareStatus.RESOLVED))
        {
            showHideCustomComponent(form.lyrPOC().tabPocDetails().customResolved(), Boolean.TRUE, null, Boolean.TRUE);
        }
        else
        {
            showHideCustomComponent(form.lyrPOC().tabPocDetails().customResolved(), Boolean.FALSE, null, Boolean.FALSE);
        }
    }
    else
    {
        /*if (!returnFlagStatus()) //WDEV-15094
        {
            form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue((PlanOfCareStatus)form.lyrPOC().tabPocDetails().cmbStatusPOC().getValues().get(0));
        }
        if (returnFlagStatus())
        {
            engine.showMessage("Select Active, Resolved or Requires Confirmation");
            form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue(PlanOfCareStatus.ACTIVE); 
        }*/

        showHideCustomComponent(form.lyrPOC().tabPocDetails().customResolved(), Boolean.FALSE, null, Boolean.FALSE);
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onCmbStatusValueChanged() throws PresentationLogicException
{
    if (form.lyrPOC().tabPocList().cmbStatus().getValue() !=  null)
    {
        listPlansOfCareByStatus(form.lyrPOC().tabPocList().cmbStatus().getValue()); 
    }
    else
    {
        form.lyrPOC().tabPocList().cmbStatus().setValue(PlanOfCareStatus.CURRENT);
        listPlansOfCareByStatus(PlanOfCareStatus.CURRENT);
    }   
}
项目: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    文件:Logic.java   
protected void onCmbStatusPOCValueChanged() throws PresentationLogicException 
{
    if (form.lyrPOC().tabPocDetails().cmbStatusPOC().getValue() != null)
    {
        if (form.lyrPOC().tabPocDetails().cmbStatusPOC().getValue().equals(PlanOfCareStatus.RESOLVED))
        {
            showHideCustomComponent(form.lyrPOC().tabPocDetails().customResolved(), Boolean.TRUE, null, Boolean.TRUE);
        }
        else
        {
            showHideCustomComponent(form.lyrPOC().tabPocDetails().customResolved(), Boolean.FALSE, null, Boolean.FALSE);
        }
    }
    else
    {
        /*if (!returnFlagStatus()) //WDEV-15094
        {
            form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue((PlanOfCareStatus)form.lyrPOC().tabPocDetails().cmbStatusPOC().getValues().get(0));
        }
        if (returnFlagStatus())
        {
            engine.showMessage("Select Active, Resolved or Requires Confirmation");
            form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue(PlanOfCareStatus.ACTIVE); 
        }*/

        showHideCustomComponent(form.lyrPOC().tabPocDetails().customResolved(), Boolean.FALSE, null, Boolean.FALSE);
    }
}
项目:openmaxims-linux    文件:Logic.java   
protected void onCmbStatusValueChanged() throws PresentationLogicException
{
    if (form.lyrPOC().tabPocList().cmbStatus().getValue() !=  null)
    {
        listPlansOfCareByStatus(form.lyrPOC().tabPocList().cmbStatus().getValue()); 
    }
    else
    {
        form.lyrPOC().tabPocList().cmbStatus().setValue(PlanOfCareStatus.CURRENT);
        listPlansOfCareByStatus(PlanOfCareStatus.CURRENT);
    }   
}
项目: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    文件:Logic.java   
protected void onCmbStatusPOCValueChanged() throws PresentationLogicException 
{
    if (form.lyrPOC().tabPocDetails().cmbStatusPOC().getValue() != null)
    {
        if (form.lyrPOC().tabPocDetails().cmbStatusPOC().getValue().equals(PlanOfCareStatus.RESOLVED))
        {
            showHideCustomComponent(form.lyrPOC().tabPocDetails().customResolved(), Boolean.TRUE, null, Boolean.TRUE);
        }
        else
        {
            showHideCustomComponent(form.lyrPOC().tabPocDetails().customResolved(), Boolean.FALSE, null, Boolean.FALSE);
        }
    }
    else
    {
        /*if (!returnFlagStatus()) //WDEV-15094
        {
            form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue((PlanOfCareStatus)form.lyrPOC().tabPocDetails().cmbStatusPOC().getValues().get(0));
        }
        if (returnFlagStatus())
        {
            engine.showMessage("Select Active, Resolved or Requires Confirmation");
            form.lyrPOC().tabPocDetails().cmbStatusPOC().setValue(PlanOfCareStatus.ACTIVE); 
        }*/

        showHideCustomComponent(form.lyrPOC().tabPocDetails().customResolved(), Boolean.FALSE, null, Boolean.FALSE);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void listActivePlansOfCare()
{
    form.lyrPOC().tabPocList().cmbStatus().setValue(PlanOfCareStatus.CURRENT);
    listPlansOfCareByStatus(form.lyrPOC().tabPocList().cmbStatus().getValue()); 
}
项目: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    文件: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)));
}
项目:AvoinApotti    文件:DailyPatientProgressImpl.java   
public PlanOfCareVoCollection listPlanOfCare(CareContextRefVo careContext, AssessmentQuestionRefVoCollection assessmentQuestionRefVoColl)
{
    if (careContext == null)
        throw new CodingRuntimeException("Cannot list PlanOfCareVoCollection for null Care Context");

    if (assessmentQuestionRefVoColl == null || assessmentQuestionRefVoColl.size() == 0)
        return null;

    StringBuffer query = new StringBuffer("from PlanOfCare poc where ");
    ArrayList values = new ArrayList();
    ArrayList params = new ArrayList();

    query.append(" poc.status is not :status ");
    params.add("status");
    values.add(getDomLookup(PlanOfCareStatus.RESOLVED));

    if(careContext != null)
    {
        if(values.size() > 0)
            query.append(" and ");
        query.append("poc.careContext.id =:careContextID");
        params.add("careContextID");
        values.add(careContext.getID_CareContext());
    }

    if(assessmentQuestionRefVoColl != null  && assessmentQuestionRefVoColl.size() > 0)
    {
        if (values.size() > 0)
            query.append(" and ");
        query.append(" poc.assessmentQuestion.id in ");
        query.append("(");
        for (int i = 0; i < assessmentQuestionRefVoColl.size(); i++)
        {
            AssessmentQuestionRefVo voAssQ = assessmentQuestionRefVoColl.get(i);
            query.append(" :assQId" + Integer.toString(i));
            if (i < (assessmentQuestionRefVoColl.size() - 1))
                query.append(", ");
            params.add("assQId" + Integer.toString(i));
            values.add(voAssQ.getID_AssessmentQuestion());
        }
        query.append(")");
    }

    DomainFactory factory = getDomainFactory();
    List list = factory.find(query.toString(), params, values);

    return PlanOfCareVoAssembler.createPlanOfCareVoCollectionFromPlanOfCare(list);
}
项目:openMAXIMS    文件:Logic.java   
private void listActivePlansOfCare()
{
    form.lyrPOC().tabPocList().cmbStatus().setValue(PlanOfCareStatus.CURRENT);
    listPlansOfCareByStatus(form.lyrPOC().tabPocList().cmbStatus().getValue()); 
}
项目: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    文件: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    文件:DailyPatientProgressImpl.java   
public PlanOfCareVoCollection listPlanOfCare(CareContextRefVo careContext, AssessmentQuestionRefVoCollection assessmentQuestionRefVoColl)
{
    if (careContext == null)
        throw new CodingRuntimeException("Cannot list PlanOfCareVoCollection for null Care Context");

    if (assessmentQuestionRefVoColl == null || assessmentQuestionRefVoColl.size() == 0)
        return null;

    StringBuffer query = new StringBuffer("from PlanOfCare poc where ");
    ArrayList values = new ArrayList();
    ArrayList params = new ArrayList();

    query.append(" poc.status is not :status ");
    params.add("status");
    values.add(getDomLookup(PlanOfCareStatus.RESOLVED));

    if(careContext != null)
    {
        if(values.size() > 0)
            query.append(" and ");
        query.append("poc.careContext.id =:careContextID");
        params.add("careContextID");
        values.add(careContext.getID_CareContext());
    }

    if(assessmentQuestionRefVoColl != null  && assessmentQuestionRefVoColl.size() > 0)
    {
        if (values.size() > 0)
            query.append(" and ");
        query.append(" poc.assessmentQuestion.id in ");
        query.append("(");
        for (int i = 0; i < assessmentQuestionRefVoColl.size(); i++)
        {
            AssessmentQuestionRefVo voAssQ = assessmentQuestionRefVoColl.get(i);
            query.append(" :assQId" + Integer.toString(i));
            if (i < (assessmentQuestionRefVoColl.size() - 1))
                query.append(", ");
            params.add("assQId" + Integer.toString(i));
            values.add(voAssQ.getID_AssessmentQuestion());
        }
        query.append(")");
    }

    DomainFactory factory = getDomainFactory();
    List list = factory.find(query.toString(), params, values);

    return PlanOfCareVoAssembler.createPlanOfCareVoCollectionFromPlanOfCare(list);
}
项目:openMAXIMS    文件:Logic.java   
private void listActivePlansOfCare()
{
    form.lyrPOC().tabPocList().cmbStatus().setValue(PlanOfCareStatus.CURRENT);
    listPlansOfCareByStatus(form.lyrPOC().tabPocList().cmbStatus().getValue()); 
}
项目: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    文件: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    文件:DailyPatientProgressImpl.java   
public PlanOfCareVoCollection listPlanOfCare(CareContextRefVo careContext, AssessmentQuestionRefVoCollection assessmentQuestionRefVoColl)
{
    if (careContext == null)
        throw new CodingRuntimeException("Cannot list PlanOfCareVoCollection for null Care Context");

    if (assessmentQuestionRefVoColl == null || assessmentQuestionRefVoColl.size() == 0)
        return null;

    StringBuffer query = new StringBuffer("from PlanOfCare poc where ");
    ArrayList values = new ArrayList();
    ArrayList params = new ArrayList();

    query.append(" poc.status is not :status ");
    params.add("status");
    values.add(getDomLookup(PlanOfCareStatus.RESOLVED));

    if(careContext != null)
    {
        if(values.size() > 0)
            query.append(" and ");
        query.append("poc.careContext.id =:careContextID");
        params.add("careContextID");
        values.add(careContext.getID_CareContext());
    }

    if(assessmentQuestionRefVoColl != null  && assessmentQuestionRefVoColl.size() > 0)
    {
        if (values.size() > 0)
            query.append(" and ");
        query.append(" poc.assessmentQuestion.id in ");
        query.append("(");
        for (int i = 0; i < assessmentQuestionRefVoColl.size(); i++)
        {
            AssessmentQuestionRefVo voAssQ = assessmentQuestionRefVoColl.get(i);
            query.append(" :assQId" + Integer.toString(i));
            if (i < (assessmentQuestionRefVoColl.size() - 1))
                query.append(", ");
            params.add("assQId" + Integer.toString(i));
            values.add(voAssQ.getID_AssessmentQuestion());
        }
        query.append(")");
    }

    DomainFactory factory = getDomainFactory();
    List list = factory.find(query.toString(), params, values);

    return PlanOfCareVoAssembler.createPlanOfCareVoCollectionFromPlanOfCare(list);
}
项目:openmaxims-linux    文件:Logic.java   
private void listActivePlansOfCare()
{
    form.lyrPOC().tabPocList().cmbStatus().setValue(PlanOfCareStatus.CURRENT);
    listPlansOfCareByStatus(form.lyrPOC().tabPocList().cmbStatus().getValue()); 
}
项目: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    文件: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    文件:DailyPatientProgressImpl.java   
public PlanOfCareVoCollection listPlanOfCare(CareContextRefVo careContext, AssessmentQuestionRefVoCollection assessmentQuestionRefVoColl)
{
    if (careContext == null)
        throw new CodingRuntimeException("Cannot list PlanOfCareVoCollection for null Care Context");

    if (assessmentQuestionRefVoColl == null || assessmentQuestionRefVoColl.size() == 0)
        return null;

    StringBuffer query = new StringBuffer("from PlanOfCare poc where ");
    ArrayList values = new ArrayList();
    ArrayList params = new ArrayList();

    query.append(" poc.status is not :status ");
    params.add("status");
    values.add(getDomLookup(PlanOfCareStatus.RESOLVED));

    if(careContext != null)
    {
        if(values.size() > 0)
            query.append(" and ");
        query.append("poc.careContext.id =:careContextID");
        params.add("careContextID");
        values.add(careContext.getID_CareContext());
    }

    if(assessmentQuestionRefVoColl != null  && assessmentQuestionRefVoColl.size() > 0)
    {
        if (values.size() > 0)
            query.append(" and ");
        query.append(" poc.assessmentQuestion.id in ");
        query.append("(");
        for (int i = 0; i < assessmentQuestionRefVoColl.size(); i++)
        {
            AssessmentQuestionRefVo voAssQ = assessmentQuestionRefVoColl.get(i);
            query.append(" :assQId" + Integer.toString(i));
            if (i < (assessmentQuestionRefVoColl.size() - 1))
                query.append(", ");
            params.add("assQId" + Integer.toString(i));
            values.add(voAssQ.getID_AssessmentQuestion());
        }
        query.append(")");
    }

    DomainFactory factory = getDomainFactory();
    List list = factory.find(query.toString(), params, values);

    return PlanOfCareVoAssembler.createPlanOfCareVoCollectionFromPlanOfCare(list);
}