Created
August 27, 2019 20:27
-
-
Save kbs5280/ba2b96dc0770a7597a955c8fd56f587e to your computer and use it in GitHub Desktop.
Customer Dynamics - Selective Consult Inventory Query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Replace | |
SELECT id, Apt_Date__c,Arrival_Time__c, Consult_Room__c FROM Consult_Inventory__c WHERE Patient_Phone__c = '{global:SearchANI}' LIMIT 1 | |
// With | |
SELECT Id, Apt_Date__c, Arrival_Time__c, Consult_Room__c FROM Consult_Inventory__c | |
WHERE Consult_Room__r.Room_Type__c NOT IN ('Practice','Unconfirmed') | |
AND (Apt_Date__c >= LAST_N_DAYS:30 AND Apt_Date__c <= TODAY) | |
AND Special_Initiative__c NOT IN ('Workshop','Group Consult') | |
AND Pre_Screen_Type__c != 'Seminar' | |
AND isConsultScheudled__c = 1 | |
AND Active__c = true | |
AND IsOnHold__c = false | |
AND Patient_Phone__c = '{global:SearchANI}' | |
LIMIT 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment