GCS Calculator
.result {
margin-top: 20px;
padding: 10px;
background: #007BFF;
color: white;
border-radius: 5px;
font-size: 20px;
}
#severity { font-size: 18px; margin-top: 10px; }
/* Buttons */
button {
margin: 10px;
padding: 10px;
border: none;
border-radius: 5px;
cursor: pointer;
}
Glasgow Coma Scale (GCS) Calculator
Spontaneously (4)
To speech (3)
To pain (2)
No response (1)
Oriented (5)
Confused (4)
Inappropriate words (3)
Incomprehensible sounds (2)
No response (1)
Obeys command (6)
Moves to localized pain (5)
Flex to withdraw from pain (4)
Abnormal flexion (3)
Abnormal extension (2)
No response (1)
Total GCS Score: 15
🟢 Mild Brain Injury
function calculateGCS() {
let eyeResponse = parseInt(document.getElementById(“eyeResponse”).value);
let verbalResponse = parseInt(document.getElementById(“verbalResponse”).value);
let motorResponse = parseInt(document.getElementById(“motorResponse”).value);
let totalGCS = eyeResponse + verbalResponse + motorResponse;
document.getElementById(“gcsScore”).innerText = totalGCS;
let severity = document.getElementById(“severity”);
if (totalGCS >= 13) {
severity.innerText = “🟢 Mild Brain Injury”;
} else if (totalGCS >= 9) {
severity.innerText = “🟡 Moderate Brain Injury”;
} else {
severity.innerText = “🔴 Severe Brain Injury”;
}
}
