opensafely / ics-research

This is the code and configuration for our paper, Inhaled corticosteroid use and risk COVID-19 related death among 966,461 patients with COPD or asthma
https://opensafely.org
0 stars 1 forks source link

*OTHER* COPD Exacerbations #11

Closed annaschultze closed 4 years ago

annaschultze commented 4 years ago

Aiming to use a validated approach for identifying exacerbations in EHR data as per https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0151357#sec015

This recommends defining an exacerbation as:

(1) a medical diagnosis of LRTI or AECOPD, or (2) a prescription of COPD-specific antibiotic combined with OCS for 5–14 days, or (3) a record of two or more respiratory symptoms of AECOPD along with a prescription of COPD-specific antibiotics and/or OCS on the same day.

lrti_Readcodes.xlsx

AECOPD Readcodes.xlsx sputum Readcodes.xlsx breathless Readcodes.xlsx cough Readcodes.xlsx

These combined strategies should be used only after removing any AECOPD events occurring on the same date as codes suggestive of a visit for annual COPD review or provision of rescue packs for COPD-specific antibiotics or OCS.

ann_rev_resc_pack Readcodes.xlsx

The codes used in this study to identify each of the above are attached below. I'm guessing Read codes would need to be translated to Read 3. It seems we may need different code lists for these as some are subject to different logic as well, i.e. (1) is any event but (3) needs to be counted and assessed with drug treatment lists.

journal.pone.0151357.s002.DOCX

ianjdouglas commented 4 years ago

Anyone free to help with code lists above @CarolineMorton @alexwalkercebm @HenryDrysdale @laurietomlinson @hjforbes ? We need to identify any relevant snomed codes. Would any qof codes be relevant for this? @brianmackenna in the journal.pone.0151357... file there's a list of oral steroid and antibiotic codes specific to COPD exacerbations, but we maybe already have the steroids?

hjforbes commented 4 years ago

I can look for QOF and snomed codes now

ianjdouglas commented 4 years ago

Brilliant, thanks Harriet - I think best start with snomed, Will find out about qof and get back to you.

hjforbes commented 4 years ago

@ianjdouglas @annaschultze

STEP 2: QOF Acute exacerbations of COPD: NOTE: COPD exacerbations fall within clusters where the majority of codes will not be relevant, so will pick up a large amount of irrelevant codes. qof-copd_exacerbations.xlsx

Breathlessness: qof-breathlessness.xlsx

No QOF codes for LRTI, sputum, cough, rescue packs, antibiotic use or oral corticosteroid use were found.


STEP 3: SNOMED
snomed-exacerbations.xlsx NOTE: This includes SNOMED parent codes for rescue_pack acute_lrti breathlessness cough exacerbation_of_copd sputum

