QRISK3: Difference between revisions

From Endeavour Knowledge Base
Tag: Manual revert
Line 22: Line 22:
• Free from a diagnosis of cardiovascular disease on or before the reference date
• Free from a diagnosis of cardiovascular disease on or before the reference date


== Variable values ==
== Variables and function parameters ==
QRISK®
QRISK® operates as a function whose parameters represent independent variables. The values of those variables, when used in the algorithm are derived in one of two ways
 
a) By direct entry by a user
 
b) By a query of a health record.
 
When passed into the algorithms as arguments to the function, the values are presented either as a double, an integer, a boolean 1 or 0,  or a character. The client must convert to these formats before submitting as arguments (e.g. as case statement)
 
If variables are unknown (missing) or their values are out of range, the algorithm may either reject the request, provide a default value, or adjust the out of range value to an outer limit.
 
Each concept set has an IRI and the iri namespace is [http://apiqcodes.org/qcodes#QCodeGroup_16779 http://apiqcodes.org/qcodes#]. Which uses the iri prefix qr in the following table
 
Input parameters needed to calculate a QRISK3® score and their handling are as follows:
{| class="wikitable"
|+
!Parameter
!Data type
!description
!Values
!Concept Sets   
!Rules
!Missing or out of range adjustments
|-
|row number
|integer
|An id that is returned in the result in order to reconcile with the client.
Its scope relates only to the specific request response and thus only relevant for bulk calculation
|
|
|
|
|-
|age
|Integer
|Patients age in years on the refence date
|
|
|
|Reject if missing
|-
|gender
|Character
|Patient gender of male or female.
|M or F
|
|
|Reject if missing
Binary values only accepted. QRISK does not have information on transgender or indeterminate gender risks at this stage. It is the responsibility of the requester as to whether to apply the higher risk M gender e.g. For Trans Women
|-
|cvd
|boolean
|Cardiovascular disease prior to the reference date
|1 or 0
|??
|Any entry  effective Date < reference date
|Reject if true.
Whilst the patient is not suitable for a score , this parameter is supported as a second line assurance
|-
|af
|boolean
|Atrial fibrillation at any time prior to reference date.
|1 or 0
|qr:24
|
|Assumes 0 by default
QRisk does not differentiate a single one off AF event from chronic or intermittent AF. Clinical interpretation may be required for those with a single event many years ago.
|-
|atypicalantipsychotics
|boolean
|Second generation ‘atypical’ antipsychotic - prescribed two or more issues in the previous 6 months (includes amisulpride, aripiprazole, clozapine, lurasidone, olanzapine, paliperidone, quetiapine, risperidone, sertindole, or zotepine)
|1 or 0
|qr:1169
|Medication requests,  effective date within 6 months prior to reference date
Count (entry)>=2
|Assumes 0 by default.
|-
|corticosteroids
|boolean
|systemic corticosteroids –prescribed two or more issues in the previous 6 months
|1 or 0
|qr:1194
|Medication requests,  effective date within 6 months prior to reference date
Count (entry)>=2
|Assumes 0 be default
|-
|migraine
|boolean
|Diagnosis of migraine prior to the reference date
39
|1 or 0
|qr:39
|any effective  prior to reference date
|Assumes 0 by default
|-
|rheumatoidArthritis
|boolean
|Diagnosis of Rheumatoid arthritis prior to the reference date
|1 or 0
|qr:58
|any effective date prior to the reference date
|Assumes 0 by default
|-
|renal
|boolean
|Chronic renal disease at any time prior to the refernce date
|1 or 0
|qr:322
|any effective date prior to the reference date
|Assumes 0 be default
|-
|severementalIllness
|boolean
|Diagnosis of severe mental illness (psychosis, severe depression, manic depression, schizophrenia) at any time prior to the refernce date
|1 or 0
|qr:3187
|any effective date prior to the reference date
|Assumes 0 to be default
|-
|sle
|boolean
|Diagnosis of systemic lupus erythematosis at any time prior to the reference date
|1 or 0
|qr:70
|any effective date prior to the reference date
|Assumes 0 to be default
|-
|treatedHypertension
|boolean
|diagnosis of hypertension at any time in the patient’s records AND On antihypertensive treatment if 1 or more  medication requests within  6 months prior to the reference date.
|1 or 0
|(hypertension  qr:21)
(medication
qr:740
qr:751
qr:759
qr:760
qr:765
to be revised)
|(hypertension effective date prior to refence date)
and
(Medication requests,  effective date within 6 months prior to reference date
|Assumes 0 by default
|-
|bmi
|double
|The most recently recorded body mass index for the patient recorded prior to the search date recorded in the last 5 years.
|
|qr:200
|effective date within 5 years prior to reference date.
Latest entry,
numeric value
|<18 is set to 18
>47 is set to 47
 
if null uses estimate value
|-
|diabetesCategory
|integer
|categorical variable to denote no diabetes, type 1 diabetes or type 2 diabetes diagnosed at any time prior to the refernce ate and
|0 or 1 or 2 or
|qr:1913
rq:2411
|any effective date prior to the reference date
most recent effective date entry,
categorise as
qr:1913= 1
qr:2411 = 2
|Assumes 0 by default
|-
|ethnicity
|integer
|17 caregories
|0 to 17
|qr:17087= Not recorded
qr:17071 = White british
 
qr:17072 =White Irish
 
qr:17073 =Other White Background
 
qr:17074 =White & Black Caribbean
 
qr:17075  =White & Black African
 
qr:17076 =White & Asian
 
qr:17077 =other mixed
 
wr:17089=Indian
 
qr:17079 =Pakistani
 
qr:17080 Bangladeshi
 
qr:17081 =Other Asian
 
qr:17090 =Caribbean
 
qr: 17083=Black African
 
qr:17091 =Other Black
 
qr:17985 =Chinese
 
qr:17086 Other ethnic group
 
qr:17087 Note recorded ->17
 
|latest from all groups
then
17087 = not recorded -> 0
qr:17071 = White british->1
 
qr:17072 =White Irish ->2
 
qr:17073 =Other White Background->3
 
qr:17074 =White & Black Caribbean->4
 
qr:17075  =White & Black African->5
 
qr:17076 =White & Asian->6
 
qr:17077 =other mixed->7
 
wr:17089=Indian->8
 
qr:17079 =Pakistani->9
 
qr:17080 Bangladeshi->10
 
qr:17081 =Other Asian->11
 
qr:17090 =Caribbean->12
 
qr: 17083=Black African->13
 
qr:17091 =Other Black->14
 
qr:17985 =Chinese->15
 
qr:17086 Other ethnic group->16
 
qr:17097 Not recorded->17
|
|}
 
 
 
 
 
 
 
 
 
ethnicity
 
Integer
 
Ethnic group in 17 categories.
 
n/a
 
0 =not recorded
 
1 =British
 
2 =Irish
 
3 =Other White Background
 
4 =White & Black Caribbean
 
5 =White & Black African
 
6 =White & Asian
 
7 =other mixed
 
8 =Indian
 
9 =Pakistani
 
10= Bangladeshi
 
11 =Other Asian
 
12 =Caribbean
 
13 =Black African
 
14 =Other Black
 
15 =Chinese
 
16 Other ethnic group
 
17 Not stated
 
fh_cvd
 
Boolean
 
Family history of coronary heart disease in a first degree relative under the age of 60 years recorded before the search date
 
404
 
1 = yes, 0 = no
 
rati
 
Double (nullable)
 
The most recent ratio of total serum cholesterol/HDL recorded in the last 5 years. The ratio is either directly directly recorded (eg using group 405) or can be calculated using group 16 divided by group 367
 
16
 
367
 
405
 
n/a
 
smoke_cat
 
Integer
 
(nullable)
 
The most recently recorded smoking status 5 levels i.e.
 
• non-smoker (group
 
2239
 
2238
 
0= non smoker
 
1 =ex-smoker
 
QRISK® 3 10-year Risk Search Definition
 
© Copyright, ClinRisk Ltd 2023
 
8
 
2239)
 
• Ex-smoker(group 2238)
 
• Light-smoker(group 2244)
 
• Moderate-smoker(group 2242)
 
• Heavy-smoker (group 2243)
 
2244
 
2242
 
2243
 
2 =light smoker
 
3= moderate smoker
 
4= heavy smoker
 
Null if missing
 
sbp
 
Integer (nullable)
 
The most recent systolic blood pressure prior to search date recorded in the last 5 years
 
198
 
n/a
 
sbps5
 
Double (nullable)
 
Standard deviation of all of the available systolic blood pressures prior to the search date recorded in the last 5 years
 
198
 
n/a
 
town
 
Double (nullable)
 
The Townsend score associated with the output area of a patient’s postcode based on the 2001 census data.
 
n/a
 
n/a
 
postcode
 
String
 
Patient’s postcode. This can be missing if Townsend score is supplied.
 
n/a
 
n/

Revision as of 15:37, 17 July 2023

Please note that at this current time, these services are not available for use in a live environment and must not be used. The following information is made available in advance of go-live

Background

Information about QRISK3 and the free to use Web site can be viewed https://qrisk.org

Integration with systems

Systems may have access to longitudinal health records, in particular those held in General Practice. In that case those systems may elect to use QRISK in a way that provides likely values for the variables used in the algorithm, those values being derived from the records.

That being the case, a set of query criteria and rules are applied to the record entries and the values of the variables derived. These are then presented to a user for confirmation, or amendment before being submitted as a set of parameters to the function via an API.

It is strongly recommended that for any individual decision, or potential entry of the risk score in the record, that each set of assumptions are confirmed. Purely automated calculations may be used for population based risk stratification in order to plan interventions.

Patient inclusion criteria

This section documents the criteria for a person suitable for the application of QRISK3

All dates are relative to the time at which the algorithm is applied to the patient and is referred to as the reference date.

  • Aged between 25 and 84 inclusive at the reference date

• Free from a diagnosis of cardiovascular disease on or before the reference date

Variables and function parameters

QRISK® operates as a function whose parameters represent independent variables. The values of those variables, when used in the algorithm are derived in one of two ways

a) By direct entry by a user

b) By a query of a health record.

