era_835_parser 0.1.10 → 0.1.11

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: 1b394c2e2133a067275fc162829b81b1e2a2a6b7794c3263796f7bc307560b24
4
- data.tar.gz: 050a54cc12e40d5d302fb90d978c2da811271a32c97248e019961ca5795a059d
3
+ metadata.gz: bdc09dc9f3656f4155cf027e2ddc655167840ad8d4e06b0e09cc3658c4eb1309
4
+ data.tar.gz: 3b37bb69fc93fc5bde9125ad62b48d720402a848da1837535fcf928f0edf2bb5
5
5
  SHA512:
6
- metadata.gz: 74ba8ed4f544b671ffa85bb88e9557b3a36bef85563cf5a4b6644e3167417705ed0bdc4c676614836081754dbb4f6845c75f4af6950d9ce3a6b4d067eaf096b0
7
- data.tar.gz: 1e1f44f0771c48278b527168fe706d60178f17f4ca84e1fd74b81eb01f2aba68b27fcc59da197b1147e09fd795f9a8918ac9c268b11ba333987effc78cc70e9e
6
+ metadata.gz: a4e30df5a5cb6b819bc399d1fc6072f66ec6c950bc9abb33cd5c98d038aff1025dfd14c860719bfa9db4c1f7adbdee81131dd03ffaa7ad729661906af89f6a35
7
+ data.tar.gz: 158d3d082f2eb8b13af67845fd65dcacef8a12f342770e9ce2f2a1aeb8203092892f9f2341238f6d295c85f6dd534d12adf9d0758651f74dd67a90c774fd864b
@@ -1031,13 +1031,13 @@ module Era835Parser
1031
1031
  else
1032
1032
  remark = truncate(line_item[:remarks], 82)
1033
1033
  end
1034
- line_items += "#{" " * (22)}#{line_item[:service_date]} #{line_item[:cpt_code]}#{" " * (7 - get_length(line_item[:cpt_code]))}#{'%.2f' % (line_item[:charge_amount].to_f / 100)}#{" " * (13 - get_length('%.2f' % (line_item[:charge_amount].to_f / 100)))}#{'%.2f' % (line_item[:payment_amount].to_f / 100)}#{" " * (13 - get_length('%.2f' % (line_item[:payment_amount].to_f / 100)))}#{'%.2f' % (line_item[:total_adjustment_amount].to_f / 100)}#{" " * (15 - get_length('%.2f' % (line_item[:total_adjustment_amount].to_f / 100)))}#{remark}\n\n"
1034
+ line_items += "#{" " * 22}#{line_item[:service_date]} #{line_item[:cpt_code]}#{safe_spacing(7, get_length(line_item[:cpt_code]))}#{'%.2f' % (line_item[:charge_amount].to_f / 100)}#{safe_spacing(13, get_length('%.2f' % (line_item[:charge_amount].to_f / 100)))}#{'%.2f' % (line_item[:payment_amount].to_f / 100)}#{safe_spacing(13, get_length('%.2f' % (line_item[:payment_amount].to_f / 100)))}#{'%.2f' % (line_item[:total_adjustment_amount].to_f / 100)}#{safe_spacing(15, get_length('%.2f' % (line_item[:total_adjustment_amount].to_f / 100)))}#{remark}\n\n"
1035
1035
 
1036
1036
  if !line_item[:adjustment_groups].nil?
1037
1037
  line_item[:adjustment_groups].each do |adjustment_group_counter, adjustment_group|
1038
1038
  line_items += " Adjustment Group Adj Amt Translated Reason Code\n" if adjustment_group_counter == 0
1039
1039
  reason_code = adjustment_group[:translated_reason_code].nil? ? '' : adjustment_group[:translated_reason_code].upcase
