in Website/public/js/predLOS.js [72:92]
function predLOS (id) {
// call /predict to get res.pred, the predicted LOS
$.ajax({
url: '/predict',
type: 'GET',
data: { eid: id },
contentType: "application/json; charset=utf-8",
error: function (xhr, error) {
console.log(xhr); console.log(error);
},
success: function (res) {
console.log("PatientID: " + id)
console.log("Predicted LOS: " + res.pred)
// now display the result
los = Math.round(res.pred);
showResult(los);
}
});
}