era_835_parser 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b8165088acaa6a3976f256236ae0e13a74b9e5b671095caf6be5b08d14af1da
4
- data.tar.gz: fd280dae00dcf64a92985c864d4b4f54500e2c2f68d370836d233691405d92e5
3
+ metadata.gz: bb3083bcfb5f401e5ea3767085314097eb6b8b665d393af4cc0afa48544713d3
4
+ data.tar.gz: 81a5ce84e43692f104ba56902710272c4033b496becac36342f8277afd3860fa
5
5
  SHA512:
6
- metadata.gz: f64e0ff363d2c7b0ad67f97305f17ae591796b5f8729c472478476d4d0af8a44a7268280917bb4730a59b1203452d4c9ca37075898f9ed4d425993ccae374bf5
7
- data.tar.gz: e2246dcdaa68f1984ee6031170b45ff4054723d490d4b84361dac8eed0ddbba0693e6f547c5bf101624db7bca6dc633c29d0a975f072adf7fb410a411971b51b
6
+ metadata.gz: 2699ae2cc3b4f0d1da9e8fa94e800a94175376376937db12e9ace64e946c71cfc53bb0afdd1dcbdf117fc318de2a3084815999511600d36e77991e2011cb1b1f
7
+ data.tar.gz: e305d65968d24ee8597ebef67b497212739e665813092d2659f0dc04938f1eee0d4568da474c786fcfa54b18f4abe9fda5275b908a87e39621246abb9839fbff
data/README.md CHANGED
@@ -32,26 +32,26 @@ era[:checks].each do |check_number, check|
32
32
  puts check[:npi_tax_id] # NPI or Tax ID of payee
33
33
  puts check[:payee] # Check payee
34
34
  puts check[:date] # Check date (string mm/dd/yyyy)
35
- check[:eras].each do |era_counter, era|
36
- puts era[:era_text] # ERA text
37
- puts era[:patient_id] # Patient ID
38
- puts era[:patient_name] # Patient name
39
- puts era[:patient_last_name] # Patient last name (titlized)
40
- puts era[:patient_first_name] # Patient first name (titlized)
41
- puts era[:charge_amount] # Total charge amount (integer)
42
- puts era[:payment_amount] # Total payment amount (integer)
43
- puts era[:account_number] # Account number
44
- puts era[:status] # Status
45
- puts era[:payer_name] # Payer name
46
- puts era[:payer_address] # Payer address
47
- puts era[:payer_city] # Payer city
48
- puts era[:payer_state] # Payer state
49
- puts era[:payer_zip_code] # Payer zip code
50
- puts era[:payer_tax_id] # Payer tax id
51
- puts era[:payer_claim_control_number] # Payer claim control number
52
- puts era[:claim_statement_period_start] # Claim statement period start
53
- puts era[:claim_statement_period_end] # Claim statement period end
54
- era[:line_items].each do |line_item_counter, line_item|
35
+ check[:eras].each do |era_counter, individual_era|
36
+ puts individual_era[:era_text] # ERA text
37
+ puts individual_era[:patient_id] # Patient ID
38
+ puts individual_era[:patient_name] # Patient name
39
+ puts individual_era[:patient_last_name] # Patient last name (titlized)
40
+ puts individual_era[:patient_first_name] # Patient first name (titlized)
41
+ puts individual_era[:charge_amount] # Total charge amount (integer)
42
+ puts individual_era[:payment_amount] # Total payment amount (integer)
43
+ puts individual_era[:account_number] # Account number
44
+ puts individual_era[:status] # Status
45
+ puts individual_era[:payer_name] # Payer name
46
+ puts individual_era[:payer_address] # Payer address
47
+ puts individual_era[:payer_city] # Payer city
48
+ puts individual_era[:payer_state] # Payer state
49
+ puts individual_era[:payer_zip_code] # Payer zip code
50
+ puts individual_era[:payer_tax_id] # Payer tax id
51
+ puts individual_era[:payer_claim_control_number] # Payer claim control number
52
+ puts individual_era[:claim_statement_period_start] # Claim statement period start
53
+ puts individual_era[:claim_statement_period_end] # Claim statement period end
54
+ individual_era[:line_items].each do |line_item_counter, line_item|
55
55
  puts line_item[:service_date] # Date of service (string mm/dd/yyyy)