1040
- line_items += " #{adjustment_group[:adjustment_group].upcase}#{" " * (28 - get_length(adjustment_group[:adjustment_group]))}#{'%.2f' % (adjustment_group[:adjustment_amount].to_f / 100)}#{" " * (8 - get_length('%.2f' % (adjustment_group[:adjustment_amount].to_f / 100)))}#{truncate(reason_code, 84)}\n"
1040
+ line_items += " #{adjustment_group[:adjustment_group].upcase}#{safe_spacing(28, get_length(adjustment_group[:adjustment_group]))}#{'%.2f' % (adjustment_group[:adjustment_amount].to_f / 100)}#{safe_spacing(8, get_length('%.2f' % (adjustment_group[:adjustment_amount].to_f / 100)))}#{truncate(reason_code, 84)}\n"
1041
1041
  line_items += "\n" if line_item[:adjustment_groups].length == (adjustment_group_counter + 1)
1042
1042
  end
1043
1043
  end
@@ -1045,19 +1045,19 @@ module Era835Parser
1045
1045
  end
1046
1046
  era_text = "--------------------------------------------------------------------------------------------------------------------------------------------------------\n"
1047
1047
  era_text += "Check# Patient ID Last,First Charge Amt Payment Amt Accnt##{" " * [8, get_length(individual_era[:account_number]) - 5].max}Status Payer\n"
1048
- era_text += "#{check[:check_number]}#{" " * (31 - get_length(check[:check_number]))}#{individual_era[:patient_id]}#{" " * (19 - get_length(individual_era[:patient_id]))}#{truncate(individual_era[:patient_name], 18)}#{" " * (20 - get_length(truncate(individual_era[:patient_name], 18)))}#{'%.2f' % (individual_era[:charge_amount].to_f / 100)}#{" " * (12 - get_length('%.2f' % (individual_era[:charge_amount].to_f / 100)))}#{'%.2f' % (individual_era[:payment_amount].to_f / 100)}#{" " * (13 - get_length('%.2f' % (individual_era[:payment_amount].to_f / 100)))}#{individual_era[:account_number]}#{" " * ([14, get_length(individual_era[:account_number]) + 1].max - get_length(individual_era[:account_number]))}#{individual_era[:status]}#{" " * (31 - get_length(individual_era[:status]))}#{check[:payer_name]}\n"
1048
+ era_text += "#{check[:check_number]}#{safe_spacing(31, get_length(check[:check_number]))}#{individual_era[:patient_id]}#{safe_spacing(19, get_length(individual_era[:patient_id]))}#{truncate(individual_era[:patient_name], 18)}#{safe_spacing(20, get_length(truncate(individual_era[:patient_name], 18)))}#{'%.2f' % (individual_era[:charge_amount].to_f / 100)}#{safe_spacing(12, get_length('%.2f' % (individual_era[:charge_amount].to_f / 100)))}#{'%.2f' % (individual_era[:payment_amount].to_f / 100)}#{safe_spacing(13, get_length('%.2f' % (individual_era[:payment_amount].to_f / 100)))}#{individual_era[:account_number]}#{safe_spacing([14, get_length(individual_era[:account_number]) + 1].max, get_length(individual_era[:account_number]))}#{individual_era[:status]}#{safe_spacing(31, get_length(individual_era[:status]))}#{check[:payer_name]}\n"
1049
1049
  era_text += "#{" " * (126 + [14, get_length(individual_era[:account_number]) + 1].max)}#{check[:payer_address]}\n"
1050
1050
  era_text += "#{" " * (126 + [14, get_length(individual_era[:account_number]) + 1].max)}#{check[:payer_city]},#{check[:payer_state]} #{check[:payer_zip_code]}\n"
1051
1051
  era_text += "#{" " * (126 + [14, get_length(individual_era[:account_number]) + 1].max)}Tax ID: #{check[:payer_tax_id]}\n"
1052
1052
 
1053
1053
  if !individual_era[:claim_statement_period_end].nil? && !individual_era[:claim_statement_period_start].nil?
