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

项目:AvoinApotti    文件:PainBodyChartImpl.java   
/**
* lists the PainAssessment records
*/
public PainAssessmentCollection listPain(CareContextRefVo voCurrentCareContext)
{
    if(voCurrentCareContext == null && voCurrentCareContext.getID_CareContextIsNotNull())
        throw new CodingRuntimeException("Current Care Context not available.");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from PainAssessment p ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    hql.append(andStr + " p.careContext.id = :rcc");
    markers.add("rcc");
    values.add(voCurrentCareContext.getID_CareContext());
    andStr = " and ";

    if (markers.size() > 0) query += " where ";
    query += hql.toString();
    List procs = factory.find(query, markers, values);                          
    return PainAssessmentAssembler.createPainAssessmentCollectionFromPainAssessment(procs);
}
项目:openMAXIMS    文件:PainBodyChartImpl.java   
/**
* lists the PainAssessment records
*/
public PainAssessmentCollection listPain(CareContextRefVo voCurrentCareContext)
{
    if(voCurrentCareContext == null && voCurrentCareContext.getID_CareContextIsNotNull())
        throw new CodingRuntimeException("Current Care Context not available.");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from PainAssessment p ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    hql.append(andStr + " p.careContext.id = :rcc");
    markers.add("rcc");
    values.add(voCurrentCareContext.getID_CareContext());
    andStr = " and ";

    if (markers.size() > 0) query += " where ";
    query += hql.toString();
    List procs = factory.find(query, markers, values);                          
    return PainAssessmentAssembler.createPainAssessmentCollectionFromPainAssessment(procs);
}
项目:openMAXIMS    文件:PainBodyChartImpl.java   
/**
* lists the PainAssessment records
*/
public PainAssessmentCollection listPain(CareContextRefVo voCurrentCareContext)
{
    if(voCurrentCareContext == null && voCurrentCareContext.getID_CareContextIsNotNull())
        throw new CodingRuntimeException("Current Care Context not available.");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from PainAssessment p ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    hql.append(andStr + " p.careContext.id = :rcc");
    markers.add("rcc");
    values.add(voCurrentCareContext.getID_CareContext());
    andStr = " and ";

    if (markers.size() > 0) query += " where ";
    query += hql.toString();
    List procs = factory.find(query, markers, values);                          
    return PainAssessmentAssembler.createPainAssessmentCollectionFromPainAssessment(procs);
}
项目:openmaxims-linux    文件:PainBodyChartImpl.java   
/**
* lists the PainAssessment records
*/
public PainAssessmentCollection listPain(CareContextRefVo voCurrentCareContext)
{
    if(voCurrentCareContext == null && voCurrentCareContext.getID_CareContextIsNotNull())
        throw new CodingRuntimeException("Current Care Context not available.");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from PainAssessment p ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    hql.append(andStr + " p.careContext.id = :rcc");
    markers.add("rcc");
    values.add(voCurrentCareContext.getID_CareContext());
    andStr = " and ";

    if (markers.size() > 0) query += " where ";
    query += hql.toString();
    List procs = factory.find(query, markers, values);                          
    return PainAssessmentAssembler.createPainAssessmentCollectionFromPainAssessment(procs);
}
项目:AvoinApotti    文件:PainBodyChartImpl.java   
public ims.nursing.vo.PainAssessment geLastPain(CareContextRefVo voCurrentCareContext)
{
    if(voCurrentCareContext == null && voCurrentCareContext.getID_CareContextIsNotNull())
        throw new CodingRuntimeException("Current Care Context not available.");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from PainAssessment pa ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    hql.append(andStr + " pa.careContext.id = :rcc");
    markers.add("rcc");
    values.add(voCurrentCareContext.getID_CareContext());
    andStr = " and ";

    if (markers.size() > 0) query += " where ";
    query += hql.toString();
    List painAssessmentList = factory.find(query, markers, values);     

    if (painAssessmentList != null && painAssessmentList.size() > 0) 
    {
        ims.nursing.vo.PainAssessmentCollection voPainAssmntColl = PainAssessmentAssembler.createPainAssessmentCollectionFromPainAssessment(painAssessmentList);
        voPainAssmntColl.sort(SortOrder.DESCENDING);
        return voPainAssmntColl.get(0);
    }
    else
    {
        return null;
    }
}
项目:AvoinApotti    文件:PainBodyChartImpl.java   
public ims.nursing.vo.PainAssessment getLastPainAssessmentByPatient(Integer idPatient)
{
    if(idPatient == null)
        throw new CodingRuntimeException("Patient Context not available.");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from PainAssessment pa ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    hql.append(andStr + " pa.careContext.episodeOfCare.careSpell.patient.id = :idPat");
    markers.add("idPat");
    values.add(idPatient);
    andStr = " and ";

    if (markers.size() > 0) query += " where ";
    query += hql.toString();
    List painAssessmentList = factory.find(query, markers, values);     

    if (painAssessmentList != null && painAssessmentList.size() > 0) 
    {
        ims.nursing.vo.PainAssessmentCollection voPainAssmntColl = PainAssessmentAssembler.createPainAssessmentCollectionFromPainAssessment(painAssessmentList).sort(SortOrder.DESCENDING);
        if(voPainAssmntColl!=null&&voPainAssmntColl.size()>0)
            return voPainAssmntColl.get(0);
    }

    return null;

}
项目:openMAXIMS    文件:PainBodyChartImpl.java   
public ims.nursing.vo.PainAssessment geLastPain(CareContextRefVo voCurrentCareContext)
{
    if(voCurrentCareContext == null && voCurrentCareContext.getID_CareContextIsNotNull())
        throw new CodingRuntimeException("Current Care Context not available.");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from PainAssessment pa ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    hql.append(andStr + " pa.careContext.id = :rcc");
    markers.add("rcc");
    values.add(voCurrentCareContext.getID_CareContext());
    andStr = " and ";

    if (markers.size() > 0) query += " where ";
    query += hql.toString();
    List painAssessmentList = factory.find(query, markers, values);     

    if (painAssessmentList != null && painAssessmentList.size() > 0) 
    {
        ims.nursing.vo.PainAssessmentCollection voPainAssmntColl = PainAssessmentAssembler.createPainAssessmentCollectionFromPainAssessment(painAssessmentList);
        voPainAssmntColl.sort(SortOrder.DESCENDING);
        return voPainAssmntColl.get(0);
    }
    else
    {
        return null;
    }
}
项目:openMAXIMS    文件:PainBodyChartImpl.java   
public ims.nursing.vo.PainAssessment getLastPainAssessmentByPatient(Integer idPatient)
{
    if(idPatient == null)
        throw new CodingRuntimeException("Patient Context not available.");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from PainAssessment pa ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    hql.append(andStr + " pa.careContext.episodeOfCare.careSpell.patient.id = :idPat");
    markers.add("idPat");
    values.add(idPatient);
    andStr = " and ";

    if (markers.size() > 0) query += " where ";
    query += hql.toString();
    List painAssessmentList = factory.find(query, markers, values);     

    if (painAssessmentList != null && painAssessmentList.size() > 0) 
    {
        ims.nursing.vo.PainAssessmentCollection voPainAssmntColl = PainAssessmentAssembler.createPainAssessmentCollectionFromPainAssessment(painAssessmentList).sort(SortOrder.DESCENDING);
        if(voPainAssmntColl!=null&&voPainAssmntColl.size()>0)
            return voPainAssmntColl.get(0);
    }

    return null;

}
项目:openMAXIMS    文件:PainBodyChartImpl.java   
public ims.nursing.vo.PainAssessment geLastPain(CareContextRefVo voCurrentCareContext)
{
    if(voCurrentCareContext == null && voCurrentCareContext.getID_CareContextIsNotNull())
        throw new CodingRuntimeException("Current Care Context not available.");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from PainAssessment pa ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    hql.append(andStr + " pa.careContext.id = :rcc");
    markers.add("rcc");
    values.add(voCurrentCareContext.getID_CareContext());
    andStr = " and ";

    if (markers.size() > 0) query += " where ";
    query += hql.toString();
    List painAssessmentList = factory.find(query, markers, values);     

    if (painAssessmentList != null && painAssessmentList.size() > 0) 
    {
        ims.nursing.vo.PainAssessmentCollection voPainAssmntColl = PainAssessmentAssembler.createPainAssessmentCollectionFromPainAssessment(painAssessmentList);
        voPainAssmntColl.sort(SortOrder.DESCENDING);
        return voPainAssmntColl.get(0);
    }
    else
    {
        return null;
    }
}
项目:openMAXIMS    文件:PainBodyChartImpl.java   
public ims.nursing.vo.PainAssessment getLastPainAssessmentByPatient(Integer idPatient)
{
    if(idPatient == null)
        throw new CodingRuntimeException("Patient Context not available.");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from PainAssessment pa ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    hql.append(andStr + " pa.careContext.episodeOfCare.careSpell.patient.id = :idPat");
    markers.add("idPat");
    values.add(idPatient);
    andStr = " and ";

    if (markers.size() > 0) query += " where ";
    query += hql.toString();
    List painAssessmentList = factory.find(query, markers, values);     

    if (painAssessmentList != null && painAssessmentList.size() > 0) 
    {
        ims.nursing.vo.PainAssessmentCollection voPainAssmntColl = PainAssessmentAssembler.createPainAssessmentCollectionFromPainAssessment(painAssessmentList).sort(SortOrder.DESCENDING);
        if(voPainAssmntColl!=null&&voPainAssmntColl.size()>0)
            return voPainAssmntColl.get(0);
    }

    return null;

}
项目:openmaxims-linux    文件:PainBodyChartImpl.java   
public ims.nursing.vo.PainAssessment geLastPain(CareContextRefVo voCurrentCareContext)
{
    if(voCurrentCareContext == null && voCurrentCareContext.getID_CareContextIsNotNull())
        throw new CodingRuntimeException("Current Care Context not available.");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from PainAssessment pa ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    hql.append(andStr + " pa.careContext.id = :rcc");
    markers.add("rcc");
    values.add(voCurrentCareContext.getID_CareContext());
    andStr = " and ";

    if (markers.size() > 0) query += " where ";
    query += hql.toString();
    List painAssessmentList = factory.find(query, markers, values);     

    if (painAssessmentList != null && painAssessmentList.size() > 0) 
    {
        ims.nursing.vo.PainAssessmentCollection voPainAssmntColl = PainAssessmentAssembler.createPainAssessmentCollectionFromPainAssessment(painAssessmentList);
        voPainAssmntColl.sort(SortOrder.DESCENDING);
        return voPainAssmntColl.get(0);
    }
    else
    {
        return null;
    }
}
项目:openmaxims-linux    文件:PainBodyChartImpl.java   
public ims.nursing.vo.PainAssessment getLastPainAssessmentByPatient(Integer idPatient)
{
    if(idPatient == null)
        throw new CodingRuntimeException("Patient Context not available.");

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from PainAssessment pa ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    hql.append(andStr + " pa.careContext.episodeOfCare.careSpell.patient.id = :idPat");
    markers.add("idPat");
    values.add(idPatient);
    andStr = " and ";

    if (markers.size() > 0) query += " where ";
    query += hql.toString();
    List painAssessmentList = factory.find(query, markers, values);     

    if (painAssessmentList != null && painAssessmentList.size() > 0) 
    {
        ims.nursing.vo.PainAssessmentCollection voPainAssmntColl = PainAssessmentAssembler.createPainAssessmentCollectionFromPainAssessment(painAssessmentList).sort(SortOrder.DESCENDING);
        if(voPainAssmntColl!=null&&voPainAssmntColl.size()>0)
            return voPainAssmntColl.get(0);
    }

    return null;

}
项目:AvoinApotti    文件:Logic.java   
private boolean populateInstance(CareContextShortVo voContext,boolean bListRecords)
{
    clearScreen();

    if (voContext != null)
    {   

        PainAssessmentCollection assmtCollection;
        PainAssessment painAss;


        form.btnNew().setEnabled(false);
        form.btnNext().setEnabled(false);
        form.btnPrevious().setEnabled(false);

        //List the assessment if they were not listed before.
        if(bListRecords || form.getLocalContext().getPainAssessments() == null)
        { 
            assmtCollection = domain.listPain(voContext);
            assmtCollection.sort(SortOrder.DESCENDING);
            form.getLocalContext().setPainAssessments(assmtCollection);
        }
        else
        {
            //Get the assessment from the context
            assmtCollection = form.getLocalContext().getPainAssessments();
        }

        if(assmtCollection != null)
        {
            for(int i=0; i<assmtCollection.size(); i++)
            {
                painAss = assmtCollection.get(i); 
                //Assessment Date/Time
                if(painAss.getDateTimeInitiated() != null && painAss.getDateTimeInitiated().getDate() != null && painAss.getDateTimeInitiated().getTime() != null)
                    form.cmbAssessment().newRow(painAss, painAss.getDateTimeInitiated().getDate().toString(DateFormat.STANDARD) + " / " + painAss.getDateTimeInitiated().getTime().toString(TimeFormat.DEFAULT));
            }
        }
        //Set the current value in the combo
        if(form.cmbAssessment().getValues() != null && form.cmbAssessment().getValues().size() > 0)
        {
            //Set the context value or the first
            if(form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO() != null)
                form.cmbAssessment().setValue(form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO());
            else
                form.cmbAssessment().setValue((PainAssessment)form.cmbAssessment().getValues().get(0));

            if(form.cmbAssessment().getValue() != null)
                refreshSite();
        }
    }

    return true;
}
项目:AvoinApotti    文件:PainReviewImpl.java   
/**
 * list Pain
 */
