This page shows an example Stata .do file for generation of the Nordic Multimorbidity Index (NMI) in pharmacoepidemiologic studies. The code-example has to be modified to fit with your data structure. The basic workflow is that a file with the study population (containing an id variable and date of cohort entry) is merged with a file with diagnosis codes (ICD-10 codes and corresponding dates) and a file with filled prescriptions (ATC codes and corresponding dates). Indicator variables for each condition in the NMI are created and the weights of each condition is summed for all individuals to provide a single, numerical score, the NMI.
Please cite data from this resource as:
Development and validation of a Nordic Multimorbidity Index based on hospital diagnoses and filled prescriptions
Kristensen KB, Lund LC, Jensen PB, Broe A, Rotbain E, Damkier P, Pottegård A, Andersen JH, Højlund M, Olesen M, Rasmussen L, Hansen MR, Ernst MT, Wesselhoeft R, Henriksen DP, Reilev M, Bliddal M, Hallas J.