Enrollment Product Adjustment Rules Operation

The purpose of this operation is to retrieve, create, update and delete enrollment product adjustment values (override). Note that this API does not support creations, updates or deletes of adjustment rules. To load adjustment rules please refer to the Adjustment and Surcharge Rules API chapter of the Premium Configuration chapter of the Configuration Guide for more information on the related model.

Requests

Fetch Enrollment Product Adjustment Rules

The GET method can be use to fetch enrollment product adjustment (override) values for a enrollment product adjustment and enrollment product time period. This request will return all the adjustment rules (lines) corresponding to a default time period applicable for the enrollment product time period context along with its overrides, if there are any. System returns adjustment rules only for the enrollment time periods that are applicable within the context of the enrollment product adjustment. All the time periods overlapping between start date and end date of enrollment product adjustment are considered.

The difference between the result of this operation v/s a get on enrollmentproductadjustmentvalues (HTTP API) is that it will return the applicable adjustment rule lines with their default values, even when there are no overrides.

This IP uses HTTP status codes as defined in Response Messages.

The link to the following resource to fetch enrollment product adjustment rules is available on every enrollment product adjustment.

"enrollmentproductadjustment": {
  "type": "object",
  "required": [
    "scheduleDefinition",
    "sequence",
    "startDate"
  ],
  "properties": {
   .....

    "enrollmentProductAdjustmentRuleList":[
      {
        "startDate": "<startDate of enrollment product time period 1>",
        "links": [
          {
            "http://[hostName]:[portNumber]/[api-context-root]/enrollmentproductadjustmentrules/enrollmentproductadjustment/\{enrollmentproduct adjustment id}/enrollmentproducttimeperiod/\{timeperiod_id 1}",
            "rel": "canonical",
            "httpMethod": "GET"
          },
          {
            "http://[hostName]:[portNumber]/[api-context-root]/enrollmentproductadjustmentrules/enrollmentproductadjustment/\{enrollmentproduct adjustment id}/enrollmentproducttimeperiod/\{timeperiod_id 1}",
            "rel": "oi:rulepatch",
            "httpMethod": "PATCH"
          },
          {
            "rel": "oi:definition",/
            "apiurl/enrollmentproductadjustmentrules/enrollmentproductadjustment/\{enrollmentproduct adjustment id}/enrollmentproducttimeperiod/\{timeperiod_id 1}/definition"
          }]
      },
      {
        "startDate": "<startDate of enrollment product time period 2>",
        "links": [
          {
            "http://[hostName]:[portNumber]/[api-context-root]/enrollmentproductadjustmentrules/enrollmentproductadjustment/\{enrollmentproduct adjustment id}/enrollmentproducttimeperiod/\{timeperiod_id 2}",
            "rel": "canonical",
            "httpMethod": "GET"
          },{
            "http://[hostName]:[portNumber]/[api-context-root]/enrollmentproductadjustmentrules/enrollmentproductadjustment/\{enrollmentproduct adjustment id}/enrollmentproducttimeperiod/\{timeperiod_id 2}",
            "rel": "oi:rulepatch",
            "httpMethod": "PATCH"
          },
          {
            "rel": "oi:definition",/
            "http://[hostName]:[portNumber]/[api-context-root]/enrollmentproductadjustmentrules/enrollmentproductadjustment/\{enrollmentproduct adjustment id}/enrollmentproducttimeperiod/\{timeperiod_id 2}/definition"
          }]
      }
    ]
  }
}

