public PersonDetails ConvertToSource(ProfileModel model)
 {
     return new PersonDetails
            {
                DOB = model.DOB,
                FirstName = model.FirstName,
                LastName = model.LastName,
                MiddleName = model.MiddleName,
                Sex = model.IsMale ? Sex.Male : Sex.Female
            };
 }
 public PatientEditModel()
 {
     Contact = new ContactModel();
     Profile = new ProfileModel();
     CurrentAgent = string.IsNullOrEmpty(CurrentAgent) ? HttpContext.Current.User.Identity.Name : CurrentAgent;
 }