era_835_parser 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24ced3bdbddf24e71641f9b339c2892c68a5f15333a0b3f3ed0fd81fc2ede024
4
- data.tar.gz: 67e81a3c9890bd5bda989b31250d68afb9e8d37748569528d04c56f0f64e1f4b
3
+ metadata.gz: 731ca964eb5c6e01d791525fe34151a2eb15e1154f2c3e9ca9726ee9264184c8
4
+ data.tar.gz: bf55ebe8c6004a2c4555643d73c42589fb064edbfc5870808da76e0738536865
5
5
  SHA512:
6
- metadata.gz: e5e36bbad1c296bb6f31790bc4ccf58d7a4455377cf22d3908b2bb23c069a5f76fd9e0c1e1b07e9837b22da564c302c40123e5ebcd74109e4a8a2113b082c064
7
- data.tar.gz: 581d746f8f3cbf3beb1826a7cc7611b0709e51e8e28ee217e6c71efc932e8cbd3790ab537a385230c1a70d0d23c173aa5a77177aee2ca6fe8cdc8664672b9dcb
6
+ metadata.gz: 2a5948ab0425ab4d72c4b31f03a4300b3759a7ef6619f67d2444baa6fcae83e9da70f1c015e68d6c140cf9c8b4b906d15ffa3a421bc02fab620ba2dc8d20456b
7
+ data.tar.gz: 7c49002c06b30bf7a78868837e311b4e00b373af56051d7fcf9292f231ff74f4320350d8c1d72e0e64f0b163a81e83a927fcbbf5bca3e36a8475946895b30992
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Electronic Remittance Advice (ERA) 835 parser
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/era_835_parser.svg)](http://badge.fury.io/rb/era_835_parser) [![Code Climate](https://codeclimate.com/github/diasks2/era_835_parser/badges/gpa.svg)](https://codeclimate.com/github/diasks2/era_835_parser) [![Build Status](https://travis-ci.org/diasks2/era_835_parser.png)](https://travis-ci.org/diasks2/era_835_parser) [![Test Coverage](https://codeclimate.com/github/diasks2/era_835_parser/badges/coverage.svg)](https://codeclimate.com/github/diasks2/era_835_parser) [![License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](https://github.com/diasks2/era_835_parser/blob/master/LICENSE.txt)
3
+ [![Gem Version](https://badge.fury.io/rb/era_835_parser.svg)](http://badge.fury.io/rb/era_835_parser) [![License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](https://github.com/diasks2/era_835_parser/blob/master/LICENSE.txt)
4
4
 
5
5
  This is a gem to parse ERAs, the electronic equivalent of a paper Explanation of Benefits (EOB). An electronic remittance advice (ERA) is an electronic data interchange (EDI) version of a medical insurance payment explanation. It provides details about providers' claims payment, and if the claims are denied, it would then contain the required explanations.
6
6
 
@@ -22,6 +22,8 @@ gem 'era_835_parser'
22
22
  ```ruby
23
23
  era = Era835Parser::Parser.new(file_path: '/Desktop/era.txt').parse
24
24
 
25
+ puts era[:addressed_to] # The person/name the ERA is addressed to
26
+
25
27
  # The output is grouped by check number with each claim grouped under its respective check
26
28
  era[:checks].each do |check_number, check|
27
29
  puts check[:check_number] # Check number
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Kevin S. Dias"]
10
10
  spec.email = ["diasks2@gmail.com"]
11
11
  spec.summary = %q{Electronic Remittance Advice (ERA) 835 parser}
12
- spec.description = %q{This is a gem to parse ERAs, the electronic equivalent of a paper Explanation of Benefits (EOB). An electronic remittance advice (ERA) is an electronic data interchange (EDI) version of a medical insurance payment explanation. It provides details about providers' claims payment, and if the claims are denied, it would then contain the required explanations.}
12
+ spec.description = %q{This is a gem to parse ERAs, the electronic equivalent of a paper Explanation of Benefits (EOB) used in the medical industry. An electronic remittance advice (ERA) is an electronic data interchange (EDI) version of a medical insurance payment explanation. It provides details about providers' claims payment, and if the claims are denied, it would then contain the required explanations.}
13
13
  spec.homepage = "https://github.com/diasks2/era_835_parser"
14
14
  spec.license = "MIT"
15
15
 
@@ -37,6 +37,10 @@ module Era835Parser
37
37
 
38
38
  open(file_path).readlines.each do |line|
39
39
 
40
+ if line.include?("Dear:")
41
+ era[:addressed_to] = line.gsub("Dear:", "").strip
42
+ end
43
+
40
44
  if line !~ /={10,}/i && adjustments_start == true
41
45
  adjustment = Hash.new
42
46
  adjustment[:adjustment_date] = /\d+\/\d+\/\d+/.match(line)[0].strip if !/\d+\/\d+\/\d+/.match(line).nil?
@@ -1,3 +1,3 @@
1
1
  module Era835Parser
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -7,49 +7,52 @@ RSpec.describe Era835Parser::Parser do
7
7
  @era = Era835Parser::Parser.new(file_path: "../era_835_parser/spec/test_era.txt").parse
8
8
  end
9
9
 
10
- # context 'Aggregate totals' do
11
- # it 'returns the correct number of checks' do
12
- # expect(@era[:checks].count).to eq(3)
13
- # end
14
- # it 'returns the correct number of adjustments' do
15
- # expect(@era[:adjustments].count).to eq(3)
16
- # end
10
+ context 'Aggregate totals' do
11
+ it 'returns the addressed to' do
12
+ expect(@era[:addressed_to]).to eq('Jane Doe')
13
+ end
14
+ it 'returns the correct number of checks' do
15
+ expect(@era[:checks].count).to eq(3)
16
+ end
17
+ it 'returns the correct number of adjustments' do
18
+ expect(@era[:adjustments].count).to eq(3)
19
+ end
17
20
 
18
- # it 'returns the correct number of line items' do
19
- # expect(@era[:checks]['201812215555555555'][:eras][0][:line_items].count).to eq(1)
20
- # end
21
- # it 'returns the correct number of line items' do
22
- # expect(@era[:checks]['201812215555555556'][:eras][0][:line_items].count).to eq(2)
23
- # end
24
- # it 'returns the correct number of line items' do
25
- # expect(@era[:checks]['201812215555555556'][:eras][1][:line_items].count).to eq(1)
26
- # end
27
- # it 'returns the correct number of line items' do
28
- # expect(@era[:checks]['201812215555555557'][:eras][0][:line_items].count).to eq(1)
29
- # end
30
- # it 'returns the correct number of line items' do
31
- # expect(@era[:checks]['201812215555555557'][:eras][1][:line_items].count).to eq(1)
32
- # end
21
+ it 'returns the correct number of line items' do
22
+ expect(@era[:checks]['201812215555555555'][:eras][0][:line_items].count).to eq(1)
23
+ end
24
+ it 'returns the correct number of line items' do
25
+ expect(@era[:checks]['201812215555555556'][:eras][0][:line_items].count).to eq(2)
26
+ end
27
+ it 'returns the correct number of line items' do
28
+ expect(@era[:checks]['201812215555555556'][:eras][1][:line_items].count).to eq(1)
29
+ end
30
+ it 'returns the correct number of line items' do
31
+ expect(@era[:checks]['201812215555555557'][:eras][0][:line_items].count).to eq(1)
32
+ end
33
+ it 'returns the correct number of line items' do
34
+ expect(@era[:checks]['201812215555555557'][:eras][1][:line_items].count).to eq(1)
35
+ end
33
36
 
34
- # it 'returns the correct number of adjustment groups' do
35
- # expect(@era[:checks]['201812215555555555'][:eras][0][:line_items][0][:adjustment_groups].count).to eq(1)
36
- # end
37
- # it 'returns the correct number of adjustment groups' do
38
- # expect(@era[:checks]['201812215555555556'][:eras][0][:line_items][0][:adjustment_groups].count).to eq(1)
39
- # end
40
- # it 'returns the correct number of adjustment groups' do
41
- # expect(@era[:checks]['201812215555555556'][:eras][0][:line_items][1][:adjustment_groups].count).to eq(1)
42
- # end
43
- # it 'returns the correct number of adjustment groups' do
44
- # expect(@era[:checks]['201812215555555556'][:eras][1][:line_items][0][:adjustment_groups].count).to eq(0)
45
- # end
46
- # it 'returns the correct number of adjustment groups' do
47
- # expect(@era[:checks]['201812215555555557'][:eras][0][:line_items][0][:adjustment_groups].count).to eq(1)
48
- # end
49
- # it 'returns the correct number of adjustment groups' do
50
- # expect(@era[:checks]['201812215555555557'][:eras][1][:line_items][0][:adjustment_groups].count).to eq(2)
51
- # end
52
- # end
37
+ it 'returns the correct number of adjustment groups' do
38
+ expect(@era[:checks]['201812215555555555'][:eras][0][:line_items][0][:adjustment_groups].count).to eq(1)
39
+ end
40
+ it 'returns the correct number of adjustment groups' do
41
+ expect(@era[:checks]['201812215555555556'][:eras][0][:line_items][0][:adjustment_groups].count).to eq(1)
42
+ end
43
+ it 'returns the correct number of adjustment groups' do
44
+ expect(@era[:checks]['201812215555555556'][:eras][0][:line_items][1][:adjustment_groups].count).to eq(1)
45
+ end
46
+ it 'returns the correct number of adjustment groups' do
47
+ expect(@era[:checks]['201812215555555556'][:eras][1][:line_items][0][:adjustment_groups]).to eq(nil)
48
+ end
49
+ it 'returns the correct number of adjustment groups' do
50
+ expect(@era[:checks]['201812215555555557'][:eras][0][:line_items][0][:adjustment_groups].count).to eq(1)
51
+ end
52
+ it 'returns the correct number of adjustment groups' do
53
+ expect(@era[:checks]['201812215555555557'][:eras][1][:line_items][0][:adjustment_groups].count).to eq(2)
54
+ end
55
+ end
53
56
 
54
57
  context 'Check #201812215555555555' do
55
58
  it 'returns the check number' do
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.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin S. Dias
@@ -53,10 +53,10 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: This is a gem to parse ERAs, the electronic equivalent of a paper Explanation
56
- of Benefits (EOB). An electronic remittance advice (ERA) is an electronic data interchange
57
- (EDI) version of a medical insurance payment explanation. It provides details about
58
- providers' claims payment, and if the claims are denied, it would then contain the
59
- required explanations.
56
+ of Benefits (EOB) used in the medical industry. An electronic remittance advice
57
+ (ERA) is an electronic data interchange (EDI) version of a medical insurance payment
58
+ explanation. It provides details about providers' claims payment, and if the claims
59
+ are denied, it would then contain the required explanations.
60
60
  email:
61
61
  - diasks2@gmail.com
62
62
  executables: []
@@ -65,7 +65,6 @@ extra_rdoc_files: []
65
65
  files:
66
66
  - ".gitignore"
67
67
  - ".rspec"
68
- - ".travis.yml"
69
68
  - CODE_OF_CONDUCT.md
70
69
  - Gemfile
71
70
  - LICENSE.txt
data/.travis.yml DELETED
File without changes