MIT-LCP / mimic-code

MIMIC Code Repository: Code shared by the research community for the MIMIC family of databases
https://mimic.mit.edu
MIT License
2.56k stars 1.51k forks source link

Question about severity of illness score calculation in sapsii.sql and oasis.sql #1568

Closed MuhangTian closed 9 months ago

MuhangTian commented 1 year ago

Prerequisites

Description

I have some observations in oasis.sql and sapsii.sql code contained in mimic-iii/concepts_postgres/severityscores folder, more specifically, I think there might be a bug in the sub-score calculation for those. They are probably just some minor issues, but I would still like to clarify since I'm doing research on this topic.

OASIS Issue

For calculation of sub-score for pre-ICU length of stay, the snippet currently in oasis.sql is

, case when preiculos is null then null
     when preiculos < 10.2 then 5
     when preiculos < 297 then 3
     when preiculos < 1440 then 0
     when preiculos < 18708 then 1
     else 2 end as preiculos_score

I believe this calculation is different from how preiculos_score was originally calculated in OASIS, which is documented on this page (https://alistairewj.github.io/project/oasis/#:~:text=OASIS%20is%20a%20novel%20severity,OASIS%20only%20requires%2010%20variables.)

I believe it should instead be

, case when preiculos is null then null
     when preiculos < 10.2 then 5
     when preiculos < 297 then 3
     when preiculos < 1440 then 0
     when preiculos < 18708 then 2
     else 1 end as preiculos_score

SAPS II Issue

Similarly, I believe there is a small bug in sapsii.sql as well, the current implementation to calculate score for bicarbonate is:

   , case
      when bicarbonate_max is null then null
      when bicarbonate_min <  15.0 then 5
      when bicarbonate_min <  20.0 then 3
      when bicarbonate_max >= 20.0
       and bicarbonate_min >= 20.0
          then 0
      end as bicarbonate_score

However, by referencing the original SAPS II score card in the paper (see image below), I believe it should have a score of 6 when bicarnobate_max < 15 rather than 5, which should be:

  , case
      when bicarbonate_max is null then null
      when bicarbonate_min <  15.0 then 6
      when bicarbonate_min <  20.0 then 3
      when bicarbonate_max >= 20.0
       and bicarbonate_min >= 20.0
          then 0
      end as bicarbonate_score
Screenshot 2023-06-13 at 10 01 55 PM
alistairewj commented 9 months ago

thanks for catching this!