Beispiel #1
0
 public IActionResult AddAllergyData(string userName, AllergyModel allergyModel)
 {
     try
     {
         ResultModel res = new ResultModel();
         if (allergyModel == null)
         {
             return(BadRequest(new Exception("Unable to fetch record")));
         }
         else
         {
             res = _patientRepository.AddPatientAllergy(userName, allergyModel);
             return(Ok(res));
         }
     }
     catch (Exception e)
     {
         return(BadRequest(e));
     }
 }