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

项目:AvoinApotti    文件:AdmissionAssessOverviewImpl.java   
public AssessmentOverview getAssessmentDetailsByCareContext(CareContextRefVo voCareContextRef)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from AdmissionAssessment t ";
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Integer> values = new ArrayList<Integer>();
    String andStr = " ";

    if (voCareContextRef != null)
    {
        hql.append(andStr + " t.careContext.id = :rcc");
        markers.add("rcc");
        values.add(voCareContextRef.getID_CareContext());
        andStr = " and ";
        hql.append(andStr + " t.isRIE is null");
    }

    if (markers.size() > 0) query += " where ";
    query += hql.toString();

    List assessmentList = factory.find(query, markers, values);     

    if (assessmentList != null && assessmentList.size() > 0) 
    {
        AssessmentOverview voAssmnt = AssessmentOverviewAssembler.create((AdmissionAssessment) assessmentList.get(0));
        return voAssmnt;
    }
    else
    {
        return null;
    }
}
项目:openMAXIMS    文件:AdmissionAssessOverviewImpl.java   
public AssessmentOverview getAssessmentDetailsByCareContext(CareContextRefVo voCareContextRef)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from AdmissionAssessment t ";
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Integer> values = new ArrayList<Integer>();
    String andStr = " ";

    if (voCareContextRef != null)
    {
        hql.append(andStr + " t.careContext.id = :rcc");
        markers.add("rcc");
        values.add(voCareContextRef.getID_CareContext());
        andStr = " and ";
        hql.append(andStr + " t.isRIE is null");
    }

    if (markers.size() > 0) query += " where ";
    query += hql.toString();

    List assessmentList = factory.find(query, markers, values);     

    if (assessmentList != null && assessmentList.size() > 0) 
    {
        AssessmentOverview voAssmnt = AssessmentOverviewAssembler.create((AdmissionAssessment) assessmentList.get(0));
        return voAssmnt;
    }
    else
    {
        return null;
    }
}
项目:openMAXIMS    文件:AdmissionAssessOverviewImpl.java   
public AssessmentOverview getAssessmentDetailsByCareContext(CareContextRefVo voCareContextRef)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from AdmissionAssessment t ";
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Integer> values = new ArrayList<Integer>();
    String andStr = " ";

    if (voCareContextRef != null)
    {
        hql.append(andStr + " t.careContext.id = :rcc");
        markers.add("rcc");
        values.add(voCareContextRef.getID_CareContext());
        andStr = " and ";
        hql.append(andStr + " t.isRIE is null");
    }

    if (markers.size() > 0) query += " where ";
    query += hql.toString();

    List assessmentList = factory.find(query, markers, values);     

    if (assessmentList != null && assessmentList.size() > 0) 
    {
        AssessmentOverview voAssmnt = AssessmentOverviewAssembler.create((AdmissionAssessment) assessmentList.get(0));
        return voAssmnt;
    }
    else
    {
        return null;
    }
}
项目:openmaxims-linux    文件:AdmissionAssessOverviewImpl.java   
public AssessmentOverview getAssessmentDetailsByCareContext(CareContextRefVo voCareContextRef)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from AdmissionAssessment t ";
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Integer> values = new ArrayList<Integer>();
    String andStr = " ";

    if (voCareContextRef != null)
    {
        hql.append(andStr + " t.careContext.id = :rcc");
        markers.add("rcc");
        values.add(voCareContextRef.getID_CareContext());
        andStr = " and ";
        hql.append(andStr + " t.isRIE is null");
    }

    if (markers.size() > 0) query += " where ";
    query += hql.toString();

    List assessmentList = factory.find(query, markers, values);     

    if (assessmentList != null && assessmentList.size() > 0) 
    {
        AssessmentOverview voAssmnt = AssessmentOverviewAssembler.create((AdmissionAssessment) assessmentList.get(0));
        return voAssmnt;
    }
    else
    {
        return null;
    }
}