(@brianmackenna I haven't looked for meds in SNOMED, as I assume this has been done?)

Can we made it clear from the title of this code list it is COPD exacerbation we are looking for? Just to make it clear it's not asthma exacerbation as well.

brianmackenna commented 4 years ago

I'm halfway through rescue pack. One issue is these are issued in advance with self management plans so there is no time relation to exacerbation. Jenny Quint has commented on the protocol about some papers validating approach so I'll have a look at these as well (I just realise one is above!).

brianmackenna commented 4 years ago

I have produced a notebook of antibiotics and steroids here that can be used in combination with above.

An observation about the list of oral antibiotics included in Rothnie et al paper - some of those that are classified as COPD specific antibiotics I am slightly surprised to see. Namely -

I'm not too worried either way about any of above as a validation has been done but just for noting.

Azithromycin - when expanding beyond the three first line medicines I might also have expected to see the macrolide azithromycin included.

annaschultze commented 4 years ago

@brianmackenna good catch, I agree given the validation approach we should be fine, but might be worth flagging to the clinical reviewer if we're deviating from the validated list by adding in additional codes for clinical conditions from SNOMED/QoF as is.

Do we need to have the code lists translated to Read3, and could you advise on how best to do that? LT can then do a clinical review (which should be quick as we're aiming to follow the validated approach).

hjforbes commented 4 years ago

@annaschultze @ianjdouglas are you happy for the Read2, QOF and SNOMED codes to be translated to READ3? If so, @CarolineMorton can forward to TPP for us.

ianjdouglas commented 4 years ago

Thanks @hjforbes Looking through these various lists, some look like they won't capture acute events, My view is:

ACUTE EVENTS - ALL LISTS TO BE MAPPED BY TPP lrti_Readcodes.xlsx AECOPD Readcodes.xlsx sputum Readcodes.xlsx breathless Readcodes.xlsx cough Readcodes.xlsx

snomed-exacerbations.xlsx

(though I think the rescue pack codes is not needed as may represent issue outside time of AECOPD @CarolineMorton , what do you think?)

NOT ACUTE EVENTS, WILL NOT HELP IDENTIFY EPISODES OF AECOPD qof-copd_exacerbations.xlsx qof-breathlessness.xlsx (@CarolineMorton -please confirm, do you think unliklely to be acute?)

hjforbes commented 4 years ago

I agree with Ian above. The QOF codes are additionally very non-specific, thus would pick up huge amounts of irrelevant codes for us to sift through.

hjforbes commented 4 years ago

After discussion with drugs study team, definition is as follows:

Number of COPD exacerbations in the year prior to study entry (assuming cohort design). An exacerbation is defined as

Background to decision: Not including symptom codes: Jenni Quint advised symptoms codes added little to picking up additional exacerbations and would be a lot of additional work for the programmers, therefore we decided to remove symptoms from the definition. The Rothnie et al exacberation validation paper only has composite validated algorithms including symptom codes, thus we cannot use a composite validated algorithm now (although the components of our algorithm are validated).

Not requiring LRTI to have a treatment code; most exacerbations with an LRTI code will have OCS/antibiotics treatment, but some won't. The approach of not including treatments simplifies things for the programmers.

Sensitivity doesn't matter here: We want to rank people amongst themselves, therefore if we miss some codes, this isn't a major problem. There may be some misclassification if practices record exacerbations in different ways. But given we can’t use hospital data it’s the best we can do.

@CarolineMorton @ianjdouglas

alexwalkerepi commented 4 years ago

CTV3 codes back from conversion. CTV3_COPDEx_Raw.xlsx

Note from @chris-tpp:

NB: We took out the QOF codes, the Read codes for dyspnoea, sputum, and cough, and the high-level SNOMED codes for these three symptoms too.

hjforbes commented 4 years ago

Great, I'll check these now and post a separate file for LRTI and AECOPD

hjforbes commented 4 years ago

Reviewed codes for LRTI and AECOPD here: CTV3_COPDEx_Raw_HF2.xlsx

@CarolineMorton or @HenryDrysdale can you cast a clinical eye over them? (once they're finalised I'll put them in separate spreadsheets)

HenryDrysdale commented 4 years ago

Sure, I can do this now.

CarolineMorton commented 4 years ago

XaIQT Chronic obstructive pulmonary disease monitoring CTV3Map_Code_And_Term XaIeq Asthma annual review CTV3Map_Code_And_Term XaIet Chronic obstructive pulmonary disease annual review CTV3Map_Code_And_Term XaKYH Deferred antibiotic therapy CTV3Map_Code_And_Term XaK8U Number of COPD exacerbations in past year CTV3Map_Code_And_Term XaR16 Advance supply of steroid medication CTV3Map_Code_And_Term XaW9D Issue of chronic obstructive pulmonary disease rescue pack CTV3Map_Code_And_Term

Taken from email message from Chris @hjforbes

hjforbes commented 4 years ago

Annual review and rescue pack codes here: copd_rescue_pack_annual_review_HF.xlsx

Only change from the list sent from Chris is I've removed: "Asthma annual review"

HenryDrysdale commented 4 years ago

Hi all, I've reviewed the LRTI / AECOPD codes. A few points to note / discuss:

  1. I'm slightly late to this, but from discussing with @hjforbes and reading the above, I gather we are trying to detect COPD exacerbations, using AECOPD codes and LRTI codes. To do this we need to exclude from LRTI codes anything which isn't a COPD exacerbation (like pneumonia).

  2. In line with this, I've excluded pneumonia, but included bronchitis and other LRTIs.

  3. I've excluded bronchiolitis, because this occurs in small children, who don't have COPD.

  4. I've excluded "flu-like illness" and "virus detected" codes, because I think they're too broad and very non-specific.

Happy to be corrected or discuss any of the above!

Henry

CTV3_COPDEx_Raw_HF2_HD.xlsx

hjforbes commented 4 years ago

Jenni Q had included bronchiolitis, flu-like illness and influenza virus detected codes in the LRTI list. Certainly sounds as though there is a good rationale for excluding them, except if our priority is to be replicating Jenni Q's algorithm.

@ianjdouglas and @CarolineMorton can you check this?

brianmackenna commented 4 years ago

Just to flag I think medicines above need a check for use in the rule with highest PPV. @richiecroker @ianjdouglas

ianjdouglas commented 4 years ago

Thanks @HenryDrysdale and @hjforbes - I think it's useful if we can refer to the validated algorithm, so would be keen to keep to the same list Jenni used - I can see a rationale for investigating how a change to the list might impact things, but we won't know how this affects the PPV etc, and would then be difficult to justify saying we're using a validated algorithm.

@brianmackenna - to check, you're asking about the rescue pack meds? For similar reasons I'd go with the original list, minus the topicals you identified.

brianmackenna commented 4 years ago

Yes - just needs a confirmatory check https://github.com/ebmdatalab/respiratory-meds-covid-codelist-notebook/blob/master/notebooks/copd.exacerbation.ipynb

hjforbes commented 4 years ago

Thanks all. Final lists are as follows: LRTI (specifically excluding pneumonia codes): CTV3_COPDEx_Raw_HF2_LRTI.xlsx AECOPD: CTV3_COPDEx_Raw_HF2_AECOPD.xlsx Annual review/rescue packs: copd_rescue_pack_annual_review_HF.xlsx

hjforbes commented 4 years ago

@annaschultze @ianjdouglas @evansd think this is ready for sign off... draft notes here for you to complete copd_summary.txt

CarolineMorton commented 4 years ago

Hi everyone, Just briefly reviewing this. Why are we excluding pnuemonia codes for LRTI? They are more or less used interchangably, require antibiotics, and are common in COPD patients? happy if there is a good reason to exclude, but feel like it should be included. Liam may also have thoughts on this.

hjforbes commented 4 years ago

It's to match the LRTI algorithm (number 8) in the Rothnie et al paper, so we can cite the PPV for LRTI...

hjforbes commented 4 years ago

Pneumonia codes excluded: see here, https://doi.org/10.1371/journal.pone.0151357.t001

Jenni Q said pneumonia was not included because pneumonia is not an exacerbation. She's not adverse to including pneumonia codes, but the LRTI algorithm was validated without.

CarolineMorton commented 4 years ago

Ok that seems fair enough. I am happy with that. Following the algorithm is better if we can use PPV.

Thanks for checking for me. Sorry for being slow to query this!

ianjdouglas commented 4 years ago

FINAL DEFINITION: Number of COPD exacerbations in the year prior to study entry. An exacerbation is defined as • LRTI (specifically excluding codes for pneumonia); or • AECOPD code Neither should be on the same day as a COPD annual review or treatment rescue pack Exacerbations within 14 days of a new exacerbation are assumed to be the same episode.

FINAL CODE LIST This codelist was made by: algorithm 8 and 12 from Rothnie et al paper and subsequently reviewed by Anna Schultze, Harriet Forbes, Henry Drysdale, Ian Douglas, Caroline Morton https://github.com/ebmdatalab/opencorona-ics-research/files/4585561/CTV3_COPDEx_Raw_HF2_LRTI.xlsx https://github.com/ebmdatalab/opencorona-ics-research/files/4585562/CTV3_COPDEx_Raw_HF2_AECOPD.xlsx Copy of copd_rescue_pack_annual_review_HF_ID.xlsx

FLEXIBILITY NEEDED BETWEEN STUDIES:

EFFECTS ON COHORT SELECTION: None anticipated. Should be noted that sensitivity doesn't matter here: We want to rank people amongst themselves, therefore if we miss some codes, this isn't a major problem.

POTENTIAL BIASES: There may be some misclassification if practices record exacerbations in different ways.

CLINICAL SIGN OFF & DATE:

EPIDEMIOLOGY SIGN OFF & DATE: @ianjdouglas 15/5/20

SHARED WITH WIDER TEAM:

FINAL SIGN OFF DATE:

ianjdouglas commented 4 years ago

@brianmackenna @hjforbes @CarolineMorton

As we're going with algorithms 8 and 10 only

8=LRTI code 12=AECOPD code, not on same day as COPD annual review or rescue pack issue.

So, 12 needs to not be on same day as a clinical code here: https://github.com/ebmdatalab/opencorona-ics-research/files/4585570/copd_rescue_pack_annual_review_HF.xlsx But doesn't need us to look for an antibiotic prescription code as that would represent a genuine acute AECOPD in the absence of an annual review or rescue pack clinical code. Let me know if you agree.

brianmackenna commented 4 years ago

I thought we are going for recommendations 1 & 2 of the Rothnie et al conclusion?

And discounting 3 due to difficulty in coding.

One recommended approach would be to use the following strategy that resulted in PPV of 86% and sensitivity of 63%: a combination of: (1) a medical diagnosis of LRTI or AECOPD, or (2) a prescription of COPD-specific antibiotic combined with OCS for 5–14 days, or (3) a record of two or more respiratory symptoms of AECOPD along with a prescription of COPD-specific antibiotics and/or OCS on the same day.

ianjdouglas commented 4 years ago

No, in the end we decided to go with:

See @hjforbes comment 2 days ago for more detail.

brianmackenna commented 4 years ago

I have checked the codes and they look good but I would suggest adding Respiratory disease medication review to the definition of annual review

CarolineMorton commented 4 years ago

No, in the end we decided to go with:

  • LRTI or;
  • AECOPD code not on day of annual review/rescue pack

Corresponds to algorithm 8 and 12 - both of which have known validity and are relatively easily identified.

See @hjforbes comment 2 days ago for more detail.

Are the codelists finalised for this? If so we can add to codelists.opensafely.org and write into study defintiion?

ianjdouglas commented 4 years ago

The Snomed term Brian identified isn't yet included in the copd rescue pack annual review file. It's Respiratory disease medication review (procedure) SCTID: 858091000000102.

There are also QoF cluster codes and Read2 codes for medication review but none are general to respiratory or are just specific to asthma. I don't know how they're used in practice @CarolineMorton @brianmackenna but would we want to only capture specific medication review codes in case the code was being used for some other disease?

ianjdouglas commented 4 years ago

Would we also want Pulmonary disorder medication review (procedure) SCTID: 473221002 ?

CarolineMorton commented 4 years ago

I have asked Chris for both of these terms.

brianmackenna commented 4 years ago

Agree with additional code.

I don't think we should include general medication reviews in the first run as very non specific. I'll try and remember for a future study.

ianjdouglas commented 4 years ago

Snomed ID 473221002 has no map therefore not used 858091000000102 maps to XaZpj and now added

ianjdouglas commented 4 years ago

Confirmed with Jenni Quint that a code of either LRTI or AECOPD on the same day as annual review/rescue pack should be excluded