patient record fast query fix