When passed into the algorithms as arguments to the function, the values are presented either as a double, an integer, a boolean 1 or 0, or a character. The client must convert to these formats before submitting as arguments (e.g. as case statement)

If variables are unknown (missing) or their values are out of range, the algorithm may either reject the request, provide a default value, or adjust the out of range value to an outer limit.

Each concept set has an IRI and the iri namespace is http://apiqcodes.org/qcodes#. Which uses the iri prefix qr in the following table

Input parameters needed to calculate a QRISK3® score and their handling are as follows:

Parameter Data type description Values Concept Sets Rules Missing or out of range adjustments
row number integer An id that is returned in the result in order to reconcile with the client.

Its scope relates only to the specific request response and thus only relevant for bulk calculation

age Integer Patients age in years on the refence date Reject if missing
gender Character Patient gender of male or female. M or F Reject if missing

Binary values only accepted. QRISK does not have information on transgender or indeterminate gender risks at this stage. It is the responsibility of the requester as to whether to apply the higher risk M gender e.g. For Trans Women

cvd boolean Cardiovascular disease prior to the reference date 1 or 0 ?? Any entry effective Date < reference date Reject if true.

Whilst the patient is not suitable for a score , this parameter is supported as a second line assurance

af boolean Atrial fibrillation at any time prior to reference date. 1 or 0 qr:24 Assumes 0 by default

