opensafely-core / cohort-extractor

Cohort extractor tool which can generate dummy data, or real data against OpenSAFELY-compliant research databases
Other
38 stars 13 forks source link

ICNARC function should not exclude non-ventilated patients #275

Closed sebbacon closed 4 years ago

sebbacon commented 4 years ago

See discussion: https://github.com/opensafely/cohort-extractor/issues/273#issuecomment-679052963

Users need to be able to distinguish between ventilated and non-ventilated subgroups within ICNARC data.

We also need to consider which previous/current studies use ICNARC as an outcome and decide if they need to be re-run.

@HelenCEBM I think when I first made ICNARC I copied some code from a notebook you wrote without really thinking about why. Can you remember what the reason was for excluding patients without respiratory support in the first place? Just wondering if there was a reason to believe they were bad data.

HelenCEBM commented 4 years ago

I think this was part of a wider discussion about variation in classification of ICU patients. As far as I understand:

rohinimathur commented 4 years ago

I think important to keep 'admitted to ICU' and 'ventilated in ICU' separate concepts- as when we want to look at ventilation as a marker for severe COVID, we will need to restrict the denominator to 'people eligible to receive ventilation', which (as I understand) is 'all people admitted to ICU'

And then in the discussion, we'd need to address that certain groups at highest risk for severe COVID will not ever enter ICU because they are too frail.

wjchulme commented 4 years ago

as per here: https://github.com/opensafely/cohort-extractor/issues/273#issuecomment-679081482 and @HelenCEBM's comment above, we should be focusing as much as possible on clinical definitions (eg "on respiratory support") not administrative definitions (eg "admitted to ICU").

As for the people deemed to frail for ventilation who remain on a ward (or aren't admitted to hospital in the first place), and who then presumably die, one approach to this is to consider "ventilated in ICU OR death" as a single outcome, and then you sweep up all those frail people too.

rohinimathur commented 4 years ago

@wjchulme In the ethnicity study we have admitted to ICU and receiving ventilation as two distinct outcomes as we are interested both in the clinical outcome, but also ethnic differences in access to/use of healthcare services (For example, are more ethnic minority people admitted to ICU because they are on average younger than the White population and more likely to benefit from ICU treatment).

Separately, in order to look at ventilation in ICU as an outcome, we need to know who is admitted to ICU in order to define the correct denominator.

HelenCEBM commented 4 years ago

When looking at access to ICU are you including the hospital ID (or at least region/STP) as a factor to account for these administrative differences and the local population demographics?

Is the exclusion of non-ventilated people the reason that a small proportion of the ICNARC numbers were being lost in the study populations? If so it seems that the "ICU population" will only be marginally larger than the "ventilated population" - unless I'm missing something?

Separately, in order to look at ventilation in ICU as an outcome, we need to know who is admitted to ICU in order to define the correct denominator.

-- But wouldn't a large proportion of people only be admitted to ICU only if they (a) needed ventilation and (b) were deemed suitable? Especially when hospitals were concerned about ICU capacity it seems unlikely they would take up an ICU bed with someone who didn't yet need ventilation (I may be oversimplifying here though!)

rohinimathur commented 4 years ago

@HelenCEBM I am including STP to account for administrative differences, I don't have any information on hospital ID. In my data, about 60% of people admitted to ICU receive invasive mechanical ventilation, so the two outcomes aren't quite so closely aligned (though I agree with your logic!) I have: 2,859 admitted to ICU and 1,651 ventilated

rohinimathur commented 4 years ago

Hi all, I spoke with @LiamSmeeth this morning - from his clinical perspective, about 50% of people admitted to ICU require ventilation.

We would be keen to separate out 'admitted to ICU' from 'ventilated in ICU'. Is there any code that indicates that the ICU admission is for COVID? ideally, we would restrict all data to COVID admissions only.

This distinction is important for the ethnicity study as ethnic differences in admissions are distinct from ethnic differences in severe covid requiring ventilation, and we are keen to explore this.

sebbacon commented 4 years ago

Is there any code that indicates that the ICU admission is for COVID? ideally, we would restrict all data to COVID admissions only.

You can refer to the OpenSAFELY dataset user guide! It says:

Currently only COVID-19 +ve patients are provided by ICNARC

rohinimathur commented 4 years ago

OK that is what I had thought, so then there is no concern about people in the denominator not being COVID related admissions! thank you 👍

LiamSmeeth commented 4 years ago

Thanks all. I think the people we will be interested in are anyone with Covid (however diagnosed) who are: (a) admitted to ICU at all (b) the sub-set of these who get ventilated/other form of respiratory support Hope that makes sense

evansd commented 4 years ago

There are three fields in the ICNARC data which relate to ventilation status:

All of these can sometimes be NULL and they don't always agree e.g. the Ventilator flag can be 0 but a positive number of days of respiratory support is recorded. The breakdown is:

status percentage
has_nulls 2.87
consistent 57.43
not_ventilated_but_days_recorded 39.64
ventilated_but_no_days_recorded 0.06
Produced using this SQL ```sql SELECT status, COUNT(*) * 100.0 / (SELECT COUNT(*) FROM ICNARC) AS percentage FROM ( SELECT CASE WHEN Ventilator IS NULL OR (BasicDays_RespiratorySupport IS NULL AND AdvancedDays_RespiratorySupport IS NULL) THEN 'has_nulls' WHEN Ventilator = 0 AND BasicDays_RespiratorySupport + AdvancedDays_RespiratorySupport > 0 THEN 'not_ventilated_but_days_recorded' WHEN Ventilator = 1 AND BasicDays_RespiratorySupport + AdvancedDays_RespiratorySupport = 0 THEN 'ventilated_but_no_days_recorded' ELSE 'consistent' END AS status FROM ICNARC ) t2 GROUP BY status ```

This suggests to me that we should ignore the Ventilator field and just rely on the day counts, which is what I'll implement unless anyone objects?

rohinimathur commented 4 years ago

Hi @evansd that sounds very sensible! thank you.

sebbacon commented 4 years ago

@wjchulme do you think this summary by @evansd belongs in the data-descriptions doc?

wjchulme commented 4 years ago

Digging through the ICNARC documentation it seems that number of days on resp support are items that have been there since at least CMP v3.1, whereas Ventilator is new from v4.0. The data flows for v4.0 aren't available online though so it's not clear exactly what Ventilator refers to. Anyway, yes, I think your approach is sensible.

UPDATE: as of september 2020 v4.0 is not yet live. So it's possible that ventilator is a derived variable from something else. It would be good to get to the bottom of it.

@sebbacon it probably belongs in a standalone "investigation of ICNARC data" notebook. But that's not going to happen immediately. I'll add a link to this issue (and others, which is on my to-do list)

wjchulme commented 4 years ago

For the BasicDays_RespiratorySupport and AdvancedDays_RespiratorySupport variables, I assume this relates to non-invasive/invasive ventilation ("advanced airway support" ~= "intubated"). Or if not this is as close as we can get. In which case AdvancedDays_RespiratorySupport>0 indicates invasive ventilation, AdvancedDays_RespiratorySupport=0 AND BasicDays_RespiratorySupport>0 indicates non-invasive ventilation. Both =0 is non-ventilated. The Ventilator variable then isn't needed, but we should find out what exactly it is.

It would be good to clarify with ICNARC, @rohinimathur!