# Example 1: High Risk
# 75yo (+3), Diabetes w/ End Organ Damage (+2), CHF (+1), MI (+1)
# Score = 7
charlson_comorbidity_index(75, 1, 1, 0, 0, 0, 0, 0, 0,
"none", "end_organ_damage", 0, 0, "none", 0, 0, 0)
# Example 2: Low Risk
# 45yo (0), Uncomplicated Diabetes (+1)
# Score = 1
charlson_comorbidity_index(45, 0, 0, 0, 0, 0, 0, 0, 0,
"none", "uncomplicated", 0, 0, "none", 0, 0, 0)
Run the code above in your browser using DataLab