Example response:

  "enrollmentProductAdjustmentRuleList":
     [{
      "lineId":"",
      "amount": {
        "value": ""
      },
      "percentage": "",
      "functionDynamicLogicCode":"",
      "functionDynamicLogicNotProratedCode": ""
      "<field name of schedule dimension with type value and datatype other than amount>": "",
      "<field name of schedule dimension with type value and datatype amount>": {
        "valueAmount" : {
          "value": "",
          "currency": ""
        }
      },
      "<field name of schedule dimension with type range and datatype other than amount>": {
        "valueFrom": "",
        "valueTo": ""
      },
      "<field name of schedule dimension with type range and datatype amount>": {
        "valueFromAmount": {
          "value": "",
          "currency": ""
        },
        "valueToAmount": {
          "value": "",
          "currency": ""
        }
      },
      "overrideAmount" :{
         "value": "",
         "currency": ""
      },
      "overridePercentage" : "",
      "overrideFunctionDynamicLogicCode": "",
      "overrideFunctionDynamicLogicNotProratedCode": ""
    },
    {
      ... other line(s)
    }
  ]
}

The payloads presented in this section are just examples. Please use the Swagger metadata to find out what all is possible.

Definition

The definition of the IP, will be available as a link in the enrollment product adjustment resource.

All the attributes in the definition related to the adjustment schedule rule are marked as readOnly, only the metadata of the override fields is updatable.

When the POST is successful, the system returns a resource representation of the created adjustment schedule like this:

{
  "MED_COND": {
    "type": "object",
    "properties": {
      "amount": {
        "type": "object",
        "properties": {
          "value": {
            "type": "number",
            "xml": {
              "attribute": true
            },
            "minimum": -9999999999.9999,
            "maximum": 9999999999.9999,
            "readOnly": true
          }
        }
      }
    }
  },
  "functionDynamicLogicCode": {
    "type": "string",
    "xml": {
      "attribute": true
    },
    "maxLength": 30
  },
  "functionDynamicLogicNotProratedCode": {
    "type": "string",
    "xml": {
      "attribute": true
    },
    "maxLength": 30
  },
  "percentage": {
    "type": "number",
    "xml": {
      "attribute": true
    },
    "minimum": -999.9999,
    "maximum": 999.9999,
    "readOnly": true
  },
  "medicalCondition": {
    "type": "string",
    "xml": {
      "attribute": true
    },
    "maxLength": 1000,
    "readOnly": true
  },
  "overrideAmount": {
    "type": "object",
    "properties": {
      "value": {
        "type": "number",
        "xml": {
          "attribute": true
        },
        "minimum": -9999999999.9999,
        "maximum": 9999999999.9999
      },
      "currency": {
        "type": "string",
        "xml": {
          "attribute": true
        }
      }
    }
  },
  "overridePercentage": {
    "type": "number",
    "xml": {
      "attribute": true
    },
    "minimum": -999.9999,
    "maximum": 999.9999
  },
  "overrideFunctionDynamicLogicCode": {
    "type": "string",
    "xml": {
      "attribute": true
    },
    "maxLength": 30
  },
  "overrideFunctionDynamicLogicNotProratedCode": {
    "type": "string",
    "xml": {
      "attribute": true
    },
    "maxLength": 30
  }
}

Create or Update or Delete Enrollment Product Adjustment Values

Enrollment Product Adjustment Values (override) can be created/updated or deleted using the same url with PATCH method.

In order to give override value(s) to an adjustment rule, send the payload with operation "replace" and id of the adjustment rule id for which the override is required. The processing of such a request, will look up adjustment rule with the lineId, if it is not found, GEN-HTTP-002 will be returned as lookup failed.

If the adjustment schedule rule is fetched, then following can happen:

  • If there is no existing override for the combination of line and enrollment product time period, a new one is created.

  • If there is an existing override, it is updated

    • If after update, all the three override fields don’t have value, then the override row is deleted.

{
  "enrollmentproductAdjustmentRuleList":
     [{
      "op": "replace"
      "lineId" : 123,
      "overrideAmount" :{
         "value": "123",
         "currency": "USD"
      }
    },
    {
      ... other line(s) if they need to be changed.
    }
  ]
}

Authorization

This operation is protected by access restriction "enrollmentproductadjustmentrules IP".