automation and view updates

This commit is contained in:
Jason Jordan
2026-04-17 15:35:10 -04:00
parent 247a075c9c
commit 7ab1143db8
30 changed files with 124704 additions and 602 deletions
+6 -6
View File
@@ -3,11 +3,11 @@ class UpdateMemberJob < ApplicationJob
def perform(pb_entity_key, employer_id, has_divisions = false, has_dental = false, vw_mb_member = {})
unless vw_mb_member.present?
vw_mb_member = Vhcs::VwmbMember.find_by(enrollee_type_value_id: 1, pb_entity_key: pb_entity_key).attributes.with_indifferent_access.slice(:mb_member_key, :pb_entity_key, :pl_plan_key, :family_id, :full_name_last_name_first, :social_security_number)
end
unless vw_mb_member.present?
vw_mb_member = Vhcs::VwmbMember.find_by(enrollee_type_value_id: 1, pb_entity_key: pb_entity_key).attributes.with_indifferent_access.slice(:mb_member_key, :pb_entity_key, :pl_plan_key, :family_id, :full_name_last_name_first, :social_security_number)
end
pb_products = Vhcs::PbProduct.joins('
pb_products = Vhcs::PbProduct.joins('
INNER JOIN "PBProductAvailability" ON "PBProductAvailability"."PBProductKey" = "PBProduct"."PBProductKey"
INNER JOIN "PBProductParticipation" ON "PBProductParticipation"."PBProductAvailabilityKey" = "PBProductAvailability"."PBProductAvailabilityKey"
INNER JOIN "PBCoveredEntities" ON "PBProductParticipation"."PBProductParticipationKey" = "PBCoveredEntities"."PBProductParticipationKey"
@@ -42,7 +42,7 @@ class UpdateMemberJob < ApplicationJob
end
if has_dental
medical_pb_product_key = pb_products.where(short_description: "Medical")&.first&.pb_product_key
medical_pb_product_key = pb_products.where("ShortDescription LIKE ?", "%Medical%")&.first&.pb_product_key
dental_pb_product_key = pb_products.where("ShortDescription LIKE ?", "%Dental%")&.first&.pb_product_key
# dental_pb_product_key = pb_products.where(short_description: "Dental")&.first&.pb_product_key
if dental_pb_product_key
@@ -74,8 +74,8 @@ class UpdateMemberJob < ApplicationJob
# else
# end
puts "---- #{member.name}"
end
puts "---- #{member.name}"
member.presence
end