Text this: A phenotype-based AI pipeline outperforms human experts in differentially diagnosing rare diseases using EHRs