Employers working - onboarding to card print
CI / scan_ruby (push) Failing after 10m41s
CI / lint (push) Failing after 7m31s
CI / test (push) Failing after 8m29s
Docker / build-and-test-image (push) Failing after 11m32s

This commit is contained in:
Jason Jordan
2026-01-15 11:37:50 -05:00
parent 0464ba8929
commit 4fac3b1036
108 changed files with 4113 additions and 431 deletions
@@ -1,10 +1,10 @@
class AlternativeNetworkLogo < ApplicationRecord
belongs_to :employer_setup_process
class AlternateNetworkLogo < ApplicationRecord
belongs_to :employer
before_save :process_network_logo
# before_save :process_network_logo
def process_network_logo
unless self.network_logo.is_a?(String)
if self.network_logo.present? && !self.network_logo.is_a?(String)
self.employer_setup_process.card_logo_files.new(
filename: self.network_logo.filename,
logo_type: 'network',
+1 -1
View File
@@ -3,5 +3,5 @@
class ApplicationRecord < ActiveRecord::Base
primary_abstract_class
establish_connection :dev_tools
establish_connection :baclight
end
-83
View File
@@ -1,83 +0,0 @@
module BrittonWeb
class SampleIdCards < BrittonWebRecord
self.table_name = 'sample_id_cards'
alias_attribute :id, :id
alias_attribute :full_name, :full_name
alias_attribute :family_id, :family_id
alias_attribute :primary_mb_member_key, :primary_mb_member_key
alias_attribute :employer_name, :employer_name
alias_attribute :pl_plan_key, :pl_plan_key -moved to esp/not used in template
alias_attribute :group_number, :group_number
alias_attribute :rx_group, :rx_group
alias_attribute :network_image, :network_image -moved to esp/not used in template
alias_attribute :medical_eff_date, :medical_eff_date
alias_attribute :provider_code, :provider_code
alias_attribute :provider_line_1, :provider_line_1
alias_attribute :provider_line_2, :provider_line_2
alias_attribute :provider_line_3, :provider_line_3
alias_attribute :provider_line_4, :provider_line_4
alias_attribute :provider_line_5, :provider_line_5
alias_attribute :provider_line_6, :provider_line_6
alias_attribute :provider_line_7, :provider_line_7
alias_attribute :provider_line_8, :provider_line_8
alias_attribute :provider_line_9, :provider_line_9
alias_attribute :provider_line_10, :provider_line_10
alias_attribute :provider_line_11, :provider_line_11
alias_attribute :mail_to, :mail_to - dont need/not used in template
alias_attribute :claim_to_1, :claim_to_1
alias_attribute :claim_to_2, :claim_to_2
alias_attribute :claim_to_3, :claim_to_3
alias_attribute :claim_to_4, :claim_to_4
alias_attribute :claim_to_5, :claim_to_5
alias_attribute :claim_to_6, :claim_to_6
alias_attribute :claim_to_7, :claim_to_7
alias_attribute :claim_to_8, :claim_to_8
alias_attribute :claim_to_9, :claim_to_9
alias_attribute :claim_to_10, :claim_to_10
alias_attribute :claim_to_11, :claim_to_11
alias_attribute :customer_service, :customer_service
alias_attribute :web_url, :web_url
alias_attribute :dependent_1, :dependent_1 - keep for now
alias_attribute :dependent_2, :dependent_2
alias_attribute :dependent_3, :dependent_3
alias_attribute :dependent_4, :dependent_4
alias_attribute :dependent_5, :dependent_5
alias_attribute :dependent_6, :dependent_6
alias_attribute :dependent_7, :dependent_7
alias_attribute :dependent_8, :dependent_8
alias_attribute :benefit_desc_1, :benefit_desc_1
alias_attribute :benefit_1, :benefit_1
alias_attribute :benefit_desc_2, :benefit_desc_2
alias_attribute :benefit_2, :benefit_2
alias_attribute :benefit_desc_3, :benefit_desc_3
alias_attribute :benefit_3, :benefit_3
alias_attribute :benefit_desc_4, :benefit_desc_4
alias_attribute :benefit_4, :benefit_4
alias_attribute :benefit_desc_5, :benefit_desc_5
alias_attribute :benefit_5, :benefit_5
alias_attribute :benefit_desc_6, :benefit_desc_6
alias_attribute :benefit_6, :benefit_6
alias_attribute :benefit_desc_7, :benefit_desc_7
alias_attribute :benefit_7, :benefit_7
alias_attribute :benefit_desc_8, :benefit_desc_8
alias_attribute :benefit_8, :benefit_8
alias_attribute :benefit_desc_9, :benefit_desc_9
alias_attribute :benefit_9, :benefit_9
alias_attribute :benefit_desc_10, :benefit_desc_10
alias_attribute :benefit_10, :benefit_10
alias_attribute :benefit_desc_11, :benefit_desc_11
alias_attribute :benefit_11, :benefit_11
alias_attribute :benefit_desc_12, :benefit_desc_12
alias_attribute :benefit_12, :benefit_12
alias_attribute :benefit_desc_13, :benefit_desc_13
alias_attribute :benefit_13, :benefit_13
alias_attribute :benefit_desc_14, :benefit_desc_14
alias_attribute :benefit_14, :benefit_14
alias_attribute :created_at, :created_at
alias_attribute :updated_at, :updated_at
end
end
+2 -1
View File
@@ -1,3 +1,4 @@
class CardLogoFile < ApplicationRecord
belongs_to :employer_setup_process, optional: true
has_many :employer_card_logos, dependent: :destroy
has_many :employers, through: :employer_card_logos
end
+3
View File
@@ -0,0 +1,3 @@
class CardProvider < ApplicationRecord
has_many :employers
end
+3
View File
@@ -0,0 +1,3 @@
class CardRx < ApplicationRecord
has_many :employers
end
+155
View File
@@ -0,0 +1,155 @@
class Employer < ApplicationRecord
has_many :members
has_many :plans, dependent: :destroy
accepts_nested_attributes_for :plans, allow_destroy: true, reject_if: :all_blank
has_many :alternate_network_logos, dependent: :destroy
accepts_nested_attributes_for :alternate_network_logos, allow_destroy: true, reject_if: :all_blank
has_many :employer_card_logos, dependent: :destroy
accepts_nested_attributes_for :employer_card_logos
has_many :card_logo_files, through: :employer_card_logos
has_one :employer_brand_logo, -> { where(logo_type: 'employer') },
class_name: 'EmployerCardLogo',
dependent: :destroy
has_one :employer_logo, through: :employer_brand_logo, source: :card_logo_file
has_many :network_images, -> { where(logo_type: 'network') },
class_name: 'EmployerCardLogo',
dependent: :destroy
has_many :network_logos, through: :network_images, source: :card_logo_file
belongs_to :card_provider, optional: true
belongs_to :card_rx, optional: true
scope :active, -> { where(active: true) }
scope :inactive, -> { where(active: false) }
# before_save :process_employer_logo
# before_save :process_employer_logo, if: :employer_logo_filename_changed?
before_save :create_slug, if: :new_record?
after_save :process_employer_logo, if: :saved_change_to_employer_logo_filename?
def process_employer_logo
# if self.employer_logo.present? && !self.employer_logo.is_a?(String)
# self.card_logo_files.new(
# filename: self.employer_logo.filename,
# logo_type: 'employer',
# image: self.employer_logo.data,
# pl_plan_key: self.pl_plan_key || ""
# )
# end
if self.employer_logo_filename.present? && self.employer_logo_filename.is_a?(String)
image_file = CardLogoFile.find_by(filename: self.employer_logo_filename)
if image_file.present?
if self.employer_brand_logo.present?
self.employer_brand_logo.update(card_logo_file: image_file)
else
self.create_employer_brand_logo(card_logo_file: image_file, logo_type: 'employer')
end
end
end
end
def create_slug
self.slug = employer_trim_name(self.name).parameterize
end
def name_to_logo_filename(extension)
self.employer_trim_name(self.name).titleize.gsub(/\s+/, '').concat('Logo').concat(extension.downcase)
end
def employer_trim_name(name)
regex_source = Regexp.union(["health", "plan", "the", "inc", "llc"]).source
case_insensitive_regex = Regexp.new(regex_source, "i")
name.gsub(case_insensitive_regex, "").squish
end
def self.permitted_params(params)
params.require(:employer).permit(
:name,
:group_number,
:pl_plan_key,
:effective_date,
:employer_logo_filename,
:network_provider,
:default_network_logo,
:single_card_template,
:card_provider_id,
:card_rx_id,
plans_attributes: [
:id,
:title,
:pb_product_key,
:_destroy,
plan_benefits_attributes: [
:id,
:benefit_desc,
:benefit,
:sequence,
:_destroy,
]
],
alternate_network_logos_attributes: [
:id,
:network_logo,
:exception_type,
:exception_value,
:_destroy
]
)
end
def save_to_prod
VhcsRecord.transaction do
Vhcs::HlPlanCode.create!(
group_number: self.group_number,
medical_number: self.group_number,
dental_number: '',
plan_key: self.pl_plan_key,
effect_date: self.effective_date
)
# Replace fairos_info with template like for benefits
fairos_info = Vhcs::HlrxCrosRef.where(pl_plan_key: 52).first
Vhcs::HlrxCrosRef.create!(
group_no: self.group_number,
rx_group_id: self.group_number,
help_desk: fairos_info.help_desk,
customer_service: fairos_info.customer_service,
web_url: fairos_info.web_url,
pl_plan_key: self.pl_plan_key
)
self.plans.each_with_index do |plan, i|
plan.plan_benefits.each do |bene|
Vhcs::HlEgglestonCardBenefit.create!(
plan_id: plan.plan_id,
benefit_desc: bene.benefit_desc,
benefit: bene.benefit,
sequence: bene.sequence,
plan_key: self.pl_plan_key
)
end
end
end
end
def build_plan_with_default_benefits(attributes = {})
plan = plans.new(attributes)
benefits = IdCardBenefitsTemplate.find_by(title: "BLANK").id_card_benefits.sort_by(&:sequence)
benefits.each do |ben|
plan.plan_benefits.new(benefit_desc: ben.benefit_desc, sequence: ben.sequence)
end
plan
end
private
end
+5
View File
@@ -0,0 +1,5 @@
class EmployerCardLogo < ApplicationRecord
belongs_to :employer
belongs_to :card_logo_file
end
+57 -5
View File
@@ -2,15 +2,16 @@ class EmployerSetupProcess < ApplicationRecord
has_many :plans, dependent: :destroy
accepts_nested_attributes_for :plans, allow_destroy: true, reject_if: :all_blank
has_many :alternative_network_logos, dependent: :destroy
accepts_nested_attributes_for :alternative_network_logos, allow_destroy: true, reject_if: :all_blank
has_many :alternate_network_logos, dependent: :destroy
accepts_nested_attributes_for :alternate_network_logos, allow_destroy: true, reject_if: :all_blank
has_many :card_logo_files
before_save :process_employer_logo
# before_save :process_employer_logo
before_save :create_slug, if: :new_record?
def process_employer_logo
unless self.employer_logo.is_a?(String)
if self.employer_logo.present? && !self.employer_logo.is_a?(String)
self.card_logo_files.new(
filename: self.employer_logo.filename,
logo_type: 'employer',
@@ -20,6 +21,20 @@ class EmployerSetupProcess < ApplicationRecord
end
end
def create_slug
self.slug = employer_trimmed_name.parameterize
end
def employer_name_to_logo_filename(extension)
self.employer_trimmed_name.titleize.gsub(/\s+/, '').concat('Logo').concat(extension.downcase)
end
def employer_trimmed_name
regex_source = Regexp.union(["health", "plan", "the", "inc", "llc"]).source
case_insensitive_regex = Regexp.new(regex_source, "i")
self.employer_name.gsub(case_insensitive_regex, "").squish
end
def self.permitted_params(params)
params.require(:employer_setup_process).permit(
:employer_name,
@@ -41,7 +56,7 @@ class EmployerSetupProcess < ApplicationRecord
:_destroy,
]
],
alternative_network_logos_attributes: [
alternate_network_logos_attributes: [
:id,
:network_logo,
:exception_type,
@@ -51,4 +66,41 @@ class EmployerSetupProcess < ApplicationRecord
)
end
def save_to_prod
VhcsRecord.transaction do
Vhcs::HlPlanCode.create!(
group_number: self.group_number,
medical_number: self.group_number,
dental_number: '',
plan_key: self.pl_plan_key,
effect_date: self.effective_date
)
# Replace fairos_info with template like for benefits
fairos_info = Vhcs::HlrxCrosRef.where(pl_plan_key: 52).first
Vhcs::HlrxCrosRef.cdarreate!(
group_no: self.group_number,
rx_group_id: self.group_number,
help_desk: fairos_info.help_desk,
customer_service: fairos_info.customer_service,
web_url: fairos_info.web_url,
pl_plan_key: self.pl_plan_key
)
self.plans.each_with_index do |plan, i|
plan.plan_benefits.each do |bene|
Vhcs::HlEgglestonCardBenefit.create!(
plan_id: plan.plan_id,
benefit_desc: bene.benefit_desc,
benefit: bene.benefit,
sequence: bene.sequence,
plan_key: self.pl_plan_key
)
end
end
end
end
end
+6
View File
@@ -0,0 +1,6 @@
class Member < ApplicationRecord
belongs_to :plan
belongs_to :employer
end
+3 -3
View File
@@ -1,15 +1,15 @@
class Plan < ApplicationRecord
belongs_to :employer_setup_process
belongs_to :employer
has_many :plan_benefits, dependent: :destroy
accepts_nested_attributes_for :plan_benefits, allow_destroy: true, reject_if: :all_blank
after_initialize :create_default_benefits, if: :new_record?
# after_initialize :create_default_benefits, if: :new_record?
private
def create_default_benefits
def build_and_create_default_benefits
benefits = IdCardBenefitsTemplate.find_by(title: "BLANK").id_card_benefits.sort_by(&:sequence)
benefits.each do |ben|
plan_benefits.new(benefit_desc: ben.benefit_desc, sequence: ben.sequence)
+14
View File
@@ -0,0 +1,14 @@
class SampleIdCard < ApplicationRecord
STRING_ATTRIBUTES = %w[provider_line_1 provider_line_2 provider_line_3 provider_line_4 provider_line_5 provider_line_6 provider_line_7 provider_line_8 provider_line_9 provider_line_10 provider_line_11 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 dependent_1 dependent_2 dependent_3 dependent_4 dependent_5 dependent_6 dependent_7 dependent_8]
before_validation :assign_blank_strings_to_unassigned_params
def assign_blank_strings_to_unassigned_params
STRING_ATTRIBUTES.each do |attr|
# Use the blank? method which checks for nil, false, empty, or whitespace strings
self[attr] = "" if self[attr].blank?
end
end
end
+57 -7
View File
@@ -1,7 +1,8 @@
module Vhcs
class HLIDCardProvider < VhcsRecord
class HlidCardProvider < VhcsRecord
self.table_name = 'HLIDCardProvider'
self.primary_key = 'ProviderCode'
alias_attribute :provider_code, :ProviderCode
alias_attribute :provider_line_1, :ProviderLine1
@@ -36,12 +37,61 @@ module Vhcs
alias_attribute :rx_contact, :RXContact
alias_attribute :provider_lookup_1, :ProviderLookup1
alias_attribute :provider_lookup_2, :ProviderLookup2
alias_attribute :precert1, :Precert1
alias_attribute :precert2, :Precert2
alias_attribute :precert3, :Precert3
alias_attribute :precert4, :Precert4
alias_attribute :precert5, :Precert5
alias_attribute :precert6, :Precert6
alias_attribute :precert_1, :Precert1
alias_attribute :precert_2, :Precert2
alias_attribute :precert_3, :Precert3
alias_attribute :precert_4, :Precert4
alias_attribute :precert_5, :Precert5
alias_attribute :precert_6, :Precert6
alias_attribute :provider_line_12, :ProviderLine12
alias_attribute :claim_to_12, :ClaimTo12
def attributes
rails_like = {
provider_code: self.provider_code,
provider_line_1: self.provider_line_1,
provider_line_2: self.provider_line_2,
provider_line_3: self.provider_line_3,
provider_line_4: self.provider_line_4,
provider_line_5: self.provider_line_5,
mail_to: self.mail_to,
mail_to_2: self.mail_to_2,
contact_line_1: self.contact_line_1,
contact_line_2: self.contact_line_2,
contact_line_3: self.contact_line_3,
group_number: self.group_number,
claim_to_1: self.claim_to_1,
claim_to_2: self.claim_to_2,
claim_to_3: self.claim_to_3,
claim_to_4: self.claim_to_4,
claim_to_5: self.claim_to_5,
claim_to_6: self.claim_to_6,
claim_to_7: self.claim_to_7,
claim_to_8: self.claim_to_8,
claim_to_9: self.claim_to_9,
claim_to_10: self.claim_to_10,
claim_to_11: self.claim_to_11,
claim_to_12: self.claim_to_12,
provider_line_6: self.provider_line_6,
provider_line_7: self.provider_line_7,
provider_line_8: self.provider_line_8,
provider_line_9: self.provider_line_9,
provider_line_10: self.provider_line_10,
provider_line_11: self.provider_line_11,
provider_line_12: self.provider_line_12,
rx_group_id: self.rx_group_id,
rx_contact: self.rx_contact,
provider_lookup_1: self.provider_lookup_1,
provider_lookup_2: self.provider_lookup_2,
precert_1: self.precert_1,
precert_2: self.precert_2,
precert_3: self.precert_3,
precert_4: self.precert_4,
precert_5: self.precert_5,
precert_6: self.precert_6,
}
super.merge(rails_like)
end
end
+48
View File
@@ -0,0 +1,48 @@
module Vhcs
class HlidCardProvider < VhcsRecord
self.table_name = 'HLIDCardProvider'
alias_attribute :provider_code, :ProviderCode
alias_attribute :provider_line_1, :ProviderLine1
alias_attribute :provider_line_2, :ProviderLine2
alias_attribute :provider_line_3, :ProviderLine3
alias_attribute :provider_line_4, :ProviderLine4
alias_attribute :provider_line_5, :ProviderLine5
alias_attribute :mail_to, :MailTo
alias_attribute :mail_to_2, :MailTo2
alias_attribute :contact_line_1, :ContactLine1
alias_attribute :contact_line_2, :ContactLine2
alias_attribute :contact_line_3, :ContactLine3
alias_attribute :group_number, :GroupNumber
alias_attribute :claim_to_1, :ClaimTo1
alias_attribute :claim_to_2, :ClaimTo2
alias_attribute :claim_to_3, :ClaimTo3
alias_attribute :claim_to_4, :ClaimTo4
alias_attribute :claim_to_5, :ClaimTo5
alias_attribute :claim_to_6, :ClaimTo6
alias_attribute :claim_to_7, :ClaimTo7
alias_attribute :claim_to_8, :ClaimTo8
alias_attribute :claim_to_9, :ClaimTo9
alias_attribute :claim_to_10, :ClaimTo10
alias_attribute :claim_to_11, :ClaimTo11
alias_attribute :provider_line_6, :ProviderLine6
alias_attribute :provider_line_7, :ProviderLine7
alias_attribute :provider_line_8, :ProviderLine8
alias_attribute :provider_line_9, :ProviderLine9
alias_attribute :provider_line_10, :ProviderLine10
alias_attribute :provider_line_11, :ProviderLine11
alias_attribute :rx_group_id, :RXGroupId
alias_attribute :rx_contact, :RXContact
alias_attribute :provider_lookup_1, :ProviderLookup1
alias_attribute :provider_lookup_2, :ProviderLookup2
alias_attribute :precert1, :Precert1
alias_attribute :precert2, :Precert2
alias_attribute :precert3, :Precert3
alias_attribute :precert4, :Precert4
alias_attribute :precert5, :Precert5
alias_attribute :precert6, :Precert6
end
end
+12
View File
@@ -10,6 +10,18 @@ module Vhcs
alias_attribute :web_url, :WebUrl
alias_attribute :pl_plan_key, :PLPlanKey
def attributes
rails_like = {
group_no: self.group_no,
rx_group_id: self.rx_group_id,
help_desk: self.help_desk,
customer_service: self.customer_service,
web_url: self.web_url,
pl_plan_key: self.pl_plan_key,
}
super.merge(rails_like)
end
end
end
+15
View File
@@ -0,0 +1,15 @@
module Vhcs
class HlrxCrosRef < VhcsRecord
self.table_name = 'HLRXCrosRef'
alias_attribute :group_no, :GroupNo
alias_attribute :rx_group_id, :RXGroupID
alias_attribute :help_desk, :HelpDesk
alias_attribute :customer_service, :CustomerService
alias_attribute :web_url, :WebUrl
alias_attribute :pl_plan_key, :PLPlanKey
end
end
+23
View File
@@ -0,0 +1,23 @@
module Vhcs
class PbCompanyPlans < VhcsRecord
self.table_name = 'PBCompanyPlans'
alias_attribute :pb_company_plan_key, :PBCompanyPlanKey
alias_attribute :company_pb_entity_key, :CompanyPBEntityKey
alias_attribute :pl_plan_key, :PLPlanKey
def attributes
rails_like = {
pb_company_plan_key: self.pb_company_plan_key,
company_pb_entity_key: self.company_pb_entity_key,
pl_plan_key: self.pl_plan_key,
}
super.merge(rails_like)
end
end
end
+47
View File
@@ -0,0 +1,47 @@
module Vhcs
class PbEntity < VhcsRecord
self.table_name = 'PBEntity'
alias_attribute :pb_entity_key, :PBEntityKey
alias_attribute :company_pb_entity_key, :CompanyPBEntityKey
alias_attribute :entity_type_id, :EntityTypeID
alias_attribute :prefix_id, :PrefixID
alias_attribute :first_name, :FirstName
alias_attribute :middle_name, :MiddleName
alias_attribute :last_name, :LastName
alias_attribute :suffix_id, :SuffixID
alias_attribute :title, :Title
alias_attribute :letter_tag_bit_flags, :LetterTagBitFlags
alias_attribute :when_last_changed, :WhenLastChanged
alias_attribute :who_last_changed, :WhoLastChanged
alias_attribute :full_name_last_name_first, :FullNameLastNameFirst
alias_attribute :alternate_key, :AlternateKey
def attributes
rails_like = {
pb_entity_key: self.pb_entity_key,
company_pb_entity_key: self.company_pb_entity_key,
entity_type_id: self.entity_type_id,
prefix_id: self.prefix_id,
first_name: self.first_name,
middle_name: self.middle_name,
last_name: self.last_name,
suffix_id: self.suffix_id,
title: self.title,
letter_tag_bit_flags: self.letter_tag_bit_flags,
when_last_changed: self.when_last_changed,
who_last_changed: self.who_last_changed,
full_name_last_name_first: self.full_name_last_name_first,
alternate_key: self.alternate_key,
}
super.merge(rails_like)
end
def full_name
[self.first_name, self.middle_name, self.last_name].join(" ").squish
end
end
end
+57
View File
@@ -0,0 +1,57 @@
module Vhcs
class PbProduct < VhcsRecord
self.table_name = 'PBProduct'
alias_attribute :pb_product_key, :PBProductKey
alias_attribute :pb_product_line_key, :PBProductLineKey
alias_attribute :target_entity_type_id, :TargetEntityTypeID
alias_attribute :company_pb_entity_key, :CompanyPBEntityKey
alias_attribute :full_description, :FullDescription
alias_attribute :column_description, :ColumnDescription
alias_attribute :short_description, :ShortDescription
alias_attribute :presentation_format_code, :PresentationFormatCode
alias_attribute :is_active, :IsActive
alias_attribute :used_for_hrafsa, :UsedForHRAFSA
alias_attribute :non_network_rx_coverage, :NonNetworkRxCoverage
alias_attribute :web_express_product_group_g_1_0, :WebExpressProductGroup_G10
alias_attribute :web_express_description, :WebExpressDescription
alias_attribute :web_express_oe_processing_order, :WebExpressOEProcessingOrder
alias_attribute :participant_enrollee_type_bitmask, :ParticipantEnrolleeTypeBitmask
alias_attribute :invoice_group_g_1_2_7, :InvoiceGroup_G127
alias_attribute :web_express_must_participate, :WebExpressMustParticipate
alias_attribute :suppress_optional_amount, :SuppressOptionalAmount
alias_attribute :suppress_coverage, :SuppressCoverage
alias_attribute :suppress_description, :SuppressDescription
alias_attribute :pb_product_enrollment_grouping_key, :PBProductEnrollmentGroupingKey
def attributes
rails_like = {
pb_product_key: self.pb_product_key,
pb_product_line_key: self.pb_product_line_key,
target_entity_type_id: self.target_entity_type_id,
company_pb_entity_key: self.company_pb_entity_key,
full_description: self.full_description,
column_description: self.column_description,
short_description: self.short_description,
presentation_format_code: self.presentation_format_code,
is_active: self.is_active,
used_for_hrafsa: self.used_for_hrafsa,
non_network_rx_coverage: self.non_network_rx_coverage,
web_express_product_group_g_1_0: self.web_express_product_group_g_1_0,
web_express_description: self.web_express_description,
web_express_oe_processing_order: self.web_express_oe_processing_order,
participant_enrollee_type_bitmask: self.participant_enrollee_type_bitmask,
invoice_group_g_1_2_7: self.invoice_group_g_1_2_7,
web_express_must_participate: self.web_express_must_participate,
suppress_optional_amount: self.suppress_optional_amount,
suppress_coverage: self.suppress_coverage,
suppress_description: self.suppress_description,
pb_product_enrollment_grouping_key: self.pb_product_enrollment_grouping_key,
}
super.merge(rails_like)
end
end
end
@@ -0,0 +1,55 @@
module Vhcs
class PbProductParticipation < VhcsRecord
self.table_name = 'PBProductParticipation'
alias_attribute :pb_product_participation_key, :PBProductParticipationKey
alias_attribute :pb_affiliation_key, :PBAffiliationKey
alias_attribute :pb_product_availability_key, :PBProductAvailabilityKey
alias_attribute :coverage_type_code, :CoverageTypeCode
alias_attribute :optional_amount, :OptionalAmount
alias_attribute :in_effect, :InEffect
alias_attribute :out_of_effect, :OutOfEffect
alias_attribute :in_effect_reason_code, :InEffectReasonCode
alias_attribute :out_of_effect_reason_code, :OutOfEffectReasonCode
alias_attribute :when_last_changed, :WhenLastChanged
alias_attribute :who_last_changed, :WhoLastChanged
alias_attribute :user_defined_rate_criteria_value_1, :UserDefinedRateCriteriaValue1
alias_attribute :user_defined_rate_criteria_value_2, :UserDefinedRateCriteriaValue2
alias_attribute :user_defined_rate_criteria_value_3, :UserDefinedRateCriteriaValue3
alias_attribute :user_defined_rate_criteria_record_id_1, :UserDefinedRateCriteriaRecordID1
alias_attribute :user_defined_rate_criteria_record_id_2, :UserDefinedRateCriteriaRecordID2
alias_attribute :user_defined_rate_criteria_record_id_3, :UserDefinedRateCriteriaRecordID3
alias_attribute :optional_amount_record_id, :OptionalAmountRecordID
alias_attribute :primary_pb_affiliation_key, :PrimaryPBAffiliationKey
alias_attribute :payment_type_record_id_g_1_7_7, :PaymentTypeRecordID_G177
def attributes
rails_like = {
pb_product_participation_key: self.pb_product_participation_key,
pb_affiliation_key: self.pb_affiliation_key,
pb_product_availability_key: self.pb_product_availability_key,
coverage_type_code: self.coverage_type_code,
optional_amount: self.optional_amount,
in_effect: self.in_effect,
out_of_effect: self.out_of_effect,
in_effect_reason_code: self.in_effect_reason_code,
out_of_effect_reason_code: self.out_of_effect_reason_code,
when_last_changed: self.when_last_changed,
who_last_changed: self.who_last_changed,
user_defined_rate_criteria_value_1: self.user_defined_rate_criteria_value_1,
user_defined_rate_criteria_value_2: self.user_defined_rate_criteria_value_2,
user_defined_rate_criteria_value_3: self.user_defined_rate_criteria_value_3,
user_defined_rate_criteria_record_id_1: self.user_defined_rate_criteria_record_id_1,
user_defined_rate_criteria_record_id_2: self.user_defined_rate_criteria_record_id_2,
user_defined_rate_criteria_record_id_3: self.user_defined_rate_criteria_record_id_3,
optional_amount_record_id: self.optional_amount_record_id,
primary_pb_affiliation_key: self.primary_pb_affiliation_key,
payment_type_record_id_g_1_7_7: self.payment_type_record_id_g_1_7_7,
}
super.merge(rails_like)
end
end
end
+103
View File
@@ -0,0 +1,103 @@
module Vhcs
class VwmbMember < VhcsRecord
self.table_name = 'VWMBMember'
alias_attribute :mb_member_key, :MBMemberKey
alias_attribute :pb_entity_key, :PBEntityKey
alias_attribute :pl_plan_key, :PLPlanKey
alias_attribute :mbr_class, :MbrClass
alias_attribute :mbr_type, :MbrType
alias_attribute :mbr_ap_vendor_key, :MbrAPVendorKey
alias_attribute :alt_ap_vendor_key, :AltAPVendorKey
alias_attribute :use_alt_payee, :UseAltPayee
alias_attribute :send_eob_primary, :SendEOBPrimary
alias_attribute :send_eob_dependent, :SendEOBDependent
alias_attribute :send_eob_third_party, :SendEOBThirdParty
alias_attribute :student_flag, :StudentFlag
alias_attribute :disabled_dependent_flag, :DisabledDependentFlag
alias_attribute :is_restricted, :IsRestricted
alias_attribute :third_party_pb_entity_key, :ThirdPartyPBEntityKey
alias_attribute :user_def_1, :UserDef1
alias_attribute :user_def_2, :UserDef2
alias_attribute :family_id, :FamilyID
alias_attribute :sequence_number, :SequenceNumber
alias_attribute :enrollee_type_key, :EnrolleeTypeKey
alias_attribute :enrollee_type, :EnrolleeType
alias_attribute :enrollee_type_value_id, :EnrolleeTypeValueID
alias_attribute :sex_key, :SexKey
alias_attribute :use_primary_address, :UsePrimaryAddress
alias_attribute :birth_date, :BirthDate
alias_attribute :birth_sequence_number, :BirthSequenceNumber
alias_attribute :death_date, :DeathDate
alias_attribute :date_of_birth, :DateOfBirth
alias_attribute :date_of_death, :DateOfDeath
alias_attribute :social_security_number, :SocialSecurityNumber
alias_attribute :hipaaid, :HIPAAID
alias_attribute :company_pb_entity_key, :CompanyPBEntityKey
alias_attribute :entity_type_id, :EntityTypeID
alias_attribute :prefix_id, :PrefixID
alias_attribute :first_name, :FirstName
alias_attribute :middle_name, :MiddleName
alias_attribute :last_name, :LastName
alias_attribute :suffix_id, :SuffixID
alias_attribute :title, :Title
alias_attribute :letter_tag_bit_flags, :LetterTagBitFlags
alias_attribute :full_name_last_name_first, :FullNameLastNameFirst
alias_attribute :policy_number, :PolicyNumber
alias_attribute :send_eob_alt_payee, :SendEOBAltPayee
alias_attribute :send_eob_alt_payee_only, :SendEOBAltPayeeOnly
def attributes
rails_like = {
mb_member_key: self.mb_member_key,
pb_entity_key: self.pb_entity_key,
pl_plan_key: self.pl_plan_key,
mbr_class: self.mbr_class,
mbr_type: self.mbr_type,
mbr_ap_vendor_key: self.mbr_ap_vendor_key,
alt_ap_vendor_key: self.alt_ap_vendor_key,
use_alt_payee: self.use_alt_payee,
send_eob_primary: self.send_eob_primary,
send_eob_dependent: self.send_eob_dependent,
send_eob_third_party: self.send_eob_third_party,
student_flag: self.student_flag,
disabled_dependent_flag: self.disabled_dependent_flag,
is_restricted: self.is_restricted,
third_party_pb_entity_key: self.third_party_pb_entity_key,
user_def_1: self.user_def_1,
user_def_2: self.user_def_2,
family_id: self.family_id,
sequence_number: self.sequence_number,
enrollee_type_key: self.enrollee_type_key,
enrollee_type: self.enrollee_type,
enrollee_type_value_id: self.enrollee_type_value_id,
sex_key: self.sex_key,
use_primary_address: self.use_primary_address,
birth_date: self.birth_date,
birth_sequence_number: self.birth_sequence_number,
death_date: self.death_date,
date_of_birth: self.date_of_birth,
date_of_death: self.date_of_death,
social_security_number: self.social_security_number,
hipaaid: self.hipaaid,
company_pb_entity_key: self.company_pb_entity_key,
entity_type_id: self.entity_type_id,
prefix_id: self.prefix_id,
first_name: self.first_name,
middle_name: self.middle_name,
last_name: self.last_name,
suffix_id: self.suffix_id,
title: self.title,
letter_tag_bit_flags: self.letter_tag_bit_flags,
full_name_last_name_first: self.full_name_last_name_first,
policy_number: self.policy_number,
send_eob_alt_payee: self.send_eob_alt_payee,
send_eob_alt_payee_only: self.send_eob_alt_payee_only,
}
super.merge(rails_like)
end
end
end