Segment

The Segment business rule dictates the data that is stored for each Segment instance and its presentation. Clients are associated to a Segment through Segment level Roles. Segment level Roles can have a defined presentation through this rule's Role Views. Configuration of the rule is similar to other screen rules with the addition of identifying and invoking a CalculateGeneral business rule that executes validations and calculations.

Segment Elements and Attributes
Element Attributes Parent Element Description Element/Attribute Value
<Segment>    

Required:

This is the root element for the rule.

 
<Fields>   <Segment>

Optional:

See Fields element.

This element defines the dynamic fields for the Segment.

 
<Events>   <Segment>

Optional:

See Action/Events element.

 
<ScreenMath>   <Segment>

Optional:

See ScreenMath Element.

 
<Actions>   <Segment>

Optional:

See Action/Events element.

 
<Buttons>   <Segment>

Required:

This allows for custom configuration of the buttons that appear on the Segment and can process actions on the Segment.

 
<Button>   <Buttons>

Required, Repeatable:

Identifies a specific button to display on the Segment's screen.  More than one button may be defined.

Values:

  • Save

    • Persists data to the database.

  • Calculate

    • Requires the name of the Calculate General rule name with the RULE attribute.

    • User selection will process the Calculate General rule and not persist the Segment and Segment Role data.

  RULE <Button>

Optional:

This identifies the Calculate General rule that the rule will process when the associated button is clicked.  This attribute is required for the Calculate button.

Values:

  • literal Calculate General rule name

<Roles>   <Segment>

Optional:

This element defines multiple Role structures that may be included on the Segment.  When absent, no roles are attached to the segment.

 
<Role>   <Roles>

Required, Repeatable:

This element defines a single Role structure that may be included on the Segment.  The order in which the roles are configured dictates the order in which the role check boxes or the options list in the combo box are displayed on the Find Client and New Client tabs. 

 
  EXTERNAL <Role>

Optional:

The attribute identifies the Role's Client data source as external to OIPA's database.

Values:

  • No

    • default

    • The Role's Client data exists in the OIPA database.

  • Yes

    • The Role's Client data exists on a database external to OIPA.

    • <ExternalClientRowRetriever> must be part of the Role's configuration.

<RoleCode>   <Role>

Required:

The element identifies the Role.

Values:

  • code value from AsCodeRole

<RolePercent>   <Role>

Optional:

The element defines the value to which the sum of Role percentages for the same Role Code must equate.

Values:

  • 100

    • default

  • integer

    • valid values from 0 to 100

  • *

    • The sum of Role percentages for the same Role Code can be any value that can exceed 100%.

    • No single Role's percentage can be greater than 100%.

<ExternalClientRowRetriever>   <Role>

Optional:

The element provides the name of the Java class that is created to integrate with the external client search. 

This element is required when EXTERNAL="Yes".

Values:

  • literal class name

<CustomScreen>   <Role>

Optional:

The element provides the name of the Java class that is created to implement a customized display of the external client search results. 

This element is required when EXTERNAL="Yes" and a customized external client search screen is the desired data presentation.

Values:

  • literal class name

<ClientType>   <Role>

Required:

This element structure contains one or more Client Type codes applicable to the Role.

 
<TypeCode>   <ClientType>

Required:

This element contains one or more Client Type codes.

Values:

  • comma-delimited list of code values from AsCodeClientType

<AllowZeroPercent>   <Role>

Optional:

The element allows the Role to accept a 0% entry in the Role Percentage.

Values:

  • No

    • default

    • A non-zero value must be entered in Role Percentage.

  • Yes

    • A zero value can be entered in Role Percentage.

<AllowPercent>   <Role>

Optional:

Controls the display of the Role's Percent entry field for the specific Segment Role.

Values:

  • Yes

    • default

    • Role's Percent entry will be presented.

  • No

    • Role's Percent entry will not be presented.

<Maximum>   <Role>

Optional:

Defines the maximum number of Roles of the same Role Code allowed on the Segment.   When absent or the element is present without a value, there is no maximum limit.

Note: This element correlates to <RoleCount> on the PolicyScreen.

Values:

  • integer

<Minimum>   <Role>

Optional:

Defines the minimum number of Roles of the same Role Code allowed on the Segment.  When absent or the element is present without a value, there is no minimum limit.

Values:

  • integer

<DisableRoleFields>   <Role>

Optional:

This structure will disable the Role's fields when the Policy status has one of the listed values.  When absent or no statuses are listed, the Role's fields are not disabled.  By default, the Segment Role's fields are enabled for user entry and modification.

 
<DisableStatus>   <DisableRoleFields>

