static void UpdateDemographics(Participant p, ParticipantListItemViewModel vm) { vm.AgeDays = (DateTime.Now - p.DateTimeBirth).Days; //to do - inform ageUpdatingService vm.DateTimeBirth = p.DateTimeBirth; vm.IsMale = p.IsMale; vm.Name = p.Name; vm.RegisteredAt = p.RegisteredAt; vm.HospitalIdentifier = p.HospitalIdentifier; vm.RegisteredAt = p.RegisteredAt; if (vm is ParticipantProgressViewModel sp) { sp.PhoneNumber = p.PhoneNumber; sp.MothersName = p.MothersName; sp.AdmissionWeight = p.AdmissionWeight; } }