A Canonical Architecture For Predictive Analytics on Longitudinal Patient Records