General practice electronic health record (EHR) data have significant potential for clinical research. This study demonstrates the feasibility of utilising longitudinal EHR data analysis to address clinically relevant outcomes and uses the relationship between lipid medication prescription and all-cause mortality in the elderly as an exemplar for the validity of this methodology. EHR data were analysed to describe the association of lipid medication use, non-use or cessation with all-cause mortality in patients aged ≥75 years. Survival analysis with Cox regression was used to calculate hazard ratios, which were adjusted for confounders. There was no significant difference in all-cause mortality among patients according to their use, non-use, or cessation of lipid medications. The outcomes of this study correlate well with the results of other research works. This single-practice study demonstrates the feasibility and potential of analysing EHR data to address important clinical issues such as the relationship between all-cause mortality and lipid medication prescription in the elderly.