1054
- era_text += "#{" " * (96)}Payer Claim Control Number: #{individual_era[:payer_claim_control_number]}\n"
1055
- era_text += "#{" " * (96)}Claim Statement Period: #{individual_era[:claim_statement_period_start]} - #{individual_era[:claim_statement_period_end]}\n\n"
1054
+ era_text += "#{" " * 96}Payer Claim Control Number: #{individual_era[:payer_claim_control_number]}\n"
1055
+ era_text += "#{" " * 96}Claim Statement Period: #{individual_era[:claim_statement_period_start]} - #{individual_era[:claim_statement_period_end]}\n\n"
1056
1056
  else
1057
- era_text += "#{" " * (96)}Payer Claim Control Number: #{individual_era[:payer_claim_control_number]}\n\n"
1057
+ era_text += "#{" " * 96}Payer Claim Control Number: #{individual_era[:payer_claim_control_number]}\n\n"
1058
1058
  end
1059
1059
  if line_items.length > 0
1060
- era_text += "#{" " * (10)}Line Item: Svc Date CPT Charge Amt Payment Amt Total Adj Amt Remarks\n"
1060
+ era_text += "#{" " * 10}Line Item: Svc Date CPT Charge Amt Payment Amt Total Adj Amt Remarks\n"
1061
1061
  era_text += line_items
1062
1062
  end
1063
1063
  era[:checks][check[:check_number]][:eras][era_counter][:era_text] = era_text
@@ -1083,5 +1083,14 @@ module Era835Parser
1083
1083
  return string.to_s[0...truncate_at]
1084
1084
  end
1085
1085
  end
1086
+
1087
+ def safe_spacing(max, length)
1088
+ value = max - length
1089
+ if value >= 0
1090
+ " " * value
1091
+ else
1092
+ ""
1093
+ end
1094
+ end
1086
1095
  end
1087
- end
1096
+ end
@@ -1,3 +1,3 @@
1
1
  module Era835Parser
2
- VERSION = "0.1.10"
3
- end
2
+ VERSION = "0.1.11"
3
+ end
@@ -1,3 +1,3 @@
1
1
  require "set"
2
2
  require "era_835_parser/version"
3
- require "era_835_parser/parser"
3
+ require "era_835_parser/parser"
@@ -632,6 +632,246 @@ RSpec.describe Era835Parser::Parser do
632
632
  end
633
633
  end
634
634
  end
