An adaptive federated learning framework for clinical risk prediction with electronic health records from multiple hospitals