Java 类ims.clinical.vo.domain.SoapNoteShortVoAssembler 实例源码

项目:AvoinApotti    文件:ContactAonSummImpl.java   
public AreaOfNeedCollection getAreaOfNeeds(ClinicalContactShortVo voClinicalContact)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer();
    String query = "from SoapNote sn where";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if(voClinicalContact != null)
    {
        hql.append(" sn.clinicalContact.id = :cc");
        markers.add("cc");
        values.add(voClinicalContact.getID_ClinicalContact());
        andStr = " and ";
    }

    hql.append(andStr + " sn.areaofNeed.size > 0");

    query += hql.toString();

    List AreaList = factory.find(query, markers, values);
    //if(AreaList.size() == 1)
    //  return SoapNoteShortVoAssembler.createSoapNoteShortVoCollectionFromSoapNote(AreaList).get(0).getAreaofNeed();

    SoapNoteShortVoCollection tempVoCol = SoapNoteShortVoAssembler.createSoapNoteShortVoCollectionFromSoapNote(AreaList);
    if(tempVoCol.size() == 1)
        return tempVoCol.get(0).getAreaofNeed();

    return null;
}
项目:openMAXIMS    文件:ContactAonSummImpl.java   
public AreaOfNeedCollection getAreaOfNeeds(ClinicalContactShortVo voClinicalContact)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer();
    String query = "from SoapNote sn where";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if(voClinicalContact != null)
    {
        hql.append(" sn.clinicalContact.id = :cc");
        markers.add("cc");
        values.add(voClinicalContact.getID_ClinicalContact());
        andStr = " and ";
    }

    hql.append(andStr + " sn.areaofNeed.size > 0");

    query += hql.toString();

    List AreaList = factory.find(query, markers, values);
    //if(AreaList.size() == 1)
    //  return SoapNoteShortVoAssembler.createSoapNoteShortVoCollectionFromSoapNote(AreaList).get(0).getAreaofNeed();

    SoapNoteShortVoCollection tempVoCol = SoapNoteShortVoAssembler.createSoapNoteShortVoCollectionFromSoapNote(AreaList);
    if(tempVoCol.size() == 1)
        return tempVoCol.get(0).getAreaofNeed();

    return null;
}
项目:openMAXIMS    文件:ContactAonSummImpl.java   
public AreaOfNeedCollection getAreaOfNeeds(ClinicalContactShortVo voClinicalContact)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer();
    String query = "from SoapNote sn where";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if(voClinicalContact != null)
    {
        hql.append(" sn.clinicalContact.id = :cc");
        markers.add("cc");
        values.add(voClinicalContact.getID_ClinicalContact());
        andStr = " and ";
    }

    hql.append(andStr + " sn.areaofNeed.size > 0");

    query += hql.toString();

    List AreaList = factory.find(query, markers, values);
    //if(AreaList.size() == 1)
    //  return SoapNoteShortVoAssembler.createSoapNoteShortVoCollectionFromSoapNote(AreaList).get(0).getAreaofNeed();

    SoapNoteShortVoCollection tempVoCol = SoapNoteShortVoAssembler.createSoapNoteShortVoCollectionFromSoapNote(AreaList);
    if(tempVoCol.size() == 1)
        return tempVoCol.get(0).getAreaofNeed();

    return null;
}
项目:openmaxims-linux    文件:ContactAonSummImpl.java   
public AreaOfNeedCollection getAreaOfNeeds(ClinicalContactShortVo voClinicalContact)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer();
    String query = "from SoapNote sn where";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if(voClinicalContact != null)
    {
        hql.append(" sn.clinicalContact.id = :cc");
        markers.add("cc");
        values.add(voClinicalContact.getID_ClinicalContact());
        andStr = " and ";
    }

    hql.append(andStr + " sn.areaofNeed.size > 0");

    query += hql.toString();

    List AreaList = factory.find(query, markers, values);
    //if(AreaList.size() == 1)
    //  return SoapNoteShortVoAssembler.createSoapNoteShortVoCollectionFromSoapNote(AreaList).get(0).getAreaofNeed();

    SoapNoteShortVoCollection tempVoCol = SoapNoteShortVoAssembler.createSoapNoteShortVoCollectionFromSoapNote(AreaList);
    if(tempVoCol.size() == 1)
        return tempVoCol.get(0).getAreaofNeed();

    return null;
}