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 Epic CPT Code #1711

Merged
merged 1 commit into from
Feb 14, 2019
Merged
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
12 changes: 10 additions & 2 deletions app/models/arm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,17 @@ def name=(name)
def display_line_items_visits(use_epic, display_all_services)
if use_epic
# only show the services that are set to be pushed to Epic
display_all_services ? line_items_visits.joins(:service).where(services: {send_to_epic: true}) : line_items_visits.joins(:service).where(services: {send_to_epic: true}).joins(:visits).where.not( "research_billing_qty = 0 and insurance_billing_qty = 0 and effort_billing_qty = 0" ).uniq
if display_all_services
self.line_items_visits.joins(:service).where.not(services: { cpt_code: [nil, ''] })
else
self.line_items_visits.joins(:service, :visits).where.not(services: { cpt_code: [nil, ''] }, visits: { research_billing_qty: 0, insurance_billing_qty: 0, effort_billing_qty: 0 }).distinct
end
else
display_all_services ? line_items_visits : line_items_visits.joins(:visits).where.not( "research_billing_qty = 0 and insurance_billing_qty = 0 and effort_billing_qty = 0" ).uniq
if display_all_services
self.line_items_visits
else
self.line_items_visits.joins(:visits).where.not(visits: { research_billing_qty: 0, insurance_billing_qty: 0, effort_billing_qty: 0 }).distinct
end
end
end

Expand Down