calculate_confirm_2015_num_of_rf {pretestcad} | R Documentation |
Calculate Number Of Risk Factors (CONFIRM 2015)
Description
A function used to calculate the number of risk factors the patient has. This is used to calculate the pretest probability of coronary artery disease (CAD) based on the 2015 CONFIRM Risk Score.
Usage
calculate_confirm_2015_num_of_rf(
have_typical_chest_pain,
have_diabetes,
have_hypertension,
have_family_history,
is_current_smoker,
max_na = 0
)
Arguments
have_typical_chest_pain |
Input characters (no, yes) to indicate if the patient has typical chest pain.
|
have_diabetes |
Input characters (no, yes) to indicate if the patient only has diabetes.
|
have_hypertension |
Input characters (no, yes) to indicate if the patient only has hypertension.
|
have_family_history |
Input characters (no, yes) to indicate if the patient only has a family history of CAD.
|
is_current_smoker |
Input characters (no, yes) to indicate if the patient is a current smoker.
|
max_na |
Input integer 0 to 5 to indicate the maximum number of
missing risk factors to tolerate before outputting an |
Value
An integer indicating the number of risk factors the patient has.
It can also be NA
if the number of missing risk factors exceeds the max_na
input value
Examples
calculate_confirm_2015_num_of_rf(
have_typical_chest_pain = "yes",
have_diabetes = "yes",
have_hypertension = "yes",
have_family_history = "yes",
is_current_smoker = "no"
)
calculate_confirm_2015_num_of_rf(
have_typical_chest_pain = "no",
have_diabetes = "no",
have_hypertension = "no",
have_family_history = NA,
is_current_smoker = "no",
max_na = 0
)
calculate_confirm_2015_num_of_rf(
have_typical_chest_pain = "no",
have_diabetes = "no",
have_hypertension = "no",
have_family_history = NA,
is_current_smoker = "no",
max_na = 1
)