public IActionResult AddNewPatient([FromBody] PatientDTO patient) { try { if (!_helperValidationSSN.Validate(patient.FldSSnumber)) { return(BadRequest("Invalid SSN")); } var result = _patientServices.AddPatients(patient); return(Ok(result)); } catch (ArgumentException argumentException) { return(BadRequest(argumentException.Message)); } catch (Exception exception) { return(StatusCode((int)HttpStatusCode.InternalServerError, exception.Message)); } }