QRisk does not differentiate a single one off AF event from chronic or intermittent AF. Clinical interpretation may be required for those with a single event many years ago.

atypicalantipsychotics boolean Second generation ‘atypical’ antipsychotic - prescribed two or more issues in the previous 6 months (includes amisulpride, aripiprazole, clozapine, lurasidone, olanzapine, paliperidone, quetiapine, risperidone, sertindole, or zotepine) 1 or 0 qr:1169 Medication requests, effective date within 6 months prior to reference date

Count (entry)>=2

Assumes 0 by default.
corticosteroids boolean systemic corticosteroids –prescribed two or more issues in the previous 6 months 1 or 0 qr:1194 Medication requests, effective date within 6 months prior to reference date

Count (entry)>=2

Assumes 0 be default
migraine boolean Diagnosis of migraine prior to the reference date

39

1 or 0 qr:39 any effective prior to reference date Assumes 0 by default
rheumatoidArthritis boolean Diagnosis of Rheumatoid arthritis prior to the reference date 1 or 0 qr:58 any effective date prior to the reference date Assumes 0 by default
renal boolean Chronic renal disease at any time prior to the refernce date 1 or 0 qr:322 any effective date prior to the reference date Assumes 0 be default
severementalIllness boolean Diagnosis of severe mental illness (psychosis, severe depression, manic depression, schizophrenia) at any time prior to the refernce date 1 or 0 qr:3187 any effective date prior to the reference date Assumes 0 to be default
sle boolean Diagnosis of systemic lupus erythematosis at any time prior to the reference date 1 or 0 qr:70 any effective date prior to the reference date Assumes 0 to be default
treatedHypertension boolean diagnosis of hypertension at any time in the patient’s records AND On antihypertensive treatment if 1 or more medication requests within 6 months prior to the reference date. 1 or 0 (hypertension qr:21)

