Relational event models for longitudinal network data with an application to interhospital patient transfers