Enrollment Span Helper

Methods

Save Enrollment Span

Method Details

Value

Method Details

Value

Visibility

Public

Method Parameters

AccountDto

Return Value

void

Functionality

Check if the account dto object received as input contains any enrollment span that needs to be saved. If there are enrollment spans present in the account then iterate through the list and perform the below steps for each enrollment span.

  1. Check if primary key for the enrollment span is present, if it is not present, then create the enrollment span.

  2. If the primary key is present, then its an existing enrollment span, check if the enrollment span data was updated, if it is updated then perform the below steps

    1. Set the account key in the enrollment span

    2. Update the enrollment span detail in the database

    3. Check if any new premium spans have to be created or updated, if there are any, then create or update them as necessary

  3. If the enrollment span was not updated, then check if premium spans are updated, if it is updated then save the updated premium spans.

Get Matching Enrollment Span

Method Detail

Value

Method Detail

Value

Visibility

Public

Method Parameters

String (Exchange Subscriber Id), String (State Type Code)

Return Value

List<EnrollmentSpan>

Functionality

Use the enrollment span repository instance to get the enrollment spans from the repository that matches the exchange subscriber Id and the state type code.

Update Enrollment Span

Method Detail

Value

Method Detail

Value

Visibility

Private

Method Parameters

EnrollmentSpanDto

Return Value

void

Functionality

Convert the dto object into an entity and persist the update

Create Enrollment Span (Overloaded Method)

Method Detail

Value

Method Detail

Value

Visibility

Private

Method Parameters

EnrollmentSpanDto

Return Value

void

Functionality

Convert the dto object into an entity and persist the new enrollment span.

Create Enrollment Span (Overloaded Method)

Method Detail

Value

Method Detail

Value

Visibility

Private

Method Parameters

AccountDto, EnrollmentSpanDto

Return Value

void

Functionality

Set the account primary key in the enrollment span object and invoke the overloaded create method to persist. Once the enrollment span is persisted, set the enrollment span primary key to the associated premium spans, populate the associated member key with each premium spans and call premium span helper to persist the premium spans.

Populate Member SK

Method Detail

Value

Method Detail

Value

Visibility

Private

Method Parameters

MemberPremiumDto, Set<MemberDto>

Return Value

void

Functionality

Iterate through the member set, to identify the member to be linked with the premium span and link the member to the premium.