era_835_parser 0.0.4 → 0.0.5

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: bb3083bcfb5f401e5ea3767085314097eb6b8b665d393af4cc0afa48544713d3
4
- data.tar.gz: 81a5ce84e43692f104ba56902710272c4033b496becac36342f8277afd3860fa
3
+ metadata.gz: ab44ebad1412d62fad23183836733396b192dc70012ce30076070941899e7236
4
+ data.tar.gz: 67dcf7c109bc282fda67f2a497bb5b40251262b6e8f29c0588b4f14b1cc77f94
5
5
  SHA512:
6
- metadata.gz: 2699ae2cc3b4f0d1da9e8fa94e800a94175376376937db12e9ace64e946c71cfc53bb0afdd1dcbdf117fc318de2a3084815999511600d36e77991e2011cb1b1f
7
- data.tar.gz: e305d65968d24ee8597ebef67b497212739e665813092d2659f0dc04938f1eee0d4568da474c786fcfa54b18f4abe9fda5275b908a87e39621246abb9839fbff
6
+ metadata.gz: 643c5464b9f0b171cdb812632fc7116ab9689a6cedd83486e243f7e5a7c7bac76114959d8e401b46bbdf4a7b415bdeebdcf54c6abe91c9822b09197c5908f6bf
7
+ data.tar.gz: 11527e47a131331d86893e2a37e57994a0a222393aa64f3025eb2a1f615c98da1df53b84bbc56c33641c0716a15be3b3dcb90a9aeddf0db9b2cb3858233fc779
data/README.md CHANGED
@@ -68,7 +68,7 @@ era[:checks].each do |check_number, check|
68
68
  end
69
69
 
70
70
  # View any adjustments
71
- era[:adjustments].each do |adjustment|
71
+ era[:adjustments].each do |adjustment_counter, adjustment|
72
72
  puts adjustment[:adjustment_date] # Adjustment date (string mm/dd/yyyy)
73
73
  puts adjustment[:provider_id] # Provider ID
74
74
  puts adjustment[:reference_id] # Reference ID
@@ -47,9 +47,9 @@ module Era835Parser
47
47
  adjustment = Hash.new
48
48
  adjustment[:adjustment_date] = /\d+\/\d+\/\d+/.match(line)[0].strip if !/\d+\/\d+\/\d+/.match(line).nil?
49
49
  adjustment[:provider_id] = /\d+\/\d+\/\d+\s+\d+\s+[^\s]+/.match(line)[0].split(" ")[1].strip if !/\d+\/\d+\/\d+\s+\d+\s+[^\s]+/.match(line).nil?
50
- adjustment[:reference_id] = /\d+\/\d+\/\d+\s+\d+\s+[^\s]+/.match(line)[0].split(" ")[2].strip if !/\d+\/\d+\/\d+\s+\d+\s+[^\s]+/.match(line).nil?
51
- adjustment[:adjustment_amount] = (/\d+\/\d+\/\d+\s+\d+\s+[^\s]+\s+[\-\d\.]+/.match(line)[0].split(" ")[3].strip.to_f * 100).to_i if !/\d+\/\d+\/\d+\s+\d+\s+[^\s]+\s+[\-\d\.]+/.match(line).nil?
52
- adjustment[:reason] = line.gsub(/\d+\/\d+\/\d+\s+\d+\s+[^\s]+\s+[\-\d\.]+/, "").strip
50
+ adjustment[:reference_id] = /\d+\/\d+\/\d+\s+[^\.]+/.match(line)[0].split(" ").each_with_index.map { |x,i| (/\d+\/\d+\/\d+\s+[^\.]+/.match(line)[0].split(" ").count - 1) > i && i > 1 ? x.strip : '' }.join(" ").strip if !/\d+\/\d+\/\d+\s+[^\.]+/.match(line).nil?
51
+ adjustment[:adjustment_amount] = (/\d+\/\d+\/\d+\s+[^\.]+\.\d+/.match(line)[0].split(" ")[-1].strip.to_f * 100).to_i if !/\d+\/\d+\/\d+\s+[^\.]+\.\d+/.match(line).nil?
52
+ adjustment[:reason] = line.gsub(/\d+\/\d+\/\d+\s+[^\.]+\.\d+/, "").strip
53
53
  adjustments[adjustment_counter] = adjustment
54
54
  adjustment_counter += 1
55
55
  end
@@ -1,3 +1,3 @@
1
1
  module Era835Parser
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -701,7 +701,7 @@ Check# Patient ID Last,First Charge Amt
701
701
  expect(@era[:adjustments][1][:provider_id]).to eq('1111111112')
702
702
  end
703
703
  it 'returns Reference ID' do
704
- expect(@era[:adjustments][1][:reference_id]).to eq('BBBBBBVP31M1')
704
+ expect(@era[:adjustments][1][:reference_id]).to eq('20170514 1710101112 06')
705
705
  end
706
706
  it 'returns Adjustment amount (integer)' do
707
707
  expect(@era[:adjustments][1][:adjustment_amount]).to eq(-3344)
@@ -12,7 +12,7 @@ Your Claims have been adjudicated by the Payer. Electronic Payment / Advise info
12
12
  Adjustment Date Provider ID Reference ID Adjustment Amt Reason
13
13
  ========================================================================================================================================================
14
14
  12/30/2018 1111111111 BBBBBBVP31M0 -42.81 Overpayment Recover
15
- 12/31/2018 1111111112 BBBBBBVP31M1 -33.44 Overpayment Recover
15
+ 12/31/2018 1111111112 20170514 1710101112 06 -33.44 Overpayment Recover
16
16
  12/30/2018 1111111113 BBBBBBVP31M2 33.45 Overpayment Recover
17
17
  ========================================================================================================================================================
18
18
 
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.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin S. Dias