APS - Premium Span Helper

Methods

Create Premium Spans (Overloaded Method)

Method Detail

Value

Method Detail

Value

Visibility

Public

Method Parameter

TransactionDto, EnrollmentSpan, Account

Return Parameter

List<PremiumSpan>

Functionality

This method will create premium span entities (createPremiumSpans) based on the date and the number of PREAMTTOT rate type that is available in the transaction.

Populate the premium amounts (populatePremiumAmounts) in the premium spans that are created from the transaction.

Save the premium spans and associate them to the members (using member premium helper)

Associate the premium spans with the enrollment span.

Save Updated Premium Spans

Method Detail

Value

Method Detail

Value

Visibility

Public

Method Parameter

List<PremiumSpanDto>, EnrollmentSpan

Return Parameter

List<PremiumSpan>

Functionality

Iterate through the premium span dto and

  1. Convert each of the premium span dto into premium span entity.

  2. Set the MMS premium span key if present in the dto

  3. Set the changed flag to TRUE.

  4. Set the associated enrollment span.

  5. Save the premium span

Return all the saved premium spans.

Set Premium Span

Method Detail

Value

Method Detail

Value

Visibility

Public

Method Parameter

EnrollmentSpanDto, EnrollmentSpan, String (Zeus Transaction Control Number)

Return Parameter

void

Functionality

Retrieve the premium spans present in the enrollment span entity and convert them into their dto object and set them in the enrollment span dto object. Use member premium helper to set the corresponding member premiums in the dto.

Create Premium Spans (Overloaded Method)

Method Detail

Value

Method Detail

Value

Visibility

Private

Method Parameter

TransactionDto, EnrollmentSpan

Return Parameter

List<PremiumSpan>

Functionality

Perform the below steps to create the necessary premium spans

  1. Sort the premium rates received by date (sortPremiumDates)

  2. Once the premium rates are sorted by dates, iterate through each rate object and create the premium span as below

    1. Create a new premium span code

    2. Set the zeus transaction control number

    3. Associate the enrollment span

    4. Set the start date of the premium span using the start date of the rate.

    5. Set the status of the premium span as "ACTIVE"

    6. Set the CSR Variant received in the transaction

    7. Set the amount received for PREAMTOT rate type as the total premium amount.

    8. Set the end date of the premium span from the transaction or else set it as the end of the year as that of the rate start date.

    9. If there are more than one premium spans to be created, the premium spans subsequent to the first premium span should have a end date that is one day less than the next premium span.

    10. Return the premium spans that are created.

Populate Premium Amounts

Method Detail

Value

Method Detail

Value

Visibility

Private

Method Parameter

List<PremiumSpans>, List<TransactionRateDto>

Return Parameter

void

Functionality

Iterate through each premium span and identify the rates that match with the same date as that of the premium span and set the policy amount (setPolicyAmount)

Set Policy Amount

Method Detail

Value

Method Detail

Value

Visibility

Private

Method Parameter

PremiumSpan, List<TransactionRateDto>, String (Rate Type Code)

Return Parameter

Void

Functionality

Retrieve the amount for the respective rate type code from the transaction and set the amount in the premium span.

Sort Premium Dates

Method Detail

Value

Method Detail

Value

Visibility

Private

Method Parameter

List<TransactionRateDto>

Return Parameter

List<TransactionRateDto>

Functionality

Get all the rate dto objects that have PREAMTTOT as the rate type code and sort it in the ascending order of the start date