public PainAssessmentCollection listPain(CareContextRefVo voCurrentCareContext)
{
    PainBodyChart body = (PainBodyChart)getDomainImpl(PainBodyChartImpl.class);
    return body.listPain(voCurrentCareContext);
}
项目:openMAXIMS    文件:Logic.java   
private boolean populateInstance(CareContextShortVo voContext,boolean bListRecords)
{
    clearScreen();

    if (voContext != null)
    {   

        PainAssessmentCollection assmtCollection;
        PainAssessment painAss;


        form.btnNew().setEnabled(false);
        form.btnNext().setEnabled(false);
        form.btnPrevious().setEnabled(false);

        //List the assessment if they were not listed before.
        if(bListRecords || form.getLocalContext().getPainAssessments() == null)
        { 
            assmtCollection = domain.listPain(voContext);
            assmtCollection.sort(SortOrder.DESCENDING);
            form.getLocalContext().setPainAssessments(assmtCollection);
        }
        else
        {
            //Get the assessment from the context
            assmtCollection = form.getLocalContext().getPainAssessments();
        }

        if(assmtCollection != null)
        {
            for(int i=0; i<assmtCollection.size(); i++)
            {
                painAss = assmtCollection.get(i); 
                //Assessment Date/Time
                if(painAss.getDateTimeInitiated() != null && painAss.getDateTimeInitiated().getDate() != null && painAss.getDateTimeInitiated().getTime() != null)
                    form.cmbAssessment().newRow(painAss, painAss.getDateTimeInitiated().getDate().toString(DateFormat.STANDARD) + " / " + painAss.getDateTimeInitiated().getTime().toString(TimeFormat.DEFAULT));
            }
        }
        //Set the current value in the combo
        if(form.cmbAssessment().getValues() != null && form.cmbAssessment().getValues().size() > 0)
        {
            //Set the context value or the first
            if(form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO() != null)
                form.cmbAssessment().setValue(form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO());
            else
                form.cmbAssessment().setValue((PainAssessment)form.cmbAssessment().getValues().get(0));

            if(form.cmbAssessment().getValue() != null)
                refreshSite();
        }
    }

    return true;
}
项目:openMAXIMS    文件:PainReviewImpl.java   
/**
 * list Pain
 */
