Skip to content

Commit

Permalink
mobile.html
Browse files Browse the repository at this point in the history
  • Loading branch information
GiuseppeELio authored Mar 18, 2024
1 parent 3ef836e commit ce3ed71
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions mobile.html
Original file line number Diff line number Diff line change
Expand Up @@ -305,14 +305,7 @@ <h2 style="font-weight: 400; text-align: center;">Non-invasive Echocardiographic
if (IVC === 0) {
// Set all related parameters to zero or empty
document.getElementById('RAP').innerText = 'RAP: N/A';
document.getElementById('PAPs').innerText = 'sPAP: N/A';
document.getElementById('PAPd').innerText = 'dPAP: N/A';
document.getElementById('PAPm').innerText = 'mPAP: N/A';

document.getElementById('RAP').style.color = 'black';
document.getElementById('PAPs').style.color = 'black';
document.getElementById('PAPd').style.color = 'black';
document.getElementById('PAPm').style.color = 'black';

} else {

Expand All @@ -336,16 +329,28 @@ <h2 style="font-weight: 400; text-align: center;">Non-invasive Echocardiographic
} else {
document.getElementById('RAP').style.color = 'red'; // Set color to red
}
}

if (TRV === 0) {

document.getElementById('PAPs').innerText = 'sPAP: N/A';
document.getElementById('PAPs').style.color = 'black';
} else {
// Calculate PAPs (Pulmonary artery pressure systolic)
var PAPs = (4 * Math.pow(TRV/100, 2) + RAP).toFixed(1);
document.getElementById('PAPs').innerText = 'sPAP: ' + PAPs + ' mmHg';
if (PAPs >= 15 && PAPs <= 30) {
document.getElementById('PAPs').style.color = 'green'; // Set color to green
} else {
document.getElementById('PAPs').style.color = 'red'; // Set color to red
}
}

if (PREDV === 0) {

document.getElementById('PAPd').innerText = 'dPAP: N/A';
document.getElementById('PAPd').style.color = 'black';
} else {
// Calculate PAPd (Pulmonary artery pressure diastolic)
var PAPd = (4 * Math.pow(PREDV/100, 2)+ RAP).toFixed(1);
document.getElementById('PAPd').innerText = 'dPAP: ' + PAPd + ' mmHg';
Expand All @@ -354,7 +359,13 @@ <h2 style="font-weight: 400; text-align: center;">Non-invasive Echocardiographic
} else {
document.getElementById('PAPd').style.color = 'red'; // Set color to red
}
}

if (PAPs === 0 && PAPd === 0) {

document.getElementById('PAPm').innerText = 'mPAP: N/A';
document.getElementById('PAPm').style.color = 'black';
} else {
// Calculate PAPm (Pulmonary artery pressure mean)
var PAPm = ((parseFloat(PAPs) + 2 * parseFloat(PAPd)) / 3).toFixed(1);
document.getElementById('PAPm').innerText = 'mPAP: ' + PAPm + ' mmHg';
Expand Down Expand Up @@ -412,5 +423,6 @@ <h2 style="font-weight: 400; text-align: center;">Non-invasive Echocardiographic
}
</script>


</body>
</html>

0 comments on commit ce3ed71

Please sign in to comment.