public List <PatientAllergy> GetPatientAllergies(GetPatientAllergiesRequest request) { List <PatientAllergy> patientAllergies = null; try { List <PatientAllergyData> data = EndpointUtil.GetPatientAllergies(request); if (data != null && data.Count > 0) { patientAllergies = new List <PatientAllergy>(); data.ForEach(a => patientAllergies.Add(Mapper.Map <PatientAllergy>(a))); } return(patientAllergies); } catch (Exception ex) { throw ex; } }