# Example 1: Good Candidate (Class I)
# 30yo (+7), 70kg (+2), Myocarditis (+3), No Failures, 5h vent (0),
#PIP 18 (+3), No Arrest (0), DBP 60 (+3), PP 30 (0), HCO3 24 (0)
# Score = 7 + 2 + 3 + 0 + 3 + 0 + 3 = 18
save_ecmo_score(30, 70, "myocarditis", 0, 0, 0, 0, 5, 18, 0, 60, 30, 24)
# Example 2: Poor Candidate (Class V)
# 70yo (0), 80kg (+2), Chronic HF (-5), Chronic Renal (-6), 48h vent (-4),
#Arrest (-2), DBP 30 (0), PP 15 (-2), HCO3 12 (-3)
# Score = 0 + 2 - 5 - 6 - 4 - 2 - 2 - 3 = -20
save_ecmo_score(70, 80, "chronic_heart_failure", 1, 0, 0, 0, 48, 30, 1, 30, 15, 12)
Run the code above in your browser using DataLab