java类ims.core.vo.MedicWithLocationsVoCollection的实例源码

HcpAdminImpl.java 文件源码 项目:AvoinApotti 阅读 22 收藏 0 点赞 0 评论 0
public MedicWithLocationsVoCollection listMedicsForLocation(LocationRefVo location) 
{
    DomainFactory factory = getDomainFactory();
    java.util.List medics = null;
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

    String hql =  "select distinct mos, hcpLoc.accreditationStatus " + 
    " from MemberOfStaff as mos left join mos.hcp as hcp left join mos.locations as hcpLoc " +
    " where (hcpLoc.location.id = :idLocation and mos.isActive = :isActive and hcp.hcpType = :medical)";

    medics = factory.find(hql, new String[]{"idLocation","isActive", "medical"}, new Object[]{location.getID_Location(), Boolean.TRUE, getDomLookup(HcpDisType.MEDICAL)});

    MedicWithLocationsVoCollection voCollMedic = new MedicWithLocationsVoCollection();
    Iterator it = medics.iterator();
    while(it.hasNext())
    {
        MedicWithLocationsVo voMedicWithLoc = new MedicWithLocationsVo();
        Object[] lstItem = (Object[]) it.next();

        MemberOfStaff doMos = (MemberOfStaff) lstItem[0];

        MemberOfStaffVo voMos = new MemberOfStaffVo();
        MedicVo voMedic = new MedicVo();
        voMos.setID_MemberOfStaff(doMos.getId());
        voMedic.setID_Hcp(doMos.getHcp().getId());

        ims.core.vo.PersonName pn = new ims.core.vo.PersonName();
        pn.setForename(doMos.getName().getForename());
        pn.setSurname(doMos.getName().getSurname());
        pn.setMiddleName(doMos.getName().getMiddleName());
        if (doMos.getName().getTitle() != null)
            pn.setTitle(LookupHelper.getPersonTitleInstance(getLookupService(),doMos.getName().getTitle().getId()));
        voMos.setName(pn);
        voMedic.setMos(voMos);
        voMedicWithLoc.setMedicVo(voMedic);
        voMedicWithLoc.setAccreditationStatus(createAccreditationLookupInstance((LookupInstance)lstItem[1]));

        voCollMedic.add(voMedicWithLoc);
    }
    return voCollMedic.sort();  
}
HcpAdminImpl.java 文件源码 项目:AvoinApotti 阅读 18 收藏 0 点赞 0 评论 0
public MedicWithLocationsVoCollection listMedicsForLocation(LocationRefVo location, CaseType caseType) 
{
    DomainFactory factory = getDomainFactory();
    java.util.List medics = null;
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

    String hql =  "select distinct mos, hcpLoc.accreditationStatus " + 
    " from MemberOfStaff as mos left join mos.hcp as hcp left join mos.locations as hcpLoc ";
    if (caseType != null)
        hql += " left join hcpLoc.caseTypes as casTyp "; 

    hql += " where (hcpLoc.location.id = :idLocation and mos.isActive = :isActive and hcp.hcpType = :medical ";

    if (caseType != null)
        hql += " and ( hcpLoc.accreditationStatus in (:id1, :id4, :id5, :id6) or (casTyp.instance = :caseType and hcpLoc.accreditationStatus in (:id2, :id3) ) )";
    else
        hql += "and hcpLoc.accreditationStatus in (:accredStat, :id4, :id5, :id6)";
    hql += ")";

    if (caseType != null)
        medics = factory.find(hql, new String[]{"idLocation","isActive", "medical", "caseType", "id1", "id2", "id3", "id4", "id5", "id6"}, 
                new Object[]{location.getID_Location(), Boolean.TRUE, getDomLookup(HcpDisType.MEDICAL), 
                getDomLookup(caseType), getDomLookup(AccreditationLocationStatus.ACCREDITED), 
                getDomLookup(AccreditationLocationStatus.RESTICT_ACCRED), 
                getDomLookup(AccreditationLocationStatus.RESTRICT_ACCRED_REFERRING),
                getDomLookup(AccreditationLocationStatus.ACCREDITATIONSUSPENDED), getDomLookup(AccreditationLocationStatus.NOTACCREDITED), 
                getDomLookup(AccreditationLocationStatus.REFERRINGCONSULTANT)});
    else
        medics = factory.find(hql, new String[]{"idLocation","isActive", "medical", "accredStat", "id4", "id5", "id6" }, 
                new Object[]{location.getID_Location(), Boolean.TRUE, getDomLookup(HcpDisType.MEDICAL), 
                getDomLookup(AccreditationLocationStatus.ACCREDITED), 
                getDomLookup(AccreditationLocationStatus.ACCREDITATIONSUSPENDED), getDomLookup(AccreditationLocationStatus.NOTACCREDITED), 
                getDomLookup(AccreditationLocationStatus.REFERRINGCONSULTANT)});

    MedicWithLocationsVoCollection voCollMedic = new MedicWithLocationsVoCollection();
    Iterator it = medics.iterator();
    while(it.hasNext())
    {
        MedicWithLocationsVo voMedicWithLoc = new MedicWithLocationsVo();
        Object[] lstItem = (Object[]) it.next();

        MemberOfStaff doMos = (MemberOfStaff) lstItem[0];

        MemberOfStaffVo voMos = new MemberOfStaffVo();
        MedicVo voMedic = new MedicVo();
        voMos.setID_MemberOfStaff(doMos.getId());
        voMedic.setID_Hcp(doMos.getHcp().getId());

        ims.core.vo.PersonName pn = new ims.core.vo.PersonName();
        pn.setForename(doMos.getName().getForename());
        pn.setSurname(doMos.getName().getSurname());
        pn.setMiddleName(doMos.getName().getMiddleName());
        if (doMos.getName().getTitle() != null)
            pn.setTitle(LookupHelper.getPersonTitleInstance(getLookupService(),doMos.getName().getTitle().getId()));
        voMos.setName(pn);
        voMedic.setMos(voMos);
        voMedicWithLoc.setMedicVo(voMedic);
        voMedicWithLoc.setAccreditationStatus(createAccreditationLookupInstance((LookupInstance)lstItem[1]));

        voCollMedic.add(voMedicWithLoc);
    }
    return voCollMedic.sort();  
}
HcpAdminImpl.java 文件源码 项目:AvoinApotti 阅读 23 收藏 0 点赞 0 评论 0
public MedicWithLocationsVoCollection listMedicsForLocation()
{
    // TODO Auto-generated method stub
    return null;
}
HcpAdminImpl.java 文件源码 项目:AvoinApotti 阅读 22 收藏 0 点赞 0 评论 0
public MedicWithLocationsVoCollection listReferringMedicsForLocation(LocationRefVo location)
{
    DomainFactory factory = getDomainFactory();
    java.util.List medics = null;
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

    String hql =  "select distinct mos, hcpLoc.accreditationStatus " + 
    " from MemberOfStaff as mos left join mos.hcp as hcp left join mos.locations as hcpLoc ";
    hql += " where (hcpLoc.location.id = :idLocation and mos.isActive = :isActive and hcp.hcpType = :medical ";
    hql += " and ( hcpLoc.accreditationStatus in (:id1, :id2, :id3) ) )";

    medics = factory.find(hql, new String[]{"idLocation","isActive", "medical", "id1", "id2", "id3"}, new Object[]{location.getID_Location(), Boolean.TRUE, getDomLookup(HcpDisType.MEDICAL), getDomLookup(AccreditationLocationStatus.ACCREDITED), getDomLookup(AccreditationLocationStatus.REFERRINGCONSULTANT), getDomLookup(AccreditationLocationStatus.RESTRICT_ACCRED_REFERRING)});

    MedicWithLocationsVoCollection voCollMedic = new MedicWithLocationsVoCollection();
    Iterator it = medics.iterator();
    while(it.hasNext())
    {
        MedicWithLocationsVo voMedicWithLoc = new MedicWithLocationsVo();
        Object[] lstItem = (Object[]) it.next();

        MemberOfStaff doMos = (MemberOfStaff) lstItem[0];

        MemberOfStaffVo voMos = new MemberOfStaffVo();
        MedicVo voMedic = new MedicVo();
        voMos.setID_MemberOfStaff(doMos.getId());
        voMedic.setID_Hcp(doMos.getHcp().getId());

        ims.core.vo.PersonName pn = new ims.core.vo.PersonName();
        pn.setForename(doMos.getName().getForename());
        pn.setSurname(doMos.getName().getSurname());
        pn.setMiddleName(doMos.getName().getMiddleName());
        if (doMos.getName().getTitle() != null)
            pn.setTitle(LookupHelper.getPersonTitleInstance(getLookupService(),doMos.getName().getTitle().getId()));
        voMos.setName(pn);
        voMedic.setMos(voMos);
        voMedicWithLoc.setMedicVo(voMedic);
        voMedicWithLoc.setAccreditationStatus(createAccreditationLookupInstance((LookupInstance)lstItem[1]));

        voCollMedic.add(voMedicWithLoc);
    }
    return voCollMedic.sort();  
}
HcpAdminImpl.java 文件源码 项目:openMAXIMS 阅读 21 收藏 0 点赞 0 评论 0
public MedicWithLocationsVoCollection listMedicsForLocation(LocationRefVo location) 
{
    DomainFactory factory = getDomainFactory();
    java.util.List medics = null;
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

    String hql =  "select distinct mos, hcpLoc.accreditationStatus " + 
    " from MemberOfStaff as mos left join mos.hcp as hcp left join mos.locations as hcpLoc " +
    " where (hcpLoc.location.id = :idLocation and mos.isActive = :isActive and hcp.hcpType = :medical)";

    medics = factory.find(hql, new String[]{"idLocation","isActive", "medical"}, new Object[]{location.getID_Location(), Boolean.TRUE, getDomLookup(HcpDisType.MEDICAL)});

    MedicWithLocationsVoCollection voCollMedic = new MedicWithLocationsVoCollection();
    Iterator it = medics.iterator();
    while(it.hasNext())
    {
        MedicWithLocationsVo voMedicWithLoc = new MedicWithLocationsVo();
        Object[] lstItem = (Object[]) it.next();

        MemberOfStaff doMos = (MemberOfStaff) lstItem[0];

        MemberOfStaffVo voMos = new MemberOfStaffVo();
        MedicVo voMedic = new MedicVo();
        voMos.setID_MemberOfStaff(doMos.getId());
        voMedic.setID_Hcp(doMos.getHcp().getId());

        ims.core.vo.PersonName pn = new ims.core.vo.PersonName();
        pn.setForename(doMos.getName().getForename());
        pn.setSurname(doMos.getName().getSurname());
        pn.setMiddleName(doMos.getName().getMiddleName());
        if (doMos.getName().getTitle() != null)
            pn.setTitle(LookupHelper.getPersonTitleInstance(getLookupService(),doMos.getName().getTitle().getId()));
        voMos.setName(pn);
        voMedic.setMos(voMos);
        voMedicWithLoc.setMedicVo(voMedic);
        voMedicWithLoc.setAccreditationStatus(createAccreditationLookupInstance((LookupInstance)lstItem[1]));

        voCollMedic.add(voMedicWithLoc);
    }
    return voCollMedic.sort();  
}
HcpAdminImpl.java 文件源码 项目:openMAXIMS 阅读 19 收藏 0 点赞 0 评论 0
public MedicWithLocationsVoCollection listMedicsForLocation(LocationRefVo location, CaseType caseType) 
{
    DomainFactory factory = getDomainFactory();
    java.util.List medics = null;
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

    String hql =  "select distinct mos, hcpLoc.accreditationStatus " + 
    " from MemberOfStaff as mos left join mos.hcp as hcp left join mos.locations as hcpLoc ";
    if (caseType != null)
        hql += " left join hcpLoc.caseTypes as casTyp "; 

    hql += " where (hcpLoc.location.id = :idLocation and mos.isActive = :isActive and hcp.hcpType = :medical ";

    if (caseType != null)
        hql += " and ( hcpLoc.accreditationStatus in (:id1, :id4, :id5, :id6) or (casTyp.instance = :caseType and hcpLoc.accreditationStatus in (:id2, :id3) ) )";
    else
        hql += "and hcpLoc.accreditationStatus in (:accredStat, :id4, :id5, :id6)";
    hql += ")";

    if (caseType != null)
        medics = factory.find(hql, new String[]{"idLocation","isActive", "medical", "caseType", "id1", "id2", "id3", "id4", "id5", "id6"}, 
                new Object[]{location.getID_Location(), Boolean.TRUE, getDomLookup(HcpDisType.MEDICAL), 
                getDomLookup(caseType), getDomLookup(AccreditationLocationStatus.ACCREDITED), 
                getDomLookup(AccreditationLocationStatus.RESTICT_ACCRED), 
                getDomLookup(AccreditationLocationStatus.RESTRICT_ACCRED_REFERRING),
                getDomLookup(AccreditationLocationStatus.ACCREDITATIONSUSPENDED), getDomLookup(AccreditationLocationStatus.NOTACCREDITED), 
                getDomLookup(AccreditationLocationStatus.REFERRINGCONSULTANT)});
    else
        medics = factory.find(hql, new String[]{"idLocation","isActive", "medical", "accredStat", "id4", "id5", "id6" }, 
                new Object[]{location.getID_Location(), Boolean.TRUE, getDomLookup(HcpDisType.MEDICAL), 
                getDomLookup(AccreditationLocationStatus.ACCREDITED), 
                getDomLookup(AccreditationLocationStatus.ACCREDITATIONSUSPENDED), getDomLookup(AccreditationLocationStatus.NOTACCREDITED), 
                getDomLookup(AccreditationLocationStatus.REFERRINGCONSULTANT)});

    MedicWithLocationsVoCollection voCollMedic = new MedicWithLocationsVoCollection();
    Iterator it = medics.iterator();
    while(it.hasNext())
    {
        MedicWithLocationsVo voMedicWithLoc = new MedicWithLocationsVo();
        Object[] lstItem = (Object[]) it.next();

        MemberOfStaff doMos = (MemberOfStaff) lstItem[0];

        MemberOfStaffVo voMos = new MemberOfStaffVo();
        MedicVo voMedic = new MedicVo();
        voMos.setID_MemberOfStaff(doMos.getId());
        voMedic.setID_Hcp(doMos.getHcp().getId());

        ims.core.vo.PersonName pn = new ims.core.vo.PersonName();
        pn.setForename(doMos.getName().getForename());
        pn.setSurname(doMos.getName().getSurname());
        pn.setMiddleName(doMos.getName().getMiddleName());
        if (doMos.getName().getTitle() != null)
            pn.setTitle(LookupHelper.getPersonTitleInstance(getLookupService(),doMos.getName().getTitle().getId()));
        voMos.setName(pn);
        voMedic.setMos(voMos);
        voMedicWithLoc.setMedicVo(voMedic);
        voMedicWithLoc.setAccreditationStatus(createAccreditationLookupInstance((LookupInstance)lstItem[1]));

        voCollMedic.add(voMedicWithLoc);
    }
    return voCollMedic.sort();  
}
HcpAdminImpl.java 文件源码 项目:openMAXIMS 阅读 20 收藏 0 点赞 0 评论 0
public MedicWithLocationsVoCollection listMedicsForLocation()
{
    // TODO Auto-generated method stub
    return null;
}
HcpAdminImpl.java 文件源码 项目:openMAXIMS 阅读 26 收藏 0 点赞 0 评论 0
public MedicWithLocationsVoCollection listReferringMedicsForLocation(LocationRefVo location)
{
    DomainFactory factory = getDomainFactory();
    java.util.List medics = null;
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

    String hql =  "select distinct mos, hcpLoc.accreditationStatus " + 
    " from MemberOfStaff as mos left join mos.hcp as hcp left join mos.locations as hcpLoc ";
    hql += " where (hcpLoc.location.id = :idLocation and mos.isActive = :isActive and hcp.hcpType = :medical ";
    hql += " and ( hcpLoc.accreditationStatus in (:id1, :id2, :id3) ) )";

    medics = factory.find(hql, new String[]{"idLocation","isActive", "medical", "id1", "id2", "id3"}, new Object[]{location.getID_Location(), Boolean.TRUE, getDomLookup(HcpDisType.MEDICAL), getDomLookup(AccreditationLocationStatus.ACCREDITED), getDomLookup(AccreditationLocationStatus.REFERRINGCONSULTANT), getDomLookup(AccreditationLocationStatus.RESTRICT_ACCRED_REFERRING)});

    MedicWithLocationsVoCollection voCollMedic = new MedicWithLocationsVoCollection();
    Iterator it = medics.iterator();
    while(it.hasNext())
    {
        MedicWithLocationsVo voMedicWithLoc = new MedicWithLocationsVo();
        Object[] lstItem = (Object[]) it.next();

        MemberOfStaff doMos = (MemberOfStaff) lstItem[0];

        MemberOfStaffVo voMos = new MemberOfStaffVo();
        MedicVo voMedic = new MedicVo();
        voMos.setID_MemberOfStaff(doMos.getId());
        voMedic.setID_Hcp(doMos.getHcp().getId());

        ims.core.vo.PersonName pn = new ims.core.vo.PersonName();
        pn.setForename(doMos.getName().getForename());
        pn.setSurname(doMos.getName().getSurname());
        pn.setMiddleName(doMos.getName().getMiddleName());
        if (doMos.getName().getTitle() != null)
            pn.setTitle(LookupHelper.getPersonTitleInstance(getLookupService(),doMos.getName().getTitle().getId()));
        voMos.setName(pn);
        voMedic.setMos(voMos);
        voMedicWithLoc.setMedicVo(voMedic);
        voMedicWithLoc.setAccreditationStatus(createAccreditationLookupInstance((LookupInstance)lstItem[1]));

        voCollMedic.add(voMedicWithLoc);
    }
    return voCollMedic.sort();  
}
HcpAdminImpl.java 文件源码 项目:openMAXIMS 阅读 19 收藏 0 点赞 0 评论 0
public MedicWithLocationsVoCollection listMedicsForLocation(LocationRefVo location) 
{
    DomainFactory factory = getDomainFactory();
    java.util.List medics = null;
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

    String hql =  "select distinct mos, hcpLoc.accreditationStatus " + 
    " from MemberOfStaff as mos left join mos.hcp as hcp left join mos.locations as hcpLoc " +
    " where (hcpLoc.location.id = :idLocation and mos.isActive = :isActive and hcp.hcpType = :medical)";

    medics = factory.find(hql, new String[]{"idLocation","isActive", "medical"}, new Object[]{location.getID_Location(), Boolean.TRUE, getDomLookup(HcpDisType.MEDICAL)});

    MedicWithLocationsVoCollection voCollMedic = new MedicWithLocationsVoCollection();
    Iterator it = medics.iterator();
    while(it.hasNext())
    {
        MedicWithLocationsVo voMedicWithLoc = new MedicWithLocationsVo();
        Object[] lstItem = (Object[]) it.next();

        MemberOfStaff doMos = (MemberOfStaff) lstItem[0];

        MemberOfStaffVo voMos = new MemberOfStaffVo();
        MedicVo voMedic = new MedicVo();
        voMos.setID_MemberOfStaff(doMos.getId());
        voMedic.setID_Hcp(doMos.getHcp().getId());

        ims.core.vo.PersonName pn = new ims.core.vo.PersonName();
        pn.setForename(doMos.getName().getForename());
        pn.setSurname(doMos.getName().getSurname());
        pn.setMiddleName(doMos.getName().getMiddleName());
        if (doMos.getName().getTitle() != null)
            pn.setTitle(LookupHelper.getPersonTitleInstance(getLookupService(),doMos.getName().getTitle().getId()));
        voMos.setName(pn);
        voMedic.setMos(voMos);
        voMedicWithLoc.setMedicVo(voMedic);
        voMedicWithLoc.setAccreditationStatus(createAccreditationLookupInstance((LookupInstance)lstItem[1]));

        voCollMedic.add(voMedicWithLoc);
    }
    return voCollMedic.sort();  
}
HcpAdminImpl.java 文件源码 项目:openMAXIMS 阅读 21 收藏 0 点赞 0 评论 0
public MedicWithLocationsVoCollection listMedicsForLocation(LocationRefVo location, CaseType caseType) 
{
    DomainFactory factory = getDomainFactory();
    java.util.List medics = null;
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

    String hql =  "select distinct mos, hcpLoc.accreditationStatus " + 
    " from MemberOfStaff as mos left join mos.hcp as hcp left join mos.locations as hcpLoc ";
    if (caseType != null)
        hql += " left join hcpLoc.caseTypes as casTyp "; 

    hql += " where (hcpLoc.location.id = :idLocation and mos.isActive = :isActive and hcp.hcpType = :medical ";

    if (caseType != null)
        hql += " and ( hcpLoc.accreditationStatus in (:id1, :id4, :id5, :id6) or (casTyp.instance = :caseType and hcpLoc.accreditationStatus in (:id2, :id3) ) )";
    else
        hql += "and hcpLoc.accreditationStatus in (:accredStat, :id4, :id5, :id6)";
    hql += ")";

    if (caseType != null)
        medics = factory.find(hql, new String[]{"idLocation","isActive", "medical", "caseType", "id1", "id2", "id3", "id4", "id5", "id6"}, 
                new Object[]{location.getID_Location(), Boolean.TRUE, getDomLookup(HcpDisType.MEDICAL), 
                getDomLookup(caseType), getDomLookup(AccreditationLocationStatus.ACCREDITED), 
                getDomLookup(AccreditationLocationStatus.RESTICT_ACCRED), 
                getDomLookup(AccreditationLocationStatus.RESTRICT_ACCRED_REFERRING),
                getDomLookup(AccreditationLocationStatus.ACCREDITATIONSUSPENDED), getDomLookup(AccreditationLocationStatus.NOTACCREDITED), 
                getDomLookup(AccreditationLocationStatus.REFERRINGCONSULTANT)});
    else
        medics = factory.find(hql, new String[]{"idLocation","isActive", "medical", "accredStat", "id4", "id5", "id6" }, 
                new Object[]{location.getID_Location(), Boolean.TRUE, getDomLookup(HcpDisType.MEDICAL), 
                getDomLookup(AccreditationLocationStatus.ACCREDITED), 
                getDomLookup(AccreditationLocationStatus.ACCREDITATIONSUSPENDED), getDomLookup(AccreditationLocationStatus.NOTACCREDITED), 
                getDomLookup(AccreditationLocationStatus.REFERRINGCONSULTANT)});

    MedicWithLocationsVoCollection voCollMedic = new MedicWithLocationsVoCollection();
    Iterator it = medics.iterator();
    while(it.hasNext())
    {
        MedicWithLocationsVo voMedicWithLoc = new MedicWithLocationsVo();
        Object[] lstItem = (Object[]) it.next();

        MemberOfStaff doMos = (MemberOfStaff) lstItem[0];

        MemberOfStaffVo voMos = new MemberOfStaffVo();
        MedicVo voMedic = new MedicVo();
        voMos.setID_MemberOfStaff(doMos.getId());
        voMedic.setID_Hcp(doMos.getHcp().getId());

        ims.core.vo.PersonName pn = new ims.core.vo.PersonName();
        pn.setForename(doMos.getName().getForename());
        pn.setSurname(doMos.getName().getSurname());
        pn.setMiddleName(doMos.getName().getMiddleName());
        if (doMos.getName().getTitle() != null)
            pn.setTitle(LookupHelper.getPersonTitleInstance(getLookupService(),doMos.getName().getTitle().getId()));
        voMos.setName(pn);
        voMedic.setMos(voMos);
        voMedicWithLoc.setMedicVo(voMedic);
        voMedicWithLoc.setAccreditationStatus(createAccreditationLookupInstance((LookupInstance)lstItem[1]));

        voCollMedic.add(voMedicWithLoc);
    }
    return voCollMedic.sort();  
}
HcpAdminImpl.java 文件源码 项目:openMAXIMS 阅读 25 收藏 0 点赞 0 评论 0
public MedicWithLocationsVoCollection listMedicsForLocation()
{
    // TODO Auto-generated method stub
    return null;
}
HcpAdminImpl.java 文件源码 项目:openMAXIMS 阅读 23 收藏 0 点赞 0 评论 0
public MedicWithLocationsVoCollection listReferringMedicsForLocation(LocationRefVo location)
{
    DomainFactory factory = getDomainFactory();
    java.util.List medics = null;
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

    String hql =  "select distinct mos, hcpLoc.accreditationStatus " + 
    " from MemberOfStaff as mos left join mos.hcp as hcp left join mos.locations as hcpLoc ";
    hql += " where (hcpLoc.location.id = :idLocation and mos.isActive = :isActive and hcp.hcpType = :medical ";
    hql += " and ( hcpLoc.accreditationStatus in (:id1, :id2, :id3) ) )";

    medics = factory.find(hql, new String[]{"idLocation","isActive", "medical", "id1", "id2", "id3"}, new Object[]{location.getID_Location(), Boolean.TRUE, getDomLookup(HcpDisType.MEDICAL), getDomLookup(AccreditationLocationStatus.ACCREDITED), getDomLookup(AccreditationLocationStatus.REFERRINGCONSULTANT), getDomLookup(AccreditationLocationStatus.RESTRICT_ACCRED_REFERRING)});

    MedicWithLocationsVoCollection voCollMedic = new MedicWithLocationsVoCollection();
    Iterator it = medics.iterator();
    while(it.hasNext())
    {
        MedicWithLocationsVo voMedicWithLoc = new MedicWithLocationsVo();
        Object[] lstItem = (Object[]) it.next();

        MemberOfStaff doMos = (MemberOfStaff) lstItem[0];

        MemberOfStaffVo voMos = new MemberOfStaffVo();
        MedicVo voMedic = new MedicVo();
        voMos.setID_MemberOfStaff(doMos.getId());
        voMedic.setID_Hcp(doMos.getHcp().getId());

        ims.core.vo.PersonName pn = new ims.core.vo.PersonName();
        pn.setForename(doMos.getName().getForename());
        pn.setSurname(doMos.getName().getSurname());
        pn.setMiddleName(doMos.getName().getMiddleName());
        if (doMos.getName().getTitle() != null)
            pn.setTitle(LookupHelper.getPersonTitleInstance(getLookupService(),doMos.getName().getTitle().getId()));
        voMos.setName(pn);
        voMedic.setMos(voMos);
        voMedicWithLoc.setMedicVo(voMedic);
        voMedicWithLoc.setAccreditationStatus(createAccreditationLookupInstance((LookupInstance)lstItem[1]));

        voCollMedic.add(voMedicWithLoc);
    }
    return voCollMedic.sort();  
}
HcpAdminImpl.java 文件源码 项目:openmaxims-linux 阅读 19 收藏 0 点赞 0 评论 0
public MedicWithLocationsVoCollection listMedicsForLocation(LocationRefVo location) 
{
    DomainFactory factory = getDomainFactory();
    java.util.List medics = null;
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

    String hql =  "select distinct mos, hcpLoc.accreditationStatus " + 
    " from MemberOfStaff as mos left join mos.hcp as hcp left join mos.locations as hcpLoc " +
    " where (hcpLoc.location.id = :idLocation and mos.isActive = :isActive and hcp.hcpType = :medical)";

    medics = factory.find(hql, new String[]{"idLocation","isActive", "medical"}, new Object[]{location.getID_Location(), Boolean.TRUE, getDomLookup(HcpDisType.MEDICAL)});

    MedicWithLocationsVoCollection voCollMedic = new MedicWithLocationsVoCollection();
    Iterator it = medics.iterator();
    while(it.hasNext())
    {
        MedicWithLocationsVo voMedicWithLoc = new MedicWithLocationsVo();
        Object[] lstItem = (Object[]) it.next();

        MemberOfStaff doMos = (MemberOfStaff) lstItem[0];

        MemberOfStaffVo voMos = new MemberOfStaffVo();
        MedicVo voMedic = new MedicVo();
        voMos.setID_MemberOfStaff(doMos.getId());
        voMedic.setID_Hcp(doMos.getHcp().getId());

        ims.core.vo.PersonName pn = new ims.core.vo.PersonName();
        pn.setForename(doMos.getName().getForename());
        pn.setSurname(doMos.getName().getSurname());
        pn.setMiddleName(doMos.getName().getMiddleName());
        if (doMos.getName().getTitle() != null)
            pn.setTitle(LookupHelper.getPersonTitleInstance(getLookupService(),doMos.getName().getTitle().getId()));
        voMos.setName(pn);
        voMedic.setMos(voMos);
        voMedicWithLoc.setMedicVo(voMedic);
        voMedicWithLoc.setAccreditationStatus(createAccreditationLookupInstance((LookupInstance)lstItem[1]));

        voCollMedic.add(voMedicWithLoc);
    }
    return voCollMedic.sort();  
}
HcpAdminImpl.java 文件源码 项目:openmaxims-linux 阅读 23 收藏 0 点赞 0 评论 0
public MedicWithLocationsVoCollection listMedicsForLocation(LocationRefVo location, CaseType caseType) 
{
    DomainFactory factory = getDomainFactory();
    java.util.List medics = null;
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

    String hql =  "select distinct mos, hcpLoc.accreditationStatus " + 
    " from MemberOfStaff as mos left join mos.hcp as hcp left join mos.locations as hcpLoc ";
    if (caseType != null)
        hql += " left join hcpLoc.caseTypes as casTyp "; 

    hql += " where (hcpLoc.location.id = :idLocation and mos.isActive = :isActive and hcp.hcpType = :medical ";

    if (caseType != null)
        hql += " and ( hcpLoc.accreditationStatus in (:id1, :id4, :id5, :id6) or (casTyp.instance = :caseType and hcpLoc.accreditationStatus in (:id2, :id3) ) )";
    else
        hql += "and hcpLoc.accreditationStatus in (:accredStat, :id4, :id5, :id6)";
    hql += ")";

    if (caseType != null)
        medics = factory.find(hql, new String[]{"idLocation","isActive", "medical", "caseType", "id1", "id2", "id3", "id4", "id5", "id6"}, 
                new Object[]{location.getID_Location(), Boolean.TRUE, getDomLookup(HcpDisType.MEDICAL), 
                getDomLookup(caseType), getDomLookup(AccreditationLocationStatus.ACCREDITED), 
                getDomLookup(AccreditationLocationStatus.RESTICT_ACCRED), 
                getDomLookup(AccreditationLocationStatus.RESTRICT_ACCRED_REFERRING),
                getDomLookup(AccreditationLocationStatus.ACCREDITATIONSUSPENDED), getDomLookup(AccreditationLocationStatus.NOTACCREDITED), 
                getDomLookup(AccreditationLocationStatus.REFERRINGCONSULTANT)});
    else
        medics = factory.find(hql, new String[]{"idLocation","isActive", "medical", "accredStat", "id4", "id5", "id6" }, 
                new Object[]{location.getID_Location(), Boolean.TRUE, getDomLookup(HcpDisType.MEDICAL), 
                getDomLookup(AccreditationLocationStatus.ACCREDITED), 
                getDomLookup(AccreditationLocationStatus.ACCREDITATIONSUSPENDED), getDomLookup(AccreditationLocationStatus.NOTACCREDITED), 
                getDomLookup(AccreditationLocationStatus.REFERRINGCONSULTANT)});

    MedicWithLocationsVoCollection voCollMedic = new MedicWithLocationsVoCollection();
    Iterator it = medics.iterator();
    while(it.hasNext())
    {
        MedicWithLocationsVo voMedicWithLoc = new MedicWithLocationsVo();
        Object[] lstItem = (Object[]) it.next();

        MemberOfStaff doMos = (MemberOfStaff) lstItem[0];

        MemberOfStaffVo voMos = new MemberOfStaffVo();
        MedicVo voMedic = new MedicVo();
        voMos.setID_MemberOfStaff(doMos.getId());
        voMedic.setID_Hcp(doMos.getHcp().getId());

        ims.core.vo.PersonName pn = new ims.core.vo.PersonName();
        pn.setForename(doMos.getName().getForename());
        pn.setSurname(doMos.getName().getSurname());
        pn.setMiddleName(doMos.getName().getMiddleName());
        if (doMos.getName().getTitle() != null)
            pn.setTitle(LookupHelper.getPersonTitleInstance(getLookupService(),doMos.getName().getTitle().getId()));
        voMos.setName(pn);
        voMedic.setMos(voMos);
        voMedicWithLoc.setMedicVo(voMedic);
        voMedicWithLoc.setAccreditationStatus(createAccreditationLookupInstance((LookupInstance)lstItem[1]));

        voCollMedic.add(voMedicWithLoc);
    }
    return voCollMedic.sort();  
}
HcpAdminImpl.java 文件源码 项目:openmaxims-linux 阅读 22 收藏 0 点赞 0 评论 0
public MedicWithLocationsVoCollection listMedicsForLocation()
{
    // TODO Auto-generated method stub
    return null;
}
HcpAdminImpl.java 文件源码 项目:openmaxims-linux 阅读 24 收藏 0 点赞 0 评论 0
public MedicWithLocationsVoCollection listReferringMedicsForLocation(LocationRefVo location)
{
    DomainFactory factory = getDomainFactory();
    java.util.List medics = null;
    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

    String hql =  "select distinct mos, hcpLoc.accreditationStatus " + 
    " from MemberOfStaff as mos left join mos.hcp as hcp left join mos.locations as hcpLoc ";
    hql += " where (hcpLoc.location.id = :idLocation and mos.isActive = :isActive and hcp.hcpType = :medical ";
    hql += " and ( hcpLoc.accreditationStatus in (:id1, :id2, :id3) ) )";

    medics = factory.find(hql, new String[]{"idLocation","isActive", "medical", "id1", "id2", "id3"}, new Object[]{location.getID_Location(), Boolean.TRUE, getDomLookup(HcpDisType.MEDICAL), getDomLookup(AccreditationLocationStatus.ACCREDITED), getDomLookup(AccreditationLocationStatus.REFERRINGCONSULTANT), getDomLookup(AccreditationLocationStatus.RESTRICT_ACCRED_REFERRING)});

    MedicWithLocationsVoCollection voCollMedic = new MedicWithLocationsVoCollection();
    Iterator it = medics.iterator();
    while(it.hasNext())
    {
        MedicWithLocationsVo voMedicWithLoc = new MedicWithLocationsVo();
        Object[] lstItem = (Object[]) it.next();

        MemberOfStaff doMos = (MemberOfStaff) lstItem[0];

        MemberOfStaffVo voMos = new MemberOfStaffVo();
        MedicVo voMedic = new MedicVo();
        voMos.setID_MemberOfStaff(doMos.getId());
        voMedic.setID_Hcp(doMos.getHcp().getId());

        ims.core.vo.PersonName pn = new ims.core.vo.PersonName();
        pn.setForename(doMos.getName().getForename());
        pn.setSurname(doMos.getName().getSurname());
        pn.setMiddleName(doMos.getName().getMiddleName());
        if (doMos.getName().getTitle() != null)
            pn.setTitle(LookupHelper.getPersonTitleInstance(getLookupService(),doMos.getName().getTitle().getId()));
        voMos.setName(pn);
        voMedic.setMos(voMos);
        voMedicWithLoc.setMedicVo(voMedic);
        voMedicWithLoc.setAccreditationStatus(createAccreditationLookupInstance((LookupInstance)lstItem[1]));

        voCollMedic.add(voMedicWithLoc);
    }
    return voCollMedic.sort();  
}


问题


面经


文章

微信
公众号

扫码关注公众号