Java 类ims.core.vo.domain.CareContextListVoAssembler 实例源码

项目:AvoinApotti    文件:DocumentGenerationImpl.java   
public CareContextListVo getCareContextList(Integer id)
{
    if(id == null)
        throw new CodingRuntimeException("null id passed to getCareContextList !");

    DomainFactory factory = getDomainFactory();
    CareContext  boCareContext = (CareContext)factory.getDomainObject(CareContext.class, id);

    return CareContextListVoAssembler.create(boCareContext);
}
项目:AvoinApotti    文件:ClinicalNoteDrawingImpl.java   
public ims.core.vo.CareContextListVo getCareContextShort(Integer id)
{
    if(id != null)
    {
        DomainFactory factory = getDomainFactory();
        CareContext doCareContext = (CareContext)factory.getDomainObject(CareContext.class, id);
        return CareContextListVoAssembler.create(doCareContext);
    }
    return null;
}
项目:openMAXIMS    文件:DocumentGenerationImpl.java   
public CareContextListVo getCareContextList(Integer id)
{
    if(id == null)
        throw new CodingRuntimeException("null id passed to getCareContextList !");

    DomainFactory factory = getDomainFactory();
    CareContext  boCareContext = (CareContext)factory.getDomainObject(CareContext.class, id);

    return CareContextListVoAssembler.create(boCareContext);
}
项目:openMAXIMS    文件:ClinicalNoteDrawingImpl.java   
public ims.core.vo.CareContextListVo getCareContextShort(Integer id)
{
    if(id != null)
    {
        DomainFactory factory = getDomainFactory();
        CareContext doCareContext = (CareContext)factory.getDomainObject(CareContext.class, id);
        return CareContextListVoAssembler.create(doCareContext);
    }
    return null;
}
项目:openMAXIMS    文件:DocumentGenerationImpl.java   
public CareContextListVo getCareContextList(Integer id)
{
    if(id == null)
        throw new CodingRuntimeException("null id passed to getCareContextList !");

    DomainFactory factory = getDomainFactory();
    CareContext  boCareContext = (CareContext)factory.getDomainObject(CareContext.class, id);

    return CareContextListVoAssembler.create(boCareContext);
}
项目:openMAXIMS    文件:ClinicalNoteDrawingImpl.java   
public ims.core.vo.CareContextListVo getCareContextShort(Integer id)
{
    if(id != null)
    {
        DomainFactory factory = getDomainFactory();
        CareContext doCareContext = (CareContext)factory.getDomainObject(CareContext.class, id);
        return CareContextListVoAssembler.create(doCareContext);
    }
    return null;
}
项目:openmaxims-linux    文件:DocumentGenerationImpl.java   
public CareContextListVo getCareContextList(Integer id)
{
    if(id == null)
        throw new CodingRuntimeException("null id passed to getCareContextList !");

    DomainFactory factory = getDomainFactory();
    CareContext  boCareContext = (CareContext)factory.getDomainObject(CareContext.class, id);

    return CareContextListVoAssembler.create(boCareContext);
}
项目:openmaxims-linux    文件:ClinicalNoteDrawingImpl.java   
public ims.core.vo.CareContextListVo getCareContextShort(Integer id)
{
    if(id != null)
    {
        DomainFactory factory = getDomainFactory();
        CareContext doCareContext = (CareContext)factory.getDomainObject(CareContext.class, id);
        return CareContextListVoAssembler.create(doCareContext);
    }
    return null;
}
项目:AvoinApotti    文件:InpatientListwithICPActionsImpl.java   
/**
 * WDEV-12481
 * Function used to retrieve the InpatientEpisodes and associated ICP info for the referral
 * the inpatient episode was created for.
 */
