class Sunnyside::ClaimEOP
Attributes
claim[R]
claim_row[R]
opts[R]
pdf[R]
post_date[R]
services[R]
Public Class Methods
new(claim, post_date, pdf, paid, billed)
click to toggle source
# File lib/sunnyside/reports/pdf_report.rb, line 88 def initialize(claim, post_date, pdf, paid, billed) @claim = claim @claim_row = [claim.invoice_id, 'Date', Client[claim.client_id].client_name, 'Units', currency(billed), currency(paid), claim.control_number] @post_date = post_date @pdf = pdf @services = Service.where(claim_id: claim.id).all.map { |svc| ['', svc.dos, svc.service_code, svc.units, currency(svc.paid), currency(svc.billed), svc.denial_reason] } @opts = { :column_widths => [85, 75, 75, 75, 75, 145], :cell_style => {:align => :center, :overflow => :shrink_to_fit, :size => 12, :height => 30 } } end
Public Instance Methods
create_block()
click to toggle source
# File lib/sunnyside/reports/pdf_report.rb, line 97 def create_block pdf.table([claim_row], opts) pdf.move_down 10 pdf.table(services, opts) end
currency(amt)
click to toggle source
# File lib/sunnyside/reports/pdf_report.rb, line 103 def currency(amt) Money.new(amt*100, 'USD').format end