Hi arsar-2618,
In my opinion, the best opinion for your scenario is building a new viewmodel when getting data from the database. Since the javascript is modifying the html element and it couldn't modifying the PatientModel, if you build some codes and method which could render the statusOfPatient with its value. But you need write a lot codes to find the js's element(Each page may contains the different element and you should call this method at window.onload method) and modify the element value according to the statusOfPatient attribute.
But if you build a new value and do these things inside the controller, you could just use the new property statusOfPatientNew which has already contains the right description.
If you still want to achieve this by using the JS, I suggest you could refer to below sample.
<h1 id="statusOfPatient">@Model.statusOfPatient</h1>
JS:
$(function () {
// get the id = test's statusOfPatient value, notice: Different element will use different way to get the value
var result;
var statusOfPatient = parseInt($("#statusOfPatient").html());
console.log(statusOfPatient);
switch (statusOfPatient) {
case 1: result = "normal";
break;
case 2: result = "referred";
break;
case 3: result = "critical";
break;
case 4: result = "ICU";
break;
};
$("#statusOfPatient").html(result);
});