Slide 1

Slide 1 text

An error in a web-based Thoracoscore calculator Kenrick Turner Andrew Ho Gunnar Rø Martin Turner Filip Van Tornout

Slide 2

Slide 2 text

This is not about Thoracoscore being wrong.

Slide 3

Slide 3 text

It’s about a systematic error in the web’s most popular Thoracoscore calculator http://www.sfar.org/scores2/thoracoscore2.php

Slide 4

Slide 4 text

…and more widely, the risks posed by medical calculators Medical Calculator

Slide 5

Slide 5 text

•  Routine audit at the Norfolk & Norwich •  Difference observed between Thoracoscores calculated in Excel & by SFAR web calculator •  Explored the discrepancy by exhaustively calculating all 1,152 possible Thoracoscores with SciPy and the SFAR calculator. Some background

Slide 6

Slide 6 text

Some example data SFAR Thoracoscore SciPy Thoracoscore Absolute Error 0.11 0.06 0.0473 0.14 0.10 0.0416 0.16 0.11 0.0451 0.17 0.12 0.0452 52.44 52.39 0.0477 56.45 56.40 0.0468 58.35 58.30 0.0454 62.22 62.18 0.0446 … Mean absolute error: 0.0449 (SD 0.0029)

Slide 7

Slide 7 text

Is it them or us? Pretty confident we were right. So where is the error? To the source code!

Slide 8

Slide 8 text

Function  Fmt(x)  {    var  v;    if  (x  >=  0)  {      v  =  ‘’  +  (x  +  0.05);    }  else  {      v  =  ‘’  +  (x  –  0.05);    }    return  v.substring(0,  v.indexOf(‘.’)  +  3);   Adds 0.05 to all scores and then shortens to 2 decimal places. This is not a proper rounding function. Buggy rounding

Slide 9

Slide 9 text

•  The observed systematic error is the addition of 0.05 to all Thoracoscores. •  Small absolute error: actual Thorascore is marginally lower for a given patient than the score calculated. •  Unlikely to have had an impact on clinical decision making. •  Lucky. Clinical points

Slide 10

Slide 10 text

So what? Scoring systems are subject to formal peer review and rigorous analysis. But we don’t use them directly.

Slide 11

Slide 11 text

Because calculating scores by hand is laborious: So we use medical calculators to do the heavy lifting... Score = e−7.3737+Age+Sex+ASA+Performance+Dyspnoea+Priority+Procedure+Diagnosis+Cormobidity 1+e−7.3737+Age+Sex+ASA+Performance+Dyspnoea+Priority+Procedure+Diagnosis+Cormobidity

Slide 12

Slide 12 text

The problem with medical calculators ACME Medical Calculator Parameters Results! We treat them as Black Boxes that give us the correct results.

Slide 13

Slide 13 text

A call to arms •  Break open the Black Box: source code must be open sourced. •  Calculators must be subject to the same standard of peer review as the scoring systems. •  Ultimately the responsibility lies with the clinician using the calculator i.e. you!

Slide 14

Slide 14 text

Thank you Contact: [email protected] http://kenners.org Full code: https://github.com/kenners/SFAR-thoracoscore