You are here:
InsFormularyService:getProducts
One of the eligibility rules to retrieve health plans is to ensure that the plan
covers the medications that the customer is taking. Use this service to facilitate
the process to retrieve eligible products linked to Formularies, which contains
medications (drugs) where the customer (accountId)
medications are included.
Method: getProducts
How It Works
In the Medicare line of business, the members must know that their current medications are covered by the available plans during the quoting process. The current quoting process for Medicare allows members to create a list of current medications before presenting the eligible plans.
-
To retrieve all prescribed drugs on the ID and the object
ConsumerDrug__cobject, if both accountID and Drugs parameters are passed into the service, the service will use theaccountId. The input must be either the list of drugs or accountId.NoteHere the account is a Person Account that represents the Consumer or Member.
-
Retrieves all related
FormularyDrug__cusing the list of drugs -
Retrieves all related
Formulary__cIds using the retrieved list ofFormularyDrug__c. -
Matches all drugs on the input on the list of FormularyDrug__c. If all the drugs exists on
Formulary__c, it is considered an eligibleFormulary__c. -
Finally, the service returns a list of all products in the
eligibleProductsJSON output node that are related to all eligibleFormulary__c.
You can also run filters, based on FieldNames and associated
values, to further refine results.
Inputs
|
Person Account Id of the customer. Must be entered only if the list of drugs is not supplied. |
|---|---|
|
List of Drug Ids Optional if So required if accountId is supplied? |
Remote Options
Option |
Description |
|---|---|
|
String Filters formatted as
Example: ProductCode:PPO, ProductType__c:Test |
Input JSON
Here is a sample JSON input that uses an accountId input:
{
"ContextId": "",
"timeStamp": "2020-03-25T06:04:15.282Z",
"userId": "0056g000003cVLZAA2",
"userName": "ins-test09@vlocity.com",
"userProfile": "System Administrator",
"userTimeZone": -420,
"userCurrencyCode": "USD",
"sfdcIFrameOrigin": "https://ins-test09-dev-ed--instest09.visualforce.com",
"sfdcIFrameHost": "web",
"layout": "lightning",
"isdtp": "p1",
"id": "a236g000000NAiRAAW",
"vlcPersistentComponent": {},
"accountId": "0016g00000IqoMqAAJ"
}And here's one that uses the filters remote option:
{
"ContextId": "",
"timeStamp": "2020-03-25T06:04:15.282Z",
"userId": "0056g000003cVLZAA2",
"userName": "ins-test09@vlocity.com",
"userProfile": "System Administrator",
"userTimeZone": -420,
"userCurrencyCode": "USD",
"sfdcIFrameOrigin": "https://ins-test09-dev-ed--instest09.visualforce.com",
"sfdcIFrameHost": "web",
"layout": "lightning",
"isdtp": "p1",
"id": "a236g000000NAiRAAW",
"vlcPersistentComponent": {},
"drugs": ["a4D6g000000NFJzEAO","a4D6g000000NFF9EAO"],
"filters": "ProductCode:SG-HMO-500"
}Output JSON
Here is a sample output of eligible products:
{
"ContextId": "",
"timeStamp": "2020-03-25T05:51:55.663Z",
"userId": "0056g000003cVLZAA2",
"userName": "ins-test09@vlocity.com",
"userProfile": "System Administrator",
"userTimeZone": -420,
"userCurrencyCode": "USD",
"sfdcIFrameOrigin": "https://ins-test09-dev-ed--instest09.visualforce.com",
"sfdcIFrameHost": "web",
"layout": "lightning",
"isdtp": "p1",
"id": "a236g000000NAiRAAW",
"vlcPersistentComponent": {},
"accountId": "0016g00000IqoMqAAJ",
"error": "OK",
"eligibleProducts": [
{
"attributes": {
"type": "Product2",
"url": "/services/data/v48.0/sobjects/Product2/01t6g000000RzEbAAK"
},
"Id": "01t6g000000RzEbAAK",
"Name": "HMO 500",
"ProductCode": "SG-HMO-500",
"instest09__Type__c": "Medical",
"instest09__SubType__c": "HMO",
"instest09__FormularyId__c": "a4L6g000000XCKVEA4",
"instest09__LineOfBusiness__c": "Group Health",
"RecordTypeId": "0126g000000NZDOAA4",
"instest09__FormularyId__r": {
"attributes": {
"type": "instest09__Formulary__c",
"url": "/services/data/v48.0/sobjects/instest09__Formulary__c/a4L6g000000XCKVEA4"
},
"Name": "Formulary1",
"Id": "a4L6g000000XCKVEA4"
}
}
]
}
