
Add 2023 MHT-specific prescription data to skeleton
Source:R/x2023-mht-specifics.R
x2023_mht_add_lmed.RdProcesses Swedish prescription registry data (LMED) specifically for the 2023 Menopausal Hormone Therapy (MHT) study. Categorizes medications into predefined groups, applies duration fixes, and creates treatment approach variables.
Value
The skeleton data.table is modified by reference with MHT treatment variables and approach categorizations added. Returns the modified skeleton invisibly.
Details
This function performs several steps:
Restricts LMED data to individuals in the skeleton
Categorizes products into MHT groups (A1-I2) based on product names
Applies duration fixes for specific products (IUDs, minimum doses)
Creates treatment approach variables based on predefined logic
Handles treatment gaps and overlapping prescriptions