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 +4 -4
- data/README.md +20 -20
- data/lib/era_835_parser/parser.rb +9 -5
- data/lib/era_835_parser/version.rb +1 -1
- data/spec/era_835_parser_spec.rb +3 -2
- data/spec/test_era.txt +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb3083bcfb5f401e5ea3767085314097eb6b8b665d393af4cc0afa48544713d3
|
4
|
+
data.tar.gz: 81a5ce84e43692f104ba56902710272c4033b496becac36342f8277afd3860fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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,
|
36
|
-
puts
|
37
|
-
puts
|
38
|
-
puts
|
39
|
-
puts
|
40
|
-
puts
|
41
|
-
puts
|
42
|
-
puts
|
43
|
-
puts
|
44
|
-
puts
|
45
|
-
puts
|
46
|
-
puts
|
47
|
-
puts
|
48
|
-
puts
|
49
|
-
puts
|
50
|
-
puts
|
51
|
-
puts
|
52
|
-
puts
|
53
|
-
puts
|
54
|
-
|
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
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
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
|
data/spec/era_835_parser_spec.rb
CHANGED
@@ -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
|
-
|
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('
|
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
|
-
|
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
|