Required, Repeatable:

This element provides a single Policy Status in which the Role's fields will be disabled. The element is repeated to disable the Role's fields for multiple Policy Statuses.

Values:

  • code value from AsCodeStatus

<ClientAssignment>   <Role>

Optional:

This element structure defines the ability to limit the Client Types available to the "Add Roles / Find Client" capabilities by identifying a source Segment and its Role Codes.  Role data can be copied from the source Segment if defined to do so.

 
  CLONEROLEDETAIL <ClientAssignment>

Optional:

Indicates if common Role details are cloned (copied) to the new Role. This has no impact to later editing of the new Role's details.

Values:

  • No

    • default

    • Role detail is not copied.

  • Yes

    • Role detail is copied.

  EXCLUDEASSIGNED <ClientAssignment>

Optional:

Indicates that the list of Clients available for the user to select is impacted by prior assignments of the same Role Code on the same Segment or other Segments with the same Segment Name on the same Policy.

Values:

  • No

    • default

    • The Client list is not impacted by prior Client assignments on the same Segment or the same Segment Name on the same Policy.

  • Yes

    • Clients already assigned to the same Segment or Segments with the same Segment Name are removed from the Client list.

<SourceSegment>   <ClientAssignment>

Required, Repeatable:

Identifies the Segment from which the Role may base Client selection and optionally clones common Role data.  This element is repeated to include more than one Segment in the <ClientAssignment> structure.

 
  SEGMENTNAME <SourceSegment>

Required:

Identifies the source Segment by its Segment Name.

Values:

  • literal segment name

<SegmentRoleCodes>   <SourceSegment>

Required:

This structure will identify the Role Codes from the <SourceSegment> in which to base Client selection.

 
<RoleCode>   <SegmentRoleCodes>

Required, Repeatable:

This element provides a Role Code.

Values:

  • Role Code from AsCodeRole

    • This code should exist in the Segment definition being targeted.

<Ordinal>   <Role>

Optional:

Used to place roles in an ascending order (lowest value to highest value).  Roles where this element is defined are ordered while Roles without this element appear in an arbitrary order.

Values:

  • integer

<RoleViews>   <Segment>

Optional:

This structure provides a definition for customized views of the Roles on the Segment.  The absence of this definition will result in a default view.

 
<DisplayStatus>   <RoleViews>

Optional:

Identifies a list of Role statuses that are included in the customized view.  This structure applies to all customized Role views.  By default, Roles of all statuses are available.

 
<Status>   <DisplayStatus>

Required, Repeatable:

This element provides a single Role status to include in the customized view.  This element is repeated to include multiple Role statuses.

Values:

  • code value from AsCodeRoleStatus

<View>   <RoleViews>

Required, Repeatable:

This structure defines a single customized Role view.  The rule can contain multiple views by repeating this element's structure.  OIPA will allow the user to select the view they wish to view.

 
  NAME <View>

Required:

This attribute provides a name to the view.  All view names are presented in the Segment's screen as an option in a drop down.

Values:

  • literal

<Roles>   <View>

Required:

This element structure provides the Roles to be included in the view.

 
  ALLROLES <Roles>

Optional:

This attribute indicates that all Roles on the Segment will be included in the specific view. 

Values:

  • No

    • default

    • The Roles to include are defined in the parent structure.

  • Yes

    • All Roles on the Segment satisfying the <DisplayStatus> filter will be displayed.  This configuration is not compatible with the following <Role> elements.

<Role>   <Roles>

Optional, Repeatable:

Defines a Role to include in the view.  The element is repeated to include multiple Roles in the view.

Values:

  • code value from AsCodeRole and exists in the Segment's definition

<Table>   <View>

Required:

See Table element.

 


XML Schema

