Search for subsets within a 250k line text dataset
I'm assuming your code does some background processing, because otherwise the patient data would be stored in a database, not in a text file. In that scenario, 4 seconds is probably ok.

Instead of grouping the records, you could simply filter them. That saves two lines of code, but will probably not be much faster.