public InpatientEpisodeWithICPInfoVoCollection listIPEpisodes(IPandOPSearchCriteriaVo searchCriteria) 
{
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    StringBuffer querry = new StringBuffer();

    querry.append("select inpatient, icp, context ");
    querry.append("from PatientICP as icp right join icp.careContext as context right join context.pasEvent as pas1, ");
    querry.append("InpatientEpisode as inpatient left join inpatient.pasEvent as inppas left join inppas.location as inploc ");
    querry.append("where pas1.id = inppas.id");

    if (searchCriteria.getConsultantIsNotNull() && searchCriteria.getConsultant().getIMosHcpId() != null)
    {
        querry.append(" and inppas.consultant.id = :CONS");
        markers.add("CONS");
        values.add(searchCriteria.getConsultant().getIMosHcpId());
    }

    if (searchCriteria.getWardIsNotNull())
    {
        querry.append(" and inploc.id = :WARD");
        markers.add("WARD");
        values.add(searchCriteria.getWard().getID_Location());
    }
    else if (searchCriteria.getHospitalIsNotNull())
    {
        querry.append(" and inploc.parentLocation.id = :HOSPITAL");
        markers.add("HOSPITAL");
        values.add(searchCriteria.getHospital().getID_Location());
    }

    //WDEV-12965 querry.append(" and icp.completedDateTime is null");


    @SuppressWarnings("rawtypes")
    List results = getDomainFactory().find(querry.toString(), markers, values);

    // Inpatient Episode
    InpatientEpisodeWithICPInfoVoCollection voColl = new InpatientEpisodeWithICPInfoVoCollection();


    @SuppressWarnings("rawtypes")
    Iterator iterator = results.iterator();

    // Declare the results
    while (iterator.hasNext())
    {
        Object[] next = (Object[]) iterator.next();

        // Create an Inpatient Episode with ICP Info from Object[]
        if (next[0] instanceof InpatientEpisode)
        {
            InpatientEpisodeWithICPInfoVo inpatientEpisodeVo = InpatientEpisodeWithICPInfoVoAssembler.create((InpatientEpisode) next[0]);

            // Add ICP Info if needed
            if (inpatientEpisodeVo != null && next[1] instanceof PatientICP)
                inpatientEpisodeVo.setICPInfo(PatientICPLiteVoAssembler.create((PatientICP) next[1]));

            // Add CareContext
            if (inpatientEpisodeVo != null && next[2] instanceof CareContext)
                inpatientEpisodeVo.setCareContext(CareContextListVoAssembler.create((CareContext) next[2]));

            voColl.add(inpatientEpisodeVo);
        }
    }


    if (voColl.size() > 0)
        return voColl;

    return null;
}
项目:openMAXIMS    文件:InpatientListwithICPActionsImpl.java   
/**
 * WDEV-12481
 * Function used to retrieve the InpatientEpisodes and associated ICP info for the referral
 * the inpatient episode was created for.
 */
public InpatientEpisodeWithICPInfoVoCollection listIPEpisodes(IPandOPSearchCriteriaVo searchCriteria) 
{
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    StringBuffer querry = new StringBuffer();

    querry.append("select inpatient, icp, context ");
    querry.append("from PatientICP as icp right join icp.careContext as context right join context.pasEvent as pas1, ");
    querry.append("InpatientEpisode as inpatient left join inpatient.pasEvent as inppas left join inppas.location as inploc ");
    querry.append("where pas1.id = inppas.id");

    if (searchCriteria.getConsultantIsNotNull() && searchCriteria.getConsultant().getIMosHcpId() != null)
    {
        querry.append(" and inppas.consultant.id = :CONS");
        markers.add("CONS");
        values.add(searchCriteria.getConsultant().getIMosHcpId());
    }

    if (searchCriteria.getWardIsNotNull())
    {
        querry.append(" and inploc.id = :WARD");
        markers.add("WARD");
        values.add(searchCriteria.getWard().getID_Location());
    }
    else if (searchCriteria.getHospitalIsNotNull())
    {
        querry.append(" and inploc.parentLocation.id = :HOSPITAL");
        markers.add("HOSPITAL");
        values.add(searchCriteria.getHospital().getID_Location());
    }

    //WDEV-12965 querry.append(" and icp.completedDateTime is null");


    @SuppressWarnings("rawtypes")
    List results = getDomainFactory().find(querry.toString(), markers, values);

    // Inpatient Episode
    InpatientEpisodeWithICPInfoVoCollection voColl = new InpatientEpisodeWithICPInfoVoCollection();


    @SuppressWarnings("rawtypes")
    Iterator iterator = results.iterator();

    // Declare the results
    while (iterator.hasNext())
    {
        Object[] next = (Object[]) iterator.next();

        // Create an Inpatient Episode with ICP Info from Object[]
        if (next[0] instanceof InpatientEpisode)
        {
            InpatientEpisodeWithICPInfoVo inpatientEpisodeVo = InpatientEpisodeWithICPInfoVoAssembler.create((InpatientEpisode) next[0]);

            // Add ICP Info if needed
            if (inpatientEpisodeVo != null && next[1] instanceof PatientICP)
                inpatientEpisodeVo.setICPInfo(PatientICPLiteVoAssembler.create((PatientICP) next[1]));

            // Add CareContext
            if (inpatientEpisodeVo != null && next[2] instanceof CareContext)
                inpatientEpisodeVo.setCareContext(CareContextListVoAssembler.create((CareContext) next[2]));

            voColl.add(inpatientEpisodeVo);
        }
    }


    if (voColl.size() > 0)
        return voColl;

    return null;
}
项目:openMAXIMS    文件:InpatientListwithICPActionsImpl.java   
/**
 * WDEV-12481
 * Function used to retrieve the InpatientEpisodes and associated ICP info for the referral
 * the inpatient episode was created for.
 */
