Registre de correu electrònic: Two-stage Federated Phenotyping and Patient Representation Learning