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

KG - Coverage Analysis Report CPT Code #1829

Merged
merged 1 commit into from
Apr 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/helpers/dashboard/sub_service_requests_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ def full_ssr_id(ssr)
end
end

def display_line_items_otf(use_epic, lis)
def display_line_items_otf(lis)
# only show the services that are set to be pushed to Epic when use_epic = true
if use_epic
lis.select{ |li| Service.find(li.service_id).send_to_epic }
if Setting.get_value('use_epic')
lis.select{ |li| li.service.cpt_code.present? }
else
lis
end
Expand Down
4 changes: 2 additions & 2 deletions app/models/arm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ def name=(name)
write_attribute(:name, name.squish)
end

def display_line_items_visits(use_epic, display_all_services)
if use_epic
def display_line_items_visits(display_all_services)
if Setting.get_value('use_epic')
# only show the services that are set to be pushed to Epic
if display_all_services
self.line_items_visits.joins(:service).where.not(services: { cpt_code: [nil, ''] })
Expand Down
12 changes: 6 additions & 6 deletions app/views/service_requests/coverage_analysis.xlsx.axlsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ wb.add_worksheet(name: "Review") do |sheet|
sheet.add_row(r_t_row, :style => styles_array)

@service_list_false.each do |key, value|
line_items_visits = arm.display_line_items_visits(Setting.get_value('use_epic'), @display_all_services)
line_items_visits = arm.display_line_items_visits(@display_all_services)

#Only show value[:name] when it hasn't been filtered out by the above line
if (value[:line_items].map(&:id) & line_items_visits.map(&:line_item_id) ).present?
Expand All @@ -164,7 +164,7 @@ wb.add_worksheet(name: "Review") do |sheet|
next if value[:line_items].exclude?(line_item)

totals_hash = line_items_visit.try(:per_subject_rt_indicated)
service_row = [line_item.service.name, line_item.service.cpt_code, line_item.service.order_code]
service_row = [line_item.service.name, "=\"#{line_item.service.cpt_code}\"", line_item.service.order_code]

if line_items_visit.notes.empty?
service_row += [""]
Expand Down Expand Up @@ -207,8 +207,8 @@ wb.add_worksheet(name: "Review") do |sheet|
end
############ end of arms.each

services_row = ["Selected Services"]
services_row += [""] * (visit_count * 2 + 4)
services_row = ["Selected Services", "CPT Code"]
services_row += [""] * (visit_count * 2 + 3)

services_row = sheet.add_row services_row, :style => header_style
merge_services_row << services_row
Expand All @@ -218,13 +218,13 @@ wb.add_worksheet(name: "Review") do |sheet|
services_sub_header_rows << sheet.add_row(['Other Services'], :style => name_header_style)

@service_list_true.each do |key, value|
line_items = display_line_items_otf(Setting.get_value('use_epic'), value[:line_items])
line_items = display_line_items_otf(value[:line_items])
next if line_items.empty?

services_sub_header_rows << sheet.add_row([value[:name]], :style => sub_header_style)

line_items.each do |line_item|
service_row = [line_item.service.name, "", "", ""]
service_row = [line_item.service.name, "=\"#{line_item.service.cpt_code}\"", "", ""]
line_item_total = display_one_time_fee_direct_cost(line_item)

if !@service_list_true.empty? && !@service_list_false.empty?
Expand Down