Pragmatic randomised trials using routine electronic health records: putting them to the test