635
+
636
+ context 'example_4.835' do
637
+ before :all do
638
+ @era = Era835Parser::Parser.new(file_path: "../era_835_parser/spec/example_4.835").parse
639
+ end
640
+
641
+ context 'Aggregate totals' do
642
+ it 'returns the addressed to' do
643
+ expect(@era[:addressed_to]).to eq(nil)
644
+ end
645
+ it 'returns the correct number of checks' do
646
+ expect(@era[:checks].count).to eq(1)
647
+ end
648
+ it 'returns the correct number of adjustments' do
649
+ expect(@era[:adjustments]).to eq(nil)
650
+ end
651
+ it 'returns the correct number of eras' do
652
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras].count).to eq(1)
653
+ end
654
+ it 'returns the correct number of line items' do
655
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items].count).to eq(3)
656
+ end
657
+ it 'returns the correct number of adjustment groups' do
658
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][0][:adjustment_groups].count).to eq(2)
659
+ end
660
+ it 'returns the correct number of adjustment groups' do
661
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][1][:adjustment_groups].count).to eq(1)
662
+ end
663
+ it 'returns the correct number of adjustment groups' do
664
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][2][:adjustment_groups]).to eq(nil)
665
+ end
666
+ end
667
+
668
+ context 'Check #70408535' do
669
+ it 'returns the check number' do
670
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:check_number]).to eq('0123456789012345678901234567890123456789')
671
+ end
672
+ it 'returns the amount' do
673
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:amount]).to eq(192286)
674
+ end
675
+ it 'returns the number of claims' do
676
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:number_of_claims]).to eq(1)
677
+ end
678
+ it 'returns the NPI or Tax ID of payee' do
679
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:npi_tax_id]).to eq('0987654321')
680
+ end
681
+ it 'returns the Check payee' do
682
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:payee]).to eq('XYZ HEALTHCARE CORPORATION')
683
+ end
684
+ it 'returns the Payer name' do
685
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:payer_name]).to eq('BLUE CROSS AND BLUE SHIELD OF NORTH CAROLINA')
686
+ end
687
+ it 'returns the Payer address' do
688
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:payer_address]).to eq('P O BOX 2291')
689
+ end
690
+ it 'returns the Payer city' do
691
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:payer_city]).to eq('DURHAM')
692
+ end
693
+ it 'returns the Payer state' do
694
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:payer_state]).to eq('NC')
695
+ end
696
+ it 'returns the Payer zip code' do
697
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:payer_zip_code]).to eq('27702')
698
+ end
699
+ it 'returns the Payer tax id' do
700
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:payer_tax_id]).to eq('60-894904')
701
+ end
702
+ it 'returns the Check date (string mm/dd/yyyy)' do
703
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:date]).to eq('01/08/2011')
704
+ end
705
+ context 'ERA #0' do
706
+ it 'returns the Patient ID' do
707
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:patient_id]).to eq('YPB123456789001')
708
+ end
709
+ it 'returns the Patient name' do
710
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:patient_name]).to eq('DOUGH,MARY')
711
+ end
712
+ it 'returns the Patient last name (titlized)' do
713
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:patient_last_name]).to eq('Dough')
714
+ end
715
+ it 'returns the Patient first name (titlized)' do
716
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:patient_first_name]).to eq('Mary')
717
+ end
718
+ it 'returns the Total charge amount (integer)' do
719
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:charge_amount]).to eq(210000)
720
+ end
721
+ it 'returns the Total payment amount (integer)' do
722
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:payment_amount]).to eq(192286)
723
+ end
724
+ it 'returns the Account number' do
725
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:account_number]).to eq('200200964A52')
726
+ end
727
+ it 'returns the Cliam status code' do
728
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:claim_status_code]).to eq('1')
729
+ end
730
+ it 'returns the Claim status code description' do
731
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:status]).to eq("PROCESSED AS PRIMARY")
732
+ end
733
+ it 'returns the Payer claim control number' do
734
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:payer_claim_control_number]).to eq('94151100100')
735
+ end
736
+ it 'returns the Claim statement period start' do
737
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:claim_statement_period_start]).to eq(nil)
738
+ end
739
+ it 'returns the Claim statement period end' do
740
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:claim_statement_period_end]).to eq(nil)
741
+ end
742
+
743
+ context 'Line item #0' do
744
+ it 'returns the Date of service (string mm/dd/yyyy)' do
745
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][0][:service_date]).to eq("12/31/2010")
746
+ end
747
+ it 'returns the CPT code' do
748
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][0][:cpt_code]).to eq("59430")
749
+ end
750
+ it 'returns the Charge amount (integer)' do
751
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][0][:charge_amount]).to eq(121000)
752
+ end
753
+ it 'returns the Payment amount (integer)' do
754
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][0][:payment_amount]).to eq(105786)
755
+ end
756
+ it 'returns the Total adjustment amount (integer)' do
757
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][0][:total_adjustment_amount]).to eq(15214)
758
+ end
759
+ it 'returns the Remark code' do
760
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][0][:remark_code]).to eq(nil)
761
+ end
762
+ it 'returns the Remarks' do
763
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][0][:remarks]).to eq(nil)
764
+ end
765
+ it 'returns the Reference number' do
766
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][0][:reference_number]).to eq('0001')
767
+ end
768
+ context 'Adjustment group #0' do
769
+ it 'returns the Adjustment group' do
770
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][0][:adjustment_groups][0][:adjustment_group]).to eq("Contractual Obligation")
771
+ end
772
+ it 'returns the Adjustment group code' do
773
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][0][:adjustment_groups][0][:adjustment_group_code]).to eq("CO")
774
+ end
775
+ it 'returns the Adjustment amount (integer)' do
776
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][0][:adjustment_groups][0][:adjustment_amount]).to eq(3460)
777
+ end
778
+ it 'returns the Reason code' do
779
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][0][:adjustment_groups][0][:reason_code]).to eq('42')
780
+ end
781
+ it 'returns the Translated reason code' do
782
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][0][:adjustment_groups][0][:translated_reason_code]).to eq("Charges exceed our fee schedule or maximum allowable amount. (Use CARC 45)")
783
+ end
784
+ end
785
+ context 'Adjustment group #1' do
786
+ it 'returns the Adjustment group' do
787
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][0][:adjustment_groups][1][:adjustment_group]).to eq("Patient Responsibility")
788
+ end
789
+ it 'returns the Adjustment group code' do
790
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][0][:adjustment_groups][1][:adjustment_group_code]).to eq("PR")
791
+ end
792
+ it 'returns the Adjustment amount (integer)' do
793
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][0][:adjustment_groups][1][:adjustment_amount]).to eq(11754)
794
+ end
795
+ it 'returns the Reason code' do
796
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][0][:adjustment_groups][1][:reason_code]).to eq('2')
797
+ end
798
+ it 'returns the Translated reason code' do
799
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][0][:adjustment_groups][1][:translated_reason_code]).to eq("Coinsurance Amount")
800
+ end
801
+ end
802
+ end
803
+ context 'Line item #1' do
804
+ it 'returns the Date of service (string mm/dd/yyyy)' do
805
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][1][:service_date]).to eq("12/31/2010")
806
+ end
807
+ it 'returns the CPT code' do
808
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][1][:cpt_code]).to eq("59440")
809
+ end
810
+ it 'returns the Charge amount (integer)' do
811
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][1][:charge_amount]).to eq(89000)
812
+ end
813
+ it 'returns the Payment amount (integer)' do
814
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][1][:payment_amount]).to eq(86500)
815
+ end
816
+ it 'returns the Total adjustment amount (integer)' do
817
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][1][:total_adjustment_amount]).to eq(2500)
818
+ end
819
+ it 'returns the Remark code' do
820
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][1][:remark_code]).to eq(nil)
821
+ end
822
+ it 'returns the Remarks' do
823
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][1][:remarks]).to eq(nil)
824
+ end
825
+ it 'returns the Reference number' do
826
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][1][:reference_number]).to eq('0002')
827
+ end
828
+ context 'Adjustment group #0' do
829
+ it 'returns the Adjustment group' do
830
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][1][:adjustment_groups][0][:adjustment_group]).to eq("Patient Responsibility")
831
+ end
832
+ it 'returns the Adjustment group code' do
833
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][1][:adjustment_groups][0][:adjustment_group_code]).to eq("PR")
834
+ end
835
+ it 'returns the Adjustment amount (integer)' do
836
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][1][:adjustment_groups][0][:adjustment_amount]).to eq(2500)
837
+ end
838
+ it 'returns the Reason code' do
839
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][1][:adjustment_groups][0][:reason_code]).to eq('3')
840
+ end
841
+ it 'returns the Translated reason code' do
842
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][1][:adjustment_groups][0][:translated_reason_code]).to eq("Co-payment Amount")
843
+ end
844
+ end
845
+ end
846
+ context 'Line item #2' do
847
+ it 'returns the Date of service (string mm/dd/yyyy)' do
848
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][2][:service_date]).to eq("12/31/2010")
849
+ end
850
+ it 'returns the CPT code' do
851
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][2][:cpt_code]).to eq("59426")
852
+ end
853
+ it 'returns the Charge amount (integer)' do
854
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][2][:charge_amount]).to eq(74200)
855
+ end
856
+ it 'returns the Payment amount (integer)' do
857
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][2][:payment_amount]).to eq(74200)
858
+ end
859
+ it 'returns the Total adjustment amount (integer)' do
860
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][2][:total_adjustment_amount]).to eq(nil)
861
+ end
862
+ it 'returns the Remark code' do
863
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][2][:remark_code]).to eq(nil)
864
+ end
865
+ it 'returns the Remarks' do
866
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][2][:remarks]).to eq(nil)
867
+ end
868
+ it 'returns the Reference number' do
869
+ expect(@era[:checks]['0123456789012345678901234567890123456789'][:eras][0][:line_items][2][:reference_number]).to eq('0003')
870
+ end
871
+ end
872
+ end
873
+ end
874
+ end
635
875
  end
