era_835_parser 0.1.9 → 0.1.10

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: 5b3817227f96a56601ede81601779419d30a6b0f420446539fcf595de56bb398
4
- data.tar.gz: '08b6b465d3fa6a3ffc988b71d2e111cf379a105f4fc8b8c9dc7e9ef974c739c4'
3
+ metadata.gz: 1b394c2e2133a067275fc162829b81b1e2a2a6b7794c3263796f7bc307560b24
4
+ data.tar.gz: 050a54cc12e40d5d302fb90d978c2da811271a32c97248e019961ca5795a059d
5
5
  SHA512:
6
- metadata.gz: ceaaeddc9a0c5946349115f9ffba772e083aaf6888ee0e76bb861eef460510822b110dbcdf72109ea9746a0e607148db0dc74720eb8bd2afa8066cc694bdd8f1
7
- data.tar.gz: e0646f75463ea9582022c466b257f0bf2838ab998d9b9be44c9af08c9ac2f0cb14347db84700ce893594fa64be7329c5fef3fc383f7913fdecc0d27e9da0eee6
6
+ metadata.gz: 74ba8ed4f544b671ffa85bb88e9557b3a36bef85563cf5a4b6644e3167417705ed0bdc4c676614836081754dbb4f6845c75f4af6950d9ce3a6b4d067eaf096b0
7
+ data.tar.gz: 1e1f44f0771c48278b527168fe706d60178f17f4ca84e1fd74b81eb01f2aba68b27fcc59da197b1147e09fd795f9a8918ac9c268b11ba333987effc78cc70e9e
data/README.md CHANGED
@@ -66,6 +66,7 @@ if !era[:checks].nil?
66
66
  puts line_item[:total_adjustment_amount] # Total adjustment amount (integer)
67
67
  puts line_item[:remark_code] # Remark code
68
68
  puts line_item[:remarks] # Remarks
69
+ puts line_item[:reference_number] # Reference number
69
70
  if !line_item[:adjustment_groups].nil?
70
71
  line_item[:adjustment_groups].each do |adjustment_group_counter, adjustment_group|
71
72
  puts adjustment_group[:adjustment_group] # Adjustment group
@@ -66,6 +66,7 @@ module Era835Parser
66
66
  claim_date_end = false
67
67
  service_date = false
68
68
  floating_adjustment_group_code = nil
69
+ returned_reference_number = false
69
70
 
70
71
  file_or_file_path = !file.nil? ? file : file_path
71
72
  opened_file = file_or_file_path.respond_to?(:write) ? file_or_file_path : open(file_or_file_path)
@@ -294,7 +295,6 @@ module Era835Parser
294
295
  # puts element_type
295
296
  # puts subline
296
297
  # https://www.healthpartnersplans.com/media/100017241/254_Electronic-Remittance-Advice.pdf
297
-
298
298
  subline.split("*").each_with_index do |element, index|
299
299
  case element_type
300
300
  when "ST"
@@ -457,15 +457,6 @@ module Era835Parser
457
457
  # Originating Company Supplemental Code
458
458
  # puts "Originating Company Supplemental Code: #{element}"
459
459
  end
460
- when "REF"
461
- case index
462
- when 1
463
- # Receiver Identification Number
464
- # puts "Receiver Identification Number: #{element}"
465
- when 2
466
- # Receiver REFERENCE IDENTIFICATION
467
- # puts "Receiver REFERENCE IDENTIFICATION: #{element}"
468
- end
469
460
  when "N1"
470
461
  if !payer_identification_loop && !payee_identification_loop
471
462
  payer_identification_loop = true
@@ -562,21 +553,6 @@ module Era835Parser
562
553
  payee_identification_loop = true
563
554
  end
564
555
  end
565
- when "REF"
566
- case index
567
- when 1
568
- # Additional Payee Identification Qualifier
569
- # puts "Additional Payee Identification Qualifier: #{element}"
570
- when 2
571
- # Reference Identification Code
572
- # puts "Reference Identification Code: #{element}"
573
- when 3
574
- # Additional Payee Identification Qualifier
575
- # puts "Additional Payee Identification Qualifier: #{element}"
576
- when 4
577
- # Reference Identification Code
578
- # puts "Reference Identification Code: #{element}"
579
- end
580
556
  when "PER"
581
557
  case index
582
558
  when 1
@@ -980,6 +956,26 @@ module Era835Parser
980
956
  # Original Units of Service Count
981
957
  # puts "Original Units of Service Count: #{element}"
982
958
  end
959
+ when "REF"
960
+ case index
961
+ when 1
962
+ # Additional Payee Identification Qualifier
963
+ # puts "Additional Payee Identification Qualifier: #{element}"
964
+ returned_reference_number = true if element == '6R'
965
+ when 2
966
+ # Reference Identification Code
967
+ # puts "Reference Identification Code: #{element}"
968
+ if individual_line_item != {} && svc_counter >= 1 && returned_reference_number && !element.nil?
969
+ individual_line_item[:reference_number] = element
970
+ returned_reference_number = false
971
+ end
972
+ when 3
973
+ # Additional Payee Identification Qualifier
974
+ # puts "Additional Payee Identification Qualifier: #{element}"
975
+ when 4
976
+ # Reference Identification Code
977
+ # puts "Reference Identification Code: #{element}"
978
+ end
983
979
  end
984
980
  era[:checks] = checks
985
981
  end
@@ -1,3 +1,3 @@
1
1
  module Era835Parser
