public Response <ContactAllergyViewModel> UpdateAllergy(ContactAllergyViewModel allergy) { string apiUrl = BaseRoute + "UpdateAllergy"; var response = _communicationManager.Put <ContactAllergyModel, Response <ContactAllergyModel> >(allergy.ToModel(), apiUrl); return(response.ToModel()); }
public static ContactAllergyViewModel ToViewModel(this ContactAllergyModel entity) { if (entity == null) { return(null); } var model = new ContactAllergyViewModel { EncounterID = entity.EncounterID, ContactID = entity.ContactID, ContactAllergyID = entity.ContactAllergyID, AllergyTypeID = entity.AllergyTypeID, NoKnownAllergy = entity.NoKnownAllergy, TakenBy = entity.TakenBy, TakenTime = entity.TakenTime, ModifiedOn = entity.ModifiedOn }; return(model); }
public Response <ContactAllergyViewModel> UpdateAllergy(ContactAllergyViewModel allergy) { allergy.TakenTime = allergy.TakenTime.ToUniversalTime(); return(_allergyRepository.UpdateAllergy(allergy)); }