(medication qr:740 qr:751 qr:759 qr:760 qr:765 to be revised)

(hypertension effective date prior to refence date)

and (Medication requests, effective date within 6 months prior to reference date

Assumes 0 by default
bmi double The most recently recorded body mass index for the patient recorded prior to the search date recorded in the last 5 years. qr:200 effective date within 5 years prior to reference date.

Latest entry, numeric value

<18 is set to 18

>47 is set to 47

if null uses estimate value

diabetesCategory integer categorical variable to denote no diabetes, type 1 diabetes or type 2 diabetes diagnosed at any time prior to the refernce ate and 0 or 1 or 2 or qr:1913

rq:2411

any effective date prior to the reference date

most recent effective date entry, categorise as qr:1913= 1 qr:2411 = 2

Assumes 0 by default
ethnicity integer 17 caregories 0 to 17 qr:17087= Not recorded

qr:17071 = White british

qr:17072 =White Irish

qr:17073 =Other White Background

qr:17074 =White & Black Caribbean

qr:17075 =White & Black African

qr:17076 =White & Asian

qr:17077 =other mixed

wr:17089=Indian

qr:17079 =Pakistani

qr:17080 Bangladeshi

qr:17081 =Other Asian

qr:17090 =Caribbean

qr: 17083=Black African

qr:17091 =Other Black

qr:17985 =Chinese

qr:17086 Other ethnic group

qr:17087 Note recorded ->17

latest from all groups

then 17087 = not recorded -> 0 qr:17071 = White british->1

qr:17072 =White Irish ->2

qr:17073 =Other White Background->3

qr:17074 =White & Black Caribbean->4

qr:17075 =White & Black African->5

qr:17076 =White & Asian->6

qr:17077 =other mixed->7

wr:17089=Indian->8

qr:17079 =Pakistani->9

qr:17080 Bangladeshi->10

qr:17081 =Other Asian->11

qr:17090 =Caribbean->12

qr: 17083=Black African->13

qr:17091 =Other Black->14

qr:17985 =Chinese->15

qr:17086 Other ethnic group->16

qr:17097 Not recorded->17





ethnicity

Integer

Ethnic group in 17 categories.

n/a

0 =not recorded

1 =British

2 =Irish

3 =Other White Background

4 =White & Black Caribbean

5 =White & Black African

6 =White & Asian

7 =other mixed

8 =Indian

9 =Pakistani

10= Bangladeshi

11 =Other Asian

12 =Caribbean

13 =Black African

14 =Other Black

15 =Chinese

16 Other ethnic group

17 Not stated

fh_cvd

Boolean

Family history of coronary heart disease in a first degree relative under the age of 60 years recorded before the search date

404

1 = yes, 0 = no

rati

Double (nullable)

The most recent ratio of total serum cholesterol/HDL recorded in the last 5 years. The ratio is either directly directly recorded (eg using group 405) or can be calculated using group 16 divided by group 367

16

367

405

n/a

smoke_cat

Integer

(nullable)

The most recently recorded smoking status 5 levels i.e.

• non-smoker (group

2239

2238

0= non smoker

1 =ex-smoker

QRISK® 3 10-year Risk Search Definition

© Copyright, ClinRisk Ltd 2023

8

2239)

• Ex-smoker(group 2238)

• Light-smoker(group 2244)

• Moderate-smoker(group 2242)

• Heavy-smoker (group 2243)

2244

2242

2243

2 =light smoker

3= moderate smoker

4= heavy smoker

Null if missing

sbp

Integer (nullable)

The most recent systolic blood pressure prior to search date recorded in the last 5 years

198

n/a

sbps5

Double (nullable)

Standard deviation of all of the available systolic blood pressures prior to the search date recorded in the last 5 years

198

n/a

town

Double (nullable)

The Townsend score associated with the output area of a patient’s postcode based on the 2001 census data.

n/a

n/a

postcode

String

Patient’s postcode. This can be missing if Townsend score is supplied.

n/a

n/