Text this: Balancing Accuracy and Privacy in Federated Queries of Clinical Data Repositories: Algorithm Development and Validation