# Example 1: Busy ED
# 35 patients, 30 beds, 4 admits, 400 hospital beds, 0 vents, 4h wait admit, 1h last bed
# Score = -20 + 85.8(1.16) + 600(0.01) + 0 + 0.93(4) + 5.64(1) = ~95 (Overcrowded)
nedocs_score(35, 30, 4, 400, 0, 4, 1)
# Example 2: Disaster Level
# 60 patients, 30 beds, 15 admits, 400 hospital beds, 2 vents, 12h wait admit, 3h last bed
# Score = -20 + 85.8(2) + 600(0.0375) + 13.4(2) + 0.93(12) + 5.64(3) = ~229 -> Capped at 200
nedocs_score(60, 30, 15, 400, 2, 12, 3)
Run the code above in your browser using DataLab