Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
MuhangTian opened this issue Jun 14, 2023 · 1 comment · Fixed by #1587
Closed
1 task done

Comments

@MuhangTian
Copy link

MuhangTian commented Jun 14, 2023

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
@MuhangTian MuhangTian changed the title Bug in oasis.sql Bug in oasis.sql and sapsii.sql for severity of illness scores Jun 14, 2023
@MuhangTian MuhangTian changed the title Bug in oasis.sql and sapsii.sql for severity of illness scores Question about severity of illness score calculation in sapsii.sql and oasis.sql Jul 1, 2023
@alistairewj
Copy link
Member

thanks for catching this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants