/// <summary> /// Updates the contact demographics. /// </summary> /// <param name="contact">The contact.</param> /// <returns></returns> public Response <ECIContactDemographicsViewModel> UpdateContactDemographics(ECIContactDemographicsViewModel contact) { string apiUrl = string.Format("{0}{1}", BaseRoute, "UpdateContactDemographics"); var response = _communicationManager.Post <ECIContactDemographicsModel, Response <ECIContactDemographicsModel> >(contact.ToModel(), apiUrl); return(response.ToViewModel()); }
/// <summary> /// To the model. /// </summary> /// <param name="model">The model.</param> /// <returns></returns> public static ECIContactDemographicsModel ToModel(this ECIContactDemographicsViewModel model) { if (model == null) { return(null); } var entity = new ECIContactDemographicsModel { ContactID = model.ContactID, ContactTypeID = model.ContactTypeID, ClientTypeID = model.ClientTypeID, FirstName = model.FirstName, Middle = model.Middle, LastName = model.LastName, SuffixID = model.SuffixID, GenderID = model.GenderID, TitleID = model.TitleID, DOB = model.DOB, SSN = model.SSN, DOBStatusID = model.DOBStatusID, ReferralSourceID = model.ReferralSourceID, SSNStatusID = model.SSNStatusID, PreferredName = model.PreferredName, IsDeceased = model.IsDeceased, DeceasedDate = model.DeceasedDate, CauseOfDeath = model.CauseOfDeath, ContactMethodID = model.ContactMethodID, MRN = model.MRN, //List Item Addresses = model.Addresses, Emails = model.Emails, Phones = model.Phones, ClientAlternateIDs = model.ClientAlternateIDs, ContactPresentingProblem = model.ContactPresentingProblem, GestationalAge = model.GestationalAge, ModifiedOn = model.ModifiedOn, TransactionID = model.TransactionID, ScreenID = model.ScreenID, isContactNotDirty = model.isContactNotDirty }; return(entity); }
public Response <ECIContactDemographicsViewModel> UpdateContactDemographics(ECIContactDemographicsViewModel contact) { return(_eciDemographicRepository.UpdateContactDemographics(contact)); }