This is a code list generating template for CPRD Gold and Aurum. Please note that this script only serves as a example of how to generate code lists, and should not be used to generate depression code lists without discernment.
If you're using this script as a template, please search 🔴 in the search bar to jump immediately to sections that need changing. Further instructions can be found in: https://ucl-dop-mhds.github.io/ucl-dop-phenotype-codelists-site/generate-codelist/
- Set up and load data
- Search for new relevant med code
- Compare with multiple reference lists
- Create and update code lists
- CPRDAurumMedical.txt: CPRD Aurum medical dictionary
- CPRDGoldMedical.txt: CPRD Gold medical dictionary
- https://raw.githubusercontent.com/smwu/SMI_GLP/main/Code_Lists/Depression/Aurum_Depression_codelist_20250725.txt: depression codelist from github repository
- https://raw.githubusercontent.com/smwu/SMI_GLP/refs/heads/main/Code_Lists/Depression/Gold_Depression_codelist_20250725.txt: depression codelist from github repository
- hdrukcodelist.csv: Depression phenotype from HDRUK library (https://doi.org/10.48533/6g09-rp92)
- qof.xlsm: Quality and Outcomes Framework clusters list
- aurum_depression_codelist_15042026_tobereviewed.csv: Aurum codelist to be clinically reviewed
- gold_depression_codelist_15042026_tobereviewed.csv: Gold codelist to be clinically reviewed
- aurum_depression_codelist_15042026.txt: Final depression codelist from Aurum
- gold_depression_codelist_15042026.txt: Finaly depression codelist from Gold
- Depression_metadata_15042026.txt: Metadata text file