//delete the patientRx record
 public IActionResult Delete(string id)
 {
     try
     {
         if (!string.IsNullOrEmpty(id))
         {
             PatientRx patientRx = lIPatientRxRepository.getById(id);
             if (patientRx != null)
             {
                 lIPatientRxRepository.DeletePatientRx(patientRx);
             }
         }
     }
     catch (Exception ex)
     {
         logger.LogDebug("Patent Rx Error: " + ex);
     }
     return(RedirectToAction("Index"));
 }