public async Task <IActionResult> RegisterDependantData([FromQuery] string familyNumber, [FromBody] PatientDTO patient) { patient.IsDependant = true; var result = ps.AddDepentdantData(familyNumber, patient); if (result != null) { string spliResult = result; var resultOut = new { PatientRegNumber = spliResult, message = "" }; _reponse = BaseResponse.GetResponse(resultOut, "patient registered", "00"); return(Ok(_reponse)); } _reponse = BaseResponse.GetResponse(null, "patient failed to register", "99"); return(BadRequest(_reponse)); }