npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

qrisk3-2017

v1.0.0

Published

An unofficial javascruport of ClinRisk's QRisk3-2017 algorithm

Downloads

2

Readme

QRisk

npm version CircleCI An unofficial javascript port of the ClinRisk QRisk 3-2017 algorithm, with typescript typings

API

Inputs are as follows:

  // Biological sex
  sex: 'm' | 'f'

  // Age at study entry (baseline)
  age: number,

  // Atrial fibrillation (including atrial fibrillation, atrial flutter, and paroxysmal atrial fibrillation)
  atrialFibrillation: boolean,

  // Second generation “atypical” antipsychotic use (including amisulpride, aripiprazole, clozapine, lurasidone,
  // olanzapine, paliperidone, quetiapine, risperidone, sertindole, or zotepine)
  atypicalAntipsychotics: boolean,

  // Corticosteroid use (British National Formulary (BNF) chapter 6.3.2 including oral or parenteral prednisolone,
  // betamethasone, cortisone, depo-medrone, dexamethasone, deflazacort, efcortesol, hydrocortisone,
  // methylprednisolone, or triamcinolone)
  corticosteroids: boolean,

  // Diagnosis of migraine (including classic migraine, atypical migraine, abdominal migraine, cluster headaches,
  // basilar migraine, hemiplegic migraine, and migraine with or without aura)
  migraine: boolean,

  // Rheumatoid arthritis (diagnosis of rheumatoid arthritis, Felty’s syndrome, Caplan’s syndrome, adult onset
  // Still’s disease, or inflammatory polyarthropathy not otherwise specified)
  rheumatoidArthritis: boolean,

  // Chronic kidney disease (stage 3, 4 or 5) and major chronic renal disease (including nephrotic syndrome, chronic
  // glomerulonephritis, chronic pyelonephritis, renal dialysis, and renal transplant)
  chronicKidneyDisease345: boolean,

  // Diagnosis of severe mental illness (including psychosis, schizophrenia, or bipolar affective disease)
  severeMentalIllness: boolean,

  // Systemic lupus erythematosus (including diagnosis of SLE, disseminated lupus erythematosus, or Libman-Sacks disease)
  systemicLupusErythematosis: boolean,

  // Treated hypertension (diagnosis of hypertension and treatment with at least one antihypertensive drug)
  treatedForHypertension: boolean,

  // Diagnosis of diabetes type 2
  diabetesType1: boolean,

  // Diagnosis of diabetes type 2
  diabetesType2: boolean,

  // Body-mass index
  bmi: number,

  // Ethnic origin
  // 0: White or not stated
  // 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
  ethnicity: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9,

  // Family history of coronary heart disease in a first degree relative aged less than 60 years
  familyCardioVascularDisease: boolean,

  // Total cholesterol to high density lipoprotein (HDL) cholesterol ratio
  cholesterolHdlRatio: number,

  // Systolic blood pressure
  systolicBloodPressure: number,

  // Measure of systolic blood pressure variability (standard deviation of repeated measures)
  systolicBloodPressureStandardDeviation: number,

  // Smoking status (0: non-smoker, 1: former smoker, 2: light smoker (1-9/day), 3: moderate smoker (10-19/day), or 4: heavy smoker (≥20/day))
  smokerCategory: 0 | 1 | 2 | 3 | 4,

  // Local deprivation as measured by the Townsend score, where higher values indicate higher levels of material deprivation
  townsendDeprivation: number

  // (Males only) Diagnosis of erectile dysfunction or treatment for erectile dysfunction (BNF chapter 7.4.5 including alprostadil,
  // phosphodiesterase type 5 inhibitors, papaverine, or phentolamine)
  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