public ActionResult Form(CovidHealthCheckViewModel ViewModel) { try { string result = model.Create(ViewModel); return(Json(new { success = true, summaryResult = result })); } catch (Exception ex) { return(Json(new { success = false, message = ex.Message })); } }
public ActionResult Form(CovidHealthCheckViewModel ViewModel) { try { string result = model.Create(ViewModel); var resultAlgorithm = model.GetAlgorithmResult(ViewModel); return(Json(new { success = true, summaryResult = result, riskLevel = resultAlgorithm.risk_level, specAction = resultAlgorithm.spec_action, isTravelIn14Days = resultAlgorithm.is_travel_in_14_days })); } catch (Exception ex) { return(Json(new { success = false, message = ex.Message })); } }