public MedicWithMappingsLiteVo getMedicMedicMappingsByExternalCode(TaxonomyType taxType, String codeVal) { if (taxType == null || codeVal == null) throw new DomainRuntimeException("External Code and type not supplied for Medic"); List hcpList = getDomHcpByExternalCode(taxType, codeVal); if (hcpList != null && hcpList.size() > 0) { Hcp hcp = (Hcp)hcpList.get(0); if (hcp instanceof Medic) { return MedicWithMappingsLiteVoAssembler.create((Medic)hcp); } } return null; }
private MedicWithMappingsLiteVo getMedicWithMappingsLiteVo(HcpRefVo consultant) { DomainFactory factory = getDomainFactory(); if(consultant != null && consultant.getID_HcpIsNotNull()){ DomainObject medic = factory.getDomainObject(Medic.class, consultant.getID_Hcp()); if(medic!=null) return MedicWithMappingsLiteVoAssembler.create((Medic)medic); } return null; }
public MedicWithMappingsLiteVo getMedicWithMappingsLiteVoFromIMos(IMos iMos) { if(iMos == null) return null; DomainFactory factory = getDomainFactory(); MemberOfStaff mos =(MemberOfStaff)factory.getDomainObject(MemberOfStaff.class, iMos.getIMosId()); Hcp hcp = mos.getHcp(); Medic medic = (Medic)factory.getDomainObject(Medic.class, hcp.getId()); return MedicWithMappingsLiteVoAssembler.create(medic); }