56
56
  puts line_item[:cpt_code] # CPT code
57
57
  puts line_item[:charge_amount] # Charge amount (integer)
@@ -137,11 +137,15 @@ module Era835Parser
137
137
  end
138
138
 
139
139
  if next_line_city
140
- individual_era[:payer_city] = line.strip.split(",")[0].strip
141
- individual_era[:payer_state] = line.strip.split(",")[1].split(" ")[0].strip
142
- individual_era[:payer_zip_code] = line.strip.split(",")[1].split(" ")[1].strip
143
- next_line_city = false
144
- next_line_tax_id = true
140
+ if line.include?(",")
141
+ individual_era[:payer_city] = line.strip.split(",")[0].strip
142
+ individual_era[:payer_state] = line.strip.split(",")[1].split(" ")[0].strip
143
+ individual_era[:payer_zip_code] = line.strip.split(",")[1].split(" ")[1].strip
144
+ next_line_city = false
145
+ next_line_tax_id = true
146
+ else
147
+ individual_era[:payer_address] = individual_era[:payer_address] + " " + line.strip
148
+ end
145
149
  end
146
150
 
147
151
  if next_line_address
@@ -1,3 +1,3 @@
1
1
  module Era835Parser
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -80,7 +80,8 @@ RSpec.describe Era835Parser::Parser do
80
80
  --------------------------------------------------------------------------------------------------------------------------------------------------------
81
81
  Check# Patient ID Last,First Charge Amt Payment Amt Accnt# Status Payer
82
82
  201812215555555555 M11111110 DOE JR,DAVIS 65.00 48.80 1112 PROCESSED AS PRIMARY ABC HEALTHCARE EAST
83
- ONE CIRCLE RD
83
+ SERVICE CENTER
84
+ PO BOX 12234
84
85
  SOMEWHERE,GA 11111
85
86
  Tax ID: 11-1111110
86
87
  Payer Claim Control Number: 111111111000
@@ -121,7 +122,7 @@ Check# Patient ID Last,First Charge Amt
121
122
  expect(@era[:checks]['201812215555555555'][:eras][0][:payer_name]).to eq('ABC HEALTHCARE EAST')
122
123
  end
123
124
  it 'returns the Payer address' do
124
- expect(@era[:checks]['201812215555555555'][:eras][0][:payer_address]).to eq('ONE CIRCLE RD')
125
+ expect(@era[:checks]['201812215555555555'][:eras][0][:payer_address]).to eq('SERVICE CENTER PO BOX 12234')
125
126
  end
126
127
  it 'returns the Payer city' do
127
128
  expect(@era[:checks]['201812215555555555'][:eras][0][:payer_city]).to eq('SOMEWHERE')
data/spec/test_era.txt CHANGED
@@ -26,7 +26,8 @@ Check# Amount # Claims NPI or Tax ID
26
26
  --------------------------------------------------------------------------------------------------------------------------------------------------------
27
27
  Check# Patient ID Last,First Charge Amt Payment Amt Accnt# Status Payer
28
28
  201812215555555555 M11111110 DOE JR,DAVIS 65.00 48.80 1112 PROCESSED AS PRIMARY ABC HEALTHCARE EAST
29
- ONE CIRCLE RD
29
+ SERVICE CENTER
30
+ PO BOX 12234
30
31
  SOMEWHERE,GA 11111
31
32
  Tax ID: 11-1111110
32
33
  Payer Claim Control Number: 111111111000
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: era_835_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin S. Dias