You are here:
InsEnrollmentService:findEnrollees
Use this service to allow a user to search for a list of enrolled clients.
Method:findEnrollees
How It Works
-
The service receives the parsed JSON.
-
If the parsed object has a searchKey parameter, it retrieves a list for Contacts with First Name, Last Name, or Member ID that starts with the given searchKey.
-
By default, the service does not return contacts with expired policies.
-
If the parsed object has a productType parameter, the list of Contacts retrieved are filtered further by policy product type.
-
If the parsed object has an includeExpiredPolicies parameter, Contacts are retrieved regardless of their policy’s expiry date
-
-
The service retrieves a list of policies and maps them to each contact retrieved, as long as their group is the given account id.
-
If the input contains an effectiveDate, only policies with the same effective date are retrieved.
-
If the input contains a productType, only policies with the same productType are retrieved.
-
If the input sets includeExpiredPolicies to true, even expired policies are retrieved.
-
-
The retrieved enrollee list with all assigned policy details is returned in the data node.
Inputs
Input |
Description |
|---|---|
|
Optional String Used to check FirstName, LastName, or MemberId of the contacts |
|
Optional String Product type used to filter the list of members by their policies’ types |
|
Optional Boolean Used to determine if the service should include contacts with expired policies |
Input JSON
JSON input formatted as follows:
{
"searchKey": String,
"productType": productType,
"includeExpiredPolicies": Boolean
}Sample JSON input with data:
{
"searchKey": "Adam",
"productType": "Medical",
"includeExpiredPolicies": true
}Output JSON
The JSON output is a list of enrollees, with the following properties under
the fields node:
{
"data": {
"records": [
{
"fields": {
"Id": "0035w000039SsoSAAS",
"AccountId": "0015w00002ADHiPAAX",
"LastName": "C2P1",
"FirstName": "P1",
"Name": "C2P1 P1"
}
}
]
}
}Sample JSON output with data:
{
"data": [
{
"AccountId": "0013h00000Gx5UqAAJ",
"Id": "0033h00000BBybMAAT",
"LastName": "C1P1",
"FirstName": "D1",
"Name": "D1 C1P1"
},
{
"AccountId": "0013h00000Gx5UqAAJ",
"Id": "0033h00000BBybPAAT",
"LastName": "C1P2",
"FirstName": "D1",
"Name": "D1 C1P2"
},
{
"AccountId": "0013h00000Gx5UrAAJ",
"Id": "0033h00000BBybSAAT",
"LastName": "C2P1",
"FirstName": "D1",
"Name": "D1 C2P1"
}
],
"error": "OK"
}
