Macros - Use case

Term Group

This sample use case explains the use of macros to term a group. Termination of a group implies end dating all the group account product availability as of the term date. Also, term the policy enrollments linked to the group as of the term date. To configure such a macro, set up the definition as follows:

Table 1. Term Group
Field Configuration

Code

TERM_GROUP

Description

Terms the group account product availability and policy enrollment products linked to the group as of the term date.

Type

Oracle Insurance Gateway Integration

Context

Group Client

Access Restriction

-

Page Template

-

The macro requires the term date as a parameter.

Parameter setup is necessary only if the intention is to start the macro from the user interface. Depending on the parameter configuration, the user interface displays the correct input form elements. For example, date picker or a list of values to choose from etc.

The following parameter configurations ensure that a field of type "date", labeled as Term Date is displayed on the user interface.

Table 2. Parameter Configurations
Field Configuration

Usage Name

termDate

Display Name

Term Date

Data Type

Date

Mandatory?

true

Multi Value?

false

Pick List

-

Filter

-

This macro is based on the Oracle Insurance Gateway Integration. This means that all the business logic that is, term group account product availability and policy enrollment is performed by an Oracle Insurance Gateway integration. Suppose such an integration can be invoked by sending a POST request to:

http://[context:host]/exchanges/integration/termgroup

The user starts the macro from the user-interface page or by directly making the following request to the Macro Integration Point.

{
   "parameters":[{
    "name":"termDate",
    "value":"2022-01-01"
     }],
     "macroDefinitionCode":"TERM_MACRO",
     "context":
     {"id": "26551" }
}

The macro integration point creates a macro history and starts the Oracle Health Insurance Integration. For the integration point to be able to start Oracle Health Insurance Exchange, the following additional setup must be configured:

Table 3. Additional Setup
Property Value

ohi.macro.termGroup.endpoint,

http://[context:host]/exchanges/integration/termgroup

ohi.service.OIG_INTEGRATION_termGroup.client.authentication

BasicAuthentication

Setup credential for OIG_INTEGRATION_termGroup

Credentials Integration Point

Oracle Insurance Gateway integration is invoked by the macro integration point with the following payload.

{
   "parameters":[{
    "name":"termDate",
    "value":"2022-01-01"
     }],
     "context":
     {"id": "26551" },
     "links": [{
      "href" : "refers to macro history",
      "rel" : "subject",
      "httpMethod" : "GET"
      }],
}

Oracle Insurance Gateway can use the term date and context information to first end date policy enrollment products (by starting a bulk update activity) and then send a patch request on the group account to end availability of all the group account products as of the term date.

Oracle Insurance Gateway can update the macro history dynamic fields or records and status (dynamic field) to supply the execution context.

Term availability for specific insurable classes.

Let’s extended the above use case to limit the insurable classes for which the availability can be termed. This requires a user to specify the list of insurable classes to consider.

The following additional parameters can be defined:

The following parameter configurations ensure that a field of type "date", labeled as Term Date is displayed on the user interface.

Table 4. Term Availability for Specific Insurable Classes
Field Configuration

Usage Name

groupAccountInsurableClasses

Display Name

Insurable Classes

Data Type

Char

Mandatory?

true

Multi Value?

true

Pick List

groupaccountinsurableclasses

Filter

groupaccount.code.eq({$context.code})

This configuration ensures that a pick list of group account insurable classes defined for the group is displayed. The macro request contains (comma separated) list of selected group account insurable class ids.

A user can start the macro from the user-interface page or by directly making the following request to the Macro Integration Point.

{
   "parameters":[{
    "name":"termDate",
    "value":"2022-01-01"
     },
    {
    "name":"groupAccountInsurableClasses",
    "value":"12323243, 2323232, 24434343"
     }],
     "macroDefinitionCode":"termMacro",
     "context":
     {"id": "26551" }
}

Alternatively, a selection floorplan can be attached to the macro definition to allow users to select the group account insurable classes from UI.

Floorplan Configuration

{
  "floorplan_selection":{
       "title":{
         "label":"SELECT_RECORDS_TO_TERM"
       },
      "properties":[
        {
            "name": "code",
            "sequence": 1
        },

        {
            "name": "descr",
            "sequence": 2
        },
        {
            "name": "groupaccountinsurableclasses",
            "sequence": 3,
            "properties": [{
                "name": "insurableClass",
                "sequence": 1,
                "refType": {
                    "type": "insurableClass"
                }},
                {
                    "name": "displayName",
                    "sequence": 2
                }]

        }]
      }
}

In this case the payload constructed from the UI to start the macro will be different from the parameter based approach. Payload to start macro integration:

{
   "parameters":[{
    "name":"termDate",
    "value":"2022-01-01"
     }],
     "macroDefinitionCode":"termMacro",
     "context": {
         "id": "26551",
         "code": "ORACLE",
         "descr":"Oracle Corp.",
         "groupAccountInsurableClassList": [

              {
                "id": "12323243",
                "insurableClass": {
                    "id": "18435",
                    "links": [
                        {
                            "href": "http:[context:root]/generic/insurableclasses/18435",
                            "rel": "canonical"
                        }
                    ]
                },
                "displayName": "Employee"
              },
               {
                "id": "2323232"

              },
              {
                "id": "24434343"

              }]
     }
}

Similarly, Oracle Insurance Gateway integration gets the group account insurable class information either in the parameters or in the context object depending on the macro configuration.

This flexibility allows for user interface design best suited for the use case at hand.

Transfer Product

Consider another example to transfer membership from a basic product to a silver product as of specified date using bulk update definition. Bulk update definition can be invoked using
1) global activities or
2) through macros

To start a bulk update definition using macros, the macro definition must be setup as follows:

Field Configuration

Code

transferProduct

Description

Transfers memberships to the selected product as of given date

Type

Bulk Update

Context

Group Account

Bulk Update Definition

transferProduct

The advantage of starting a bulk update through macros is consolidated UI experience on all the processes started in context of groups.

The following parameter configurations ensure that a field of type "date", labeled as Transfer Date gets displayed on the user interface.

Field Configuration

Usage Name

transferDate

Display Name

Transfer Date

Data Type

Date

Mandatory?

true

Multi Value?

false

Pick List

-

Filter

-

Configure the following additional parameters to supply the "from product" and "to product" details.

Field Configuration

Usage Name

fromProduct

Display Name

From Product

Data Type

Char

Mandatory?

true

Multi Value?

false

Pick List

groupaccountproducts

Filter

groupaccount.code.eq({$context.code})

Field Configuration

Usage Name

toProduct

Display Name

To Product

Data Type

Char

Mandatory?

true

Multi Value?

false

Pick List

groupaccountproducts

Filter

groupaccount.code.eq({$context.code})

The user starts the macro from the user-interface page or by directly making the following request to Macro Integration Point.

  -- Paramters must specify "bulk update activity parameters" ---
  -- For bulk update, any macro definition *parameters* are sent in as named value pairs

{
   "parameters":[{

     {
    "name":"parameters",
    "value":"transferDate,2022-01-02;toProduct,SILVER;fromProduct,BASIC "
     }],
     "macroDefinitionCode":"transferProduct",
     "context":
     {"id": "26551" }
}

The macro integration point internally starts the bulk update activity as specified by the macro definition.