public async Task <ActionResult <PatientDetails> > GetPatientDetailsAsync([Required] int patientId) { var result = _iPatient.GetPatientDetails(patientId); if (result == null) { return(NotFound($"No record found for the patient Id {patientId}")); } return(Ok(result)); }