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

identify negative culture #1677

Open
hidoyebi opened this issue Dec 4, 2023 · 0 comments
Open

identify negative culture #1677

hidoyebi opened this issue Dec 4, 2023 · 0 comments

Comments

@hidoyebi
Copy link

hidoyebi commented Dec 4, 2023

The org_name column in the microbiologyevents table contains the data "CANCELLED" (org_itemid: 90760). Is this a case the culture was implemented but the culture was cancelled?

In order to identify negative culture, should I add the condition if org_name="CANCELLED"?

https://github.com/MIT-LCP/mimic-code/blob/main/mimic-iv/concepts_postgres/sepsis/suspicion_of_infection.sql

me AS (
    SELECT micro_specimen_id
        -- the following columns are identical for all rows
        -- of the same micro_specimen_id
        -- these aggregates simply collapse duplicates down to 1 row
        , MAX(subject_id) AS subject_id
        , MAX(hadm_id) AS hadm_id
        , CAST(MAX(chartdate) AS DATE) AS chartdate
        , MAX(charttime) AS charttime
        , MAX(spec_type_desc) AS spec_type_desc
        -- identify negative cultures as NULL organism
        -- or a specific itemid saying "NEGATIVE"
        , MAX(
            CASE WHEN org_name IS NOT NULL
                      AND org_itemid != 90856
                      AND org_name != ''
                THEN 1 ELSE 0
            END) AS positiveculture
    FROM mimiciv_hosp.microbiologyevents
    GROUP BY micro_specimen_id
)
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

No branches or pull requests

1 participant