Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rcno dental policies must use aptc_credit premiums from proper spans for subscriber segment total premium amounts #106

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions app/operations/reports/generate_rcno_report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -606,14 +606,8 @@ def total_premium_amount
# unprocessed policy
if @overall_flag == "G"
segment = fetch_segment(@member.coverage_start)
kind = @policy.insurance_line_code == "HLT" ? "health" : "dental"
premium_amount = if kind == "dental"
@policy.total_premium_amount
else
segment&.total_premium_amount
end
unprocessed_total_premium = begin
format('%.2f', premium_amount)
format('%.2f', segment&.total_premium_amount)
rescue StandardError
"0.00"
end
Expand All @@ -623,12 +617,7 @@ def total_premium_amount
@overall_flag = "N"
return [nil, @rcni_row[45], "D"]
end
kind = @policy.insurance_line_code == "HLT" ? "health" : "dental"
premium_amount = if kind == "dental"
@policy.total_premium_amount
else
segment&.total_premium_amount
end
premium_amount = segment&.total_premium_amount
@total_premium_amount += premium_amount
ffm_total_premium = begin
format('%.2f', premium_amount)
Expand Down