Class: ChangeHealth::Response::Claim::Report277Claim

Inherits:
ReportClaim
  • Object
show all
Defined in:
lib/change_health/response/claim/report/report_277_claim.rb

Instance Method Summary collapse

Instance Method Details

#add_info_claim_status(info_claim_status) ⇒ Object



12
13
14
15
# File 'lib/change_health/response/claim/report/report_277_claim.rb', line 12

def add_info_claim_status(info_claim_status)
  self[:info_claim_statuses] ||= []
  self[:info_claim_statuses] << info_claim_status
end

#add_procedure_code(procedure_code) ⇒ Object



17
18
19
20
# File 'lib/change_health/response/claim/report/report_277_claim.rb', line 17

def add_procedure_code(procedure_code)
  self[:procedure_codes] ||= []
  self[:procedure_codes] << procedure_code
end

#latest_info_claim_statusObject



34
35
36
37
38
39
40
# File 'lib/change_health/response/claim/report/report_277_claim.rb', line 34

def latest_info_claim_status
  info_claim_statuses&.select do |info|
    !info.status_information_effective_date.nil? &&
      info.status_information_effective_date.is_a?(Date) &&
      info.status_information_effective_date <= Date.today
  end&.max_by(&:status_information_effective_date)
end

#latest_status_category_codesObject



22
23
24
# File 'lib/change_health/response/claim/report/report_277_claim.rb', line 22

def latest_status_category_codes
  latest_info_claim_status&.status_category_codes
end

#latest_status_info_effective_dateObject



30
31
32
# File 'lib/change_health/response/claim/report/report_277_claim.rb', line 30

def latest_status_info_effective_date
  latest_info_claim_status&.status_information_effective_date
end

#total_charge_amountObject



26
27
28
# File 'lib/change_health/response/claim/report/report_277_claim.rb', line 26

def total_charge_amount
  latest_info_claim_status&.total_charge_amount
end