private SeenByHCPForTrackingVo assembleSeenBy(SeenByHCPForTrackingVo seenByHcp, ims.core.generic.domain.objects.PersonName hcpNameMedic,ims.core.generic.domain.objects.PersonName hcpNameNurse, Date allocatedHcpDate, Date seenByHcpSeenDate) { if(seenByHcp == null) { seenByHcp = new SeenByHCPForTrackingVo(); } if(hcpNameMedic != null) { if(seenByHcp.getAllocatedMedic() == null) { seenByHcp.setAllocatedMedic(new MedicForTrackingVo()); } if(seenByHcp.getAllocatedMedic().getMos() == null) { seenByHcp.getAllocatedMedic().setMos(new MemberOfStaffLiteVo()); } seenByHcp.getAllocatedMedic().getMos().setName(PersonNameAssembler.create(hcpNameMedic)); } if(hcpNameNurse != null) { if(seenByHcp.getAllocatedNurse() == null) { seenByHcp.setAllocatedNurse(new NurseForTrackingVo()); } if(seenByHcp.getAllocatedNurse().getMos() == null) { seenByHcp.getAllocatedNurse().setMos(new MemberOfStaffLiteVo()); } seenByHcp.getAllocatedNurse().getMos().setName(PersonNameAssembler.create(hcpNameNurse)); } if(allocatedHcpDate != null) { seenByHcp.setAllocatedDateTime(new DateTime(allocatedHcpDate)); } if(seenByHcpSeenDate != null) { seenByHcp.setSeenDateTime(new DateTime(seenByHcpSeenDate)); } return seenByHcp; }