<Segment>
    <Filter>...</Filter>
    <Fields>...</Fields>
    <Events>...</Events>
    <ScreenMath>...</ScreenMath>
    <Actions>...</Actions>
    <Buttons>
        <Button RULE="[rule name]">Calculate</Button>
        <Button>Save</Button>
    </Buttons>
    <Roles>
        <Role EXTERNAL="[No | Yes]">
            <RoleCode>[code]</RoleCode>
            <RolePercent>[100 | integer | *]</RolePercent>
            <ExternalClientRowRetriever>[class name]</ExternalClientRowRetriever>
            <CustomScreen>[class name]</CustomScreen>
            <ClientType>
                <TypeCode>[list]</TypeCode>
            </ClientType>
            <AllowZeroPercent>[No | Yes]</AllowZeroPercent>
            <AllowPercent>[Yes | No]</AllowPercent>
            <Maximum>[integer]</Maximum>
            <Minimum>[integer]</Minimum>
            <DisableRoleFields>
                <DisableStatus>[code]</DisableStatus>
                <DisalbeStatus>...</DisalbeStatus>
            </DisableRoleFields>
            <ClientType>
                <TypeCode>[list]</TypeCode>
            </ClientType>
            <ClientAssignment CLONEROLEDETAIL="[No | Yes]" EXCLUDEASSIGNED="[No | Yes]">
                <SourceSegment SEGMENTNAME="[segment name]">
                    <SegmentRoleCodes>
                        <RoleCode>[code]</RoleCode>
                        <RoleCode>...</RoleCode>
                    </SegmentRoleCodes>
                </SourceSegment>
                <SourceSegment>...</SourceSegment>
            </ClientAssignment>
            <Ordinal>[integer]</Ordinal>
        </Role>
        <Role>,,,</Role>
    </Roles>
    <RoleViews>
        <DisplayStatus>
            <Status>[code]</Status>
            <Status>...</Status>
        </DisplayStatus>
        <View NAME="[literal]">
            <Roles ALLROLES="[No | Yes]">
                <Role>[code]</Role>
                <Role>...</Role>
            </Roles>
            <Table>...</Table>
        </View>
        <View>...</View>
    </RoleViews>
</Segment>

XML Example

