# Example 1: Low Risk
# 40yo Male, No comorbidities, Normal Vitals/Labs
# Score = 40
psi_port_score(40, "male", 0, 0, 0, 0, 0, 0, 0, 16, 120, 37, 70, 7.4, 15, 140, 90, 40, 90, 0)
# Example 2: High Risk
# 70yo Female (-10), Nursing Home (+10), CHF (+10), RR 32 (+20), BUN 40 (+20)
# Score = 60 + 10 + 10 + 20 + 20 = 120 (Class IV)
psi_port_score(70, "female", 1, 0, 0, 1, 0, 0, 0, 32, 110, 37, 80, 7.4, 40, 140, 100, 40, 80, 0)
Run the code above in your browser using DataLab