Employer form mostly working with persist to db

This commit is contained in:
Jason Jordan
2025-12-10 13:22:33 -05:00
parent 78ce415b94
commit 0464ba8929
68 changed files with 3071 additions and 365 deletions
+2
View File
@@ -84,3 +84,5 @@ gem 'pundit'
gem "tailwindcss-rails" gem "tailwindcss-rails"
gem 'docx' gem 'docx'
gem 'rubyzip' gem 'rubyzip'
gem 'httparty'
gem 'combine_pdf'
+13
View File
@@ -104,9 +104,13 @@ GEM
xpath (~> 3.2) xpath (~> 3.2)
cgi (0.5.0) cgi (0.5.0)
coderay (1.1.3) coderay (1.1.3)
combine_pdf (1.0.31)
matrix
ruby-rc4 (>= 0.1.5)
concurrent-ruby (1.3.5) concurrent-ruby (1.3.5)
connection_pool (2.5.4) connection_pool (2.5.4)
crass (1.0.6) crass (1.0.6)
csv (3.3.5)
date (3.5.0) date (3.5.0)
devise (4.9.4) devise (4.9.4)
bcrypt (~> 3.0) bcrypt (~> 3.0)
@@ -123,6 +127,10 @@ GEM
erubi (1.13.1) erubi (1.13.1)
globalid (1.3.0) globalid (1.3.0)
activesupport (>= 6.1) activesupport (>= 6.1)
httparty (0.23.2)
csv
mini_mime (>= 1.0.0)
multi_xml (>= 0.5.2)
i18n (1.14.7) i18n (1.14.7)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
importmap-rails (2.2.2) importmap-rails (2.2.2)
@@ -156,6 +164,8 @@ GEM
mini_mime (1.1.5) mini_mime (1.1.5)
minitest (5.26.0) minitest (5.26.0)
msgpack (1.8.0) msgpack (1.8.0)
multi_xml (0.7.2)
bigdecimal (~> 3.1)
net-imap (0.5.12) net-imap (0.5.12)
date date
net-protocol net-protocol
@@ -308,6 +318,7 @@ GEM
lint_roller (~> 1.1) lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1) rubocop (~> 1.72, >= 1.72.1)
ruby-progressbar (1.13.0) ruby-progressbar (1.13.0)
ruby-rc4 (0.1.5)
rubyzip (3.2.2) rubyzip (3.2.2)
securerandom (0.4.1) securerandom (0.4.1)
selenium-webdriver (4.38.0) selenium-webdriver (4.38.0)
@@ -391,8 +402,10 @@ DEPENDENCIES
brakeman brakeman
bundler-audit bundler-audit
capybara capybara
combine_pdf
devise devise
docx docx
httparty
importmap-rails importmap-rails
jbuilder jbuilder
pry-rails pry-rails
+2
View File
@@ -33,4 +33,6 @@
--color-verdigris: #588288; --color-verdigris: #588288;
/* oxidized copper/bronze green-blue */ /* oxidized copper/bronze green-blue */
--color-verdigris-tinted: #496A6F; --color-verdigris-tinted: #496A6F;
/* alert red */
--color-brightlava: #f80800;
} }
+26 -86
View File
@@ -1,90 +1,22 @@
class EmployerSetupController < ApplicationController class EmployerSetupController < ApplicationController
def new def new
# session.delete(:employer_setup_data) @employer_setup = EmployerSetupProcess.new
session.clear() @employer_setup.plans.build
# puts "Start" @plan_templates = IdCardBenefitsTemplate.where.not(title: "BLANK")
# puts session[:employer_setup_data] render 'employer_setup/employer_information'
if session[:employer_setup_data].blank?
session[:employer_setup_data] = {}
end
session[:employer_setup_data]['current_step'] = 'network_exceptions'
session[:employer_setup_data]['pl_plan_key'] = 82
@top_form = EmployerSetupForm.new(session[:employer_setup_data])
if @top_form.current_step != 'summary'
@form = form_for_step
else
@form = @top_form
end
# case @top_form.current_step
# when 'general_information'
# @form = EmployerSetupGeneralInformationForm.new(session[:employer_setup_data]&.dig('general_information_data'))
# when 'plans'
# @form = EmployerSetupPlansForm.new(session[:employer_setup_data]&.dig('plans_data'))
# when 'network_exceptions'
# @form = EmployerSetupNetworkExceptionsForm.new(session[:employer_setup_data]&.dig('network_exceptions_data'))
# when 'summary'
# @form = @top_form
# end
render @top_form.current_step_view
end end
def create def create
# puts session[:employer_setup_data] employer_setup_process_params = EmployerSetupProcess.permitted_params(params)
@top_form = EmployerSetupForm.new(session[:employer_setup_data]) puts "---Params---"
if @top_form.current_step != 'summary' puts employer_setup_process_params
if process_step(@top_form.current_step) @employer_setup = EmployerSetupProcess.new(employer_setup_process_params)
session[:employer_setup_data]['current_step'] = @top_form.next_step if @employer_setup.save
redirect_to new_employer_setup_path redirect_to @employer_setup, notice: 'Employer Setup Process initiated'
else else
render @top_form.current_step_view @plan_templates = IdCardBenefitsTemplate.where.not(title: "BLANK")
render 'employer_setup/employer_information'
end end
else
if @top_form.save
session.delete(:employer_setup_data)
redirect_to root_path, notice: "Employer setup successfully!"
else
render @top_form.current_step_view
end
end
# case @top_form.current_step
# when 'general_information'
# @form = EmployerSetupGeneralInformationForm.new(general_information_params)
# if @form.valid?
# session[:employer_setup_data]['general_information_data'] = general_information_params
# session[:employer_setup_data]['current_step'] = @top_form.next_step
# redirect_to new_employer_setup_path
# else
# render @top_form.current_step_view
# end
# when 'plans'
# @form = EmployerSetupPlansForm.new(plans_params)
# if @form.valid?
# session[:employer_setup_data]['plans_data'] = plans_params
# session[:employer_setup_data]['current_step'] = @top_form.next_step
# redirect_to new_employer_setup_path
# else
# render @top_form.current_step_view
# end
# when 'network_exceptions'
# @form = EmployerSetupNetworkExceptionsForm.new(network_exceptions_params)
# if @form.valid?
# session[:employer_setup_data]['network_exceptions_data'] = network_exceptions_params
# session[:employer_setup_data]['current_step'] = @top_form.next_step
# redirect_to new_employer_setup_path
# else
# render @top_form.current_step_view
# end
# when 'summary'
# @form = EmployerSetupForm.new(session[:employer_setup_data])
# if @form.save
# session.delete(:employer_setup_data)
# redirect_to root_path, notice: "Employer setup successfully!"
# else
# render @top_form.current_step_view
# end
# end
end end
def update def update
@@ -131,23 +63,31 @@ class EmployerSetupController < ApplicationController
def form_for_step def form_for_step
step_name = @top_form.current_step step_name = @top_form.current_step
form_method = "EmployerSetup#{step_name.camelize}Form".constantize form_method = "EmployerSetup#{step_name.camelize}Form".constantize
form_method.new() # puts "/////\\\\\\||||||"
# puts session[:employer_setup_data]
# puts session[:employer_setup_data]['employer_setup_process_id']
puts form_method
form_method.new(session[:employer_setup_data]['employer_setup_process_id'])
end end
def process_step(step_name) def process_step(step_name)
@form_method = "EmployerSetup#{step_name.camelize}Form".constantize @form_method = "EmployerSetup#{step_name.camelize}Form".constantize
session_data_name = "#{step_name}_data" session_data_name = "#{step_name}_data"
puts "1--------------params----" # puts "1--------------params----"
# puts params
# puts "8--------------session----"
# puts session[:employer_setup_data]
employer_setup_process_id = session[:employer_setup_data]['employer_setup_process_id']
# puts session[:employer_setup_data]
puts "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
puts params puts params
puts "8--------------session----" @form = @form_method.new(employer_setup_process_id, params)
puts session[:employer_setup_data]
@form = @form_method.new(params)
if @form.pl_plan_key.blank? if @form.pl_plan_key.blank?
@form.pl_plan_key = session[:employer_setup_data]['pl_plan_key'] @form.pl_plan_key = session[:employer_setup_data]['pl_plan_key']
end end
if @form.valid? && @form.save if @form.valid? && @form.save
pl_plan_key = @top_form.pl_plan_key || @form.pl_plan_key pl_plan_key = @top_form.pl_plan_key || @form.pl_plan_key
session[:employer_setup_data] = {current_step: step_name, pl_plan_key: pl_plan_key} # session[:employer_setup_data].merge!({current_step: step_name, pl_plan_key: pl_plan_key})
# form_fields = @form.attributes.merge!(global_params(step_name)) # form_fields = @form.attributes.merge!(global_params(step_name))
# session[:employer_setup_data][session_data_name] = form_fields # session[:employer_setup_data][session_data_name] = form_fields
# session[:employer_setup_data].merge!(global_params(step_name)) # session[:employer_setup_data].merge!(global_params(step_name))
@@ -0,0 +1,244 @@
class EmployerSetupController < ApplicationController
def new
# session.delete(:employer_setup_data)
# session.clear()
# puts "Start"
# puts session[:employer_setup_data]
if session[:employer_setup_data].blank?
@process = EmployerSetupProcess.create(status: "form")
session[:employer_setup_data] = { "employer_setup_process_id" => @process.id }
end
puts "-S--------------------------------------"
puts session[:employer_setup_data]
# session[:employer_setup_data]['current_step'] = 'plans'
@top_form = EmployerSetupForm.new(session[:employer_setup_data])
if @top_form.current_step != 'summary'
@form = form_for_step
else
@form = @top_form
end
# case @top_form.current_step
# when 'general_information'
# @form = EmployerSetupGeneralInformationForm.new(session[:employer_setup_data]&.dig('general_information_data'))
# when 'plans'
# @form = EmployerSetupPlansForm.new(session[:employer_setup_data]&.dig('plans_data'))
# when 'network_exceptions'
# @form = EmployerSetupNetworkExceptionsForm.new(session[:employer_setup_data]&.dig('network_exceptions_data'))
# when 'summary'
# @form = @top_form
# end
render @top_form.current_step_view
end
def create
# puts session[:employer_setup_data]
@top_form = EmployerSetupForm.new(session[:employer_setup_data])
if @top_form.current_step != 'summary'
if process_step(@top_form.current_step)
session[:employer_setup_data]['current_step'] = @top_form.next_step
puts "---------------------------------------"
puts "pass"
puts "next - #{@top_form.next_step}"
puts session[:employer_setup_data]
puts "---------------------------------------"
redirect_to new_employer_setup_path
else
puts "fail"
render @top_form.current_step_view
end
else
if @top_form.save
session.delete(:employer_setup_data)
redirect_to root_path, notice: "Employer setup successfully!"
else
render @top_form.current_step_view
end
end
# case @top_form.current_step
# when 'general_information'
# @form = EmployerSetupGeneralInformationForm.new(general_information_params)
# if @form.valid?
# session[:employer_setup_data]['general_information_data'] = general_information_params
# session[:employer_setup_data]['current_step'] = @top_form.next_step
# redirect_to new_employer_setup_path
# else
# render @top_form.current_step_view
# end
# when 'plans'
# @form = EmployerSetupPlansForm.new(plans_params)
# if @form.valid?
# session[:employer_setup_data]['plans_data'] = plans_params
# session[:employer_setup_data]['current_step'] = @top_form.next_step
# redirect_to new_employer_setup_path
# else
# render @top_form.current_step_view
# end
# when 'network_exceptions'
# @form = EmployerSetupNetworkExceptionsForm.new(network_exceptions_params)
# if @form.valid?
# session[:employer_setup_data]['network_exceptions_data'] = network_exceptions_params
# session[:employer_setup_data]['current_step'] = @top_form.next_step
# redirect_to new_employer_setup_path
# else
# render @top_form.current_step_view
# end
# when 'summary'
# @form = EmployerSetupForm.new(session[:employer_setup_data])
# if @form.save
# session.delete(:employer_setup_data)
# redirect_to root_path, notice: "Employer setup successfully!"
# else
# render @top_form.current_step_view
# end
# end
end
def update
@form = RegistrationForm.new(registration_params)
if params[:back_button]
@form.current_step = @form.previous_step
elsif params[:skip_newsletter]
@form.current_step = @form.next_step # Skip newsletter step
end
render :new
end
private
# def general_information_params
# params.require(:employer_setup_general_information_form).permit(
# :name,
# :employer_logo,
# :group_number,
# :dental,
# :pl_plan_key,
# :effect_date,
# :number_of_plans,
# :network,
# :number_of_additional_network_logos
# )
# end
# def plans_params
# params.require(:employer_setup_plans_form).permit(
# plans: permited_plans_keys,
# benefit_descs: benefit_sequence_keys
# )
# end
# def network_exceptions_params
# params.require(:employer_setup_network_exceptions_form).permit(
# network_exceptions: [:network_logo, exceptions: [:type, :value]],
# )
# end
def form_for_step
step_name = @top_form.current_step
form_method = "EmployerSetup#{step_name.camelize}Form".constantize
# puts "/////\\\\\\||||||"
# puts session[:employer_setup_data]
# puts session[:employer_setup_data]['employer_setup_process_id']
puts form_method
form_method.new(session[:employer_setup_data]['employer_setup_process_id'])
end
def process_step(step_name)
@form_method = "EmployerSetup#{step_name.camelize}Form".constantize
session_data_name = "#{step_name}_data"
# puts "1--------------params----"
# puts params
# puts "8--------------session----"
# puts session[:employer_setup_data]
employer_setup_process_id = session[:employer_setup_data]['employer_setup_process_id']
# puts session[:employer_setup_data]
puts "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
puts params
@form = @form_method.new(employer_setup_process_id, params)
if @form.pl_plan_key.blank?
@form.pl_plan_key = session[:employer_setup_data]['pl_plan_key']
end
if @form.valid? && @form.save
pl_plan_key = @top_form.pl_plan_key || @form.pl_plan_key
# session[:employer_setup_data].merge!({current_step: step_name, pl_plan_key: pl_plan_key})
# form_fields = @form.attributes.merge!(global_params(step_name))
# session[:employer_setup_data][session_data_name] = form_fields
# session[:employer_setup_data].merge!(global_params(step_name))
# puts session[:employer_setup_data][session_data_name]
true
else
false
end
end
def step_params(step_name)
form_name_sym = "employer_setup_#{step_name}_form".to_sym
params.require(form_name_sym).permit(@form_method.permitted_params)
end
def global_params(step_name)
form_name_sym = "employer_setup_#{step_name}_form".to_sym
params.require(form_name_sym).permit(EmployerSetupForm.permitted_params)
end
# def process_step(step_name)
# form_name = "employer_setup_#{step_name}_form".camelize.constantize
# form_params_name = "#{step_name}_params".to_sym
# allowed_params = [:general_information_params, :plans_params, :network_exceptions_params]
# if allowed_params.include?(form_params_name)
# form_params = send(form_params_name)
# @form = form_name.new(form_params)
# if @form.valid?
# session[:employer_setup_data]["#{step_name}_data"] = form_params
# true
# else
# false
# end
# end
# false
# end
# def employer_setup_params
# params.require(:employer_setup_form).permit(
# :current_step,
# :name,
# :employer_logo,
# :group_number,
# :pl_plan_key,
# :effect_date,
# :number_of_plans,
# :network,
# :number_of_additional_network_logos,
# network_exceptions: [:network_logo, exceptions: [:type, :value]],
# plans: permited_plans_keys,
# benefit_descs: benefit_sequence_keys
# )
# end
# def benefit_sequence_keys
# (1..14).map { |i| i.to_s.to_sym }
# end
# def permited_plans_keys
# benefit_sequence_keys.push(:plan_id)
# end
# def plans_params
# plans_keys = params[:plans]&.keys || []
# plans_keys.each_with_object({}) do |key, hash|
# if key == 'benefit_descs' || key.match?(/^plan_\d$/)
# hash[key.to_sym] = permited_plan_param_list
# end
# end
# end
# def permited_plan_param_list
# (1..14).map { |i| i.to_s.to_sym }.push(:plan_id)
# end
end
@@ -11,7 +11,7 @@ class EmployerSetupController < ApplicationController
:name, :name,
:group_number, :group_number,
:pl_plan_key, :pl_plan_key,
:effect_date :effective_date
)) ))
@employer_data[:employer].merge!(params.permit(:number_of_plans)) @employer_data[:employer].merge!(params.permit(:number_of_plans))
@@ -54,7 +54,7 @@ class EmployerSetupController < ApplicationController
# medical_number: @final_data['employer']['group_number'], # medical_number: @final_data['employer']['group_number'],
# dental_number: ' ', # dental_number: ' ',
# plan_key: @final_data['employer']['pl_plan_key'], # plan_key: @final_data['employer']['pl_plan_key'],
# effect_date: @final_data['employer']['effect_date'] # effective_date: @final_data['employer']['effective_date']
# ) # )
# default = Vhcs::HLRXCrosRef.find_by(pl_plan_key: 52) # default = Vhcs::HLRXCrosRef.find_by(pl_plan_key: 52)
+1 -1
View File
@@ -5,7 +5,7 @@ class TailwindFormBuilder < ActionView::Helpers::FormBuilder
TEXT_FIELD_STYLE = "bg-gray-200 rounded py-2 px-4 text-bluetang font-semibold leading-tight focus:outline-none focus:bg-white".freeze TEXT_FIELD_STYLE = "bg-gray-200 rounded py-2 px-4 text-bluetang font-semibold leading-tight focus:outline-none focus:bg-white".freeze
SELECT_FIELD_STYLE = "block bg-gray-200 text-gray-700 py-2 px-4 rounded leading-tight focus:outline-none focus:bg-white".freeze SELECT_FIELD_STYLE = "block bg-gray-200 text-gray-700 py-2 px-4 rounded leading-tight focus:outline-none focus:bg-white".freeze
SUBMIT_BUTTON_STYLE = "shadow bg-bronze focus:shadow-outline focus:outline-none text-white font-bold py-2 px-4 rounded hover:bg-copper".freeze SUBMIT_BUTTON_STYLE = "cursor-pointer shadow bg-bronze focus:shadow-outline focus:outline-none text-white font-bold py-2 px-4 rounded hover:bg-copper".freeze
text_field_helpers.each do |field_method| text_field_helpers.each do |field_method|
class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1 class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
+16 -11
View File
@@ -6,12 +6,16 @@ class EmployerSetupForm
attribute :current_step, :string, default: FIRST_STEP attribute :current_step, :string, default: FIRST_STEP
attribute :pl_plan_key, :string attribute :pl_plan_key, :string
attribute :employer_setup_process_id, :integer
def initialize(params = {}) def initialize(params = {})
# if params.present? # if params.present?
# params = permitted_params(params) # params = permitted_params(params)
# end # end
# @current_step = params["current_step"]
# @employer_setup_process_id = params["employer_setup_process_id"]
super(params) super(params)
unless self.steps.first == FIRST_STEP unless self.steps.first == FIRST_STEP
raise StepMisalignmentError, "FIRST_STEP does not match first entry in steps" raise StepMisalignmentError, "FIRST_STEP does not match first entry in steps"
end end
@@ -53,7 +57,7 @@ class EmployerSetupForm
end end
def permitted_params(params) def permitted_params(params)
params.require(:employer_setup_data).permit( params.permit(
:pl_plan_key, :pl_plan_key,
:current_step :current_step
) )
@@ -66,15 +70,16 @@ class EmployerSetupForm
] ]
end end
# def save def save
# if valid? if valid?
# EmployerSetupGeneralInformationForm.new(attributes[:general_information_data]).save process = EmployerSetupProcess.find(@employer_setup_process_id)
# EmployerSetupPlansForm.new(attributes[:plans_data]).save process.update(
# EmployerSetupNetworkExceptionsForm.new(attributes[:network_exceptions_data]).save status: "entered"
# true )
# else true
# false else
# end false
# end end
end
end end
@@ -7,16 +7,17 @@ class EmployerSetupGeneralInformationForm
attribute :group_number, :string attribute :group_number, :string
attribute :dental, :boolean, default: false attribute :dental, :boolean, default: false
attribute :pl_plan_key, :string attribute :pl_plan_key, :string
attribute :effect_date, :string attribute :effective_date, :string
# attribute :number_of_plans, :integer # attribute :number_of_plans, :integer
attribute :network, :string attribute :network, :string
# attribute :number_of_additional_network_logos, :integer # attribute :number_of_additional_network_logos, :integer
attr_accessor :employer_setup_process_id
validates :name, presence: true validates :name, presence: true
validates :employer_logo, presence: true validates :employer_logo, presence: true
validates :group_number, presence: true validates :group_number, presence: true
validates :pl_plan_key, presence: true validates :effective_date, presence: true
validates :effect_date, presence: true
# validates :number_of_plans, presence: true # validates :number_of_plans, presence: true
validates :network, presence: true validates :network, presence: true
# validates :number_of_additional_network_logos, presence: true if network = "cigna+" # validates :number_of_additional_network_logos, presence: true if network = "cigna+"
@@ -27,11 +28,27 @@ class EmployerSetupGeneralInformationForm
# super(permitted_attributes) # super(permitted_attributes)
# end # end
def initialize(params = {}) def initialize(employer_setup_process_id, params = {})
@employer_setup_process_id = employer_setup_process_id
if params.present? if params.present?
params = permitted_params(params) form_params = permitted_params(params)
end super(form_params)
else
super(params) super(params)
load_from_process
end
end
def load_from_process
process = EmployerSetupProcess.find(@employer_setup_process_id)
self.name = process.employer_name
# self.employer_logo = process.
self.group_number = process.group_number
self.dental = false
self.pl_plan_key = process.pl_plan_key
self.effective_date = process.effective_date
self.network = process.network_provider
end end
def permitted_params(params) def permitted_params(params)
@@ -41,7 +58,7 @@ class EmployerSetupGeneralInformationForm
:group_number, :group_number,
:dental, :dental,
:pl_plan_key, :pl_plan_key,
:effect_date, :effective_date,
:number_of_plans, :number_of_plans,
:network, :network,
:number_of_additional_network_logos :number_of_additional_network_logos
@@ -52,48 +69,57 @@ class EmployerSetupGeneralInformationForm
# Implement logic to save data to models after all steps are complete # Implement logic to save data to models after all steps are complete
# For example, create a User record with the collected data # For example, create a User record with the collected data
if valid? if valid?
hl_plan_code = Vhcs::HlPlanCode.create!( process = EmployerSetupProcess.find(@employer_setup_process_id)
process.update(
employer_name: name,
group_number: group_number, group_number: group_number,
medical_number: group_number,
dental_number: '',
plan_key: pl_plan_key,
effect_date: effect_date
)
# Replace fairos_info with template like for benefits
fairos_info = Vhcs::HlrxCrosRef.where(pl_plan_key: 52).first
hlrx_cros_ref = Vhcs::HlrxCrosRef.create!(
group_no: group_number,
rx_group_id: group_number,
help_desk: fairos_info.help_desk,
customer_service: fairos_info.customer_service,
web_url: fairos_info.web_url,
pl_plan_key: pl_plan_key
)
web_employer = BrittonWeb::Employers.create!(
name: name,
pl_plan_key: pl_plan_key, pl_plan_key: pl_plan_key,
dental_plan: dental, effective_date: effective_date,
single_card_template: 'FairosRxIDCard', network_provider: network
logo: employer_logo.original_filename
) )
default_network_logo = # hl_plan_code = Vhcs::HlPlanCode.create!(
case # group_number: group_number,
when network.include?("cig") # medical_number: group_number,
"CignaLogo.png" # dental_number: '',
when network.include?("med") # plan_key: pl_plan_key,
"Logo_MC_PMS.png" # effect_date: effective_date
else # )
"CignaLogo.png"
end
BrittonWeb::NetworkLogos.create!( # # Replace fairos_info with template like for benefits
employer_id: web_employer.id, # fairos_info = Vhcs::HlrxCrosRef.where(pl_plan_key: 52).first
net_logo: default_network_logo, # hlrx_cros_ref = Vhcs::HlrxCrosRef.create!(
default: true # group_no: group_number,
) # rx_group_id: group_number,
# help_desk: fairos_info.help_desk,
# customer_service: fairos_info.customer_service,
# web_url: fairos_info.web_url,
# pl_plan_key: pl_plan_key
# )
# web_employer = BrittonWeb::Employers.create!(
# name: name,
# pl_plan_key: pl_plan_key,
# dental_plan: dental,
# single_card_template: 'FairosRxIDCard',
# logo: employer_logo.original_filename
# )
# default_network_logo =
# case
# when network.include?("cig")
# "CignaLogo.png"
# when network.include?("med")
# "Logo_MC_PMS.png"
# else
# "CignaLogo.png"
# end
# BrittonWeb::NetworkLogos.create!(
# employer_id: web_employer.id,
# net_logo: default_network_logo,
# default: true
# )
true true
else else
@@ -5,17 +5,22 @@ class EmployerSetupNetworkExceptionsForm
Network_exception = Struct.new(:network_logo, :exceptions) Network_exception = Struct.new(:network_logo, :exceptions)
attribute :network_exceptions, :array_of_items, default: -> { [] } attribute :network_exceptions, :array_of_items, default: -> { [] }
attribute :pl_plan_key, :string attribute :pl_plan_key, :string
attribute :number_of_additional_network_logos, :integer
attr_accessor :employer_setup_process_id
# validates :network_exceptions, presence: true if number_of_additional_network_logos > 0 # validates :network_exceptions, presence: true if number_of_additional_network_logos > 0
def initialize(params = {}) def initialize(employer_setup_process_id, params = {})
if params.present? && params[:employer_setup_network_exceptions_form].is_a?(ActionController::Parameters) @employer_setup_process_id = employer_setup_process_id
params = permitted_params(params) if params.present?
end form_params = permitted_params(params)
super(form_params)
else
super(params) super(params)
end end
end
def permitted_params(params) def permitted_params(params)
params.require(:employer_setup_network_exceptions_form).permit( params.require(:employer_setup_network_exceptions_form).permit(
network_exceptions: [ network_exceptions: [
@@ -67,20 +72,23 @@ class EmployerSetupNetworkExceptionsForm
# Implement logic to save data to models after all steps are complete # Implement logic to save data to models after all steps are complete
# For example, create a User record with the collected data # For example, create a User record with the collected data
if valid? if valid?
employer = BrittonWeb::Employers.find_by(pl_plan_key: pl_plan_key) process = EmployerSetupProcess.find(@employer_setup_process_id)
# employer = BrittonWeb::Employers.find_by(pl_plan_key: pl_plan_key)
if network_exceptions
network_exceptions_data = process_for_save(network_exceptions) network_exceptions_data = process_for_save(network_exceptions)
network_exceptions_data.each do |ne|
ne['exceptions'].each do |ex|
BrittonWeb::NetworkLogos.create!(
employer_id: employer.id,
net_logo: ne['network_logo'].original_filename,
exception_type: ex['type'].downcase,
exception_value: ex['value'],
default: false
)
end
end end
# network_exceptions_data.each do |ne|
# ne['exceptions'].each do |ex|
# BrittonWeb::NetworkLogos.create!(
# employer_id: employer.id,
# net_logo: ne['network_logo'].original_filename,
# exception_type: ex['type'].downcase,
# exception_value: ex['value'],
# default: false
# )
# end
# end
true true
else else
false false
+55 -17
View File
@@ -2,25 +2,31 @@ class EmployerSetupPlansForm
include ActiveModel::Model include ActiveModel::Model
include ActiveModel::Attributes include ActiveModel::Attributes
PLAN_COLORS = ['atmosphere', 'copper', 'bluemana', 'bronze', 'cobalt', 'verdigris'] PLAN_COLORS = ['atmosphere', 'verdigris', 'cobalt', 'bluemana']
# attribute :plans, array: true, default: [] attribute :plans, array: true, default: -> { [Plan.new] }
attribute :plans, array: true, default: -> { [new_plan] }
attribute :pl_plan_key, :string attribute :pl_plan_key, :string
attribute :number_of_plans, :integer attribute :benefit_descs, hash: true, default: -> { Plan.new }
attribute :benefit_descs, hash: true, default: -> { new_plan }
attr_accessor :plan_templates attr_accessor :plan_templates
attr_accessor :benefits_template attr_accessor :benefits_template
attr_accessor :employer_setup_process_id
validates :plans, presence: true validates :plans, presence: true
validates :benefit_descs, presence: true validates :benefit_descs, presence: true
def initialize(params = {}) def initialize(employer_setup_process_id, params = {})
@employer_setup_process_id = employer_setup_process_id
if params.present? if params.present?
params = permitted_params(params) form_params = permitted_params(params)
end super(form_params)
else
super(params) super(params)
process_plans = EmployerSetupProcess.find(@employer_setup_process_id).plans
if process_plans.present?
self.plans = process_plans
end
end
@plan_templates = IdCardBenefitsTemplate.where.not(title: "BLANK") @plan_templates = IdCardBenefitsTemplate.where.not(title: "BLANK")
@benefits_template = IdCardBenefitsTemplate.find_by(title: "BLANK").id_card_benefits.sort_by(&:sequence) @benefits_template = IdCardBenefitsTemplate.find_by(title: "BLANK").id_card_benefits.sort_by(&:sequence)
@@ -61,6 +67,11 @@ class EmployerSetupPlansForm
plan plan
end end
def process_params(employer_setup_process_id)
process = EmployerSetupProcess.find(employer_setup_process_id)
process.plans
end
def permitted_params(params) def permitted_params(params)
params.require(:employer_setup_plans_form).permit( params.require(:employer_setup_plans_form).permit(
:pl_plan_key, :pl_plan_key,
@@ -90,27 +101,54 @@ class EmployerSetupPlansForm
end end
def permited_plans_keys def permited_plans_keys
(1..14).map { |i| "benefit_#{i}".to_sym }.push(:plan_id) (1..14).map { |i| "benefit_#{i}".to_sym }.push(:plan_id, :id)
end end
def save def save
# Implement logic to save data to models after all steps are complete # Implement logic to save data to models after all steps are complete
# For example, create a User record with the collected data # For example, create a User record with the collected data
if valid? if valid?
plans.each do |plan| process = EmployerSetupProcess.find(@employer_setup_process_id)
# process.plans.update(plans: plans)
planss = Array.wrap(plans)
plans.each_with_index do |plan, i|
plan_info = plan.last plan_info = plan.last
plan_id = plan_info.delete(:plan_id).to_i plan_id = plan_info[:plan_id].present? ? plan_info[:plan_id].to_i : "temp #{i}"
plan_info.delete(:plan_id)
new_plan = process.plans.create(plan_id: plan_id)
plan_info.each do |key, value| plan_info.each do |key, value|
sequence = key.delete_prefix("benefit_").to_i sequence = key.delete_prefix("benefit_").to_i
Vhcs::HlEgglestonCardBenefit.create( benefit = new_plan.plan_benefits.find_by(sequence: sequence)
plan_id: plan_id, benefit.update(
benefit_desc: benefit_descs["#{key}"], benefit: value
benefit: value,
sequence: sequence,
plan_key: pl_plan_key
) )
# Vhcs::HlEgglestonCardBenefit.create(
# plan_id: plan_id,
# benefit_desc: benefit_descs["#{key}"],
# benefit: value,
# sequence: sequence,
# plan_key: pl_plan_key
# )
end end
end end
# plans.each do |plan|
# plan_info = plan.last
# plan_id = plan_info.delete(:plan_id).to_i
# plan_info.each do |key, value|
# sequence = key.delete_prefix("benefit_").to_i
# Vhcs::HlEgglestonCardBenefit.create(
# plan_id: plan_id,
# benefit_desc: benefit_descs["#{key}"],
# benefit: value,
# sequence: sequence,
# plan_key: pl_plan_key
# )
# end
# end
true true
else else
false false
@@ -20,13 +20,18 @@ export default class extends Controller {
const nextIndex = this.networkLogoTargets.length const nextIndex = this.networkLogoTargets.length
const num_of_colors = this.formColorValue.length const num_of_colors = this.formColorValue.length
let colorIndex = 0 let colorIndex = 0
let newSecondaryColor = "copper"
if (nextIndex != 0) { if (nextIndex != 0) {
colorIndex = nextIndex % num_of_colors colorIndex = nextIndex % num_of_colors
if (nextIndex % 2 == 1) {
newSecondaryColor = "bronze"
}
} }
const newColor = this.formColorValue[colorIndex] const newColor = this.formColorValue[colorIndex]
return this.templateTarget.innerHTML return this.templateTarget.innerHTML
.replace(/NEW_RECORD/g, nextIndex) .replace(/NEW_RECORD/g, nextIndex)
.replace(/NEXT_COLOR/g, newColor) .replace(/NEXT_COLOR/g, newColor)
.replace(/NEXT_SECONDARY_COLOR/g, newSecondaryColor)
} }
} }
@@ -1,20 +1,30 @@
import { Controller } from "@hotwired/stimulus" import { Controller } from "@hotwired/stimulus"
export default class extends Controller { export default class extends Controller {
static targets = ["template", "container"] static values = {
parentColor: String
connect() {
console.log("connect")
} }
static targets = ["template", "container"]
add(event) { add(event) {
console.log("start") console.log("start")
event.preventDefault() event.preventDefault()
event.stopPropagation() event.stopPropagation()
const content = this.templateTarget.innerHTML.replace(/NEW_EXC_RECORD/g, new Date().getTime()) const content = this.#updateTemplateException()
this.containerTarget.insertAdjacentHTML("beforeend", content) this.containerTarget.insertAdjacentHTML("beforeend", content)
console.log("end")
}
#updateTemplateException() {
const nextIndex = new Date().getTime()
console.log("~~ " + this.parentColorValue)
return this.templateTarget.innerHTML
.replace(/NEW_EXC_RECORD/g, nextIndex)
.replace(/PARENT_SECONDARY_COLOR/g, this.parentColorValue)
} }
} }
@@ -7,6 +7,7 @@ export default class extends Controller {
static targets = ["template", "container", "plan", "button"] static targets = ["template", "container", "plan", "button"]
add(event) { add(event) {
console.log("start")
event.preventDefault() event.preventDefault()
event.stopPropagation() event.stopPropagation()
@@ -20,14 +21,19 @@ export default class extends Controller {
const nextIndex = this.planTargets.length const nextIndex = this.planTargets.length
const num_of_colors = this.formColorValue.length const num_of_colors = this.formColorValue.length
let colorIndex = 0 let colorIndex = 0
let newSecondaryColor = "copper"
if (nextIndex != 0) { if (nextIndex != 0) {
colorIndex = nextIndex % num_of_colors colorIndex = nextIndex % num_of_colors
if (nextIndex % 2 == 1) {
newSecondaryColor = "bronze"
}
} }
const newColor = this.formColorValue[colorIndex] const newColor = this.formColorValue[colorIndex]
return this.templateTarget.innerHTML return this.templateTarget.innerHTML
.replace(/NEW_RECORD/g, nextIndex) .replace(/NEW_RECORD/g, nextIndex)
.replace(/NEW_PLAN/g, nextIndex + 1) .replace(/NEW_PLAN/g, nextIndex + 1)
.replace(/NEXT_COLOR/g, newColor) .replace(/NEXT_COLOR/g, newColor)
.replace(/NEXT_SECONDARY_COLOR/g, newSecondaryColor)
} }
+16
View File
@@ -0,0 +1,16 @@
class AlternativeNetworkLogo < ApplicationRecord
belongs_to :employer_setup_process
before_save :process_network_logo
def process_network_logo
unless self.network_logo.is_a?(String)
self.employer_setup_process.card_logo_files.new(
filename: self.network_logo.filename,
logo_type: 'network',
image: self.network_logo.data,
pl_plan_key: self.employer_setup_process.pl_plan_key || ""
)
end
end
end
+83
View File
@@ -0,0 +1,83 @@
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
+3
View File
@@ -0,0 +1,3 @@
class CardLogoFile < ApplicationRecord
belongs_to :employer_setup_process, optional: true
end
+52 -1
View File
@@ -1,3 +1,54 @@
class EmployerSetupProcess < ApplicationRecord class EmployerSetupProcess < ApplicationRecord
has_many :plans 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 :card_logo_files
before_save :process_employer_logo
def process_employer_logo
unless 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
end
def self.permitted_params(params)
params.require(:employer_setup_process).permit(
:employer_name,
:group_number,
:pl_plan_key,
:effective_date,
:employer_logo,
:network_provider,
plans_attributes: [
:id,
:title,
:plan_id,
:_destroy,
plan_benefits_attributes: [
:id,
:benefit_desc,
:benefit,
:sequence,
:_destroy,
]
],
alternative_network_logos_attributes: [
:id,
:network_logo,
:exception_type,
:exception_value,
:_destroy
]
)
end
end end
+1 -1
View File
@@ -1,5 +1,5 @@
class IdCardBenefitsTemplate < ApplicationRecord class IdCardBenefitsTemplate < ApplicationRecord
has_many :id_card_benefits has_many :id_card_benefits, dependent: :destroy
end end
+4 -3
View File
@@ -1,8 +1,9 @@
class Plan < ApplicationRecord class Plan < ApplicationRecord
belongs_to :employer_setup_process belongs_to :employer_setup_process
has_many :plan_benefits has_many :plan_benefits, dependent: :destroy
accepts_nested_attributes_for :plan_benefits, allow_destroy: true, reject_if: :all_blank
after_create :create_default_benefits after_initialize :create_default_benefits, if: :new_record?
@@ -11,7 +12,7 @@ class Plan < ApplicationRecord
def create_default_benefits def create_default_benefits
benefits = IdCardBenefitsTemplate.find_by(title: "BLANK").id_card_benefits.sort_by(&:sequence) benefits = IdCardBenefitsTemplate.find_by(title: "BLANK").id_card_benefits.sort_by(&:sequence)
benefits.each do |ben| benefits.each do |ben|
plan_benefits.create(benefit_desc: ben.benefit_desc, sequence: ben.sequence) plan_benefits.new(benefit_desc: ben.benefit_desc, sequence: ben.sequence)
end end
end end
end end
@@ -0,0 +1,13 @@
module Vhcs
class HLEggIdCardDependent < VhcsRecord
self.table_name = 'HLEggIdCardDependent'
alias_attribute :id, :Id
alias_attribute :family_id, :FamilyId
alias_attribute :dependent_name, :DependentName
alias_attribute :sequence_number, :SequenceNumber
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
+25
View File
@@ -0,0 +1,25 @@
module Vhcs
class HLIDCardsEgg < VhcsRecord
self.table_name = 'HLIDCardsEgg'
alias_attribute :facility, :Facility
alias_attribute :division, :Division
alias_attribute :full_name, :FullName
alias_attribute :ssn, :SSN
alias_attribute :medical_coverage, :MedicalCoverage
alias_attribute :medical_eff_date, :MedicalEffDate
alias_attribute :medical_group_num, :MedicalGroupNum
alias_attribute :dental_coverage, :DentalCoverage
alias_attribute :dental_eff_date, :DentalEffDate
alias_attribute :dental_group_num, :DentalGroupNum
alias_attribute :card_type, :CardType
alias_attribute :group_number, :GroupNumber
alias_attribute :pb_product_key, :PBProductKey
alias_attribute :id, :Id
alias_attribute :pl_plan_key, :PLPlanKey
alias_attribute :mb_member_key, :MBMemberKey
end
end
@@ -0,0 +1,72 @@
module BenefitsWordDoc
class MapEmployerInformation
def initialize(process, word_doc_section)
@process = process
@word_doc_section = word_doc_section
end
def call
search_fields = mapping_hash.keys.to_set
@word_doc_section.each do |line|
matching_field = search_fields.detect { |field| line.include?(field) }
if matching_field
field_mapping = mapping_hash[matching_field]
field_regex = field_mapping[:doc_to_process_regex]
field_value = line.match(field_regex)[1].strip
process_field = field_mapping[:process_field]
if field_mapping[:validation].present?
validation_type = field_mapping[:validation]
if send("is_#{validation_type}?".to_sym, field_value)
@process[process_field] = field_value
end
else
@process[process_field] = field_value
end
end
end
@process.save
end
private
def mapping_hash
{
'Employer Name' => {
process_field: :employer_name,
doc_field: 'Employer Name',
doc_field_desc: 'Follows pattern - Employer Name:New Employer',
doc_to_process_regex: /.*:(.*)/,
regex_desc: 'Grabs everything after colon'
},
'Group Number' => {
process_field: :group_number,
doc_field: 'Group Number',
doc_field_desc: 'Follows pattern - Group Number:099999',
doc_to_process_regex: /.*:(.*)/,
regex_desc: 'Grabs everything after colon',
validation: 'number'
},
'Group Effective Date' => {
process_field: :effective_date,
doc_field: 'Group Effective Date',
doc_field_desc: 'Follows pattern - Group Effective Date:12/1/2025',
doc_to_process_regex: /.*:(.*)/,
regex_desc: 'Grabs everything after colon',
validation: 'date'
}
}
end
def is_number?(string)
true if Float(string) rescue false
end
def is_date?(string)
true if Date.parse rescue false
end
end
end
@@ -0,0 +1,28 @@
module BenefitsWordDoc
class MapEmployerLogo
def initialize(process, word_doc)
@process = process
@word_doc = word_doc
end
def call
extracted_images = []
Zip::File.open(@word_doc) do |zip_file|
zip_file.each do |entry|
if entry.name.start_with?('word/media/') && !entry.directory?
filename = @process.employer_name.titleize.gsub(/\s+/, '').concat("Logo.png")
image_data = entry.get_input_stream.read
extracted_images << { filename: filename, data: image_data }
end
end
end
if extracted_images.length > 1
employer_logo = extracted_images.last
@process.employer_logo = employer_logo[:filename]
# same file logic
end
@process.save
end
end
end
@@ -0,0 +1,149 @@
module BenefitsWordDoc
class MapPlansInformation
def initialize(process, word_doc_section)
@process = process
@word_doc_section = word_doc_section
end
def call
search_fields = mapping_hash.keys.to_set
plans_indexes = @word_doc_section.each_index.select { |index| @word_doc_section[index].match?(/\d*\.?\d+k/i) }
plans_indexes.each do |plan_index|
new_plan = @process.plans.create(title: @word_doc_section[plan_index])
plan_lines = @word_doc_section.slice(plan_index + 1, 14)
plan_lines.each_with_index do |line, i|
matching_field = search_fields.detect { |field| line.include?(field) }
if matching_field
puts matching_field
field_mapping = mapping_hash[matching_field]
field_regex = field_mapping[:doc_to_process_regex]
field_value = line.match(field_regex)[1].strip
process_benefit_desc_field = field_mapping[:process_benefit_desc_field]
puts process_benefit_desc_field
puts new_plan.plan_benefits.map { |b| b.benefit_desc}
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: process_benefit_desc_field)
new_benefit.benefit = field_value
new_benefit.save
end
end
end
end
private
def mapping_hash
{
'Physician Visit' => {
process_field: :benefit,
process_benefit_desc_field: 'Primary Visit',
doc_field_desc: 'Follows pattern - Physician Visit$x,xxx',
doc_to_process_regex: /\$(.*)/,
regex_desc: 'Grabs everything after dollar sign'
},
'Specialist Visit' => {
process_field: :benefit,
process_benefit_desc_field: 'Specialist Visit',
doc_field_desc: 'Follows pattern - Specialist Visit$x,xxx',
doc_to_process_regex: /\$(.*)/,
regex_desc: 'Grabs everything after dollar sign'
},
'Urgent Care' => {
process_field: :benefit,
process_benefit_desc_field: 'Urgent Care',
doc_field_desc: 'Follows pattern - Urgent Care$x,xxx',
doc_to_process_regex: /\$(.*)/,
regex_desc: 'Grabs everything after dollar sign'
},
'Individual Deductible (in network )' => {
process_field: :benefit,
process_benefit_desc_field: 'INNInd Ded',
doc_field_desc: 'Follows pattern - Individual Deductible (in network )$x,xxx',
doc_to_process_regex: /\$(.*)/,
regex_desc: 'Grabs everything after dollar sign'
},
'Family Deductible(in network )' => {
process_field: :benefit,
process_benefit_desc_field: 'INNFamily Ded',
doc_field_desc: 'Follows pattern - Family Deductible(in network )$x,xxx',
doc_to_process_regex: /\$(.*)/,
regex_desc: 'Grabs everything after dollar sign'
},
'Individual Deductible (out of network)' => {
process_field: :benefit,
process_benefit_desc_field: 'OONInd Ded',
doc_field_desc: 'Follows pattern - Individual Deductible (out of network)$x,xxx',
doc_to_process_regex: /\$(.*)/,
regex_desc: 'Grabs everything after dollar sign'
},
'Family Deductible (out of network)' => {
process_field: :benefit,
process_benefit_desc_field: 'OONFamily Ded',
doc_field_desc: 'Follows pattern - Family Deductible (out of network)$x,xxx',
doc_to_process_regex: /\$(.*)/,
regex_desc: 'Grabs everything after dollar sign'
},
'Co-Insurance' => {
process_field: :benefit,
process_benefit_desc_field: 'Co-Insurance',
doc_field_desc: 'Follows pattern - Co-Insurance70%/30%',
doc_to_process_regex: /Co-Insurance(.*)/,
regex_desc: 'Grabs everything after field name'
},
'Out-of-Pocket(in network)' => {
process_field: :benefit,
process_benefit_desc_field: 'INNInd OOP',
doc_field_desc: 'Follows pattern - Out-of-Pocket(in network)$x,xxx',
doc_to_process_regex: /\$(.*)/,
regex_desc: 'Grabs everything after dollar sign'
},
'Out-of-Pocket Family(in network)' => {
process_field: :benefit,
process_benefit_desc_field: 'INNFamily OOP',
doc_field_desc: 'Follows pattern - Out-of-Pocket Family(in network)$x,xxx',
doc_to_process_regex: /\$(.*)/,
regex_desc: 'Grabs everything after dollar sign'
},
'Out-of-Pocket(out of network)' => {
process_field: :benefit,
process_benefit_desc_field: 'OONInd OOP',
doc_field_desc: 'Follows pattern - Out-of-Pocket(out of network)$x,xxx',
doc_to_process_regex: /\$(.*)/,
regex_desc: 'Grabs everything after dollar sign'
},
'Out-of-Pocket Family (out of network)' => {
process_field: :benefit,
process_benefit_desc_field: 'OONFamily OOP',
doc_field_desc: 'Follows pattern - Out-of-Pocket Family (out of network)$x,xxx',
doc_to_process_regex: /\$(.*)/,
regex_desc: 'Grabs everything after dollar sign'
},
'Emergency Room' => {
process_field: :benefit,
process_benefit_desc_field: 'Emergency Room',
doc_field_desc: 'Follows pattern - Emergency RoomXxxxx',
doc_to_process_regex: /Emergency Room(.*)/,
regex_desc: 'Grabs everything after field name'
},
'Preventive Care' => {
process_field: :benefit,
process_benefit_desc_field: 'Preventive Care',
doc_field_desc: 'Follows pattern - Preventive Care100%',
doc_to_process_regex: /Preventive Care(.*)/,
regex_desc: 'Grabs everything after field name'
},
}
end
def is_number?(string)
true if Float(string) rescue false
end
def is_date?(string)
true if Date.parse rescue false
end
end
end
+7 -133
View File
@@ -11,146 +11,20 @@ class BenefitsWordDocProcessor
def call def call
doc = Docx::Document.open(@word_doc) doc = Docx::Document.open(@word_doc)
data_lines = doc.paragraphs.map { |p| p.to_s.squish }.reject!(&:empty?)
index = 40 start_of_plans_index = data_lines.index { |s| s == 'Medical Plan'}
general_information = doc.paragraphs.slice(0, index) employer_information = data_lines.slice(0, start_of_plans_index)
plan_information = doc.paragraphs.slice(index + 1..) plan_information = data_lines.slice(start_of_plans_index + 1..)
BenefitsWordDoc::MapEmployerInformation.new(@process, employer_information).call
BenefitsWordDoc::MapEmployerLogo.new(@process, @word_doc).call
BenefitsWordDoc::MapPlansInformation.new(@process, plan_information).call
general_fields(general_information)
plans(plan_information)
logo
@process @process
end end
private
def general_fields(general_information)
fields = ['Group Number:', 'Employer Name:', 'Group Effective Date:']
general_information.each do |gi|
field_string = gi.to_s
if field_string.include?('Group Number:')
value = field_string.delete_prefix('Group Number:').strip
@process.group_number = value
elsif field_string.include?('Employer Name:')
value = field_string.delete_prefix('Employer Name:').strip
@process.employer_name = value
elsif field_string.include?('Group Effective Date:')
value = field_string.delete_prefix('Group Effective Date:').strip
@process.effect_date = value
end
end
end
def logo
extracted_images = []
Zip::File.open(@word_doc) do |zip_file|
zip_file.each do |entry|
if entry.name.start_with?('word/media/') && !entry.directory?
filename = File.basename(entry.name)
image_data = entry.get_input_stream.read
extracted_images << { filename: filename, data: image_data }
end
end
end
if extracted_images.length > 1
@process.logo_filename = extracted_images.last[:filename]
end
end
def plans(plan_information)
plans_array = []
plan_information.each_with_index do |pin, i|
if pin.to_s.match?(/\d*\.?\d+k/i)
new_plan = {title: pin.to_s.strip, start_index: i, benefits: []}
plans_array.push(new_plan)
end
end
plans_array.each do |pl|
new_plan = Plan.create(title: pl[:title], employer_setup_process: @process)
plan_fields = plan_information.slice(pl[:start_index] + 1, 14)
plan_fields.each_with_index do |pf, i|
field_string = pf.to_s
if field_string.strip.length > 1
case field_string
when ->(string) { string.include?("Physician Visit") }
value = field_string.delete_prefix("Physician Visit")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "Primary Visit")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Specialist Visit") }
value = field_string.delete_prefix("Specialist Visit")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "Specialist Visit")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Urgent Care") }
value = field_string.delete_prefix("Urgent Care")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "Urgent Care")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Individual Deductible (in network )") }
value = field_string.delete_prefix("Individual Deductible (in network )")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "INNInd Ded")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Family Deductible(in network )") }
value = field_string.delete_prefix("Family Deductible(in network )")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "INNFamily Ded")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Individual Deductible (out of network)") }
value = field_string.delete_prefix("Individual Deductible (out of network)")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "OONInd Ded")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Family Deductible (out of network) ") }
value = field_string.delete_prefix("Family Deductible (out of network) ")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "OONFamily Ded")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Co-Insurance") }
value = field_string.delete_prefix("Co-Insurance")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "Co-Insurance")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Out-of-Pocket(in network) ") }
value = field_string.delete_prefix("Out-of-Pocket(in network) ")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "INNInd OOP")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Out-of-Pocket Family(in network) ") }
value = field_string.delete_prefix("Out-of-Pocket Family(in network) ")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "INNFamily OOP")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Out-of-Pocket(out of network) ") }
value = field_string.delete_prefix("Out-of-Pocket(out of network) ")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "OONInd OOP")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Out-of-Pocket Family (out of network) ") }
value = field_string.delete_prefix("Out-of-Pocket Family (out of network) ")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "OONFamily OOP")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Emergency Room ") }
value = field_string.delete_prefix("Emergency Room ")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "Emergency Room")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Preventive Care") }
value = field_string.delete_prefix("Preventive Care")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "Preventive Care")
new_benefit.benefit = value
new_benefit.save
end
end
end
end
end
end end
@@ -0,0 +1,163 @@
class BenefitsWordDocProcessorOld
def initialize(word_doc, process=nil)
@word_doc = word_doc
if process
@process = process
else
@process = EmployerSetupProcess.new
end
end
def call
doc = Docx::Document.open(@word_doc)
index = 40
general_information = doc.paragraphs.slice(0, index)
plan_information = doc.paragraphs.slice(index + 1..)
general_fields(general_information)
plans(plan_information)
employer_logo()
@process
end
private
def general_fields(general_information)
fields = ['Group Number:', 'Employer Name:', 'Group Effective Date:']
general_information.each do |gi|
field_string = gi.to_s
if field_string.include?('Group Number:')
value = field_string.delete_prefix('Group Number:').strip
if is_number?(value)
@process.group_number = value
end
elsif field_string.include?('Employer Name:')
value = field_string.delete_prefix('Employer Name:').strip
@process.employer_name = value
elsif field_string.include?('Group Effective Date:')
value = field_string.delete_prefix('Group Effective Date:').strip
@process.effective_date = value
end
end
end
def employer_logo
extracted_images = []
Zip::File.open(@word_doc) do |zip_file|
zip_file.each do |entry|
if entry.name.start_with?('word/media/') && !entry.directory?
filename = File.basename(entry.name)
image_data = entry.get_input_stream.read
extracted_images << { filename: filename, data: image_data }
end
end
end
if extracted_images.length > 1
@process.employer_logo = @process.employer_name.titleize.gsub(/\s+/, '').concat("Logo.png")
# same file logic
end
end
def plans(plan_information)
plans_array = []
plan_information.each_with_index do |pin, i|
if pin.to_s.match?(/\d*\.?\d+k/i)
new_plan = {title: pin.to_s.strip, start_index: i, benefits: []}
plans_array.push(new_plan)
end
end
plans_array.each do |pl|
new_plan = Plan.create(title: pl[:title], employer_setup_process: @process)
plan_fields = plan_information.slice(pl[:start_index] + 1, 14)
plan_fields.each_with_index do |pf, i|
field_string = pf.to_s
if field_string.strip.length > 1
case field_string
when ->(string) { string.include?("Physician Visit") }
value = field_string.delete_prefix("Physician Visit")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "Primary Visit")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Specialist Visit") }
value = field_string.delete_prefix("Specialist Visit")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "Specialist Visit")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Urgent Care") }
value = field_string.delete_prefix("Urgent Care")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "Urgent Care")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Individual Deductible (in network )") }
value = field_string.delete_prefix("Individual Deductible (in network )")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "INNInd Ded")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Family Deductible(in network )") }
value = field_string.delete_prefix("Family Deductible(in network )")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "INNFamily Ded")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Individual Deductible (out of network)") }
value = field_string.delete_prefix("Individual Deductible (out of network)")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "OONInd Ded")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Family Deductible (out of network) ") }
value = field_string.delete_prefix("Family Deductible (out of network) ")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "OONFamily Ded")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Co-Insurance") }
value = field_string.delete_prefix("Co-Insurance")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "Co-Insurance")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Out-of-Pocket(in network) ") }
value = field_string.delete_prefix("Out-of-Pocket(in network) ")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "INNInd OOP")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Out-of-Pocket Family(in network) ") }
value = field_string.delete_prefix("Out-of-Pocket Family(in network) ")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "INNFamily OOP")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Out-of-Pocket(out of network) ") }
value = field_string.delete_prefix("Out-of-Pocket(out of network) ")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "OONInd OOP")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Out-of-Pocket Family (out of network) ") }
value = field_string.delete_prefix("Out-of-Pocket Family (out of network) ")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "OONFamily OOP")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Emergency Room ") }
value = field_string.delete_prefix("Emergency Room ")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "Emergency Room")
new_benefit.benefit = value
new_benefit.save
when ->(string) { string.include?("Preventive Care") }
value = field_string.delete_prefix("Preventive Care")
new_benefit = new_plan.plan_benefits.find_by(benefit_desc: "Preventive Care")
new_benefit.benefit = value
new_benefit.save
end
end
end
end
end
def is_number?(string)
true if Float(string) rescue false
end
end
@@ -0,0 +1,81 @@
module SampleCard
class DataFormatter
def initialize(process)
@process = process
end
def call
@sample_card = BrittonWeb::SampleIdCard.new()
set_process_fields()
set_generic_fields()
set_network_fields()
sample_cards = set_plan_fields()
sample_cards.each(&:save!)
end
private
def set_process_fields
selected_attributes = {
employer_name: @process.employer_name,
group_number: @process.group_number,
medical_eff_date: @process.effective_date,
network_image: @process.logo_filename,
status: "imported"
}
@sample_card.assign_attributes(selected_attributes)
end
def set_plan_fields
plans_sample_cards = []
@process.plans.each do |plan|
plan_sample_card = @sample_card.dup
plan_sample_card.family_id = plan.title
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
end
plans_sample_cards.push(plan_sample_card)
end
plans_sample_cards
end
def set_generic_fields
selected_attributes = {
full_name: "JANE DOE",
primary_mb_member_key: "99999",
rx_group: "99999"
}
@sample_card.assign_attributes(selected_attributes)
end
def set_network_fields
provider_code = @process.network_provider.includes?("Cigna") ? "5" : "2"
# if @process.network_provider.includes?("Cigna")
# provider_code = "5"
# network_image = "CignaLogo.png"
# else
# provider_code = "2"
# network_image = "Logo_MC_PMS.png"
# end
provider_information = Vhcs::HLIDCardProvider.find_by(provider_code: provider_code)
selected_attributes = provider_information.attributes.slice(
: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
)
@sample_card.assign_attributes(selected_attributes)
end
def set_dependent_fields
# Not needed for sample card
end
end
end
@@ -0,0 +1,21 @@
module SampleCard
class JasperPdfGenerator
def initialize(jasper_url)
@jasper_url = jasper_url
end
def call
response = HTTParty.get(@jasper_url)
card_pdf = CombinePDF.parse(response.body)
# todays_date = Date.today.strftime("%m-%d-%Y")
# card_pdf.save("tmp/service_test_member_id_card_#{todays_date}.pdf")
card_pdf
end
end
end
@@ -0,0 +1,39 @@
module SampleCard
class JasperUrlGenerator
def initialize(process, family_id)
@family_id = family_id
@process = process
end
def call
@net_logo = determine_network_logo
URI::HTTPS.build(url_components)
end
private
def determine_network_logo
# if @network_logos.length > 1
# member_geographic_info = Vhcs::PbEntityAddress.joins("INNER JOIN vwMBMember ON PBEntityAddress.PBEntityKey = vwMBMember.PBEntityKey AND PBEntityAddress.AddressTypeID = 1137").where("vwMBMember.FamilyID = ?", @family_id).first
# @network_logos.where.not(default: true).each do |pnl|
# if member_geographic_info[pnl.exception_type] == pnl.exception_value
# return pnl.net_logo
# end
# end
# end
# @network_logos.find_by(default: true).net_logo
@process.network_logo
end
def url_components
{
host: 'www.dicins.com',
path: '/ReportServerDEV/PdfServlet',
query: "reportConn=BrittonWeb&id=&reportName=#{@process.card_template}&FamilyId=#{@family_id}&BackImage=c:/images/#{@net_logo}&reportDir=secure/Documents&SUBREPORT_DIR=/&ImageDir=secure/Documents&netToken=3a4a8b03f4dfb0e6e3fc82dd369f70ef&FileType=PDF"
}
end
end
end
+27
View File
@@ -0,0 +1,27 @@
module SampleCard
class PdfPrinter
def initialize(process, sample_cards)
@process = process
@sample_cards = sample_cards
end
def call
group_cards_pdf = CombinePDF.new
@sample_cards.each do |sample_card|
url = SampleCard::JasperUrlGenerator.new(@process, sample_card.family_id).call
puts url
sample_card_pdf = SampleCard::JasperPdfGenerator.new(url).call
group_cards_pdf << sample_card_pdf
end
employer_name = @process.employer_name.downcase.tr(" ", "_")
todays_date = Date.today.strftime("%m-%d-%Y")
group_cards_pdf.save("tmp/#{employer_name}_sample_cards_#{todays_date}.pdf")
group_cards_pdf
end
end
end
@@ -0,0 +1,37 @@
<div class="flex space-x-5 items-center mt-4">
<label for="file_upload_input_NEW_RECORD" class="cursor-pointer bg-NEXT_COLOR hover:bg-NEXT_COLOR-tinted text-platinum font-bold py-2 px-4 rounded border border-platinum">
Choose Network Logo File
</label>
<span id="file_name_display_NEW_RECORD" class="ml-2 text-NEXT_COLOR font-semibold">No file chosen</span>
<%= network_fields.file_field :network_logo, class: "hidden", id: "file_upload_input_NEW_RECORD", data: { add_alt_network_logo_target: "networkLogo" } %>
</div>
<div class="flex items-end space-x-6 w-full">
<div class="w-full">
<%= network_fields.select :exception_type, options_for_select(["Zip","State"]), label: { text: "Exception Type" }, prompt: "Select Type", class: "w-full" %>
</div>
<div class="w-full">
<%= network_fields.text_field :exception_value, label: { text: "Exception Value" }, class: "w-full" %>
</div>
<div class="w-1/5">
<%= network_fields.hidden_field :_destroy %>
<%= button_tag "Remove", class: "cursor-pointer bg-deepcove hover:bg-brightlava text-xl font-bold text-NEXT_SECONDARY_COLOR hover:text-platinum py-1 px-2 font-semibold leading-tight rounded-lg border-3 border-NEXT_SECONDARY_COLOR w-full", data: { action: "add-alt-network-logo#remove" } %>
</div>
</div>
<div class="flex flex-col w-full space-y-6" data-add-network-exception-target="container"></div>
<%= button_tag "Add an exception rule", class: "cursor-pointer bg-NEXT_COLOR hover:bg-NEXT_COLOR-tinted text-platinum text-lg font-bold py-2 px-4 rounded border border-platinum w-full", data: { action: "add-network-exception#add" } %>
<template data-add-network-exception-target="template">
<%= network_fields.fields_for :alternative_network_logos, AlternativeNetworkLogo.new(network_logo: network_fields.object.network_logo), child_index: 'NEW_EXC_RECORD' do |network_fields| %>
<div class="flex items-end space-x-6 w-full">
<div class="w-full">
<%= network_fields.select :exception_type, options_for_select(["Zip","State"]), label: { text: "Exception Type" }, prompt: "Select Type", class: "w-full" %>
</div>
<div class="w-full">
<%= network_fields.text_field :exception_value, label: { text: "Exception Value" }, class: "w-full" %>
</div>
<div class="w-1/5">
<%= network_fields.hidden_field :_destroy %>
<%= button_tag "Remove", class: "cursor-pointer bg-deepcove hover:bg-brightlava text-xl font-bold text-PARENT_SECONDARY_COLOR hover:text-platinum py-1 px-2 font-semibold leading-tight rounded-lg border-3 border-PARENT_SECONDARY_COLOR w-full", data: { action: "add-alt-network-logo#remove" } %>
</div>
</div>
<% end %>
</template>
@@ -0,0 +1,23 @@
<div class="flex flex-col items-stretch justify-end pr-6 pl-1 w-1/4">
<%= plan_fields.fields_for :plan_benefits do |plan_benefits_fields| %>
<%= render 'plan_benefits_desc_fields', plan_benefits_fields: plan_benefits_fields %>
<% end %>
</div>
<div class="inline-flex flex-col justify-end pr-6 pl-1 mt-10 relative w-1/4" data-controller="benefits-template-picker">
<div class="absolute left-0 top-[2%] h-[98%] border-l-4 <%= "border-#{EmployerSetupPlansForm::PLAN_COLORS[i]}" %> rounded-bl-lg"></div>
<div class="font-bold text-2xl <%= "text-#{EmployerSetupPlansForm::PLAN_COLORS[i]}" %> -ml-[6px] z-2 w-full">
<%= "Plan #{i + 1}" %>
</div>
<div class="pl-1 w-full">
<%= plan_fields.text_field :title, label: { text: "Plan Title" }, class: "w-full", data: { add_plan_target: "plan" } %>
</div>
<div class="pl-1 w-full">
<%= plan_fields.text_field :plan_id, label: { text: "Plan Id" }, class: "w-full" %>
</div>
<div class="pl-1">
<%= f.select :template_id, options_from_collection_for_select(@form.plan_templates, :id, :title), { prompt: "Select Plan Template" }, { data: { action: "benefits-template-picker#fetchData" }} %>
</div>
<%= plan_fields.fields_for :plan_benefits do |plan_benefits_fields| %>
<%= render 'plan_benefits_fields', plan_benefits_fields: plan_benefits_fields %>
<% end %>
</div>
@@ -0,0 +1,4 @@
<div class="pl-1 w-full">
<%= plan_benefits_fields.text_field :benefit, label: { text: "Benefit Value #{plan_benefits_fields.object.sequence}" }, data: { benefits_template_picker_target: "benefit", sequence: plan_benefits_fields.object.sequence}, class: "w-full" %>
<%= plan_benefits_fields.hidden_field :sequence %>
</div>
@@ -0,0 +1,3 @@
<div class="pl-1 w-full">
<%= plan_benefits_fields.text_field :benefit_desc, label: { text: "Benefit Description #{plan_benefits_fields.object.sequence}" }, class: "w-full" %>
</div>
@@ -0,0 +1,5 @@
<div class="pl-1 w-full">
<%= plan_benefits_fields.text_field :benefit, label: { text: "Benefit Value #{plan_benefits_fields.object.sequence}" }, data: { benefits_template_picker_target: "benefit", sequence: plan_benefits_fields.object.sequence}, class: "w-full" %>
<%= plan_benefits_fields.hidden_field :benefit_desc %>
<%= plan_benefits_fields.hidden_field :sequence %>
</div>
@@ -0,0 +1,11 @@
<div class="pl-1 w-full">
<%= plan_fields.text_field :title, label: { text: "Plan Title" }, class: "w-full", data: { add_plan_target: "plan" } %>
</div>
<div class="pl-1 w-full">
<%= plan_fields.text_field :plan_id, label: { text: "Plan Id" }, class: "w-full" %>
</div>
<div class="pl-1">
<%= f.select :template_id, options_from_collection_for_select(@plan_templates, :id, :title), { prompt: "Select Plan Template" }, { data: { action: "benefits-template-picker#fetchData" }} %>
</div>
@@ -0,0 +1,136 @@
<div class="bg-deepcove h-full w-full flex flex-col">
<h1 class="font-bold text-4xl text-platinum my-5">New Employer Setup</h1>
<%= form_with model: @employer_setup, url: employer_setup_index_path, local: true do |f| %>
<div class="flex flex-col space-y-6">
<div class="w-full flex items-center">
<h3 class="font-bold text-2xl text-bluemana">General Information</h3>
<div class="h-[1px] w-1/2 mt-2 bg-bluemana"></div>
</div>
<div class="flex space-x-10">
<div class="w-1/5">
<%= f.text_field :employer_name, label: { text: "Employer Name" }, class: "w-full" %>
</div>
<div class="w-1/5">
<%= f.text_field :group_number, label: { text: "Group/Medical Number" }, class: "w-full" %>
</div>
</div>
<div class="flex space-x-10">
<div class="w-1/5">
<%= f.text_field :pl_plan_key, label: { text: "Pl Plan Key" }, class: "w-full" %>
</div>
<div class="w-1/5">
<%= f.text_field :effective_date, label: { text: "Effective Date" }, class: "w-full" %>
</div>
</div>
<div class="flex space-x-10">
<div class="w-1/5">
<%= f.select :network_provider, options_for_select(["Cigna", "Medcost"]), label: { text: "Provider Network" }, class: "w-full" %>
</div>
</div>
<div class="flex space-x-5 items-center mt-4">
<label for="file_upload_input" class="cursor-pointer bg-atmosphere hover:bg-bluetang text-platinum font-bold py-2 px-4 rounded border border-platinum">
Choose Employer Logo File
</label>
<span id="file_name_display" class="ml-2 text-bluemana font-semibold">No file chosen</span>
<%= f.file_field :employer_logo, class: "hidden", id: "file_upload_input" %>
</div>
<div class="w-full flex items-center">
<h3 class="font-bold text-2xl text-bluemana">Plans Information</h3>
<div class="h-[1px] w-1/2 mt-2 bg-bluemana"></div>
</div>
<div class="w-full flex my-8" data-controller="add-plan" data-add-plan-form-color-value="<%= EmployerSetupPlansForm::PLAN_COLORS.to_json %>" >
<div class="flex flex-wrap w-full" data-add-plan-target="container">
<% @employer_setup.plans.each_with_index do |plan, index| %>
<%= f.fields_for :plans, plan, child_index: index do |plan_fields| %>
<% if index == 0 %>
<div class="flex flex-col w-1/2 relative items-end" data-controller="benefits-template-picker">
<div class="absolute left-[50%] top-[2%] h-[98%] border-l-4 <%= "border-#{EmployerSetupPlansForm::PLAN_COLORS[index]}" %> "></div>
<div class="inline-flex flex-col pl-1 pr-6 w-1/2">
<div class="font-bold text-2xl <%= "text-#{EmployerSetupPlansForm::PLAN_COLORS[index]}" %> -ml-[6px] z-2 w-full">
<%= "Plan 1" %>
</div>
<%= render 'plan_fields', plan_fields: plan_fields, f: f, index: index %>
</div>
<div class="flex flex-col items-end w-full">
<%= plan_fields.fields_for :plan_benefits do |plan_benefits_fields| %>
<div class="flex w-full">
<div class="flex flex-col items-stretch justify-end pr-6 w-1/2">
<%= render 'plan_benefits_desc_fields', plan_benefits_fields: plan_benefits_fields %>
</div>
<div class="flex flex-col items-stretch justify-end pl-1 pr-6 w-1/2">
<%= render 'plan_benefit_only_fields', plan_benefits_fields: plan_benefits_fields %>
</div>
</div>
<% end %>
<div class="mt-4 pl-2 pr-6 w-1/2">
<%= plan_fields.hidden_field :_destroy %>
<%= button_tag "Remove Plan 1", class: "cursor-pointer bg-deepcove hover:bg-brightlava text-xl font-bold text-copper hover:text-platinum py-2 px-4 font-semibold leading-tight rounded-lg border-3 border-copper w-full", data: { action: "add-plan#remove" } %>
</div>
</div>
</div>
<% else %>
<div class="inline-flex flex-col justify-end pr-6 mt-10 w-1/4 relative pl-1" data-controller="benefits-template-picker">
<div class="absolute left-0 top-[2%] h-[98%] border-l-4 <%= "border-#{EmployerSetupPlansForm::PLAN_COLORS[index]}" %>"></div>
<div class="font-bold text-2xl <%= "text-#{EmployerSetupPlansForm::PLAN_COLORS[index]}" %> -ml-[6px] z-2 w-full">
<%= "Plan #{index + 1}" %>
</div>
<%= render 'plan_fields', plan_fields: plan_fields, f: f, index: index %>
<%= plan_fields.fields_for :plan_benefits do |plan_benefits_fields| %>
<%= render 'plan_benefits_fields', plan_benefits_fields: plan_benefits_fields %>
<% end %>
<div class="mt-4 pl-1">
<%= plan_fields.hidden_field :_destroy %>
<%= button_tag "Remove Plan #{index + 1}", class: "cursor-pointer bg-deepcove text-brightlava py-2 px-4 font-semibold leading-tight rounded border-3 border-#{EmployerSetupPlansForm::PLAN_COLORS[index]} w-full", data: { action: "add-plan#remove" } %>
</div>
</div>
<% end %>
<% end %>
<% end %>
<%= button_tag "Add a Plan", class: "cursor-pointer text-2xl font-bold py-2 pr-6 mt-10 w-[calc(24%-1rem)] w-1/4 min-h-[940px] text-[#E0E0E0] rounded-lg font-medium border border-[#E0E0E0] bg-[#173057] hover:bg-transparent hover:shadow-[0_0_10px_3px_#93c5fd] transition-colors duration-150", data: { action: "add-plan#add", add_plan_target: "button" } %>
<template data-add-plan-target="template">
<%= f.fields_for :plans, Plan.new, child_index: 'NEW_RECORD' do |plan_fields| %>
<div class="inline-flex flex-col justify-end pr-6 w-1/4 relative pl-1" data-controller="benefits-template-picker">
<div class="absolute left-0 top-[2%] h-[98%] border-l-4 border-NEXT_COLOR"></div>
<div class="font-bold text-2xl text-NEXT_COLOR -ml-[6px] z-2 w-full">
<%= "Plan NEW_PLAN" %>
</div>
<%= render 'plan_fields', plan_fields: plan_fields, f: f, index: "NEW_RECORD".to_i %>
<%= plan_fields.fields_for :plan_benefits do |plan_benefits_fields| %>
<%= render 'plan_benefits_fields', plan_benefits_fields: plan_benefits_fields %>
<% end %>
<div class="mt-4 pl-1">
<%= plan_fields.hidden_field :_destroy %>
<%= button_tag "Remove Plan NEW_PLAN", class: "cursor-pointer bg-deepcove hover:bg-brightlava text-xl font-bold text-NEXT_SECONDARY_COLOR hover:text-platinum py-2 px-4 font-semibold leading-tight rounded-lg border-3 border-NEXT_SECONDARY_COLOR w-full", data: { action: "add-plan#remove" } %>
</div>
</div>
<% end %>
</template>
</div>
</div>
<div class="w-full flex items-center">
<h3 class="font-bold text-2xl text-bluemana">Alternative Network Information</h3>
<div class="h-[1px] w-1/2 mt-2 bg-bluemana"></div>
</div>
<div class="flex w-full justify-start" data-controller="add-alt-network-logo" data-add-alt-network-logo-form-color-value="<%= EmployerSetupPlansForm::PLAN_COLORS.to_json %>">
<div class="flex flex-wrap w-full" data-add-alt-network-logo-target="container">
<%= button_tag "Add a Regional Logo", class: "cursor-pointer text-lg font-medium py-2 px-4 rounded w-1/7 h-75 my-8 text-[#E0E0E0] rounded-lg border border-[#C2C2C2] hover:shadow-[0_0_10px_3px_#93c5fd]", data: { action: "add-alt-network-logo#add", add_alt_network_logo_target: "button" } %>
</div>
<template data-add-alt-network-logo-target="template">
<%= f.fields_for :alternative_network_logos, AlternativeNetworkLogo.new, child_index: 'NEW_RECORD' do |network_fields| %>
<div class="flex flex-col my-8 mr-3 space-y-6 px-3" data-controller="add-network-exception" data-add-network-exception-parent-color-value="NEXT_SECONDARY_COLOR">
<%= render 'alt_network_logo_fields', network_fields: network_fields %>
</div>
<% end %>
</template>
</div>
<div class="pt-8">
<%= f.submit "Submit" %>
</div>
</div>
<% end %>
</div>
@@ -1,8 +1,8 @@
<div class="bg-deepcove min-h-screen w-full flex flex-col"> <div class="bg-deepcove h-full w-full flex flex-col">
<h1 class="font-bold text-4xl text-platinum">New Employer Setup</h1> <h1 class="font-bold text-4xl text-platinum">New Employer Setup</h1>
<h3 class="font-bold text-2xl text-bluemana">General Information</h3> <h3 class="font-bold text-2xl text-bluemana">General Information</h3>
<%= form_with model: @form, url: employer_setup_index_path, local: true do |f| %> <%= form_with model: @form, url: employer_setup_index_path, local: true do |f| %>
<div class="flex flex-col my-8 space-y-6"> <div class="flex flex-col space-y-6">
<div class="flex space-x-10"> <div class="flex space-x-10">
<div class="w-1/5"> <div class="w-1/5">
<%= f.text_field :name, label: { text: "Employer Name" }, class: "w-full" %> <%= f.text_field :name, label: { text: "Employer Name" }, class: "w-full" %>
@@ -16,12 +16,12 @@
<%= f.text_field :pl_plan_key, label: { text: "Pl Plan Key" }, class: "w-full" %> <%= f.text_field :pl_plan_key, label: { text: "Pl Plan Key" }, class: "w-full" %>
</div> </div>
<div class="w-1/5"> <div class="w-1/5">
<%= f.text_field :effect_date, label: { text: "Effective Date" }, class: "w-full" %> <%= f.text_field :effective_date, label: { text: "Effective Date" }, class: "w-full" %>
</div> </div>
</div> </div>
<div class="flex space-x-10"> <div class="flex space-x-10">
<div class="w-1/5"> <div class="w-1/5">
<%= f.select :network, options_for_select([["Cigna", "cig"], ["Cigna+Regional", "cig+"], ["Medcost", "med"]]), label: { text: "Provider Network" }, data: { controller: "form-toggle", action: "change->form-toggle#toggleDivs" }, class: "w-full" %> <%= f.select :network, options_for_select(["Cigna", "Cigna+Regional", "Medcost"]), label: { text: "Provider Network" }, data: { controller: "form-toggle", action: "change->form-toggle#toggleDivs" }, class: "w-full" %>
</div> </div>
</div> </div>
<div class="flex space-x-5 items-center mt-4"> <div class="flex space-x-5 items-center mt-4">
@@ -2,12 +2,14 @@
<h1 class="font-bold text-4xl text-platinum">New Employer Setup</h1> <h1 class="font-bold text-4xl text-platinum">New Employer Setup</h1>
<h3 class="font-bold text-2xl text-bluemana">Provider Network</h3> <h3 class="font-bold text-2xl text-bluemana">Provider Network</h3>
<%= form_with model: @form, url: employer_setup_index_path, local: true do |f| %> <%= form_with model: @form, url: employer_setup_index_path, local: true do |f| %>
<div class="flex w-full justify-start"> <div class="flex w-full justify-start">
<div class="flex flex-wrap w-full" data-add-alt-network-logo-target="container"> <div class="flex flex-wrap w-full" data-add-alt-network-logo-target="container">
<%= button_tag "Add a Regional Logo", class: "cursor-pointer text-lg font-medium py-2 px-4 rounded w-1/7 h-75 my-8 text-[#E0E0E0] rounded-lg border border-[#C2C2C2] hover:shadow-[0_0_10px_3px_#93c5fd]", data: { action: "add-alt-network-logo#add", add_alt_network_logo_target: "button" } %> <%= button_tag "Add a Regional Logo", class: "cursor-pointer text-lg font-medium py-2 px-4 rounded w-1/7 h-75 my-8 text-[#E0E0E0] rounded-lg border border-[#C2C2C2] hover:shadow-[0_0_10px_3px_#93c5fd]", data: { action: "add-alt-network-logo#add", add_alt_network_logo_target: "button" } %>
</div> </div>
</div> </div>
<div class="py-10"> <div class="py-10">
<%= f.hidden_field :pl_plan_key, value: "fake" %>
<%= f.submit "Continue to Summary" %> <%= f.submit "Continue to Summary" %>
</div> </div>
<template data-add-alt-network-logo-target="template"> <template data-add-alt-network-logo-target="template">
@@ -47,6 +49,8 @@
</div> </div>
<% end %> <% end %>
</template> </template>
<% end %> <% end %>
</div> </div>
+1 -2
View File
@@ -3,12 +3,11 @@
<h3 class="font-bold text-2xl text-bluemana">Medical Plans</h3> <h3 class="font-bold text-2xl text-bluemana">Medical Plans</h3>
<div class="flex flex-col pl-6"> <div class="flex flex-col pl-6">
<%= form_with model: @form, url: employer_setup_index_path, local: true do |f| %> <%= form_with model: @form, url: employer_setup_index_path, local: true do |f| %>
<%= f.text_field :pl_plan_key, label: { text: "Employer PL Plan Key" }, class: "justify-self-start" %>
<div class="w-full flex my-8"> <div class="w-full flex my-8">
<div class="flex flex-wrap w-full" data-add-plan-target="container"> <div class="flex flex-wrap w-full" data-add-plan-target="container">
<div class="flex flex-col items-stretch justify-end pr-6 pl-1 w-1/4"> <div class="flex flex-col items-stretch justify-end pr-6 pl-1 w-1/4">
<%= f.fields_for :benefit_descs do |plan_benefit_fields| %> <%= f.fields_for :benefit_descs do |plan_benefit_fields| %>
<%= plan_benefit_fields.text_field :plan_id, class: "hidden", value: "descriptions" %> <%= plan_benefit_fields.hidden_field :plan_id, value: "descriptions" %>
<% @form.benefits_template.each do |bene| %> <% @form.benefits_template.each do |bene| %>
<div> <div>
<%= plan_benefit_fields.text_field "benefit_#{bene.sequence}", label: { text: "Benefit Description #{bene.sequence}" }, value: "#{bene.benefit_desc}", class: "w-full" %> <%= plan_benefit_fields.text_field "benefit_#{bene.sequence}", label: { text: "Benefit Description #{bene.sequence}" }, value: "#{bene.benefit_desc}", class: "w-full" %>
+4 -3
View File
@@ -13,9 +13,9 @@
<body> <body>
<main> <main>
<div class="w-full h-screen flex bg-black justify-center items-center"> <div class="w-full min-h-screen flex flex-col bg-black justify-center items-center">
<div class="h-[98%] w-[calc(100%-1rem)] mt-1 mb-2 flex justify-center items-center shadow-[0_0_10px_3px_#93c5fd] rounded-xl bg-[#04153E]"> <div class="min-h-full w-[calc(100%-1rem)] mt-1 mb-2 flex flex-grow justify-center items-center shadow-[0_0_10px_3px_#93c5fd] rounded-xl bg-[#04153E]">
<div class="w-11/12 mt-8 px-5 flex"> <div class="min-h-full w-11/12 mt-8 px-5 flex flex-grow justify-center items-center">
<%= yield %> <%= yield %>
</div> </div>
</div> </div>
@@ -23,3 +23,4 @@
</main> </main>
</body> </body>
</html> </html>
+3 -3
View File
@@ -1,13 +1,13 @@
<div class="flex items-center justify-center h-full w-full"> <div class="flex items-center justify-center min-h-full w-full">
<div class="flex flex-col text-7xl font-bold text-[#2A4B6F] space-y-30"> <div class="flex flex-col text-7xl font-bold text-[#2A4B6F] space-y-30">
<div> <div>
<span class="[text-shadow:0_0_20px_#fff,0_0_50px_#0090D9,0_0_80px_#0ff] text-[#04153E]">B</span>acl<span class="text-[#CD7F32]">i</span>ght <span class="[text-shadow:0_0_20px_#fff,0_0_50px_#0090D9,0_0_80px_#0ff] text-[#04153E]">B</span>acl<span class="text-[#CD7F32]">i</span>ght
</div> </div>
<div> <div>
<span class="[text-shadow:0_0_20px_#fff,0_0_50px_#0090D9,0_0_80px_#0ff] text-[#04153E]">B</span>acl<span class="relative inline-block">i<span class="absolute top-0 right-0 h-3 w-3 rounded-full bg-[#CD7F32] translate-y-[7px] -translate-x-[3px]"></span></span>ght <span class="[text-shadow:0_0_20px_#fff,0_0_50px_#0090D9,0_0_80px_#0ff] text-[#04153E]">B</span>acl<span class="relative inline-block">i<span class="absolute top-0 right-0 h-3 w-3 rounded-full bg-[#CD7F32] translate-y-[12px] -translate-x-[4px]"></span></span>ght
</div> </div>
<div> <div>
<span class="justify-self-end [text-shadow:0_0_20px_#fff,0_0_50px_#0090D9,0_0_80px_#0ff] text-[#04153E]">B</span>acl<span class="relative inline-block">i<span class="absolute top-0 right-0 h-3 w-3 rounded-full bg-[#CD7F32] translate-y-[7px] -translate-x-[3px] shadow-[0_0_7px_2px_#93c5fd]"></span></span>ght <span class="justify-self-end [text-shadow:0_0_20px_#fff,0_0_50px_#0090D9,0_0_80px_#0ff] text-[#04153E]">B</span>acl<span class="relative inline-block">i<span class="absolute top-0 right-0 h-3 w-3 rounded-full bg-[#CD7F32] translate-y-[13px] -translate-x-[4px] shadow-[0_0_7px_2px_#93c5fd]"></span></span>ght
</div> </div>
</div> </div>
</div> </div>
@@ -0,0 +1,17 @@
<div class="text-deepcove bg-deepcove border border-deepcove">co</div>
<div class="text-bluetang bg-bluetang border border-bluetang">co</div>
<div class="text-bluetang-tinted bg-bluetang-tinted border border-bluetang-tinted">co</div>
<div class="text-atmosphere bg-atmosphere border border-atmosphere">co</div>
<div class="text-atmosphere-tinted bg-atmosphere-tinted border border-atmosphere-tinted">co</div>
<div class="text-bluemana bg-bluemana border border-bluemana">co</div>
<div class="text-bluemana-tinted bg-bluemana-tinted border border-bluemana-tinted">co</div>
<div class="text-cobalt bg-cobalt border border-cobalt">co</div>
<div class="text-cobalt-tinted bg-cobalt-tinted border border-cobalt-tinted">co</div>
<div class="text-copper bg-copper border border-copper">co</div>
<div class="text-copper-tinted bg-copper-tinted border border-copper-tinted">co</div>
<div class="text-bronze bg-bronze border border-bronze">co</div>
<div class="text-bronze-tinted bg-bronze-tinted border border-bronze-tinted">co</div>
<div class="text-verdigris bg-verdigris border border-verdigris">co</div>
<div class="text-verdigris-tinted bg-verdigris-tinted border border-verdigris-tinted">co</div>
<div class="text-brightlava bg-brightlava border border-brightlava">co</div>
+878
View File
@@ -0,0 +1,878 @@
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="IDCard" pageWidth="612" pageHeight="792" columnWidth="572" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="477346fd-960f-44d2-84f5-bd25202741fc">
<property name="ireport.zoom" value="5.0"/>
<property name="ireport.x" value="1955"/>
<property name="ireport.y" value="0"/>
<parameter name="FamilyId" class="java.lang.String">
<defaultValueExpression><![CDATA["198621286"]]></defaultValueExpression>
</parameter>
<parameter name="BackImage" class="java.lang.String">
<defaultValueExpression><![CDATA["C:\\images\\CignaLogo.png"]]></defaultValueExpression>
</parameter>
<queryString>
<![CDATA[Select * From HLIDCardEggData Where FamilyId = $P{FamilyId}]]>
</queryString>
<field name="ID" class="java.lang.Integer"/>
<field name="Facility" class="java.lang.String"/>
<field name="Division" class="java.lang.String"/>
<field name="FullName" class="java.lang.String"/>
<field name="SSN" class="java.lang.String"/>
<field name="MedicalCoverage" class="java.lang.String"/>
<field name="MedicalEffDate" class="java.lang.String"/>
<field name="MedicalGroupNum" class="java.lang.String"/>
<field name="DentalCoverage" class="java.lang.String"/>
<field name="DentalEffDate" class="java.lang.String"/>
<field name="DentalGroupNum" class="java.lang.String"/>
<field name="CardType" class="java.lang.String"/>
<field name="ProviderCode" class="java.lang.String"/>
<field name="ProviderLine1" class="java.lang.String"/>
<field name="ProviderLine2" class="java.lang.String"/>
<field name="ProviderLine3" class="java.lang.String"/>
<field name="ProviderLine4" class="java.lang.String"/>
<field name="ProviderLine5" class="java.lang.String"/>
<field name="ProviderLine6" class="java.lang.String"/>
<field name="ProviderLine7" class="java.lang.String"/>
<field name="ProviderLine8" class="java.lang.String"/>
<field name="ProviderLine9" class="java.lang.String"/>
<field name="ProviderLine10" class="java.lang.String"/>
<field name="ProviderLine11" class="java.lang.String"/>
<field name="MailTo" class="java.lang.String"/>
<field name="MailTo2" class="java.lang.String"/>
<field name="ClaimTo1" class="java.lang.String"/>
<field name="ClaimTo2" class="java.lang.String"/>
<field name="ClaimTo3" class="java.lang.String"/>
<field name="ClaimTo4" class="java.lang.String"/>
<field name="ClaimTo5" class="java.lang.String"/>
<field name="ClaimTo6" class="java.lang.String"/>
<field name="ClaimTo7" class="java.lang.String"/>
<field name="ClaimTo8" class="java.lang.String"/>
<field name="ClaimTo9" class="java.lang.String"/>
<field name="ClaimTo10" class="java.lang.String"/>
<field name="ClaimTo11" class="java.lang.String"/>
<field name="ContactLine1" class="java.lang.String"/>
<field name="ContactLine2" class="java.lang.String"/>
<field name="ContactLine3" class="java.lang.String"/>
<field name="GroupNumber" class="java.lang.String"/>
<field name="FamilyId" class="java.lang.String"/>
<field name="GroupNo" class="java.lang.String"/>
<field name="RXGroupID" class="java.lang.String"/>
<field name="HelpDesk" class="java.lang.String"/>
<field name="CustomerService" class="java.lang.String"/>
<field name="WebUrl" class="java.lang.String"/>
<field name="Expr1" class="java.lang.String"/>
<field name="Line3" class="java.lang.String"/>
<field name="Dependent1" class="java.lang.String"/>
<field name="Dependent2" class="java.lang.String"/>
<field name="Dependent3" class="java.lang.String"/>
<field name="Dependent4" class="java.lang.String"/>
<field name="Dependent5" class="java.lang.String"/>
<field name="Dependent6" class="java.lang.String"/>
<field name="BenDesc1" class="java.lang.String"/>
<field name="Ben1" class="java.lang.String"/>
<field name="BenDesc2" class="java.lang.String"/>
<field name="Ben2" class="java.lang.String"/>
<field name="BenDesc3" class="java.lang.String"/>
<field name="Ben3" class="java.lang.String"/>
<field name="BenDesc4" class="java.lang.String"/>
<field name="Ben4" class="java.lang.String"/>
<field name="BenDesc5" class="java.lang.String"/>
<field name="Ben5" class="java.lang.String"/>
<field name="BenDesc6" class="java.lang.String"/>
<field name="Ben6" class="java.lang.String"/>
<field name="BenDesc7" class="java.lang.String"/>
<field name="Ben7" class="java.lang.String"/>
<field name="BenDesc8" class="java.lang.String"/>
<field name="Ben8" class="java.lang.String"/>
<field name="BenDesc9" class="java.lang.String"/>
<field name="Ben9" class="java.lang.String"/>
<field name="BenDesc10" class="java.lang.String"/>
<field name="Ben10" class="java.lang.String"/>
<field name="BenDesc11" class="java.lang.String"/>
<field name="Ben11" class="java.lang.String"/>
<field name="BenDesc12" class="java.lang.String"/>
<field name="Ben12" class="java.lang.String"/>
<field name="BenDesc13" class="java.lang.String"/>
<field name="Ben13" class="java.lang.String"/>
<field name="BenDesc14" class="java.lang.String"/>
<field name="Ben14" class="java.lang.String"/>
<field name="PLPlanKey" class="java.lang.Integer"/>
<field name="PrimaryMBMemberKey" class="java.lang.Integer"/>
<field name="PPOLookup1" class="java.lang.String"/>
<field name="PPOLookup2" class="java.lang.String"/>
<field name="Precert1" class="java.lang.String"/>
<field name="Precert2" class="java.lang.String"/>
<field name="Precert3" class="java.lang.String"/>
<field name="Precert4" class="java.lang.String"/>
<field name="Precert5" class="java.lang.String"/>
<field name="Precert6" class="java.lang.String"/>
<field name="Dependent7" class="java.lang.String"/>
<field name="Dependent8" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band splitType="Stretch"/>
</title>
<pageHeader>
<band splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band splitType="Stretch"/>
</columnHeader>
<detail>
<band height="166" splitType="Immediate">
<rectangle>
<reportElement uuid="7335a19a-8a74-445f-aaa4-e015e3c186f8" mode="Transparent" x="296" y="1" width="250" height="164" forecolor="#00CCFF"/>
<graphicElement>
<pen lineWidth="0.5" lineStyle="Dashed"/>
</graphicElement>
</rectangle>
<rectangle>
<reportElement uuid="4a5b91ca-ebdb-45be-8c16-f6ab6529dae7" x="439" y="15" width="102" height="146"/>
</rectangle>
<rectangle>
<reportElement uuid="08937bdf-e64e-4836-b222-490c0843272b" mode="Transparent" x="35" y="1" width="250" height="164" forecolor="#00CCFF"/>
<graphicElement>
<pen lineWidth="0.5" lineStyle="Dashed"/>
</graphicElement>
</rectangle>
<rectangle>
<reportElement uuid="e762ee84-c013-417b-a78f-54f6f1f6a1a3" x="41" y="15" width="100" height="71"/>
</rectangle>
<rectangle>
<reportElement uuid="66e1721c-c7fd-40cf-8f45-10b5f6b4c22d" x="41" y="97" width="100" height="49"/>
</rectangle>
<rectangle>
<reportElement uuid="ad8b04e0-5993-4f1c-b6b1-f2c11320be29" x="146" y="15" width="133" height="71"/>
</rectangle>
<rectangle>
<reportElement uuid="777f7302-b52c-48fd-9cf7-6bce02846f86" x="302" y="15" width="133" height="84"/>
</rectangle>
<rectangle>
<reportElement uuid="c654c4f4-6d8f-4678-9a39-99f7394d2690" x="302" y="6" width="53" height="8" backcolor="#000000"/>
</rectangle>
<rectangle>
<reportElement uuid="5c229560-d2d4-4752-95a0-b562e786d29e" x="146" y="6" width="58" height="8" backcolor="#000000"/>
</rectangle>
<rectangle>
<reportElement uuid="014fd155-bf62-4aa6-8a1a-894c0b5855ac" x="41" y="6" width="60" height="8" backcolor="#000000"/>
</rectangle>
<rectangle>
<reportElement uuid="2a360f63-7815-4b72-9ff1-9339cc530b94" x="41" y="89" width="60" height="8" backcolor="#000000"/>
</rectangle>
<staticText>
<reportElement uuid="8417fc69-fdb9-483e-8c7f-9d5a0b91cbc5" x="43" y="6" width="39" height="10" forecolor="#FFFFFF"/>
<textElement>
<font size="6" isUnderline="false"/>
</textElement>
<text><![CDATA[Eligibility]]></text>
</staticText>
<staticText>
<reportElement uuid="393d9b02-933b-46d8-850b-4d69d148aa86" x="43" y="89" width="58" height="11" forecolor="#FFFFFF"/>
<textElement>
<font size="6" isUnderline="false" isPdfEmbedded="false"/>
</textElement>
<text><![CDATA[Utilization / Pre-Cert]]></text>
</staticText>
<image scaleImage="FillFrame">
<reportElement uuid="7445dc43-933e-4b42-bef0-1772e9b85ba4" x="441" y="17" width="98" height="24" isPrintInFirstWholeBand="true"/>
<imageExpression><![CDATA[$F{PLPlanKey}==3?"C:\\images\\TandemLocLogo.png":
$F{PLPlanKey}==4?"C:\\images\\PRFaulkLogo.jpg":
$F{PLPlanKey}==5?"C:\\images\\graceChurch.jpg":
$F{PLPlanKey}==13?"C:\\images\\ovationlogo12.jpg":
$F{PLPlanKey}==19?"C:\\images\\BeamLogo.png":
$F{PLPlanKey}==20?"C:\\images\\anewgo.png":
$F{PLPlanKey}==39?"C:\\images\\HeritagePicture2.jpg":
$F{PLPlanKey}==48?"C:\\images\\HandT.png":
$F{PLPlanKey}==49?"C:\\images\\Panhandle.jpg":
$F{PLPlanKey}==50?"C:\\images\\DeepSouth.png":
$F{PLPlanKey}==51?"C:\\images\\PalmettoLogo.png":
$F{PLPlanKey}==52?"C:\\images\\90WorksLogo.png":
$F{PLPlanKey}==53?"C:\\images\\DublinLogo.png":
$F{PLPlanKey}==54?"C:\\images\\SouthlandLogo.jpg":
$F{PLPlanKey}==58?"C:\\images\\Floralawn_Logo.png":
$F{PLPlanKey}==60?"C:\\images\\DreamCenterLogo.jpg":
$F{PLPlanKey}==62?"C:\\images\\SitationLlcLogo.png":
"C:\\images\\imageB.png"]]></imageExpression>
</image>
<staticText>
<reportElement uuid="5e18e17a-d437-434d-ad97-fe131a7f2850" x="147" y="6" width="56" height="11" forecolor="#FFFFFF"/>
<textElement>
<font size="6" isUnderline="false" isPdfEmbedded="false"/>
</textElement>
<text><![CDATA[Claims Submission]]></text>
</staticText>
<staticText>
<reportElement uuid="99f47ca3-1456-4fc7-bb08-a98f460120ce" x="441" y="39" width="98" height="23"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="5" isBold="true" isItalic="false"/>
</textElement>
<text><![CDATA[Administered by:
Britton Benefit Services, LLC
1.800.676.1182]]></text>
</staticText>
<staticText>
<reportElement uuid="75aa6426-2374-4c07-9556-63dab683cb11" x="41" y="15" width="100" height="17"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isBold="false" isItalic="false"/>
</textElement>
<text><![CDATA[To confirm eligibility, verify benefits,
or check claim:
]]></text>
</staticText>
<staticText>
<reportElement uuid="8307c61b-9927-4bcc-a825-fec29b5ba605" x="41" y="27" width="100" height="17"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isBold="false" isItalic="false"/>
</textElement>
<text><![CDATA[Britton Benefit Services, LLC]]></text>
</staticText>
<staticText>
<reportElement uuid="46c394a4-7df2-4f23-b17e-d8e186e99f5e" x="41" y="37" width="100" height="50"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="6" isBold="false" isItalic="false"/>
</textElement>
<text><![CDATA[Call:
1.800.676.1182 (8am 5pm)
Online:
www.bbstpa.com (24/7)
This card does not guarantee
eligibility or payment
]]></text>
</staticText>
<textField>
<reportElement uuid="10b2b729-cb2f-4507-99d4-d3286e5ca8ed" x="152" y="16" width="52" height="7"/>
<textElement verticalAlignment="Middle">
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{ClaimTo1}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="0f23b912-da97-4297-b142-8c47d3332037" x="152" y="21" width="52" height="7"/>
<textElement verticalAlignment="Middle">
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{ClaimTo2}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="6664081c-30df-4e12-a563-e286fb71935a" x="152" y="26" width="52" height="7"/>
<textElement verticalAlignment="Middle">
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{ClaimTo3}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="e957833e-54e9-4145-b41b-1a72d0ddadf3" x="152" y="31" width="52" height="7"/>
<textElement verticalAlignment="Middle">
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{ClaimTo4}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="a49dbbb0-791e-4930-b99a-dfa39ee3e3d9" x="152" y="40" width="52" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{ClaimTo5}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="0b0c6791-76a7-4a76-9695-59fff6544f8f" x="152" y="45" width="52" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{ClaimTo6}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="f1ce64f0-b5fd-499e-a419-e0ef4b1e32e0" x="152" y="50" width="52" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{ClaimTo7}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="2abffded-f4c1-4bfd-bf83-95550d8e1aa3" x="152" y="55" width="52" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{ClaimTo8}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="ed2733a7-5906-4544-a4a6-1e4465c94f70" x="152" y="64" width="52" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{ClaimTo9}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="cc95f964-4572-46b1-b092-964c9f19e7f6" x="152" y="70" width="52" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{ClaimTo10}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="6becfb6d-cb5b-4262-991d-e8d5bc9153c1" x="152" y="76" width="52" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{ClaimTo11}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="94749044-5ec6-4eb4-8f6d-e52ce5e215da" x="206" y="16" width="70" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{ProviderLine1}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="25cbc687-a185-4894-97f4-11d57c8ad84c" x="206" y="21" width="70" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{ProviderLine2}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="527837e8-6ecb-4eba-8b3c-c1fee8e58b52" x="206" y="26" width="70" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{ProviderLine3}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="96e1ff12-6c27-4bd9-b706-050a283ea1a8" x="206" y="31" width="70" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{ProviderLine4}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="c209866f-c8db-455d-8118-ae0aa51204a8" x="206" y="40" width="70" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{ProviderLine5}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="22bcf3ce-6edc-4390-9c63-f169623fdf58" x="206" y="45" width="70" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{ProviderLine6}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="b8bd2df8-9ad2-4cde-9c67-b0e32425c00b" x="206" y="50" width="70" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{ProviderLine7}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="e5d86062-d78f-42b5-b578-cd14dcc071ca" x="206" y="55" width="70" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{ProviderLine8}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="8b542cf4-f0e7-4019-90cf-4b3a826184bf" x="206" y="64" width="70" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{ProviderLine9}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="b154a117-b385-4eac-b53a-51f349d2e9a6" x="206" y="69" width="70" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{ProviderLine10}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="d30067fe-8185-4854-a4da-615d8bb59f4a" x="206" y="76" width="70" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{ProviderLine11}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="8bbea900-0c43-40d8-ad68-2f478aabd3c1" x="305" y="6" width="50" height="11" forecolor="#FFFFFF"/>
<textElement>
<font size="6" isUnderline="false" isPdfEmbedded="false"/>
</textElement>
<text><![CDATA[Health Benefit Plan]]></text>
</staticText>
<rectangle>
<reportElement uuid="4ecd4a82-edd1-4166-abf9-85d66ebb8b37" x="439" y="6" width="44" height="8" backcolor="#000000"/>
</rectangle>
<staticText>
<reportElement uuid="4ddf1be3-c752-46e0-8197-f4d64b5484b0" x="442" y="6" width="41" height="11" forecolor="#FFFFFF"/>
<textElement>
<font size="6" isUnderline="false" isPdfEmbedded="false"/>
</textElement>
<text><![CDATA[Medical Plan]]></text>
</staticText>
<rectangle>
<reportElement uuid="1b74e177-da54-47c1-a801-ac0331d2cd11" x="146" y="97" width="133" height="49"/>
</rectangle>
<rectangle>
<reportElement uuid="6a6d5769-ee7e-439f-8d65-7de67cdcb16b" x="146" y="89" width="53" height="8" backcolor="#000000"/>
</rectangle>
<staticText>
<reportElement uuid="fa26d6b7-51d2-4f9e-9d05-9a4513c66eed" x="149" y="89" width="50" height="11" forecolor="#FFFFFF"/>
<textElement>
<font size="6" isUnderline="false" isPdfEmbedded="false"/>
</textElement>
<text><![CDATA[Pharmacy Plan]]></text>
</staticText>
<staticText>
<reportElement uuid="5c39d2a5-fb6b-427a-ade9-f09c04c1144c" x="304" y="16" width="40" height="8"/>
<textElement>
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[Group #/ID:]]></text>
</staticText>
<staticText>
<reportElement uuid="26d1f156-d150-4837-9bba-1390a8199fb4" x="304" y="23" width="19" height="8"/>
<textElement>
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[Name:]]></text>
</staticText>
<staticText>
<reportElement uuid="8c0fbf41-d7b6-482b-996d-0b48ee2b0ff7" x="304" y="30" width="32" height="8"/>
<textElement>
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[Member #:]]></text>
</staticText>
<staticText>
<reportElement uuid="da2ecd13-2381-494c-9d69-745b2496587e" x="304" y="37" width="50" height="8"/>
<textElement>
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[Effective Date:]]></text>
</staticText>
<staticText>
<reportElement uuid="58ce6f59-01b7-457a-aee6-0be9d7ae868e" x="304" y="44" width="30" height="8"/>
<textElement>
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[Employer:]]></text>
</staticText>
<textField>
<reportElement uuid="1361e8b7-6ea2-4f2b-a6fd-781b1fa521e8" x="346" y="16" width="88" height="8"/>
<textElement>
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{GroupNo}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="c2877613-bc27-4175-b080-5ab67f1d781c" x="323" y="23" width="111" height="8"/>
<textElement>
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{FullName}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="acea13af-f269-47da-b9cc-ba0ea22df29f" x="336" y="30" width="98" height="8"/>
<textElement>
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{PrimaryMBMemberKey}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="eaa738bf-1ced-4c86-8a31-9acc09a88abe" x="346" y="37" width="88" height="8"/>
<textElement>
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{MedicalEffDate}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="f559a5a0-cd09-46e5-9a6c-0b4458ddd8b2" x="334" y="44" width="100" height="15"/>
<textElement>
<font size="6"/>
</textElement>
<textFieldExpression><![CDATA[$F{Division}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="cf1ce1ca-5cef-436c-b2d6-26bd3e1015b4" x="304" y="62" width="76" height="8"/>
<textElement>
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[Covered Dependents:]]></text>
</staticText>
<textField>
<reportElement uuid="848389f8-98f1-41da-962e-cc29aeac91d1" x="305" y="69" width="63" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{Dependent1}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="adee7873-b80c-4be4-9568-533471bab640" x="305" y="76" width="63" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{Dependent2}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="53ed1fe8-89ed-42a2-98bb-9ad75418f543" x="305" y="83" width="63" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{Dependent3}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="07c29443-8589-4e0f-a758-b69a34f38b07" x="305" y="90" width="63" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{Dependent4}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="f906328d-53c5-4bb7-b4d4-4eba2261adfb" x="371" y="69" width="63" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{Dependent5}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="a15671c2-f677-4def-9d42-1e0553d43010" x="371" y="76" width="63" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{Dependent6}]]></textFieldExpression>
</textField>
<image scaleImage="RetainShape">
<reportElement uuid="36c204c6-c2f7-4613-863f-332cf50ff6cc" x="202" y="100" width="76" height="21"/>
<imageExpression><![CDATA["C:\\images\\FairRxOs.jpg"]]></imageExpression>
</image>
<staticText>
<reportElement uuid="40b57f3b-eeeb-4e38-857b-6bf290bb5ba5" x="148" y="101" width="25" height="8"/>
<textElement>
<font size="5" isBold="true"/>
</textElement>
<text><![CDATA[RX Bin:]]></text>
</staticText>
<staticText>
<reportElement uuid="cc922142-d87a-4f04-b28b-413ad513e5e0" x="148" y="110" width="31" height="8"/>
<textElement>
<font size="5" isBold="true"/>
</textElement>
<text><![CDATA[RX PCN:]]></text>
</staticText>
<staticText>
<reportElement uuid="4534f9a0-901a-402c-86ba-0b3109370e53" x="148" y="120" width="31" height="8"/>
<textElement>
<font size="5" isBold="true"/>
</textElement>
<text><![CDATA[RX GRP:]]></text>
</staticText>
<staticText>
<reportElement uuid="abd7fb37-b19a-4691-869c-28a8c0b326ce" x="175" y="101" width="27" height="8"/>
<textElement>
<font size="5" isBold="true"/>
</textElement>
<text><![CDATA[021841]]></text>
</staticText>
<staticText>
<reportElement uuid="84e6427e-950d-4c1a-877e-a342ec8009db" x="175" y="110" width="27" height="8"/>
<textElement>
<font size="5" isBold="true"/>
</textElement>
<text><![CDATA[18000405]]></text>
</staticText>
<textField>
<reportElement uuid="709713dc-5f48-40dc-957c-9f015b376b41" x="175" y="120" width="49" height="8"/>
<textElement>
<font size="5" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{RXGroupID}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="00b86af7-1cba-4c7a-a78b-cb0ffa476f88" x="148" y="134" width="58" height="8"/>
<textElement>
<font size="5" isBold="true"/>
</textElement>
<text><![CDATA[Customer Service:]]></text>
</staticText>
<textField>
<reportElement uuid="0bce3d0c-c01b-4dfd-9638-19b94d75e73e" x="205" y="120" width="73" height="8"/>
<textElement textAlignment="Center">
<font size="5" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{WebUrl}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="1193b1ef-31e9-4c43-bb51-236b67c21c81" x="205" y="134" width="73" height="8"/>
<textElement>
<font size="5" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{CustomerService}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="ded7012f-9a8d-4e97-876b-e34bc59241ef" x="441" y="61" width="52" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{BenDesc1}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="2a63ebda-6cf8-4f7a-927b-7cfa892e196d" x="496" y="61" width="43" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{Ben1}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="aa510ad0-1a1e-4f24-b692-505794f4f159" x="441" y="68" width="52" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{BenDesc2}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="f501005d-ba2b-4747-92f4-1b3288d52f3a" x="496" y="68" width="43" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{Ben2}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="fae8e590-1ffe-4e48-aef6-26a7e01c88af" x="441" y="75" width="52" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{BenDesc3}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="693746af-9ba2-4992-a270-397eaac04653" x="441" y="82" width="52" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{BenDesc4}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="27282b06-831e-40e5-93ee-ca77e3190dd5" x="496" y="75" width="43" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{Ben3}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="fb423834-c0e0-4e68-8dd9-baa62eaa79a2" x="496" y="82" width="43" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{Ben4}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="b0e3223c-1930-42db-82cc-d059e9b699b9" x="441" y="89" width="52" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{BenDesc5}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="bae3a6b6-1ca2-4ca6-9ba1-dd5fb9d1153f" x="496" y="110" width="43" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{Ben8}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="8afd99dc-91b9-4416-806a-5f0e7eb83b1c" x="441" y="110" width="52" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{BenDesc8}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="c88d8d15-070c-42ad-999c-2e013f399992" x="441" y="103" width="52" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{BenDesc7}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="8bfb12fe-aef3-4397-a026-1fe43ebce05e" x="441" y="96" width="52" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{BenDesc6}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="43a569a5-7de5-427a-986f-bc4af746be06" x="496" y="96" width="43" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{Ben6}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="a26646b1-152c-44f2-9486-1bd1590683c3" x="496" y="103" width="43" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{Ben7}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="b572b49b-7b9a-4f68-b7ef-11dfadd2dae4" x="496" y="89" width="43" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{Ben5}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="71022051-2ec9-443d-81e2-5f7385ddeb7b" x="43" y="99" width="54" height="9"/>
<textElement>
<font fontName="Microsoft Sans Serif" size="5" isBold="true"/>
</textElement>
<text><![CDATA[Precertification]]></text>
</staticText>
<textField>
<reportElement uuid="e414550a-a8d0-4313-9b57-e42ca3bb67ab" x="43" y="105" width="93" height="13"/>
<textElement textAlignment="Left">
<font fontName="Microsoft Sans Serif" size="5"/>
</textElement>
<textFieldExpression><![CDATA["Call Britton Benefit Services, LLC"]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="cc80102a-5811-4dc6-8d44-606d736bddc7" x="148" y="140" width="8" height="7"/>
<textElement>
<font fontName="Microsoft Sans Serif" size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{ProviderCode}.equals("1")?"S":""]]></textFieldExpression>
</textField>
<image hAlign="Center">
<reportElement uuid="ea716b2c-5586-439d-8450-7302d49a5bd3" x="303" y="103" width="100" height="51"/>
<imageExpression><![CDATA[$P{BackImage}]]></imageExpression>
</image>
<image>
<reportElement uuid="7da52da7-1e66-4ba2-ae1c-8ba65b8797c3" x="191" y="147" width="189" height="8"/>
<imageExpression><![CDATA["C:\\images\\LOGO - AFHC.jpg"]]></imageExpression>
</image>
<staticText>
<reportElement uuid="4da0cb27-87c4-4f6c-8cde-4078ad224da6" x="41" y="147" width="160" height="8"/>
<textElement>
<font size="6" isBold="true"/>
</textElement>
<text><![CDATA[Benefits are not insured by Cigna or affiliates]]></text>
</staticText>
<textField>
<reportElement uuid="1d9c4616-e0bc-41e0-836d-8614c195b304" x="43" y="115" width="93" height="13"/>
<textElement textAlignment="Left">
<font fontName="Microsoft Sans Serif" size="5" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["1.800.676.1182"]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="e1932f2f-82d4-491b-a3a3-b8151ac539e2" x="496" y="117" width="43" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{Ben9}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="a064a7fd-da67-407f-838d-4d0a5b267843" x="441" y="117" width="52" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{BenDesc9}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="ab233e66-e9cd-4224-8a46-bf57655ef118" x="441" y="124" width="52" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{BenDesc10}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="286a851b-e65e-4fa2-bae1-161ed10a131c" x="496" y="124" width="43" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{Ben10}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="920cb788-6331-4e5c-8f8f-f94c8be5a994" x="441" y="131" width="52" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{BenDesc11}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="30aeb39b-dc3b-41a1-9d68-642c0f9bcb97" x="496" y="131" width="43" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{Ben11}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="f8c77d6d-09fd-4b82-aae0-e9d6fdc2d30f" x="441" y="138" width="52" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{BenDesc12}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="d29a0a9b-974d-43c6-bb2a-9a299abffc63" x="496" y="138" width="43" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{Ben12}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="a8518713-b138-4ffe-aa62-0569c1d9a994" x="441" y="145" width="52" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{BenDesc13}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="26483625-94c7-40e6-bde9-c9be49a05cb5" x="496" y="145" width="43" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{Ben13}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="34bf0565-21e2-4f28-b7e9-8002d413c604" x="441" y="152" width="52" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{BenDesc14}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="34649417-951f-406a-8ab8-b30d019d5017" x="496" y="152" width="43" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{Ben14}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="bb76fe99-8d7a-4089-b690-86be4c3c289d" x="371" y="83" width="63" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{Dependent7}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="36c1c7bb-72e0-4cfe-bdf6-f2aeb9fd7a61" x="371" y="90" width="63" height="7"/>
<textElement>
<font size="5"/>
</textElement>
<textFieldExpression><![CDATA[$F{Dependent8}]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
<band splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band splitType="Stretch"/>
</pageFooter>
<summary>
<band splitType="Stretch"/>
</summary>
</jasperReport>
+199
View File
@@ -0,0 +1,199 @@
USE [VHCS_HIPAA]
GO
/****** Object: View [dbo].[HLIDCardsViewEgg] Script Date: 12/3/2025 12:34:01 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER VIEW [dbo].[HLIDCardsViewEgg]
AS
SELECT dbo.HLIDCardsEgg.Facility,
dbo.HLIDCardsEgg.Division AS Division,
UPPER(dbo.HLIDCardsEgg.FullName) AS FullName,
'XXX-XX-' + SUBSTRING(dbo.HLIDCardsEgg.SSN, 6, 4) AS SSN,
dbo.HLIDCardsEgg.MedicalCoverage,
dbo.HLIDCardsEgg.MedicalEffDate,
dbo.HLIDCardsEgg.MedicalGroupNum,
dbo.HLIDCardsEgg.DentalCoverage,
dbo.HLIDCardsEgg.DentalEffDate,
dbo.HLIDCardsEgg.DentalGroupNum,
dbo.HLIDCardsEgg.CardType,
dbo.HLIDCardProvider.ProviderCode,
dbo.HLIDCardProvider.ProviderLine1,
dbo.HLIDCardProvider.ProviderLine2,
dbo.HLIDCardProvider.ProviderLine3,
dbo.HLIDCardProvider.ProviderLine4,
dbo.HLIDCardProvider.ProviderLine5,
dbo.HLIDCardProvider.ProviderLine6,
dbo.HLIDCardProvider.ProviderLine7,
dbo.HLIDCardProvider.ProviderLine8,
dbo.HLIDCardProvider.ProviderLine9,
dbo.HLIDCardProvider.ProviderLine10,
dbo.HLIDCardProvider.ProviderLine11,
dbo.HLIDCardProvider.MailTo,
dbo.HLIDCardProvider.MailTo2,
dbo.HLIDCardProvider.ClaimTo1,
dbo.HLIDCardProvider.ClaimTo2,
dbo.HLIDCardProvider.ClaimTo3,
dbo.HLIDCardProvider.ClaimTo4,
dbo.HLIDCardProvider.ClaimTo5,
dbo.HLIDCardProvider.ClaimTo6,
dbo.HLIDCardProvider.ClaimTo7,
dbo.HLIDCardProvider.ClaimTo8,
dbo.HLIDCardProvider.ClaimTo9,
dbo.HLIDCardProvider.ClaimTo10,
dbo.HLIDCardProvider.ClaimTo11,
dbo.HLIDCardProvider.ContactLine1,
dbo.HLIDCardProvider.ContactLine2,
dbo.HLIDCardProvider.ContactLine3,
dbo.HLIDCardsEgg.GroupNumber,
REPLACE(dbo.HLIDCardsEgg.SSN, '-', '') AS FamilyId, dbo.HLIDCardsEgg.GroupNumber AS GroupNo,
CASE
WHEN dbo.HLIDCardsEgg.PLPlanKey = 56 -- HealthBus/TCRM BENEFITS - Plan Specific RXGroupID
THEN (Select RXGroupID From HLRXCrosRef_Product Where PLPlanKey = dbo.HLIDCardsEgg.PLPlanKey And PBProductKey = dbo.HLIDCardsEgg.PBProductKey)
ELSE dbo.HLRXCrosRef.RXGroupID
END as RXGroupID,
dbo.HLRXCrosRef.HelpDesk,
dbo.HLRXCrosRef.CustomerService,
dbo.HLRXCrosRef.WebUrl,
dbo.HLIDCardProvider.MailTo2 AS Expr1,
CASE
WHEN CardType = 'T' THEN '1-800-676-1182'
WHEN CardType = 'I' THEN '1-800-676-1182'
WHEN CardType = 'A' THEN '1-800-676-1182'
WHEN CardType = 'J' THEN '1-800-676-1182'
WHEN CardType = 'K' THEN '1-800-676-1182'
ELSE 'Britton Benefits at 1-800-676-1182'
END Line3,
ISNULL((Select DependentName
From (Select distinct TOP(1) dbo.HLEggIdCardDependent.DependentName DependentName, dbo.HLEggIdCardDependent.SequenceNumber SequenceNumber
From dbo.HLEggIdCardDependent Where dbo.HLEggIdCardDependent.FamilyId = dbo.HLIDCardsEgg.SSN
order by dbo.HLEggIdCardDependent.SequenceNumber) A),'') as Dependent1,
ISNULL((Select DependentName
From (Select distinct dbo.HLEggIdCardDependent.DependentName DependentName, dbo.HLEggIdCardDependent.SequenceNumber SequenceNumber
From dbo.HLEggIdCardDependent Where dbo.HLEggIdCardDependent.FamilyId = dbo.HLIDCardsEgg.SSN
order by dbo.HLEggIdCardDependent.SequenceNumber
OFFSET 1 ROWS -- backup 1 row
FETCH NEXT 1 ROWS ONLY) A),'') as Dependent2,
ISNULL((Select DependentName
From (Select distinct dbo.HLEggIdCardDependent.DependentName DependentName, dbo.HLEggIdCardDependent.SequenceNumber SequenceNumber
From dbo.HLEggIdCardDependent Where dbo.HLEggIdCardDependent.FamilyId = dbo.HLIDCardsEgg.SSN
order by dbo.HLEggIdCardDependent.SequenceNumber
OFFSET 2 ROWS -- backup 2 rows
FETCH NEXT 1 ROWS ONLY) A),'') as Dependent3,
ISNULL((Select DependentName
From (Select distinct dbo.HLEggIdCardDependent.DependentName DependentName, dbo.HLEggIdCardDependent.SequenceNumber SequenceNumber
From dbo.HLEggIdCardDependent Where dbo.HLEggIdCardDependent.FamilyId = dbo.HLIDCardsEgg.SSN
order by dbo.HLEggIdCardDependent.SequenceNumber
OFFSET 3 ROWS -- backup 3 rows
FETCH NEXT 1 ROWS ONLY) A),'') as Dependent4,
ISNULL((Select DependentName
From (Select distinct dbo.HLEggIdCardDependent.DependentName DependentName, dbo.HLEggIdCardDependent.SequenceNumber SequenceNumber
From dbo.HLEggIdCardDependent Where dbo.HLEggIdCardDependent.FamilyId = dbo.HLIDCardsEgg.SSN
order by dbo.HLEggIdCardDependent.SequenceNumber
OFFSET 4 ROWS -- backup 4 rows
FETCH NEXT 1 ROWS ONLY) A),'') as Dependent5,
ISNULL((Select DependentName
From (Select distinct dbo.HLEggIdCardDependent.DependentName DependentName, dbo.HLEggIdCardDependent.SequenceNumber SequenceNumber
From dbo.HLEggIdCardDependent Where dbo.HLEggIdCardDependent.FamilyId = dbo.HLIDCardsEgg.SSN
order by dbo.HLEggIdCardDependent.SequenceNumber
OFFSET 5 ROWS -- backup 5 rows
FETCH NEXT 1 ROWS ONLY) A),'') as Dependent6,
ISNULL((Select DependentName
From (Select distinct dbo.HLEggIdCardDependent.DependentName DependentName, dbo.HLEggIdCardDependent.SequenceNumber SequenceNumber
From dbo.HLEggIdCardDependent Where dbo.HLEggIdCardDependent.FamilyId = dbo.HLIDCardsEgg.SSN
order by dbo.HLEggIdCardDependent.SequenceNumber
OFFSET 6 ROWS -- backup 6 rows
FETCH NEXT 1 ROWS ONLY) A),'') as Dependent7,
ISNULL((Select DependentName
From (Select distinct dbo.HLEggIdCardDependent.DependentName DependentName, dbo.HLEggIdCardDependent.SequenceNumber SequenceNumber
From dbo.HLEggIdCardDependent Where dbo.HLEggIdCardDependent.FamilyId = dbo.HLIDCardsEgg.SSN
order by dbo.HLEggIdCardDependent.SequenceNumber
OFFSET 7 ROWS -- backup 7 rows
FETCH NEXT 1 ROWS ONLY) A),'') as Dependent8,
ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 1), '') as BenDesc1,
ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 1), '') as Ben1,
ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 2), '') as BenDesc2,
ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 2), '') as Ben2,
ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 3), '') as BenDesc3,
ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 3), '') as Ben3,
ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 4), '') as BenDesc4,
ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 4), '') as Ben4,
ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 5), '') as BenDesc5,
ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 5), '') as Ben5,
ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 6), '') as BenDesc6,
ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 6), '') as Ben6,
ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 7), '') as BenDesc7,
ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 7), '') as Ben7,
ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 8), '') as BenDesc8,
ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 8), '') as Ben8,
ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 9), '') as BenDesc9,
ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 9), '') as Ben9,
ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 10),'') as BenDesc10,
ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 10),'') as Ben10,
ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 11),'') as BenDesc11,
ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 11),'') as Ben11,
ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 12),'') as BenDesc12,
ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 12),'') as Ben12,
ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 13),'') as BenDesc13,
ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 13),'') as Ben13,
ISNULL((Select h.BenefitDesc From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 14),'') as BenDesc14,
ISNULL((Select h.Benefit From HLEgglestonCardBenefit h Where PlanId = dbo.HLIDCardsEgg.PBProductKey AND h.Sequence = 14),'') as Ben14,
dbo.HLIDCardsEgg.PLPlanKey,
dbo.HLIDCardsEgg.MBMemberKey,
dbo.HLIDCardProvider.ProviderLookup1,
dbo.HLIDCardProvider.ProviderLookup2,
dbo.HLIDCardProvider.Precert1,
dbo.HLIDCardProvider.Precert2,
dbo.HLIDCardProvider.Precert3,
dbo.HLIDCardProvider.Precert4,
dbo.HLIDCardProvider.Precert5,
dbo.HLIDCardProvider.Precert6,
CASE
WHEN dbo.HLIDCardsEgg.PLPlanKey IN (13, 21, 39, 49, 50, 51, 20, 52, 19, 53, 54, 56, 58, 60, 61, 62)
THEN 'Benefits are not insured by Cigna Healthcare or affiliates'
ELSE ''
END AS MISCDATA,
CASE WHEN dbo.HLIDCardsEgg.PLPlanKey IN (21,39) THEN 'CIGNA' ELSE '' END AS PPODATA,
CASE WHEN dbo.HLIDCardsEgg.PLPlanKey IN (21,39) THEN 'PPO' ELSE '' END AS PPODATA2,
CASE WHEN dbo.HLIDCardsEgg.PLPlanKey IN (21,39) THEN '"S"' ELSE '' END AS PPODATA3,
CASE
WHEN LEN(FullName) - LEN(REPLACE(FullName,' ','')) > 2
THEN FullName
WHEN LEN(FullName) - LEN(REPLACE(FullName,' ','')) > 1
THEN SUBSTRING(SUBSTRING(FullName , CHARINDEX(' ', FullName ) + 1, LEN(FullName )),
CHARINDEX(' ', SUBSTRING(FullName , CHARINDEX(' ', FullName ) + 1, LEN(FullName )) ) + 1,
LEN(SUBSTRING(FullName , CHARINDEX(' ', FullName ) + 1, LEN(FullName )) ))
WHEN LEN(FullName) - LEN(REPLACE(FullName,' ','')) > 0
THEN SUBSTRING(FullName , CHARINDEX(' ', FullName ) + 1, LEN(FullName ))
ELSE FullName
END AS LastName
FROM dbo.HLIDCardsEgg
INNER JOIN dbo.HLIDCardProvider
ON dbo.HLIDCardsEgg.CardType = dbo.HLIDCardProvider.ProviderCode
INNER JOIN dbo.HLRXCrosRef
ON dbo.HLRXCrosRef.GroupNo = dbo.HLIDCardsEgg.GroupNumber
WHERE dbo.HLIDCardsEgg.PBProductKey IN (Select PBProductKey From PBProduct Where FullDescription NOT LIKE '%LIFE%' AND FullDescription NOT LIKE '%VISION%')
AND dbo.HLIDCardsEgg.PBProductKey <> 1059 -- Grace Chapel Vision
GO
+1 -1
View File
@@ -18,7 +18,7 @@ require "action_cable/engine"
# you've limited to :test, :development, or :production. # you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups) Bundler.require(*Rails.groups)
module Railsondocker module Baclight
class Application < Rails::Application class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version. # Initialize configuration defaults for originally generated Rails version.
config.load_defaults 7.2 config.load_defaults 7.2
+1 -1
View File
@@ -1,7 +1,7 @@
# frozen_string_literal: true # frozen_string_literal: true
Rails.application.routes.draw do Rails.application.routes.draw do
resources :employer_setup, only: [:new, :create] resources :employer_setup, only: [:new, :create, :edit, :update]
get 'id_card_benefits_templates/get_template_benefits/:id', to: 'id_card_benefits_templates#get_template_benefits' get 'id_card_benefits_templates/get_template_benefits/:id', to: 'id_card_benefits_templates#get_template_benefits'
# Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500. # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.
@@ -0,0 +1,5 @@
class AddNetworkProviderToEmployerSetupProcesses < ActiveRecord::Migration[7.0]
def change
add_column :employer_setup_processes, :network_provider, :string
end
end
@@ -0,0 +1,7 @@
class AddNetworkLogoToEmployerSetupProcesses < ActiveRecord::Migration[7.2]
def change
add_column :employer_setup_processes, :network_logo, :string
add_column :employer_setup_processes, :card_template, :string
add_column :employer_setup_processes, :pl_plan_key, :string
end
end
@@ -0,0 +1,6 @@
class RenameLogoFilenameOnEmployerSetupProcesses < ActiveRecord::Migration[7.2]
def change
rename_column :employer_setup_processes, :logo_filename, :employer_logo
rename_column :employer_setup_processes, :effect_date, :effective_date
end
end
@@ -0,0 +1,12 @@
class CreateNetworkLogos < ActiveRecord::Migration[7.0]
def change
create_table :alternate_network_logos do |t|
t.string :network_logo
t.string :exception_type
t.string :exception_value
t.belongs_to :employer_setup_process, null: false, foreign_key: true
t.timestamps
end
end
end
@@ -0,0 +1,12 @@
class CreateCardLogoFiles < ActiveRecord::Migration[7.2]
def change
create_table :card_logo_files do |t|
t.string :filename
t.string :logo_type
t.binary :image
t.integer :pl_plan_key
t.timestamps
end
end
end
@@ -0,0 +1,5 @@
class AddPlPlanKeyToEmployerSetupProcesses < ActiveRecord::Migration[7.2]
def change
add_column :employer_setup_processes, :pl_plan_key, :string
end
end
@@ -0,0 +1,5 @@
class AddPlanIdToPlan < ActiveRecord::Migration[7.2]
def change
add_column :plans, :plan_id, :integer
end
end
@@ -0,0 +1,5 @@
class AddEmployerSetUpProcessToCardLogoFiles < ActiveRecord::Migration[7.2]
def change
add_reference :card_logo_files, :employer_setup_process, null: false, foreign_key: true
end
end
+107 -3
View File
@@ -10,7 +10,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.2].define(version: 2025_12_02_142512) do ActiveRecord::Schema[7.2].define(version: 2025_12_09_182135) do
create_table "action_text_rich_texts", force: :cascade do |t| create_table "action_text_rich_texts", force: :cascade do |t|
t.string "name", null: false t.string "name", null: false
t.text "body" t.text "body"
@@ -49,16 +49,41 @@ ActiveRecord::Schema[7.2].define(version: 2025_12_02_142512) do
t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true
end end
create_table "alternative_network_logos", force: :cascade do |t|
t.string "network_logo"
t.string "exception_type"
t.string "exception_value"
t.bigint "employer_setup_process_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["employer_setup_process_id"], name: "index_alternative_network_logos_on_employer_setup_process_id"
end
create_table "card_logo_files", force: :cascade do |t|
t.string "filename"
t.string "logo_type"
t.binary "image"
t.integer "pl_plan_key"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.bigint "employer_setup_process_id", null: false
t.index ["employer_setup_process_id"], name: "index_card_logo_files_on_employer_setup_process_id"
end
create_table "employer_setup_processes", force: :cascade do |t| create_table "employer_setup_processes", force: :cascade do |t|
t.string "employer_name" t.string "employer_name"
t.string "group_number" t.string "group_number"
t.string "effect_date" t.string "effective_date"
t.string "logo_filename" t.string "employer_logo"
t.string "form_method" t.string "form_method"
t.string "status" t.string "status"
t.string "current_step" t.string "current_step"
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.string "network_provider"
t.string "network_logo"
t.string "card_template"
t.string "pl_plan_key"
end end
create_table "id_card_benefits", force: :cascade do |t| create_table "id_card_benefits", force: :cascade do |t|
@@ -92,11 +117,90 @@ ActiveRecord::Schema[7.2].define(version: 2025_12_02_142512) do
t.bigint "employer_setup_process_id", null: false t.bigint "employer_setup_process_id", null: false
t.datetime "created_at", null: false t.datetime "created_at", null: false
t.datetime "updated_at", null: false t.datetime "updated_at", null: false
t.integer "plan_id"
t.index ["employer_setup_process_id"], name: "index_plans_on_employer_setup_process_id" t.index ["employer_setup_process_id"], name: "index_plans_on_employer_setup_process_id"
end end
create_table "sample_id_cards", force: :cascade do |t|
t.string "family_id"
t.string "network_image"
t.integer "pl_plan_key"
t.integer "primary_mb_member_key"
t.string "group_number"
t.string "rx_group"
t.string "employer_name"
t.string "full_name"
t.string "medical_eff_date"
t.string "provider_code"
t.string "provider_line_1"
t.string "provider_line_2"
t.string "provider_line_3"
t.string "provider_line_4"
t.string "provider_line_5"
t.string "provider_line_6"
t.string "provider_line_7"
t.string "provider_line_8"
t.string "provider_line_9"
t.string "provider_line_10"
t.string "provider_line_11"
t.string "mail_to"
t.string "claim_to_1"
t.string "claim_to_2"
t.string "claim_to_3"
t.string "claim_to_4"
t.string "claim_to_5"
t.string "claim_to_6"
t.string "claim_to_7"
t.string "claim_to_8"
t.string "claim_to_9"
t.string "claim_to_10"
t.string "claim_to_11"
t.string "customer_service"
t.string "web_url"
t.string "dependent_1"
t.string "dependent_2"
t.string "dependent_3"
t.string "dependent_4"
t.string "dependent_5"
t.string "dependent_6"
t.string "dependent_7"
t.string "dependent_8"
t.string "benefit_desc_1"
t.string "benefit_1"
t.string "benefit_desc_2"
t.string "benefit_2"
t.string "benefit_desc_3"
t.string "benefit_3"
t.string "benefit_desc_4"
t.string "benefit_4"
t.string "benefit_desc_5"
t.string "benefit_5"
t.string "benefit_desc_6"
t.string "benefit_6"
t.string "benefit_desc_7"
t.string "benefit_7"
t.string "benefit_desc_8"
t.string "benefit_8"
t.string "benefit_desc_9"
t.string "benefit_9"
t.string "benefit_desc_10"
t.string "benefit_10"
t.string "benefit_desc_11"
t.string "benefit_11"
t.string "benefit_desc_12"
t.string "benefit_12"
t.string "benefit_desc_13"
t.string "benefit_13"
t.string "benefit_desc_14"
t.string "benefit_14"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id" add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
add_foreign_key "alternative_network_logos", "employer_setup_processes"
add_foreign_key "card_logo_files", "employer_setup_processes"
add_foreign_key "id_card_benefits", "id_card_benefits_templates" add_foreign_key "id_card_benefits", "id_card_benefits_templates"
add_foreign_key "plan_benefits", "plans" add_foreign_key "plan_benefits", "plans"
add_foreign_key "plans", "employer_setup_processes" add_foreign_key "plans", "employer_setup_processes"
+30 -18
View File
@@ -1,20 +1,32 @@
# frozen_string_literal: true benefit_descriptions = ["Primary Visit",
"Specialist Visit",
"Urgent Care",
"INNInd Ded",
"INNFamily Ded",
"OONInd Ded",
"OONFamily Ded",
"Co-Insurance",
"INNInd OOP",
"INNFamily OOP",
"OONInd OOP",
"OONFamily OOP",
"Emergency Room",
"Preventive Care"]
default = IdCardBenefitsTemplate.create(title: "BLANK")
benefit_descriptions.each_with_index do |bene, i|
IdCardBenefit.create(sequence: i + 1, benefit_desc: bene, id_card_benefits_template: default)
end
temp_1 = IdCardBenefitsTemplate.create(title: "Rebekah's Template")
(1..14).each do |seq|
IdCardBenefit.create(sequence: seq, benefit: "greatest hits vol #{seq}", id_card_benefits_template: temp_1)
end
temp_2 = IdCardBenefitsTemplate.create(title: "Jason's Template")
(1..14).each do |seq|
IdCardBenefit.create(sequence: seq, benefit: "#{seq} hit wonder", id_card_benefits_template: temp_2)
end
# This file should ensure the existence of records required to run the application in every environment (production,
# development, test). The code here should be idempotent so that it can be executed at any point in every environment.
# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup).
#
# Example:
#
# ["Action", "Comedy", "Drama", "Horror"].each do |genre_name|
# MovieGenre.find_or_create_by!(name: genre_name)
# end
# Pull one planid, return data, run this
# data.each do |bene|
# IdCardBenefit.create(
# benefit_desc: bene.benefit_desc,
# sequence: bene.sequence,
# id_card_benefits_template: temp
# )
# end
+132
View File
@@ -0,0 +1,132 @@
temp = IdCardBenefitsTemplate.create(title: "Testing Template")
(1..14).each do |bene|
IdCardBenefit.create(sequence: bene, benefit: "value_#{bene}", id_card_benefits_template: temp)
end
3.times do |i|
puts i
end
<div class="text-cobalt bg-bluetang-tinted">co</div>
<div class="text-verdigris bg-atmosphere-tinted">ve</div>
<div class="text-cobalt bg-bluemana-tinted">co</div>
<div class="text-verdigris bg-cobalt-tinted">ve</div>
<div class="text-cobalt bg-copper-tinted">co</div>
<div class="text-verdigris bg-bronze-tinted">ve</div>
<div class="text-cobalt bg-verdigris-tinted">co</div>
<div class="text-verdigris bg-cobalt">ve</div>
<div class="text-cobalt bg-copper">co</div>
<div class="text-verdigris bg-bronze">ve</div>
<div class="text-cobalt bg-verdigris">co</div>
doc = Docx::Document.open('tmp/BRYAN PEST CONTROL ID CARD SET UP REVISION.docx')
data_lines = doc.paragraphs.map { |p| p.to_s.strip }.reject!(&:empty?)
data_lines.each_with_index do |p, i|
if p.to_s.length > 1
puts "-#{i}----------------------------------------------------------"
puts p
end
end
doc.bookmarks.each_pair do |bookmark_name, bookmark_object|
puts bookmark_object.text
end
data_lines.index { |s| s == 'Medical Plan'}
Zip::File.open('tmp/BRYAN PEST CONTROL ID CARD SET UP REVISION.docx') do |zip_file|
zip_file.each do |entry|
if entry.name.start_with?('word/media/') && !entry.directory?
filename = File.basename(entry.name)
image_data = entry.get_input_stream.read
extracted_images << { filename: filename, data: image_data }
end
end
end
Sitation
[8,9,10,15,19,40]
plan 1 [48..62]
plan 2 [65..79]
plan 3 [85..99]
Bryan
group_number
employer_name
effect_date
logo_name
plans:
same as template
process:
{
}
BenefitsWordDocProcessor.new('tmp/BRYAN PEST CONTROL ID CARD SET UP REVISION.docx').call
sample_id_cards
rails g model SampleIdCard family_id:string network_image:string pl_plan_key:integer primary_mb_member_key:integer employer_name:string full_name:string medical_eff_date:string provider_code:string provider_line_1:string provider_line_2:string provider_line_3:string provider_line_4:string provider_line_5:string provider_line_6:string provider_line_7:string provider_line_8:string provider_line_9:string provider_line_10:string provider_line_11:string mail_to:string claim_to_1:string claim_to_2:string claim_to_3:string claim_to_4:string claim_to_5:string claim_to_6:string claim_to_7:string claim_to_8:string claim_to_9:string claim_to_10:string claim_to_11:string group_number:string rx_group:string customer_service:string web_url:string dependent_1:string dependent_2:string dependent_3:string dependent_4:string dependent_5:string dependent_6:string dependent_7:string dependent_8:string benefit_desc_1:string benefit_1:string benefit_desc_2:string benefit_2:string benefit_desc_3:string benefit_3:string benefit_desc_4:string benefit_4:string benefit_desc_5:string benefit_5:string benefit_desc_6:string benefit_6:string benefit_desc_7:string benefit_7:string benefit_desc_8:string benefit_8:string benefit_desc_9:string benefit_9:string benefit_desc_10:string benefit_10:string benefit_desc_11:string benefit_11:string benefit_desc_12:string benefit_12:string benefit_desc_13:string benefit_13:string benefit_desc_14:string benefit_14:string
: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
claim_to
temp = IdCardBenefitsTemplate.first
seed_data = temp.attributes.except("id", "created_at", "updated_at")
seed_data_bene = temp.id_card_benefits.order(:sequence).pluck(:benefit)
IdCardBenefitsTemplate.find()
IdCardBenefitsTemplate.where(id: IdCardBenefitsTemplate.group(:user_id).select('MAX(id)'))
BenefitsWordDocProcessor.new('').call
e_names = EmployerSetupProcess.where.not(employer_name: [nil, ""]).pluck(:employer_name).uniq
substrings_to_remove = ["health plan", "the", "inc", "llc"]
regex = Regexp.union(substrings_to_remove)
trimmed_e_names = e_names.map { |e_name| e_name.downcase.gsub(regex, "").squish }
sql_query = "SELECT PLPlanKey, PlanId, Company FROM PLPlanHeader WHERE PLPlanKey >= 58"
plan_headers = VhcsRecord.connection.select_all(sql_query)
trimmed_e_names.each do |e_name|
match = plan_headers.select { |ph| e_name.downcase.include?(ph["Company"].downcase) || ph["Company"].downcase.include?(e_name.downcase) }
if match.present?
puts match
else
puts "#{e_name} not matched"
end
end
original_string = "How to chop an onion? This is a test string."
substrings_to_remove = ["to", "an", "a", "the"]
# Create a regular expression from the array of substrings,
# using the | (OR) operator to match any of them.
# The `\b` word boundary ensures that "an" in "another" isn't removed.
regex = Regexp.union(substrings_to_remove.map { |s| /\b#{Regexp.escape(s)}\b/ })
# Use gsub with the regular expression to replace all occurrences with an empty string.
cleaned_string = original_string.gsub(regex, '')
@@ -0,0 +1,15 @@
require 'rails_helper'
# Specs in this file have access to a helper object that includes
# the IdCardEmployersHelper. For example:
#
# describe IdCardEmployersHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# expect(helper.concat_strings("this","that")).to eq("this that")
# end
# end
# end
RSpec.describe IdCardEmployersHelper, type: :helper do
pending "add some examples to (or delete) #{__FILE__}"
end
+46
View File
@@ -0,0 +1,46 @@
require 'rails_helper'
RSpec.describe "IdCardEmployers", type: :request do
describe "GET /index" do
it "returns http success" do
get "/id_card_employers/index"
expect(response).to have_http_status(:success)
end
end
describe "GET /show" do
it "returns http success" do
get "/id_card_employers/show"
expect(response).to have_http_status(:success)
end
end
describe "GET /new" do
it "returns http success" do
get "/id_card_employers/new"
expect(response).to have_http_status(:success)
end
end
describe "GET /create" do
it "returns http success" do
get "/id_card_employers/create"
expect(response).to have_http_status(:success)
end
end
describe "GET /edit" do
it "returns http success" do
get "/id_card_employers/edit"
expect(response).to have_http_status(:success)
end
end
describe "GET /update" do
it "returns http success" do
get "/id_card_employers/update"
expect(response).to have_http_status(:success)
end
end
end
@@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe "id_card_employers/create.html.tailwindcss", type: :view do
pending "add some examples to (or delete) #{__FILE__}"
end
@@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe "id_card_employers/edit.html.tailwindcss", type: :view do
pending "add some examples to (or delete) #{__FILE__}"
end
@@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe "id_card_employers/index.html.tailwindcss", type: :view do
pending "add some examples to (or delete) #{__FILE__}"
end
@@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe "id_card_employers/new.html.tailwindcss", type: :view do
pending "add some examples to (or delete) #{__FILE__}"
end
@@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe "id_card_employers/show.html.tailwindcss", type: :view do
pending "add some examples to (or delete) #{__FILE__}"
end
@@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe "id_card_employers/update.html.tailwindcss", type: :view do
pending "add some examples to (or delete) #{__FILE__}"
end