A collection of scripts and look up tables for analysis of electronic healthcare record data.
Contents
- Bug grouper - a script for grouping common bacterial pathogens bug_grouper.R
- EHR measurement limits in adults - a list of values deemed to extreme to be compatible with an actual measurement, recommended that these are set to missing in analyses EHR Measurement Limits - Adults.xlsx
- Calculate Comorbidity Index - a script for calculating Charlson and Elixhauser scores using diagnostic codes from 1-year lookback Calculate Comorbidity Index.R
- NEWS2 Score calculation - used in UK hospitals for detecting deteriorating patients based on observations. NOTE: in this version, there is no implementation of the SpO2 scale 2 appropriate for patients with chronic hypercapnic respiratory failure. news_score.R
Look-up tables
- Local subspecialties - specialty codes matched to specialties matched to specialty groups local_subspecialties_lookup.csv
- ICD-10 codes for primary diagnosis (needing revisions and confirmation for your own projects)
- ICD-10 codes to CCS codes - for identifying possible sources of infection ccs_lookup.csv
- ICD-10 codes to CCS codes [UPDATED SEP 2022] - vs. ccs_lookup.csv, this version deals with cases where ICD10 mapping to >1 CCSR code results in conflicting labels for "bacterial infection" and "source" ccsr_lookup_v20220909.csv