stable, before a refactor
This commit is contained in:
@@ -12,6 +12,7 @@ module SampleCard
|
||||
set_generic_fields()
|
||||
set_rx_fields()
|
||||
set_network_fields()
|
||||
# set_dependent_fields()
|
||||
sample_cards = set_plan_fields()
|
||||
sample_cards.each(&:save!)
|
||||
|
||||
@@ -33,7 +34,8 @@ module SampleCard
|
||||
plans_sample_cards = []
|
||||
@employer.plans.each do |plan|
|
||||
plan_sample_card = @sample_card.dup
|
||||
plan_sample_card.family_id = plan.title
|
||||
plan_name = plan.title.split(/(?<=\d[kK])/).first
|
||||
plan_sample_card.family_id = plan_name
|
||||
plan.plan_benefits.each do |bene|
|
||||
plan_sample_card["benefit_desc_#{bene.sequence}".to_sym] = bene.benefit_desc
|
||||
plan_sample_card["benefit_#{bene.sequence}".to_sym] = bene.benefit
|
||||
@@ -60,6 +62,9 @@ module SampleCard
|
||||
:claim_to_1, :claim_to_2, :claim_to_3, :claim_to_4, :claim_to_5, :claim_to_6,
|
||||
:claim_to_7, :claim_to_8, :claim_to_9, :claim_to_10, :claim_to_11, :claim_to_12
|
||||
)
|
||||
if @employer.network_provider == "Cigna"
|
||||
@sample_card.provider_code = "5"
|
||||
end
|
||||
|
||||
@sample_card.assign_attributes(selected_attributes)
|
||||
end
|
||||
@@ -75,7 +80,14 @@ module SampleCard
|
||||
end
|
||||
|
||||
def set_dependent_fields
|
||||
# Not needed for sample card
|
||||
@sample_card.dependent_1 = "John Doe"
|
||||
@sample_card.dependent_2 = "Molly Doe"
|
||||
@sample_card.dependent_3 = "Jonathan Doe"
|
||||
@sample_card.dependent_4 = "Calvin Doe"
|
||||
@sample_card.dependent_5 = "Richard Doe"
|
||||
@sample_card.dependent_6 = "Jannet Doe"
|
||||
@sample_card.dependent_7 = "Longername Doe"
|
||||
@sample_card.dependent_8 = "Robbert Doe"
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user