public InpatientEpisodeWithICPInfoVoCollection listIPEpisodes(IPandOPSearchCriteriaVo searchCriteria) 
{
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    StringBuffer querry = new StringBuffer();

    querry.append("select inpatient, icp, context ");
    querry.append("from PatientICP as icp right join icp.careContext as context right join context.pasEvent as pas1, ");
    querry.append("InpatientEpisode as inpatient left join inpatient.pasEvent as inppas left join inppas.location as inploc ");
    querry.append("where pas1.id = inppas.id");

    if (searchCriteria.getConsultantIsNotNull() && searchCriteria.getConsultant().getIMosHcpId() != null)
    {
        querry.append(" and inppas.consultant.id = :CONS");
        markers.add("CONS");
        values.add(searchCriteria.getConsultant().getIMosHcpId());
    }

    if (searchCriteria.getWardIsNotNull())
    {
        querry.append(" and inploc.id = :WARD");
        markers.add("WARD");
        values.add(searchCriteria.getWard().getID_Location());
    }
    else if (searchCriteria.getHospitalIsNotNull())
    {
        querry.append(" and inploc.parentLocation.id = :HOSPITAL");
        markers.add("HOSPITAL");
        values.add(searchCriteria.getHospital().getID_Location());
    }

    //WDEV-12965 querry.append(" and icp.completedDateTime is null");


    @SuppressWarnings("rawtypes")
    List results = getDomainFactory().find(querry.toString(), markers, values);

    // Inpatient Episode
    InpatientEpisodeWithICPInfoVoCollection voColl = new InpatientEpisodeWithICPInfoVoCollection();


    @SuppressWarnings("rawtypes")
    Iterator iterator = results.iterator();

    // Declare the results
    while (iterator.hasNext())
    {
        Object[] next = (Object[]) iterator.next();

        // Create an Inpatient Episode with ICP Info from Object[]
        if (next[0] instanceof InpatientEpisode)
        {
            InpatientEpisodeWithICPInfoVo inpatientEpisodeVo = InpatientEpisodeWithICPInfoVoAssembler.create((InpatientEpisode) next[0]);

            // Add ICP Info if needed
            if (inpatientEpisodeVo != null && next[1] instanceof PatientICP)
                inpatientEpisodeVo.setICPInfo(PatientICPLiteVoAssembler.create((PatientICP) next[1]));

            // Add CareContext
            if (inpatientEpisodeVo != null && next[2] instanceof CareContext)
                inpatientEpisodeVo.setCareContext(CareContextListVoAssembler.create((CareContext) next[2]));

            voColl.add(inpatientEpisodeVo);
        }
    }


    if (voColl.size() > 0)
        return voColl;

    return null;
}
项目:openmaxims-linux    文件:InpatientListwithICPActionsImpl.java   
/**
 * WDEV-12481
 * Function used to retrieve the InpatientEpisodes and associated ICP info for the referral
 * the inpatient episode was created for.
 */
public InpatientEpisodeWithICPInfoVoCollection listIPEpisodes(IPandOPSearchCriteriaVo searchCriteria) 
{
    ArrayList<String> markers = new ArrayList<String>();
    ArrayList<Object> values = new ArrayList<Object>();

    StringBuffer querry = new StringBuffer();

    querry.append("select inpatient, icp, context ");
    querry.append("from PatientICP as icp right join icp.careContext as context right join context.pasEvent as pas1, ");
    querry.append("InpatientEpisode as inpatient left join inpatient.pasEvent as inppas left join inppas.location as inploc ");
    querry.append("where pas1.id = inppas.id");

    if (searchCriteria.getConsultantIsNotNull() && searchCriteria.getConsultant().getIMosHcpId() != null)
    {
        querry.append(" and inppas.consultant.id = :CONS");
        markers.add("CONS");
        values.add(searchCriteria.getConsultant().getIMosHcpId());
    }

    if (searchCriteria.getWardIsNotNull())
    {
        querry.append(" and inploc.id = :WARD");
        markers.add("WARD");
        values.add(searchCriteria.getWard().getID_Location());
    }
    else if (searchCriteria.getHospitalIsNotNull())
    {
        querry.append(" and inploc.parentLocation.id = :HOSPITAL");
        markers.add("HOSPITAL");
        values.add(searchCriteria.getHospital().getID_Location());
    }

    //WDEV-12965 querry.append(" and icp.completedDateTime is null");


    @SuppressWarnings("rawtypes")
    List results = getDomainFactory().find(querry.toString(), markers, values);

    // Inpatient Episode
    InpatientEpisodeWithICPInfoVoCollection voColl = new InpatientEpisodeWithICPInfoVoCollection();


    @SuppressWarnings("rawtypes")
    Iterator iterator = results.iterator();

    // Declare the results
    while (iterator.hasNext())
    {
        Object[] next = (Object[]) iterator.next();

        // Create an Inpatient Episode with ICP Info from Object[]
        if (next[0] instanceof InpatientEpisode)
        {
            InpatientEpisodeWithICPInfoVo inpatientEpisodeVo = InpatientEpisodeWithICPInfoVoAssembler.create((InpatientEpisode) next[0]);

            // Add ICP Info if needed
            if (inpatientEpisodeVo != null && next[1] instanceof PatientICP)
                inpatientEpisodeVo.setICPInfo(PatientICPLiteVoAssembler.create((PatientICP) next[1]));

            // Add CareContext
            if (inpatientEpisodeVo != null && next[2] instanceof CareContext)
                inpatientEpisodeVo.setCareContext(CareContextListVoAssembler.create((CareContext) next[2]));

            voColl.add(inpatientEpisodeVo);
        }
    }


    if (voColl.size() > 0)
        return voColl;

    return null;
}