diff --git a/mimic-iii/concepts/severityscores/sirs.sql b/mimic-iii/concepts/severityscores/sirs.sql index 9de5bcff..e13096ef 100644 --- a/mimic-iii/concepts/severityscores/sirs.sql +++ b/mimic-iii/concepts/severityscores/sirs.sql @@ -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 @@ -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) diff --git a/mimic-iii/concepts_postgres/severityscores/sirs.sql b/mimic-iii/concepts_postgres/severityscores/sirs.sql index 1a34cc28..5a3f3fed 100644 --- a/mimic-iii/concepts_postgres/severityscores/sirs.sql +++ b/mimic-iii/concepts_postgres/severityscores/sirs.sql @@ -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 @@ -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, diff --git a/mimic-iv/concepts/score/sirs.sql b/mimic-iv/concepts/score/sirs.sql index ca4a933e..c0e86b62 100644 --- a/mimic-iv/concepts/score/sirs.sql +++ b/mimic-iv/concepts/score/sirs.sql @@ -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 @@ -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) diff --git a/mimic-iv/concepts_postgres/score/sirs.sql b/mimic-iv/concepts_postgres/score/sirs.sql index b1b28667..af10c491 100644 --- a/mimic-iv/concepts_postgres/score/sirs.sql +++ b/mimic-iv/concepts_postgres/score/sirs.sql @@ -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 @@ -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,