Large multi-decade healthcare databases exist of longitudinal patient electronic health records (EHR) that have been used to conduct public health research. EHR data can be enhanced by being linked to other databases that provides augmented information such as the built environment that the patient lives in (e.g. neighborhood walkability, number of parks, property value, and crime statistics). Further, patients move over time into potentially different built environments yielding time-varying predictors of interest, which allows for estimation of causal association tied to health outcomes (e.g. weight) and changes in the built environment. Analyzing this type of data is complicated due to numerous factors including multi-level correlated data (spatial and longitudinal), missing data, and estimating a time-varying predictor with appropriate lag time until expected outcome response. In this talk we will provide an example of a study that links EHR data to the built environment in Washington State. We will detail different statistical approaches developed to handle the challenges presented when analyzing this type of data.