Open matthewberesford92 opened 10 months ago
re: care homes the addresses table in ehrql has fields that should (hopefully) be self-explanatory for this
re: BMI you could copy this function which has been used in our comparative booster effectiveness study
Hi @joshuamutio
As discussed today I have now created a new list for oestrogen-containing meds exlcuding topical preparations which can be found here (https://www.opencodelists.org/codelist/user/matthewberesford92/oestrogen-based-drugs-excluding-topical-preparations/0a2b9272/)
@joshuamutio
do you need an equivalent ICD-10 codelist for all of the medical diagnoses we are looking for (e.g. ischaemic heart disease, chronic resp disease etc) so you can search HES as well as TPP?
@matthewberesford92 @Jongmassey @joshuamutio I'm back from parental leave just in case you need my assistance. Jon / Josh I work with the national clinical leads for VTE prevention in my other job, and can support from within that role as needed.
That's ace - I'd forgotten that this was your area of expertise and your offer of help is very welcome
Thanks @speed-vm this is great news
@Jongmassey @matthewberesford92 How are you getting on?
Matt, perhaps we could just grab 20-30 minutes in next couple of weeks. (email didn't work the other day when I was trying to check in)
HI @speed-vm It would be good to check in. We have a made a bit of progress but not loads. One issue has been Josh's access (or lack of) to the results server which has made iterating our analytic code more difficult. Hopefully we have sorted this now as Josh has dug out his old (non M1 chip) laptop. We have our weekly check in on Thursday's at 12....I am on nights this weekend but do you want to join next week (23rd November)?
Yes please, Thursday 23rd at 12 works for me. Looking forward to catching up.
Please could you forward over the invite?
Hope nights ok!
BW
Vicky
From: Matt Beresford @.> Sent: 15 November 2023 07:19 To: opensafely/vte-diagnoses-and-deaths @.> Cc: SPEED, Victoria (KING'S COLLEGE HOSPITAL NHS FOUNDATION TRUST) @.>; Mention @.> Subject: Re: [opensafely/vte-diagnoses-and-deaths] Codelist summary (Issue #4)
This message originated from outside of NHSmail. Please do not click links or open attachments unless you recognise the sender and know the content is safe.
HI @speed-vmhttps://github.com/speed-vm It would be good to check in. We have a made a bit of progress but not loads. One issue has been Josh's access (or lack of) to the results server which has made iterating our analytic code more difficult. Hopefully we have sorted this now as Josh has dug out his old (non M1 chip) laptop. We have our weekly check in on Thursday's at 12....I am on nights this weekend but do you want to join next week (23rd November)?
— Reply to this email directly, view it on GitHubhttps://github.com/opensafely/vte-diagnoses-and-deaths/issues/4#issuecomment-1811928558, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASL2HZO6G7KTS47DMC4R2CLYERUITAVCNFSM6AAAAAA3M4MJWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJRHEZDQNJVHA. You are receiving this because you were mentioned.
This message may contain confidential information. If you are not the intended recipient please: i) inform the sender that you have received the message in error before deleting it; and ii) do not disclose, copy or distribute information in this e-mail or take any action in relation to its content (to do so is strictly prohibited and may be unlawful). Thank you for your co-operation.
NHSmail is the secure email, collaboration and directory service available for all NHS staff in England. NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and other accredited email services.
For more information and to find out how you can switch visit Joining NHSmail – NHSmail Supporthttps://support.nhs.net/article-categories/joining-nhsmail/
Sure, what is your email again vicky? I lost your address as my nhs.net email was blocked.
Thanks Matt
@matthewberesford92 v.speed on nhs.net.
Codelists needed: @joshuamutio @Jongmassey - will work on pulling these lists together. Where possible, will find ones on opencodelists and X-ref with list I have from a colleague.
Primary diagnosis
Demographics
[x] Ethnicity - 6 point and 16 point list on opencodelists, if TPP/HES different, use TPP
Suggest we use the 6-category list here https://www.opencodelists.org/codelist/opensafely/ethnicity/2020-04-27/
This article summarises validity of this approach. Looks like by combining HES APC and TPP we are likely to get high degree of completeness (~97% in the study) but there are some issues with discordance in non white ethnicities. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9346309/
Codelist already available from other OS project here https://github.com/opensafely/representativeness/blob/master/codelists/opensafely-ethnicity.csv
Analytic code looks like it is available here https://github.com/opensafely/representativeness/blob/master/analysis/common_variables.py
[x] IMD - recorded as rank on TPP rounded to nearest to 100, most other projects have used quintiles
Dataset listing Lower super output area to 2019 IMD rank can be found here https://opendatacommunities.org/data/geography/uk-postcodes
Dataset linking all UK postcodes to LSOA can be found here https://opendatacommunities.org/data/geography/uk-postcodes
Approach already used in another OS paper - see code here https://github.com/opensafely/representativeness/blob/master/analysis/common_variables.py
Looks like you can use the addresses table and it is already done for you! https://docs.opensafely.org/ehrql/includes/generated_docs/schemas/beta.tpp/#addresses
[x] Care home - is the address on TPP a care home on CQC database - @Jongmassey to explore
approach from another OS paper here https://github.com/opensafely/representativeness/blob/master/codelists/opensafely-nhs-england-care-homes-residential-status.csv
looks like we can just use addresses table as indicated by Jon https://docs.opensafely.org/ehrql/includes/generated_docs/schemas/beta.tpp/#addresses
Secondary diagnoses @joshuamutio - what do you need to interrogate HES? ICD10?
[x] Cancer
Snomed-CT (note lung and haem lists are separate hence 3 links) https://www.opencodelists.org/codelist/opensafely/lung-cancer-snomed/2020-04-15/#full-list, https://www.opencodelists.org/codelist/opensafely/haematological-cancer-snomed/2020-04-15/, https://www.opencodelists.org/codelist/opensafely/cancer-excluding-lung-and-haematological/2020-04-15/
ICD10 https://www.opencodelists.org/codelist/user/matthewberesford92/cancer-codes/7ac1c63c/#full-list
[ ] 'Acute infection' excluding covid - ?use resp infections only as has been done before - any records of within 30 days either side anchored to date of VTE diagnosis. @matthewberesford92 to explore if any good lists out there
[x] COVID - any positive diagnosis in SGSS within 30 days either side anchored to date of VTE diagnosis
See linked issue here https://github.com/opensafely/vte-diagnoses-and-deaths/issues/7
Should
[x] BMI
I think we should aim to extract BMIs for all patients with VTE and then classify into groups. This will allow us to more clearly indicate the degree of missingness. Groups should be as for this OS paper (7 groups inc missing group) https://www.nature.com/articles/s41586-020-2521-4
Use the most recently recorded one prior to date of diagnosis.
Do not attempt to compute BMI from height and weight
Could use code from booster study that can be found here https://github.com/opensafely-core/ehrql/blob/82f8d41ef5f629999a29d0dadd11223e5a9bc9d3/tests/acceptance/external_studies/comparative-booster-ehrql-poc/analysis/variables_lib.py#L81
[X] Coronary heart disease -
SNOMED https://www.opencodelists.org/codelist/nhsd-primary-care-domain-refsets/chd_cod/20210127/#full-list
ICD-10 https://www.opencodelists.org/codelist/user/matthewberesford92/coronary-heart-disease-icd10/361e4561/
[X] Heart failure
For SNOMEDCT - combine PINCER/NHSD lists - https://www.opencodelists.org/codelist/nhsd-primary-care-domain-refsets/hf_cod/20210127/, https://www.opencodelists.org/codelist/pincer/hf/v1.8/
ICD-10 - https://www.opencodelists.org/codelist/user/matthewberesford92/heart-failure-icd-10/1d0ed22c/#full-list
[x] Chronic Respiratory disease'
CTV3 - Suggest we use this CTV3 list used in OS nature paper. Lots of discussion on github and refinement appears to be very robust. https://github.com/opensafely/risk-factors-research/blob/main/codelists/opensafely-chronic-respiratory-disease.csv. NOTE: asthma has been excluded, looks like they were suggesting a different way of finding this through asthma medication due to risk of including individuals with a historical childhood diagnosis.
SNOMED-CT [https://www.opencodelists.org/codelist/primis-covid19-vacc-uptake/resp_cov/v.1.5.3/#full-list]
ICD-10 https://www.opencodelists.org/codelist/user/matthewberesford92/chronic-respiratory-disease-icd10/18ceab18/
SCRAP 'Connective tissue disease'
[X] Pregnancy
on opencodelists (NHSD or PRIMIS), any pregnancy code within a year of VTE diagnosis, exclude any male or any females <10 or >60
SNODMED - https://www.opencodelists.org/codelist/nhsd-primary-care-domain-refsets/c19preg_cod/20200812/
[X] Thrombophilia
SNOMED - https://phenotypes.healthdatagateway.org/concepts/C2905/version/7425/detail/
ICD-10 - https://www.opencodelists.org/codelist/user/matthewberesford92/thrombophilia-icd10/31de1e4d/
Medication
[X] Tranexamic acid
DM+D https://www.opencodelists.org/codelist/user/matthewberesford92/tranexamic-acid/35bfa018/#full-list
Need to define when a prescription is relevant. Essentially want 'active' prescriptions. @Jongmassey any ideas on best methodology to do this based on other studies?
[X] Oestrogen-containing (ostreogen-like) medication excluding topical preparations
DM+D https://www.opencodelists.org/codelist/user/matthewberesford92/oestrogen-based-drugs-excluding-topical-preparations/0a2b9272/
Need to define when a prescription is relevant. Could suggest any prescription in 1 year preceding VTE diagnosis. This covers implants which may exert effect up to 8 months after insertion.