Class: ChangeHealth::Response::Claim::Report835ServiceLine

Inherits:
Hashie::Trash
  • Object
show all
Defined in:
lib/change_health/response/claim/report/report_835_service_line.rb

Instance Method Summary collapse

Instance Method Details

#create_adjustment_detail_arrayObject



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

def create_adjustment_detail_array
  service_adjustments&.map do |service_adjustments|
    create_group_adjustments(service_adjustments)
  end || []
end

#create_group_adjustments(service_adjustments) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/change_health/response/claim/report/report_835_service_line.rb', line 12

def create_group_adjustments(service_adjustments)
  adjustment_array = service_adjustments[:adjustments].map do |key, value|
    {
      adjustmentReasonCode: key,
      adjustmentAmount: value
    }
  end
  {
    adjustmentDetails: adjustment_array,
    adjustmentGroupCode: service_adjustments[:claim_adjustment_group_code]
  }
end