Drug Testing Full Integration Service
Quest Diagnostics
Processing of EXE:
Web Service(“https://qcs-uat.questdiagnostics.com/services/esservice.asmx”) consumed in exe have three web methods which are as,
1) Submit Order
2) Update Order
3) Remove Order
1)Submit Order:
Place an Employer Solutions order requesting drug testing collection services. This method allows for a single donor to be submitted with multiple test events.
This CreateOrder method is the first step in the eOrder process.
There are some conditions on BGC_DTOC_Order__c for creating order to Quest Diagnostics portal,
Partner_Location__r.Integration_Vendor_Name__c should be 'Quest Diagnostics' Ready_For_E_Registration__c should be 'TRUE'
Related_BGC_Order__c should not be null
Drug_Integration_Status__c should be 'Quest Create Order'
Drug_Integration_Status__c should not be 'Quest Validation Error' Related_BGC_Order__r.Order_Status__c should not be 'Cancelled' Related_BGC_Order__r.Order_Status__c
should not be 'Deleted'
Drug_Test_Schedule_Complete__c should be 'FALSE'
Drug_Test_Collection_Complete__c should be 'FALSE'
After satisfying above conditions exe is converting the data into xml format and posted it to web service for processing.
String xmlString = CreateOrder( string Username, string Password, string OrderXML)
Submit Order response: The CreateOrder() Web Method will return an XML string response which describes the outcome of the Web Method request.
Two examples below, Success and Failure.
2) Update Order:
There are some conditions on BGC_DTOC_Order__c for updating order,
Partner_Location__r.Integration_Vendor_Name__c should be 'Quest Diagnostics'
Ready_For_E_Registration__c should be 'TRUE'
Related_BGC_Order__c should not be null
Drug_Integration_Status__c should be 'Quest Update Order'
Reference_Test_ID__c should not be null
Reference_Test_ID__c should not be blank
Drug_Integration_Status__c should not be 'Quest Validation Error' Related_BGC_Order__r.Order_Status__c should not be 'Cancelled'
Related_BGC_Order__r.Order_Status__c should not be 'Deleted'
After satisfying above conditions exe is converting the data into xml format and posted it to web service for processing.
String xmlString = UpdateOrder( string Username, string Password, string OrderXML)
Update Order response: The UpdateOrder() Web Method will return an XML string response which describes the outcome of the Web Method request.
3) Remove Order:
RemoveOrder method will cancel a previously placed “pending” order requesting drug testing collection services. Once the collection process has
retrieved a valid order it may not be canceled.
There are some conditions on BGC_DTOC_Order__c for removing order,
Partner_Location__r.Integration_Vendor_Name__c should be 'Quest Diagnostics'
Ready_For_E_Registration__c should be 'TRUE'
Related_BGC_Order__c should not be null
Drug_Integration_Status__c should be 'Quest Remove Order'
Reference_Test_ID__c should not be null
Reference_Test_ID__c should not be blank
Drug_Integration_Status__c should not be 'Quest Validation Error'
Any one of (Related_BGC_Order__r.Order_Status__c should be 'Cancelled' OR Related_BGC_Order__r.Order_Status__c shuold be 'Deleted')
After satisfying above conditions exe is converting the data into xml format and posted it to web service for processing.
String xmlString = RemoveOrder(string Username, string Password, string TestID)
Remove Order response: The RemoveOrder() Web Method will return an XML string response which describes the outcome of the Web Method request.
LabCorp Diagnostics :
Processing of EXE :-
There are three methods are defined for its order status i.e.,
1) CallLabCorpRegisterDonor
2) CallLabCorpModifyRegistration
3) CallLabCorpDeleteRegistration
1) CallLabCorpRegisterDonor()
Step 1: Going to update the status and other fields in DTOC Order (oBGC_DTOC_Order__c) on the basis of some conditions which are as,
Partner_Location__r.Integration_Vendor_Name__c should be 'LabCorp Diagnostics'
Ready_For_E_Registration__c should be 'TRUE'
Related_BGC_Order__c should not be null
Drug_Integration_Status__c should be 'LabCorp Register Donor'
Related_BGC_Order__r.Order_Status__c should not be 'Cancelled'
Related_BGC_Order__r.Order_Status__c should not be 'Deleted'
Drug_Integration_Status__c should not be 'LabCorp Validation Error'
Drug_Test_Schedule_Complete__c should be false
Drug_Test_Collection_Complete__c should be false
Step 2: Downloaded the updated records to sql database into DrugTestingFullIntegrationService Table from salesforce for logging purpose
2) CallLabCorpModifyRegistration()
Step 1: Going to update the status and other fields in DTOC Order (BGC_DTOC_Order__c) on the basis of some conditions which are as,
'Partner_Location__r.Integration_Vendor_Name__c' should be 'LabCorp Diagnostics'
Ready_For_E_Registration__c should be 'TRUE'
Related_BGC_Order__c should not be null
Drug_Integration_Status__c should be 'LabCorp Modify Registration'
'Labcorp_Registration_Number__c' should not be null
Registration_Number__c should not be null
Related_BGC_Order__r.Order_Status__c should not be 'Cancelled'
Related_BGC_Order__r.Order_Status__c should not be 'Deleted'
Drug_Integration_Status__c should not be 'LabCorp Validation Error'
Step 2: Download the updated records to SQL database into DrugTestingFullIntegrationService Table from salesforce for logging purpose.
3) CallLabCorpDeleteRegistration()
Step 1: Going to update the status and other fields in DTOC Order (BGC_DTOC_Order__c) on the basis of some conditions which are as,
Partner_Location__r.Integration_Vendor_Name__c should be 'LabCorp Diagnostics'
Ready_For_E_Registration__c should be 'TRUE'
'Related_BGC_Order__c' should not be null
Drug_Integration_Status__c should be 'LabCorp Delete Registration'
'Labcorp_Registration_Number__c' should not be null
Registration_Number__c should not be null
Any one of (Related_BGC_Order__r.Order_Status__c should be 'Cancelled' OR Related_BGC_Order__r.Order_Status__c should be 'Deleted')
Drug_Integration_Status__c should not be 'LabCorp Validation Error'
Step 2: Downloaded the updated records to SQL database into DrugTestingFullIntegrationService Table from salesforce for logging purpose.
Note: LabCorp, ReasonForTest and Panel Ids are defined in EXE code
QuestLabcorp_PreEmploy_IntegrationField_Mapping of fields from XML to Fields in salesforce
http://preemploy.arcsdev.com/document/questlabcorp_preemploy_integrationfield_map.xls