QRISK3_2017: Cardiovascular Disease 10-year Risk Calculation (QRISK3 2017)

View source: R/QRISK3-2017ver9.R

QRISK3_2017R Documentation

Cardiovascular Disease 10-year Risk Calculation (QRISK3 2017)

Description

This function allows you to calculate 10-year individual CVD risk using QRISK3-2017.

Usage

QRISK3_2017(
  data,
  patid,
  gender,
  age,
  atrial_fibrillation,
  atypical_antipsy,
  regular_steroid_tablets,
  erectile_disfunction,
  migraine,
  rheumatoid_arthritis,
  chronic_kidney_disease,
  severe_mental_illness,
  systemic_lupus_erythematosis,
  blood_pressure_treatment,
  diabetes1,
  diabetes2,
  weight,
  height,
  ethiniciy,
  heart_attack_relative,
  cholesterol_HDL_ratio,
  systolic_blood_pressure,
  std_systolic_blood_pressure,
  smoke,
  townsend
)

Arguments

data

Specifiy your data.

patid

Specifiy the patient identifier.

gender

1: women 0: men.

age

Specify the age of the patient in year (e.g. 64 years-old)

atrial_fibrillation

Atrial fibrillation? (0: No, 1:Yes)

atypical_antipsy

On atypical antipsychotic medication? (0: No, 1:Yes)

regular_steroid_tablets

On regular steroid tablets? (0: No, 1:Yes)

erectile_disfunction

A diagnosis of or treatment for erectile disfunction? (0: No, 1:Yes)

migraine

Do patients have migraines? (0: No, 1:Yes)

rheumatoid_arthritis

Rheumatoid arthritis? (0: No, 1:Yes)

chronic_kidney_disease

Chronic kidney disease (stage 3, 4 or 5)? (0: No, 1:Yes)

severe_mental_illness

Severe mental illness? (0: No, 1:Yes)

systemic_lupus_erythematosis

Systemic lupus erythematosis (SLE)? (0: No, 1:Yes)

blood_pressure_treatment

On blood pressure treatment? (0: No, 1:Yes)

diabetes1

Diabetes status: type 1? (0: No, 1:Yes)

diabetes2

Diabetes status: type 2? (0: No, 1:Yes)

weight

Weight of patients (kg)

height

Height of patients (cm)

ethiniciy

Ethic group must be coded as the same as QRISK3

1 White or not stated
2 Indian
3 Pakistani
4 Bangladeshi
5 Other Asian
6 Black Caribbean
7 Black African
8 Chinese
9 Other ethnic group

heart_attack_relative

Angina or heart attack in a 1st degree relative < 60? (0: No, 1:Yes)

cholesterol_HDL_ratio

Cholesterol/HDL ratio? (range from 1 to 11, e.g. 4)

systolic_blood_pressure

Systolic blood pressure (mmHg, e.g. 180 mmHg)

std_systolic_blood_pressure

Standard deviation of at least two most recent systolic blood pressure readings (mmHg)

smoke

Smoke status must be coded as the same as QRISK3

1 non-smoker
2 ex-smoker
3 light smoker (less than 10)
4 moderate smoker (10 to 19)
5 heavy smoker (20 or over)

townsend

Townsend deprivation scores

Value

Return a dataset with three columns: patient identifier, caculated QRISK3 score, caculated QRISK3 score with only 1 digit

Examples

data(QRISK3_2019_test)
test_all <- QRISK3_2019_test

test_all_rst <- QRISK3_2017(data=test_all, patid="ID", gender="gender", age="age",
atrial_fibrillation="b_AF", atypical_antipsy="b_atypicalantipsy",
regular_steroid_tablets="b_corticosteroids", erectile_disfunction="b_impotence2",
migraine="b_migraine", rheumatoid_arthritis="b_ra", 
chronic_kidney_disease="b_renal", severe_mental_illness="b_semi",
systemic_lupus_erythematosis="b_sle",
blood_pressure_treatment="b_treatedhyp", diabetes1="b_type1",
diabetes2="b_type2", weight="weight", height="height",
ethiniciy="ethrisk", heart_attack_relative="fh_cvd", 
cholesterol_HDL_ratio="rati", systolic_blood_pressure="sbp",
std_systolic_blood_pressure="sbps5", smoke="smoke_cat", townsend="town")

test_all_rst$"QRISK_C_algorithm_score" <- test_all$"QRISK_C_algorithm_score"
test_all_rst$"diff" <- test_all_rst$"QRISK3_2017_1digit" - test_all_rst$"QRISK_C_algorithm_score"
print(test_all_rst$"diff")
print(identical(test_all_rst$"QRISK3_2017_1digit", test_all_rst$"QRISK_C_algorithm_score"))


YanLiUK/QRISK3 documentation built on July 30, 2023, 2:21 a.m.