A Predictive Model for Medical Events Based on Contextual Embedding of Temporal Sequences