Skip to end of banner
Go to start of banner

APS - Enrollment Span Helper

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Methods

Create Enrollment Span

Method Detail

Value

Visibility

Public

Below are the steps to create the enrollment span.

  1. Identify the primary subscriber in the transaction (getPrimaryMember)

  2. Generate a unique code for the new enrollment span to be created.

  3. Create the enrollment span entity with the below details retrieved from the transaction

    1. Set the account enrollment span sk to NULL, since this is a new enrollment span.

    2. Set the enrollment span code

    3. Set the account for which the enrollment span is being created

    4. Set the zeus transaction control number

    5. Set the state type code

    6. Set the marketplace type code

    7. Set the business unit type code

    8. Set the coverage type code

    9. Set the start date

    10. Set the end date (determineEndDate)

    11. Set the exchange subscriber id

    12. Set the effectuation date (determineEffectuationDate)

    13. Set the plan

    14. Set the product type

    15. Set the group policy id

    16. Set the changed flag to "TRUE"

    17. Set the enrollment span status (determineEnrollmentSpanStatus)

  4. Save the enrollment span

  5. Call the premium span helper instance to create the premium spans (createPremiumSpans)

Determine Enrollment Span Status

Method Detail

Value

Visibility

Public

Method Parameters

EnrollmentSpan(Current Enrollment Span), List<EnrollmentSpanDto> (Prior Enrollment Spans)

Return Parameter

String

Functionality

If the prior enrollment span is delinquent (isDelinquent) then the status of the current enrollment span is either "DELINQUENT" or "SUSPENDED"

If the end date of the current enrollment span is less than the start date, then status is "CANCELED"

If the prior enrollment span is not delinquent and if the end date of the current enrollment span is greater than the start date and if the effectuation date is not NUL, then the status is "ENROLLED"

If the If the prior enrollment span is not delinquent and if the end date of the current enrollment span is greater than the start date and if the effectuation date is NUL, then the status is "PRE_MEMBER"

If none of the above conditions are met, then return the status as "NO_VALID_STATUS"

Determine Status

Method Detail

Value

Visibility

Public

Method Parameters

EnrollmentSpanStatusDto

Return Parameter

String

Functionality

Invoke the enrollment span status determination method (determineEnrollmentSpanStatus) by passing the current enrollment span the list of prior enrollment span.

Set Enrollment Span

Method Detail

Value

Visibility

Public

Update Enrollment Span

Method Detail

Value

Visibility

Public

Cancel Premium Span

Method Detail

Value

Visibility

Private

Cancel Premium Spans

Method Detail

Value

Visibility

Private

Determine Effectuation Date

Method Detail

Value

Visibility

Private

Method Parameters

TransactionDto, List<EnrollmentSpan> (Prior Enrollment Spans)

Return parameter

LocalDate

Functionality

Perform the below steps to determine if an effectuation date should be returned or not.

  1. If the responsibility amount for the enrollment is zero then, return the current date as the effectuation date.

  2. If there is at least one prior enrollment span that is in Enrolled Status, and

    1. It has the same plan (isSamePlan) and

    2. There is no gap in coverage between the prior enrollment span and the new enrollment (isThereGapInCoverage)

    3. Then return the current date as the effectuation date.

  3. If current date is not returned as effectuation date in steps 1 and 2, then return NULL.

Determine End Date

Method Detail

Value

Visibility

Private

Method Parameters

LocalDate (Start Date), LocalDate (End Date)

Return Parameter

LocalDate

Functionality

If the end date is passed in as a non-null value, then return the end date value.

If the end date is passed in as NULL, then get the year of the start date and return the last day of the same year as the end date.

Get Exchange Subscriber Id

Method Detail

Value

Visibility

Private

Get Overlapping Enrollment Spans

Method Detail

Value

Visibility

Private

Get Primary Member

Method Detail

Value

Visibility

Private

Method Parameters

TransactionDto

Return

TransactionMemberDto

Functionality

Iterate through the members in the transaction the retrieve the member with the relationship type code "HOH"

Note: No exception handling is added if no member with relationship type code of "HOH" is not present, because such validations should have been done by rules well before the transaction is at this step.

Get Prior Enrollment Spans

Method Detail

Value

Visibility

Private

Is Delinquent

Method Detail

Value

Visibility

Private

Method Parameters

EnrollmentSpan (Current Enrollment Span), List<EnrollmentSpanDto> priorEnrollmentSpans

Return Parameter

int

Functionality

This method returns one of the three below values

1 - To indicate the current enrollment span should be set to delinquent

-1 - To indicate that the current enrollment span should be set to suspended

0 - To indicate that the current enrollment span is not delinquent.

Below is how the logic is perform the determine which of the above three should be sent.

Check for below conditions

  1. Current Enrollment Span effectuation date is not NULL

  2. Current Enrollment Span delinquency indicator is set to TRUE

  3. Current Enrollment Span start date is greater than the end date (Cancel span condition)

If any of the above conditions are false, then span is not delinquent return the value "0"

If all of the above conditions are true, then follow the below logic.

  1. If the current enrollment span does not have claim paid through date, then return the value -1 (Suspended - Note at this point the delinquency indicator is true and the effectuation date is not null)

  2. If the current enrollment span has a claim paid through date then

    1. If the the current system date is before or equal to the claim paid through date and

    2. There is no gap in coverage between the current enrollment and the prior enrollment span, and

    3. Both enrollments are for the same plan and

    4. The prior enrollment span is in delinquent status

    5. If all of the above conditions are true, then return the value "1" (Delinquent)

    6. If any of the above conditions are false, then return the value "-1" (Suspended)

Is Same Plan

Method Detail

Value

Visibility

Private

Method Parameters

String (Current plan), String (Prior Plan)

Return Parameter

Boolean

Functionality

Return true if the current plan and prior plan are same, return false if they are different.

Is There Gap In Coverage

Method Detail

Value

Visibility

Private

Method Parameters

Local Date(Effective Start Date), EnrollmentSpanDto (Prior Enrollment Span)

Return Parameter

boolean

Functionality

If the prior enrollment span is in "CANCEL" status, then return true.

Determine the number of days between the last day of the prior enrollment span and the effective start date.

If the number of days gap is greater than 1 then return true, else return false.

Remove Canceled Spans

Method Detail

Value

Visibility

Private

Save Updated Enrollment Spans

Method Detail

Value

Visibility

Private

Update Account Dto With Overlapping Spans

Method Detail

Value

Visibility

Private

Update Overlapping Enrollment Spans

Method Detail

Value

Visibility

Private

  • No labels