[ORB-16] enabled advanced search to run queries based on the patient key/metadata store