smr_pmorbs: Prior-morbidities Wrangling for HSMR data

View source: R/smr_pmorbs.R

smr_pmorbsR Documentation

Prior-morbidities Wrangling for HSMR data

Description

Creates the remainder of necessary variables to be used in the HSMR model.

Usage

smr_pmorbs(smr01, smr01_minus5, morbs)

Arguments

smr01

Input tibble for admissions, see details.

smr01_minus5

Input tibble for admissions going back five years, see details.

morbs

Input tibble for the charlson index for comorbidities lookup.

Details

smr_pmorbs expects a tibble of data extracted from SMR01 that has already been through smr_wrangling. It also expects a tibble of data extracted from SMR01 covering a time-period that begins five years prior to that of the data in smr01. This is so that the function is able to calculate the Charlson Index for Comorbidities weighting for the previous five years. It also expects a tibble for the Charlson Index lookups.


Public-Health-Scotland/hsmr documentation built on June 24, 2024, 1:48 a.m.