QRisk
An unofficial javascript port of the ClinRisk QRisk 3-2017 algorithm, with typescript typings
API
Inputs are as follows:
sex: 'm' | 'f'
age: number,
atrialFibrillation: boolean,
atypicalAntipsychotics: boolean,
corticosteroids: boolean,
migraine: boolean,
rheumatoidArthritis: boolean,
chronicKidneyDisease345: boolean,
severeMentalIllness: boolean,
systemicLupusErythematosis: boolean,
treatedForHypertension: boolean,
diabetesType1: boolean,
diabetesType2: boolean,
bmi: number,
ethnicity: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9,
familyCardioVascularDisease: boolean,
cholesterolHdlRatio: number,
systolicBloodPressure: number,
systolicBloodPressureStandardDeviation: number,
smokerCategory: 0 | 1 | 2 | 3 | 4,
townsendDeprivation: number
diagnosisOrTreatmentErectileDysfunction: boolean
License
This code is released under LGPL 3.0. See LICENSE
Additional terms
The following disclaimer must be held together with any risk score score generated by this code.
If the score is displayed, then this disclaimer must be displayed or otherwise be made easily accessible, e.g. by a prominent link alongside it.
The initial implemntation, to be found at http://svn.clinrisk.co.uk/opensource/qrisk2, faithfully implements QRISK3-2017.
ClinRisk Ltd. have released this code under the GNU Lesser General Public License to enable others to implement the algorithm faithfully.
However, the nature of the GNU Lesser General Public License is such that we cannot prevent, for example, someone accidentally altering the coefficients, getting the inputs wrong, or just poor programming.
ClinRisk Ltd. stress, therefore, that it is the responsibility of the end user to check that the source that they receive produces the same results as the original code found at https://qrisk.org.
Inaccurate implementations of risk scores can lead to wrong patients being given the wrong treatment.
End of additional terms