636
876
 
637
877
  context 'Human readable' do
@@ -1498,4 +1738,4 @@ Check# Patient ID Last,First Charge Amt
1498
1738
  end
1499
1739
  end
1500
1740
  end
1501
- end
1741
+ end
@@ -0,0 +1,32 @@
1
+ ST*835*1234~
2
+ BPR*I*1922.86*C*CHK************20110108~
3
+ TRN*1*0123456789012345678901234567890123456789*560894904~
4
+ REF*F2*LCLA438D~
5
+ DTM*405*20110104~
6
+ N1*PR*BLUE CROSS AND BLUE SHIELD OF NORTH CAROLINA~
7
+ N3*P O BOX 2291~
8
+ N4*DURHAM*NC*27702~
9
+ PER*CX*TE*8005554844~
10
+ N1*PE*XYZ HEALTHCARE CORPORATION*XX*0987654321~
11
+ N3*P O BOX XYZ~
12
+ N4*CHARLOTTE*NC*28234~
13
+ REF*TJ*123456789~
14
+ LX*1~
15
+ CLP*200200964A52*1*2100*1922.86*142.54*15*94151100100~
16
+ NM1*QC*1*Dough*Mary****MI* YPB123456789001~
17
+ DTM*050*20110103~
18
+ SVC*HC:59430*1210*1057.86**1*HC:59410~
19
+ DTM*472*20101231~
20
+ CAS*CO*42*34.6~
21
+ CAS*PR*2*117.54~
22
+ REF*6R*0001~
23
+ AMT*B6*1175.4~
24
+ SVC*HC:59440*890*865**1*HC:59410~
25
+ DTM*472*20101231~
26
+ CAS*PR*3*25~
27
+ REF*6R*0002~
28
+ SVC*HC:59426*742*742**1~
29
+ DTM*472*20101231~
30
+ REF*6R*0003~
31
+ AMT*B6*742~
32
+ SE*33*1234~
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  require 'simplecov'
2
2
  SimpleCov.start
3
- require 'era_835_parser'
3
+ require 'era_835_parser'
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.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin S. Dias
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-05 00:00:00.000000000 Z
11
+ date: 2023-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -78,6 +78,7 @@ files:
78
78
  - spec/example_1.835
79
79
  - spec/example_2.835
80
80
  - spec/example_3.835
81
+ - spec/example_4.835
81
82
  - spec/spec_helper.rb
82
83
  - spec/test_era.txt
83
84
  homepage: https://github.com/diasks2/era_835_parser
@@ -99,8 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
100
  - !ruby/object:Gem::Version
100
101
  version: '0'
101
102
  requirements: []
102
- rubyforge_project:
103
- rubygems_version: 2.7.6
103
+ rubygems_version: 3.3.26
104
104
  signing_key:
105
105
  specification_version: 4
106
106
  summary: Electronic Remittance Advice (ERA) 835 parser
@@ -109,5 +109,6 @@ test_files:
109
109
  - spec/example_1.835
110
110
  - spec/example_2.835
111
111
  - spec/example_3.835
112
+ - spec/example_4.835
112
113
  - spec/spec_helper.rb
113
114
  - spec/test_era.txt