public PainAssessmentCollection listPain(CareContextRefVo voCurrentCareContext)
{
    PainBodyChart body = (PainBodyChart)getDomainImpl(PainBodyChartImpl.class);
    return body.listPain(voCurrentCareContext);
}
项目:openMAXIMS    文件:Logic.java   
private boolean populateInstance(CareContextShortVo voContext,boolean bListRecords)
{
    clearScreen();

    if (voContext != null)
    {   

        PainAssessmentCollection assmtCollection;
        PainAssessment painAss;


        form.btnNew().setEnabled(false);
        form.btnNext().setEnabled(false);
        form.btnPrevious().setEnabled(false);

        //List the assessment if they were not listed before.
        if(bListRecords || form.getLocalContext().getPainAssessments() == null)
        { 
            assmtCollection = domain.listPain(voContext);
            assmtCollection.sort(SortOrder.DESCENDING);
            form.getLocalContext().setPainAssessments(assmtCollection);
        }
        else
        {
            //Get the assessment from the context
            assmtCollection = form.getLocalContext().getPainAssessments();
        }

        if(assmtCollection != null)
        {
            for(int i=0; i<assmtCollection.size(); i++)
            {
                painAss = assmtCollection.get(i); 
                //Assessment Date/Time
                if(painAss.getDateTimeInitiated() != null && painAss.getDateTimeInitiated().getDate() != null && painAss.getDateTimeInitiated().getTime() != null)
                    form.cmbAssessment().newRow(painAss, painAss.getDateTimeInitiated().getDate().toString(DateFormat.STANDARD) + " / " + painAss.getDateTimeInitiated().getTime().toString(TimeFormat.DEFAULT));
            }
        }
        //Set the current value in the combo
        if(form.cmbAssessment().getValues() != null && form.cmbAssessment().getValues().size() > 0)
        {
            //Set the context value or the first
            if(form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO() != null)
                form.cmbAssessment().setValue(form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO());
            else
                form.cmbAssessment().setValue((PainAssessment)form.cmbAssessment().getValues().get(0));

            if(form.cmbAssessment().getValue() != null)
                refreshSite();
        }
    }

    return true;
}
项目:openMAXIMS    文件:PainReviewImpl.java   
/**
 * list Pain
 */
