public IActionResult AddBed(string icuId) { try { bool isAdded = _bedRepository.AddBed(icuId); if (isAdded) { return(Json("Bed added to ICU")); } else { return(Json("Could not add bed: ICU has reached max capacity")); } } catch (Exception) { return(StatusCode(500, "unable to add Bed")); } }