Skip to content

Commit

Permalink
rename issuer name on 1095A forms as approved by ME
Browse files Browse the repository at this point in the history
  • Loading branch information
saipraveen18 committed Dec 4, 2023
1 parent 5137c5f commit f9c03a2
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
11 changes: 10 additions & 1 deletion app/models/irs_yearly_pdf_report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def fill_subscriber_details
end

bounding_box([col3, y_pos], :width => 250) do
text(@insurance_agreement[:insurance_provider][:title])
text(fetch_insurance_provider_title(@insurance_agreement[:insurance_provider][:title]))
end

move_down(12)
Expand Down Expand Up @@ -194,6 +194,15 @@ def fill_subscriber_details
end
# rubocop:enable Metrics/AbcSize

def fetch_insurance_provider_title(title)
{
"Anthem Blue Cross and Blue Shield" => "Anthem Health Plans of Maine Inc",
"Harvard Pilgrim Health Care" => "Harvard Pilgrim Health Care Inc",
"Community Health Options" => "Maine Community Health Options",
"Taro Health" => "Taro Health Plan of Maine Inc"
}[title] || title
end

# rubocop:disable Metrics/CyclomaticComplexity
def fill_premium_details
col1 = mm2pt(36.50)
Expand Down
16 changes: 16 additions & 0 deletions spec/models/irs_yearly_pdf_report_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,21 @@
reporting_year = insurance_agreement[:plan_year].to_i
expect(File.exist?("#{Rails.root}/lib/pdf_templates/#{reporting_year}_1095A_form.pdf")).to eq true
end

context "#fetch_insurance_provider_title" do
context "when insurance_provider is Community health options" do
let(:provider_title) { "Community Health Options" }
it "returns correct title for insurance_provider" do
params = { tax_household: tax_household,
recipient: recipient,
insurance_policy: insurance_policy,
insurance_agreement: insurance_agreement,
included_hbx_ids: included_hbx_ids }
irs_yearly_pdf_report = IrsYearlyPdfReport.new(params)
result = irs_yearly_pdf_report.fetch_insurance_provider_title(provider_title)
expect(result).to eq("Maine Community Health Options")
end
end
end
end
end
4 changes: 3 additions & 1 deletion spec/shared_examples/enrollments/family_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

let(:current_date) { Date.today }

let(:provider_title) { "Community Health Options" }

let(:family_hash) do
{
:documents_needed => true,
Expand Down Expand Up @@ -344,7 +346,7 @@

let(:insurance_provider) do
{
title: "MAINE COMMUNITY HEALTH OPTIONS",
title: provider_title,
hios_id: "123456",
fein: "311705652",
insurance_products: [insurance_product]
Expand Down

0 comments on commit f9c03a2

Please sign in to comment.