2
- VERSION = "0.1.9"
2
+ VERSION = "0.1.10"
3
3
  end
@@ -128,6 +128,9 @@ RSpec.describe Era835Parser::Parser do
128
128
  it 'returns the Remarks' do
129
129
  expect(@era[:checks]['70408535'][:eras][0][:line_items][0][:remarks]).to eq(nil)
130
130
  end
131
+ it 'returns the Reference number' do
132
+ expect(@era[:checks]['70408535'][:eras][0][:line_items][0][:reference_number]).to eq(nil)
133
+ end
131
134
  context 'Adjustment group #0' do
132
135
  it 'returns the Adjustment group' do
133
136
  expect(@era[:checks]['70408535'][:eras][0][:line_items][0][:adjustment_groups][0][:adjustment_group]).to eq("Contractual Obligation")
@@ -279,6 +282,9 @@ RSpec.describe Era835Parser::Parser do
279
282
  it 'returns the Remarks' do
280
283
  expect(@era[:checks]['02790758'][:eras][0][:line_items][0][:remarks]).to eq(nil)
281
284
  end
285
+ it 'returns the Reference number' do
286
+ expect(@era[:checks]['02790758'][:eras][0][:line_items][0][:reference_number]).to eq('0001')
287
+ end
282
288
  context 'Adjustment group #0' do
283
289
  it 'returns the Adjustment group' do
284
290
  expect(@era[:checks]['02790758'][:eras][0][:line_items][0][:adjustment_groups][0][:adjustment_group]).to eq("Contractual Obligation")
@@ -336,6 +342,9 @@ RSpec.describe Era835Parser::Parser do
336
342
  it 'returns the Remarks' do
337
343
  expect(@era[:checks]['02790758'][:eras][0][:line_items][1][:remarks]).to eq(nil)
338
344
  end
345
+ it 'returns the Reference number' do
346
+ expect(@era[:checks]['02790758'][:eras][0][:line_items][1][:reference_number]).to eq('0002')
347
+ end
339
348
  context 'Adjustment group #0' do
340
349
  it 'returns the Adjustment group' do
341
350
  expect(@era[:checks]['02790758'][:eras][0][:line_items][1][:adjustment_groups][0][:adjustment_group]).to eq("Patient Responsibility")
@@ -376,6 +385,9 @@ RSpec.describe Era835Parser::Parser do
376
385
  it 'returns the Remarks' do
377
386
  expect(@era[:checks]['02790758'][:eras][0][:line_items][2][:remarks]).to eq(nil)
378
387
  end
388
+ it 'returns the Reference number' do
389
+ expect(@era[:checks]['02790758'][:eras][0][:line_items][2][:reference_number]).to eq('0003')
390
+ end
379
391
  end
380
392
  end
381
393
  end
@@ -510,6 +522,9 @@ RSpec.describe Era835Parser::Parser do
510
522
  it 'returns the Remarks' do
511
523
  expect(@era[:checks]['02790758'][:eras][0][:line_items][0][:remarks]).to eq(nil)
512
524
  end
525
+ it 'returns the Reference number' do
526
+ expect(@era[:checks]['02790758'][:eras][0][:line_items][0][:reference_number]).to eq('0001')
527
+ end
513
528
  context 'Adjustment group #0' do
514
529
  it 'returns the Adjustment group' do
515
530
  expect(@era[:checks]['02790758'][:eras][0][:line_items][0][:adjustment_groups][0][:adjustment_group]).to eq("Contractual Obligation")
@@ -567,6 +582,9 @@ RSpec.describe Era835Parser::Parser do
567
582
  it 'returns the Remarks' do
568
583
  expect(@era[:checks]['02790758'][:eras][0][:line_items][1][:remarks]).to eq(nil)
569
584
  end
585
+ it 'returns the Reference number' do
586
+ expect(@era[:checks]['02790758'][:eras][0][:line_items][1][:reference_number]).to eq('0002')
587
+ end
570
588
  context 'Adjustment group #0' do
571
589
  it 'returns the Adjustment group' do
572
590
  expect(@era[:checks]['02790758'][:eras][0][:line_items][1][:adjustment_groups][0][:adjustment_group]).to eq("Patient Responsibility")
@@ -607,6 +625,9 @@ RSpec.describe Era835Parser::Parser do
607
625
  it 'returns the Remarks' do
608
626
  expect(@era[:checks]['02790758'][:eras][0][:line_items][2][:remarks]).to eq(nil)
609
627
  end
628
+ it 'returns the Reference number' do
629
+ expect(@era[:checks]['02790758'][:eras][0][:line_items][2][:reference_number]).to eq('0003')
630
+ end
610
631
  end
611
632
  end
612
633
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: era_835_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin S. Dias
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-10 00:00:00.000000000 Z
11
+ date: 2020-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -84,7 +84,7 @@ homepage: https://github.com/diasks2/era_835_parser
84
84
  licenses:
85
85
  - MIT
86
86
  metadata: {}
87
- post_install_message:
87
+ post_install_message:
88
88
  rdoc_options: []
89
89
  require_paths:
90
90
  - lib
@@ -99,9 +99,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  - !ruby/object:Gem::Version
100
100
  version: '0'
101
101
  requirements: []
102
- rubyforge_project:
102
+ rubyforge_project:
103
103
  rubygems_version: 2.7.6
104
- signing_key:
104
+ signing_key:
105
105
  specification_version: 4
106
106
  summary: Electronic Remittance Advice (ERA) 835 parser
107
107
  test_files: