Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mimic-iii/concepts/severityscores/sirs.sql
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ left join `physionet-data.mimiciii_derived.labs_first_day` l
, case
when wbc_min < 4.0 then 1
when wbc_max > 12.0 then 1
when bands_max > 10 then 1-- > 10% immature neurophils (band forms)
when bands_max > 10 then 1 -- > 10% immature neutrophils (band forms)
when coalesce(wbc_min, bands_max) is null then null
else 0
end as wbc_score
Expand All @@ -97,7 +97,7 @@ left join `physionet-data.mimiciii_derived.labs_first_day` l
)
select
ie.subject_id, ie.hadm_id, ie.icustay_id
-- Combine all the scores to get SOFA
-- Combine all component scores to get SIRS
-- Impute 0 if the score is missing
, coalesce(temp_score,0)
+ coalesce(heartrate_score,0)
Expand Down
4 changes: 2 additions & 2 deletions mimic-iii/concepts_postgres/severityscores/sirs.sql
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ WITH bg AS (
WHEN wbc_max > 12.0
THEN 1
WHEN bands_max > 10
THEN 1 /* > 10% immature neurophils (band forms) */
THEN 1 /* > 10% immature neutrophils (band forms) */
WHEN COALESCE(wbc_min, bands_max) IS NULL
THEN NULL
ELSE 0
Expand All @@ -68,7 +68,7 @@ WITH bg AS (
SELECT
ie.subject_id,
ie.hadm_id,
ie.icustay_id, /* Combine all the scores to get SOFA */ /* Impute 0 if the score is missing */
ie.icustay_id, /* Combine all component scores to get SIRS */ /* Impute 0 if the score is missing */
COALESCE(temp_score, 0) + COALESCE(heartrate_score, 0) + COALESCE(resp_score, 0) + COALESCE(wbc_score, 0) AS sirs,
temp_score,
heartrate_score,
Expand Down
4 changes: 2 additions & 2 deletions mimic-iv/concepts/score/sirs.sql
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ WITH scorecomp AS (
, CASE
WHEN wbc_min < 4.0 THEN 1
WHEN wbc_max > 12.0 THEN 1
WHEN bands_max > 10 THEN 1-- > 10% immature neurophils (band forms)
WHEN bands_max > 10 THEN 1 -- > 10% immature neutrophils (band forms)
WHEN COALESCE(wbc_min, bands_max) IS NULL THEN NULL
ELSE 0
END AS wbc_score
Expand All @@ -86,7 +86,7 @@ WITH scorecomp AS (

SELECT
ie.subject_id, ie.hadm_id, ie.stay_id
-- Combine all the scores to get SOFA
-- Combine all component scores to get SIRS
-- Impute 0 if the score is missing
, COALESCE(temp_score, 0)
+ COALESCE(heart_rate_score, 0)
Expand Down
4 changes: 2 additions & 2 deletions mimic-iv/concepts_postgres/score/sirs.sql
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ WITH scorecomp AS (
WHEN wbc_max > 12.0
THEN 1
WHEN bands_max > 10
THEN 1 /* > 10% immature neurophils (band forms) */
THEN 1 /* > 10% immature neutrophils (band forms) */
WHEN COALESCE(wbc_min, bands_max) IS NULL
THEN NULL
ELSE 0
Expand All @@ -64,7 +64,7 @@ WITH scorecomp AS (
SELECT
ie.subject_id,
ie.hadm_id,
ie.stay_id, /* Combine all the scores to get SOFA */ /* Impute 0 if the score is missing */
ie.stay_id, /* Combine all component scores to get SIRS */ /* Impute 0 if the score is missing */
COALESCE(temp_score, 0) + COALESCE(heart_rate_score, 0) + COALESCE(resp_score, 0) + COALESCE(wbc_score, 0) AS sirs,
temp_score,
heart_rate_score,
Expand Down
Loading