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 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:openMAXIMS
作者:
评论列表
文章目录