ClaimContact role constraints

Role constraints

In ClaimCenter, a role constraint is an logical expression that prevent users from assigning roles to ClaimContacts in a manner that does not make business sense.

There are two types of role constraints:

  • Entity role constraint - This identifies which type of objects can make use of the role, and how many ClaimContacts can be associated with that object using that role (exactly one, at least one, at most one, or unlimited).
    • For example, this constraint could stipulate that the role of driver can be held by ClaimContacts associated with a vehicle incident, and that there can be at most one driver on a given vehicle incident.
    • This type of constraint can be thought of as both a "which type of object" constraint and a "how many" constraint.
  • Contact role type constraint - This identifies the subtype for which a given role is allowed.
    • For example, this constraint could stipulate that the role of primary doctor can be held by ClaimContacts with an associated contact whose subtype is Doctor, but not ClaimContacts with an associated contact whose subtype is Attorney.
    • This type of constraint can be thought of as a "which subtype" constraint.

In ClaimCenter, ClaimContact role constraints are configured in entityroleconstraints-config.xml. For more information, refer to the Configuration Guide.

Role constraint endpoints

You can use the following endpoints to retrieve information about role constraints.

Operation Endpoint Description
GET /role-constraints Retrieve a list of all contact role constraints for the given instance of ClaimCenter
GET /role-constraints/{contactRoleId} Retrieve information for the given contact role. Note that contactRoleId is the contact role's code, such as reporter.

These are metadata endpoints. They return information about the configuration of the given instance of ClaimCenter, not about any of its business resources.

Role constraint example: Doctor

This is a portion of the payload when GET /role-constraints/doctor is executed on the base configuration:

{
    "data": {
            "schemaConstraints": [
                {
                    "constraints": [
                        {
                            "constraintType": "ZeroToMore"
                        }
                    ],
                    "schema": "Claim"
                },
                {
                    "constraints": [
                        {
                            "constraintType": "ZeroToMore"
                        }
                    ],
                    "schema": "Exposure"
                }
            ],
            "subtype": "Doctor"
        },

From this payload, you can determine the following about doctor:

  • It can be used as a role for a ClaimContact that is associated with a claim.
    • There can be any number of doctors on an claim, including 0.
  • It can be used as a role for a ClaimContact that is associated with an exposure.
    • There can be any number of doctors on an exposure, including 0.
  • The role of doctor can only be used on ClaimContacts whose associated contact has a subtype of Doctor (or a child subtype of Doctor).

Role constraint example: Reporter

This is a portion of the payload when GET /role-constraints/reporter is executed on the base configuration:

{
    "data": {
        "attributes": {
            "schemaConstraints": [
                {
                    "constraints": [
                        {
                            "constraintType": "Exclusive"
                        },
                        {
                            "constraintType": "Required"
                        }
                    ],
                    "schema": "Claim"
                },
                {
                    "constraints": [
                        {
                            "constraintType": "ZeroToMore"
                        }
                    ],
                    "schema": "Exposure"
                }
            ]

From this payload, you can determine the following about reporter:

  • It can be used as a role for a ClaimContact that is associated with a claim.
    • The role is "exclusive". (There can be at most one ClaimContact on a Claim with this role.)
    • The role is "required". (There must be at least one ClaimContact on a Claim with this role.)
    • Taken together, these two constraints mean there must be exactly one reporter on a Claim.
  • It can be used as a role for a ClaimContact that is associated with an Exposure.
    • There can be any number of reporters on an exposure, including 0.
  • There is no subtype restriction. Therefore, the role of reporter can be used with any ClaimContact, regardless of the subtype of its associated contact.