public PainAssessmentCollection listPain(CareContextRefVo voCurrentCareContext)
{
    PainBodyChart body = (PainBodyChart)getDomainImpl(PainBodyChartImpl.class);
    return body.listPain(voCurrentCareContext);
}
项目:openmaxims-linux    文件:Logic.java   
private boolean populateInstance(CareContextShortVo voContext,boolean bListRecords)
{
    clearScreen();

    if (voContext != null)
    {   

        PainAssessmentCollection assmtCollection;
        PainAssessment painAss;


        form.btnNew().setEnabled(false);
        form.btnNext().setEnabled(false);
        form.btnPrevious().setEnabled(false);

        //List the assessment if they were not listed before.
        if(bListRecords || form.getLocalContext().getPainAssessments() == null)
        { 
            assmtCollection = domain.listPain(voContext);
            assmtCollection.sort(SortOrder.DESCENDING);
            form.getLocalContext().setPainAssessments(assmtCollection);
        }
        else
        {
            //Get the assessment from the context
            assmtCollection = form.getLocalContext().getPainAssessments();
        }

        if(assmtCollection != null)
        {
            for(int i=0; i<assmtCollection.size(); i++)
            {
                painAss = assmtCollection.get(i); 
                //Assessment Date/Time
                if(painAss.getDateTimeInitiated() != null && painAss.getDateTimeInitiated().getDate() != null && painAss.getDateTimeInitiated().getTime() != null)
                    form.cmbAssessment().newRow(painAss, painAss.getDateTimeInitiated().getDate().toString(DateFormat.STANDARD) + " / " + painAss.getDateTimeInitiated().getTime().toString(TimeFormat.DEFAULT));
            }
        }
        //Set the current value in the combo
        if(form.cmbAssessment().getValues() != null && form.cmbAssessment().getValues().size() > 0)
        {
            //Set the context value or the first
            if(form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO() != null)
                form.cmbAssessment().setValue(form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO());
            else
                form.cmbAssessment().setValue((PainAssessment)form.cmbAssessment().getValues().get(0));

            if(form.cmbAssessment().getValue() != null)
                refreshSite();
        }
    }

    return true;
}
项目:openmaxims-linux    文件:PainReviewImpl.java   
/**
 * list Pain
 */
public PainAssessmentCollection listPain(CareContextRefVo voCurrentCareContext)
{
    PainBodyChart body = (PainBodyChart)getDomainImpl(PainBodyChartImpl.class);
    return body.listPain(voCurrentCareContext);
}