Public-Health-Scotland / hsmr

Reproducible Analytical Pipeline of the Hospital Standardised Mortality Ratio (HSMR) quarterly publication
9 stars 1 forks source link

Edits to location name and updated admission type #66

Closed robynm01 closed 5 years ago

robynm01 commented 5 years ago

Hopefully on a roll here . I've made the following edits, grateful if someone could check/ approve:

1) create_smr_data.R - Added in location names for the updated HB codes as these aren't in the National Ref File HB lookup file and were getting dropped. - Tested and works. 2) create_trends_data.R - Same as above. 3) sql_smr.R - We were still pulling in old_tadm for prev_emerg, have updated this to pull in current admission type variable. 4) smr_pmorbs.R - Have amended to reference new admission type instead of old_tadm variable and select out emergency admission codes related to this updated variable when calculating n_emerg.

Not tested amendments 3 & 4 work yet so hopefully I haven't broken anything!