beta build
This commit is contained in:
@@ -56,14 +56,12 @@ class ProcessMemberCardDataJob < ApplicationJob
|
||||
end
|
||||
|
||||
if has_dental
|
||||
if member.dental_plan_key
|
||||
member_attributes.merge!({dental_coverage: member.coverage_class.upcase})
|
||||
unless member.id_card_plan_id
|
||||
member_attributes.merge!({group_number: "", medical_eff_date: ""})
|
||||
# dental_plan = IdCard::Plan.find_by(pb_product_key: 1025)
|
||||
if IdCard::Plan.find_by(pb_product_key: member.dental_plan_key).blank?
|
||||
member_attributes.merge!({employer_name: 'COBRA'})
|
||||
end
|
||||
member_attributes.merge!({dental_coverage: member.coverage_class.upcase})
|
||||
if member.dental_plan_key && member.id_card_plan_id.blank?
|
||||
member_attributes.merge!({group_number: "", medical_eff_date: ""})
|
||||
# dental_plan = IdCard::Plan.find_by(pb_product_key: 1025)
|
||||
if IdCard::Plan.find_by(pb_product_key: member.dental_plan_key).blank?
|
||||
member_attributes.merge!({employer_name: 'COBRA'})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -15,7 +15,7 @@ class UpdateMemberJob < ApplicationJob
|
||||
"PBCoveredEntities"."PBEntityKey" = ?
|
||||
AND "PBProductParticipation"."InEffect" <= ?
|
||||
AND "PBProductParticipation"."OutOfEffect" > ?',
|
||||
vw_mb_member[:pb_entity_key], 2.month.from_now , 1.day.ago
|
||||
vw_mb_member[:pb_entity_key], 3.month.from_now , 1.day.ago
|
||||
)
|
||||
|
||||
if pb_products.present? && vw_mb_member[:social_security_number].present?
|
||||
@@ -53,14 +53,18 @@ class UpdateMemberJob < ApplicationJob
|
||||
INNER JOIN "PBCoveredEntities" ON "PBProductParticipation"."PBProductParticipationKey" = "PBCoveredEntities"."PBProductParticipationKey"
|
||||
INNER JOIN "PBProductAvailability" ON "PBProductAvailability"."PBProductAvailabilityKey" = "PBProductParticipation"."PBProductAvailabilityKey"
|
||||
INNER JOIN "PBProduct" ON "PBProduct"."PBProductKey" = "PBProductAvailability"."PBProductKey"
|
||||
').find_by('
|
||||
').select('
|
||||
"GEN_LookupTables".*, "PBProductParticipation"."InEffect" AS EffDate
|
||||
').where('
|
||||
"PBCoveredEntities"."PBEntityKey" = ?
|
||||
AND "PBProductParticipation"."InEffect" <= ?
|
||||
AND "PBProductParticipation"."OutOfEffect" > ?
|
||||
AND "PBProduct"."PBProductKey" = ?',
|
||||
member.pb_entity_key, 1.month.from_now, 1.day.ago, dental_pb_product_key
|
||||
).short_desc
|
||||
).order('EffDate DESC').first.short_desc
|
||||
member.coverage_class = coverage_class
|
||||
else
|
||||
member.coverage_class = "NONE"
|
||||
end
|
||||
else
|
||||
medical_pb_product_key = pb_products.first.pb_product_key
|
||||
|
||||
Reference in New Issue
Block a user