Fixes for issues with the new QME where lack of test_id in certain queries caused issues
Added caching in patients_controller that shouldn't cause issues