<Segment>
    <Fields>
        <Field>
            <Name>SegmentAmount</Name>
            <Display>Amount</Display>
            <DataType>Money</DataType>
            <Currency>USD,JPY,TWD</Currency>
        </Field>
        <Field>
            <Name>SegmentIssueDate</Name>
            <Display>Issue Date</Display>
            <DataType>Date</DataType>
            <Disabled>ReadOnly</Disabled>
        </Field>
        <Field>
            <Name>Filler</Name>
            <Display></Display>
            <DataType>Blank</DataType>
        </Field>
        <Field>
            <Name>Filler</Name>
            <Display></Display>
            <DataType>Blank</DataType>
        </Field>
        <Field>
            <Name>SegmentTobaccoPremBasis</Name>
            <Display>Tobacco Use</Display>
            <DataType>Combo</DataType>
            <Query TYPE="FIXED">
                <Options>
                    <Option>
                        <OptionValue>01</OptionValue>
                        <OptionText>Smoker</OptionText>
                    </Option>
                    <Option>
                        <OptionValue>02</OptionValue>
                        <OptionText>Non-Smoker</OptionText>
                    </Option>
                </Options>
            </Query>
        </Field>
        <Field>
            <Name>SegmentTableRating</Name>
            <Display>Table Rating</Display>
            <DataType>Combo</DataType>
            <Query TYPE="SQL">SELECT CodeValue, LongDescription FROM AsCode WHERE CodeName = 'AsCodeTableRating' AND CAST(CodeValue AS INTEGER) < 9 ORDER BY CodeValue</Query>
            <DefaultValue>01</DefaultValue>
        </Field>
        <Field>
            <Name>SegmentTextField</Name>
            <Display>Test Text Field</Display>
            <DataType>Text</DataType>
        </Field>
        <Field>
            <Name>InsuredDOB</Name>
            <Display>Insured DOB</Display>
            <DataType>Date</DataType>
            <Calculated TYPE="SQL">SELECT AsClient.DateOfBirth FROM AsClient JOIN AsRole ON AsClient.ClientGUID = AsRole.ClientGUID WHERE AsRole.PolicyGUID = '[PolicyGUID]' AND AsRole.RoleCode IN ('37')</Calculated>
        </Field>
    </Fields>
    <Roles>
        <Role>
            <RoleCode>37</RoleCode>
            <DisableRoleFields>
                <DisableStatus>01</DisableStatus>
            </DisableRoleFields>
            <Maximum>1</Maximum>
            <Minimum>1</Minimum>
            <ClientType>
                <TypeCode>02</TypeCode>
            </ClientType>
            <AllowZeroPercent>No</AllowZeroPercent>
            <AllowPercent>No</AllowPercent>
            <Ordinal>1</Ordinal>
            <ClientAssignment CLONEROLEDETAIL="Yes">
                <SourceSegment SEGMENTNAME="RiderWithRoles">
                    <SegmentRoleCodes>
                        <RoleCode>01</RoleCode>
                    </SegmentRoleCodes>
                </SourceSegment>
            </ClientAssignment>
        </Role>
        <Role>
            <RoleCode>01</RoleCode>
            <DisableRoleFields>
                <DisableStatus>01</DisableStatus>
            </DisableRoleFields>
            <Maximum>4</Maximum>
            <Minimum>1</Minimum>
            <ClientType>
                <TypeCode>02</TypeCode>
            </ClientType>
            <AllowZeroPercent>No</AllowZeroPercent>
            <AllowPercent>Yes</AllowPercent>
            <RolePercent>100</RolePercent>
            <Ordinal>2</Ordinal>
            <ClientAssignment CLONEROLEDETAIL="Yes" EXCLUDEASSIGNED="Yes">
                <SourceSegment SEGMENTNAME="RiderWithoutClientAssignmentII">
                    <SegmentRoleCodes>
                        <RoleCode>37</RoleCode>
                        <RoleCode>49</RoleCode>
                    </SegmentRoleCodes>
                </SourceSegment>
            </ClientAssignment>
        </Role>
        <Role>
            <RoleCode>04</RoleCode>
            <DisableRoleFields>
                <DisableStatus>01</DisableStatus>
            </DisableRoleFields>
            <Minimum>1</Minimum>
            <ClientType>
                <TypeCode>02</TypeCode>
            </ClientType>
            <AllowZeroPercent>Yes</AllowZeroPercent>
            <AllowPercent>Yes</AllowPercent>
            <RolePercent>100</RolePercent>
            <Ordinal>3</Ordinal>
        </Role>
        <Role>
            <RoleCode>49</RoleCode>
            <ClientType>
                <TypeCode>02</TypeCode>
            </ClientType>
        </Role>
    </Roles>
    <Buttons>
        <Button>Save</Button>
    </Buttons>
    <RoleViews>
        <View NAME="Insured Role View">
            <Roles ALLROLES="No">
                <Role>37</Role>
            </Roles>
            <Table>
                <Column ALIGN="Left">
                    <Display>Client Name</Display>
                    <Name>Name</Name>
                    <Group>Client</Group>
                    <DataType>Text</DataType>
                </Column>
                <Column ALIGN="Left">
                    <Display>Role</Display>
                    <Name>RoleCode</Name>
                    <Group>Role</Group>
                    <DataType>Text</DataType>
                </Column>
                <Column ALIGN="Left">
                    <Display>DOB</Display>
                    <Name>DateOfBirth</Name>
                    <Group>Client</Group>
                    <DataType>Date</DataType>
                </Column>
                <Column ALIGN="Left">
                    <Display>Common Role Field</Display>
                    <Name>CommonRoleField</Name>
                    <Group>RoleField</Group>
                    <DataType>Integer</DataType>
                </Column>
            </Table>
        </View>
        <View NAME="Payee Role View">
            <Roles ALLROLES="No">
                <Role>04</Role>
            </Roles>
            <Table>
                <Column ALIGN="Left">
                    <Display>Client Name</Display>
                    <Name>Name</Name>
                    <Group>Client</Group>
                    <DataType>Text</DataType>
                </Column>
                <Column ALIGN="Left">
                    <Display>Role</Display>
                    <Name>RoleCode</Name>
                    <Group>Role</Group>
                    <DataType>Text</DataType>
                </Column>
                <Column ALIGN="Left">
                    <Display>Relationship to Insured</Display>
                    <Name>RoleRelationship</Name>
                    <Group>RoleField</Group>
                    <DataType>Text</DataType>
                </Column>
            </Table>
        </View>
        <View NAME="Owner Role View">
            <Roles ALLROLES="No">
                <Role>01</Role>
            </Roles>
            <Table>
                <Column ALIGN="Left">
                    <Display>Client Name</Display>
                    <Name>Name</Name>
                    <Group>Client</Group>
                    <DataType>Text</DataType>
                </Column>
                <Column ALIGN="Left">
                    <Display>Role</Display>
                    <Name>RoleCode</Name>
                    <Group>Role</Group>
                    <DataType>Text</DataType>
                </Column>
            </Table>
        </View>
        <View NAME="All Roles View">
            <Roles ALLROLES="Yes></Roles>
            <Table>
                <Column ALIGN="Left">
                    <Display>Client Name</Display>
                    <Name>Name</Name>
                    <Group>Client</Group>
                    <DataType>Text</DataType>
                </Column>
                <Column ALIGN="Left">
                    <Display>Role</Display>
                    <Name>RoleCode</Name>
                    <Group>Role</Group>
                    <DataType>Text</DataType>
                </Column>
                <Column ALIGN="Left">
                    <Display>Relationship to Insured</Display>
                    <Name>RoleRelationship</Name>
                    <Group>RoleField</Group>
                    <DataType>Text</DataType>
                </Column>
            </Table>
        </View>
    </RoleViews>
</Segment>