hippo 0.0.4

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.
Files changed (203) hide show
  1. data/.gitignore +6 -0
  2. data/CHANGELOG +9 -0
  3. data/Gemfile +11 -0
  4. data/Guardfile +14 -0
  5. data/README.md +227 -0
  6. data/Rakefile +12 -0
  7. data/bin/demo_270.rb +280 -0
  8. data/bin/demo_276.rb +296 -0
  9. data/bin/demo_835.rb +170 -0
  10. data/hippo.gemspec +24 -0
  11. data/lib/hippo/exceptions.rb +8 -0
  12. data/lib/hippo/field.rb +6 -0
  13. data/lib/hippo/loop.rb +0 -0
  14. data/lib/hippo/parser.rb +92 -0
  15. data/lib/hippo/samples/835.edi +88 -0
  16. data/lib/hippo/samples/sample_835_with.rb +272 -0
  17. data/lib/hippo/samples/sample_parsed.rb +1162 -0
  18. data/lib/hippo/segments/AK1.rb +32 -0
  19. data/lib/hippo/segments/AK2.rb +31 -0
  20. data/lib/hippo/segments/AK9.rb +82 -0
  21. data/lib/hippo/segments/AMT.rb +31 -0
  22. data/lib/hippo/segments/BHT.rb +55 -0
  23. data/lib/hippo/segments/BPR.rb +175 -0
  24. data/lib/hippo/segments/CAS.rb +159 -0
  25. data/lib/hippo/segments/CL1.rb +39 -0
  26. data/lib/hippo/segments/CLM.rb +223 -0
  27. data/lib/hippo/segments/CLP.rb +119 -0
  28. data/lib/hippo/segments/CN1.rb +55 -0
  29. data/lib/hippo/segments/CR1.rb +87 -0
  30. data/lib/hippo/segments/CR2.rb +104 -0
  31. data/lib/hippo/segments/CR3.rb +47 -0
  32. data/lib/hippo/segments/CR4.rb +239 -0
  33. data/lib/hippo/segments/CR5.rb +151 -0
  34. data/lib/hippo/segments/CR6.rb +175 -0
  35. data/lib/hippo/segments/CR7.rb +33 -0
  36. data/lib/hippo/segments/CR8.rb +79 -0
  37. data/lib/hippo/segments/CRC.rb +63 -0
  38. data/lib/hippo/segments/CTP.rb +212 -0
  39. data/lib/hippo/segments/CTX.rb +105 -0
  40. data/lib/hippo/segments/CUR.rb +175 -0
  41. data/lib/hippo/segments/DMG.rb +115 -0
  42. data/lib/hippo/segments/DN1.rb +39 -0
  43. data/lib/hippo/segments/DN2.rb +55 -0
  44. data/lib/hippo/segments/DSB.rb +71 -0
  45. data/lib/hippo/segments/DTM.rb +55 -0
  46. data/lib/hippo/segments/DTP.rb +31 -0
  47. data/lib/hippo/segments/FRM.rb +47 -0
  48. data/lib/hippo/segments/GE.rb +19 -0
  49. data/lib/hippo/segments/GS.rb +52 -0
  50. data/lib/hippo/segments/HCP.rb +127 -0
  51. data/lib/hippo/segments/HI.rb +919 -0
  52. data/lib/hippo/segments/HL.rb +44 -0
  53. data/lib/hippo/segments/HSD.rb +72 -0
  54. data/lib/hippo/segments/IEA.rb +19 -0
  55. data/lib/hippo/segments/IK3.rb +40 -0
  56. data/lib/hippo/segments/IK4.rb +63 -0
  57. data/lib/hippo/segments/IK5.rb +55 -0
  58. data/lib/hippo/segments/IMM.rb +55 -0
  59. data/lib/hippo/segments/ISA.rb +95 -0
  60. data/lib/hippo/segments/K3.rb +147 -0
  61. data/lib/hippo/segments/LIN.rb +255 -0
  62. data/lib/hippo/segments/LQ.rb +23 -0
  63. data/lib/hippo/segments/LX.rb +21 -0
  64. data/lib/hippo/segments/MEA.rb +219 -0
  65. data/lib/hippo/segments/MIA.rb +199 -0
  66. data/lib/hippo/segments/MOA.rb +79 -0
  67. data/lib/hippo/segments/N1.rb +55 -0
  68. data/lib/hippo/segments/N2.rb +23 -0
  69. data/lib/hippo/segments/N3.rb +23 -0
  70. data/lib/hippo/segments/N4.rb +63 -0
  71. data/lib/hippo/segments/NM1.rb +103 -0
  72. data/lib/hippo/segments/NTE.rb +23 -0
  73. data/lib/hippo/segments/OI.rb +55 -0
  74. data/lib/hippo/segments/PAT.rb +79 -0
  75. data/lib/hippo/segments/PER.rb +79 -0
  76. data/lib/hippo/segments/PLB.rb +191 -0
  77. data/lib/hippo/segments/PRV.rb +75 -0
  78. data/lib/hippo/segments/PS1.rb +31 -0
  79. data/lib/hippo/segments/PWK.rb +116 -0
  80. data/lib/hippo/segments/QTY.rb +155 -0
  81. data/lib/hippo/segments/RDM.rb +135 -0
  82. data/lib/hippo/segments/REF.rb +83 -0
  83. data/lib/hippo/segments/SBR.rb +79 -0
  84. data/lib/hippo/segments/SE.rb +24 -0
  85. data/lib/hippo/segments/ST.rb +31 -0
  86. data/lib/hippo/segments/STC.rb +187 -0
  87. data/lib/hippo/segments/SV1.rb +267 -0
  88. data/lib/hippo/segments/SV2.rb +147 -0
  89. data/lib/hippo/segments/SV3.rb +223 -0
  90. data/lib/hippo/segments/SV4.rb +211 -0
  91. data/lib/hippo/segments/SV5.rb +123 -0
  92. data/lib/hippo/segments/SV6.rb +155 -0
  93. data/lib/hippo/segments/SV7.rb +55 -0
  94. data/lib/hippo/segments/SVC.rb +183 -0
  95. data/lib/hippo/segments/SVD.rb +116 -0
  96. data/lib/hippo/segments/TOO.rb +67 -0
  97. data/lib/hippo/segments/TRN.rb +39 -0
  98. data/lib/hippo/segments/TS2.rb +159 -0
  99. data/lib/hippo/segments/TS3.rb +199 -0
  100. data/lib/hippo/segments/UR.rb +23 -0
  101. data/lib/hippo/segments/base.rb +148 -0
  102. data/lib/hippo/segments.rb +85 -0
  103. data/lib/hippo/transaction_sets/HIPAA_276/L2000A.rb +28 -0
  104. data/lib/hippo/transaction_sets/HIPAA_276/L2000B.rb +28 -0
  105. data/lib/hippo/transaction_sets/HIPAA_276/L2000C.rb +28 -0
  106. data/lib/hippo/transaction_sets/HIPAA_276/L2000D.rb +45 -0
  107. data/lib/hippo/transaction_sets/HIPAA_276/L2000E.rb +45 -0
  108. data/lib/hippo/transaction_sets/HIPAA_276/L2100A.rb +20 -0
  109. data/lib/hippo/transaction_sets/HIPAA_276/L2100B.rb +20 -0
  110. data/lib/hippo/transaction_sets/HIPAA_276/L2100C.rb +19 -0
  111. data/lib/hippo/transaction_sets/HIPAA_276/L2100D.rb +19 -0
  112. data/lib/hippo/transaction_sets/HIPAA_276/L2100E.rb +20 -0
  113. data/lib/hippo/transaction_sets/HIPAA_276/L2200D.rb +116 -0
  114. data/lib/hippo/transaction_sets/HIPAA_276/L2200E.rb +116 -0
  115. data/lib/hippo/transaction_sets/HIPAA_276/L2210D.rb +36 -0
  116. data/lib/hippo/transaction_sets/HIPAA_276/L2210E.rb +36 -0
  117. data/lib/hippo/transaction_sets/HIPAA_276/base.rb +86 -0
  118. data/lib/hippo/transaction_sets/HIPAA_276.rb +21 -0
  119. data/lib/hippo/transaction_sets/HIPAA_277/L2000A.rb +35 -0
  120. data/lib/hippo/transaction_sets/HIPAA_277/L2000B.rb +35 -0
  121. data/lib/hippo/transaction_sets/HIPAA_277/L2000C.rb +35 -0
  122. data/lib/hippo/transaction_sets/HIPAA_277/L2000D.rb +35 -0
  123. data/lib/hippo/transaction_sets/HIPAA_277/L2000E.rb +35 -0
  124. data/lib/hippo/transaction_sets/HIPAA_277/L2100A.rb +19 -0
  125. data/lib/hippo/transaction_sets/HIPAA_277/L2100B.rb +20 -0
  126. data/lib/hippo/transaction_sets/HIPAA_277/L2100C.rb +19 -0
  127. data/lib/hippo/transaction_sets/HIPAA_277/L2100D.rb +20 -0
  128. data/lib/hippo/transaction_sets/HIPAA_277/L2100E.rb +20 -0
  129. data/lib/hippo/transaction_sets/HIPAA_277/L2200A.rb +41 -0
  130. data/lib/hippo/transaction_sets/HIPAA_277/L2200B.rb +66 -0
  131. data/lib/hippo/transaction_sets/HIPAA_277/L2200C.rb +73 -0
  132. data/lib/hippo/transaction_sets/HIPAA_277/L2200D.rb +73 -0
  133. data/lib/hippo/transaction_sets/HIPAA_277/L2200E.rb +103 -0
  134. data/lib/hippo/transaction_sets/HIPAA_277/L2220D.rb +56 -0
  135. data/lib/hippo/transaction_sets/HIPAA_277/L2220E.rb +43 -0
  136. data/lib/hippo/transaction_sets/HIPAA_277/base.rb +77 -0
  137. data/lib/hippo/transaction_sets/HIPAA_277.rb +24 -0
  138. data/lib/hippo/transaction_sets/HIPAA_835/L1000A.rb +71 -0
  139. data/lib/hippo/transaction_sets/HIPAA_835/L1000B.rb +47 -0
  140. data/lib/hippo/transaction_sets/HIPAA_835/L2000.rb +37 -0
  141. data/lib/hippo/transaction_sets/HIPAA_835/L2100.rb +182 -0
  142. data/lib/hippo/transaction_sets/HIPAA_835/L2110.rb +85 -0
  143. data/lib/hippo/transaction_sets/HIPAA_835/base.rb +112 -0
  144. data/lib/hippo/transaction_sets/HIPAA_835.rb +12 -0
  145. data/lib/hippo/transaction_sets/HIPAA_837/L1000A.rb +30 -0
  146. data/lib/hippo/transaction_sets/HIPAA_837/L1000B.rb +21 -0
  147. data/lib/hippo/transaction_sets/HIPAA_837/L2000A.rb +65 -0
  148. data/lib/hippo/transaction_sets/HIPAA_837/L2000B.rb +49 -0
  149. data/lib/hippo/transaction_sets/HIPAA_837/L2000C.rb +42 -0
  150. data/lib/hippo/transaction_sets/HIPAA_837/L2010AA.rb +57 -0
  151. data/lib/hippo/transaction_sets/HIPAA_837/L2010AB.rb +33 -0
  152. data/lib/hippo/transaction_sets/HIPAA_837/L2010AC.rb +51 -0
  153. data/lib/hippo/transaction_sets/HIPAA_837/L2010BA.rb +74 -0
  154. data/lib/hippo/transaction_sets/HIPAA_837/L2010BB.rb +48 -0
  155. data/lib/hippo/transaction_sets/HIPAA_837/L2010CA.rb +72 -0
  156. data/lib/hippo/transaction_sets/HIPAA_837/L2300.rb +510 -0
  157. data/lib/hippo/transaction_sets/HIPAA_837/L2310A.rb +26 -0
  158. data/lib/hippo/transaction_sets/HIPAA_837/L2310B.rb +37 -0
  159. data/lib/hippo/transaction_sets/HIPAA_837/L2310C.rb +52 -0
  160. data/lib/hippo/transaction_sets/HIPAA_837/L2310D.rb +27 -0
  161. data/lib/hippo/transaction_sets/HIPAA_837/L2310E.rb +34 -0
  162. data/lib/hippo/transaction_sets/HIPAA_837/L2310F.rb +34 -0
  163. data/lib/hippo/transaction_sets/HIPAA_837/L2320.rb +122 -0
  164. data/lib/hippo/transaction_sets/HIPAA_837/L2330A.rb +43 -0
  165. data/lib/hippo/transaction_sets/HIPAA_837/L2330B.rb +92 -0
  166. data/lib/hippo/transaction_sets/HIPAA_837/L2330C.rb +26 -0
  167. data/lib/hippo/transaction_sets/HIPAA_837/L2330D.rb +26 -0
  168. data/lib/hippo/transaction_sets/HIPAA_837/L2330E.rb +27 -0
  169. data/lib/hippo/transaction_sets/HIPAA_837/L2330F.rb +27 -0
  170. data/lib/hippo/transaction_sets/HIPAA_837/L2330G.rb +26 -0
  171. data/lib/hippo/transaction_sets/HIPAA_837/L2400.rb +475 -0
  172. data/lib/hippo/transaction_sets/HIPAA_837/L2410.rb +30 -0
  173. data/lib/hippo/transaction_sets/HIPAA_837/L2420A.rb +37 -0
  174. data/lib/hippo/transaction_sets/HIPAA_837/L2420B.rb +26 -0
  175. data/lib/hippo/transaction_sets/HIPAA_837/L2420C.rb +41 -0
  176. data/lib/hippo/transaction_sets/HIPAA_837/L2420D.rb +27 -0
  177. data/lib/hippo/transaction_sets/HIPAA_837/L2420E.rb +51 -0
  178. data/lib/hippo/transaction_sets/HIPAA_837/L2420F.rb +26 -0
  179. data/lib/hippo/transaction_sets/HIPAA_837/L2420G.rb +34 -0
  180. data/lib/hippo/transaction_sets/HIPAA_837/L2420H.rb +34 -0
  181. data/lib/hippo/transaction_sets/HIPAA_837/L2430.rb +44 -0
  182. data/lib/hippo/transaction_sets/HIPAA_837/L2440.rb +23 -0
  183. data/lib/hippo/transaction_sets/HIPAA_837/base.rb +81 -0
  184. data/lib/hippo/transaction_sets/HIPAA_837.rb +45 -0
  185. data/lib/hippo/transaction_sets/HIPAA_999/L2000 - AK2.rb +30 -0
  186. data/lib/hippo/transaction_sets/HIPAA_999/L2000AK2.rb +30 -0
  187. data/lib/hippo/transaction_sets/HIPAA_999/L2100 - AK2.rb +37 -0
  188. data/lib/hippo/transaction_sets/HIPAA_999/L2100AK2.rb +37 -0
  189. data/lib/hippo/transaction_sets/HIPAA_999/L2110 - AK2.rb +23 -0
  190. data/lib/hippo/transaction_sets/HIPAA_999/L2110AK2.rb +23 -0
  191. data/lib/hippo/transaction_sets/HIPAA_999/base.rb +46 -0
  192. data/lib/hippo/transaction_sets/HIPAA_999.rb +10 -0
  193. data/lib/hippo/transaction_sets/base.rb +136 -0
  194. data/lib/hippo/transaction_sets.rb +11 -0
  195. data/lib/hippo/version.rb +3 -0
  196. data/lib/hippo.rb +15 -0
  197. data/samples/835_4010.edi +1 -0
  198. data/samples/837_4010A1.edi +1 -0
  199. data/test/test_helper.rb +118 -0
  200. data/test/test_hipaa_837.rb +396 -0
  201. data/test/test_segments_base.rb +106 -0
  202. data/test/test_transaction_sets_base.rb +85 -0
  203. metadata +277 -0
@@ -0,0 +1,71 @@
1
+ module Hippo::TransactionSets
2
+ module HIPAA_835
3
+
4
+ class L1000A < Hippo::TransactionSets::Base
5
+ loop_name 'L1000A' #Payer Identification
6
+
7
+ #Payer Identification
8
+ segment Hippo::Segments::N1,
9
+ :name => 'Payer Identification',
10
+ :minimum => 1,
11
+ :maximum => 1,
12
+ :position => 800,
13
+ :defaults => {
14
+ 'N101' => 'PR'
15
+ }
16
+
17
+ #Payer Address
18
+ segment Hippo::Segments::N3,
19
+ :name => 'Payer Address',
20
+ :minimum => 1,
21
+ :maximum => 1,
22
+ :position => 1000
23
+
24
+ #Payer City, State, ZIP Code
25
+ segment Hippo::Segments::N4,
26
+ :name => 'Payer City, State, ZIP Code',
27
+ :minimum => 1,
28
+ :maximum => 1,
29
+ :position => 1100
30
+
31
+ #Additional Payer Identification
32
+ segment Hippo::Segments::REF,
33
+ :name => 'Additional Payer Identification',
34
+ :minimum => 0,
35
+ :maximum => 4,
36
+ :position => 1200
37
+
38
+ #Payer Business Contact Information
39
+ segment Hippo::Segments::PER,
40
+ :name => 'Payer Business Contact Information',
41
+ :minimum => 0,
42
+ :maximum => 1,
43
+ :position => 1300,
44
+ :defaults => {
45
+ 'PER01' => 'CX'
46
+ }
47
+
48
+ #Payer Technical Contact Information
49
+ segment Hippo::Segments::PER,
50
+ :name => 'Payer Technical Contact Information',
51
+ :minimum => 1,
52
+ :maximum => nil,
53
+ :position => 1303,
54
+ :defaults => {
55
+ 'PER01' => 'BL'
56
+ }
57
+
58
+ #Payer WEB Site
59
+ segment Hippo::Segments::PER,
60
+ :name => 'Payer WEB Site',
61
+ :minimum => 0,
62
+ :maximum => 1,
63
+ :position => 1305,
64
+ :defaults => {
65
+ 'PER01' => 'IC',
66
+ 'PER03' => 'UR'
67
+ }
68
+
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,47 @@
1
+ module Hippo::TransactionSets
2
+ module HIPAA_835
3
+
4
+ class L1000B < Hippo::TransactionSets::Base
5
+ loop_name 'L1000B' #Payee Identification
6
+
7
+ #Payee Identification
8
+ segment Hippo::Segments::N1,
9
+ :name => 'Payee Identification',
10
+ :minimum => 1,
11
+ :maximum => 1,
12
+ :position => 1400,
13
+ :defaults => {
14
+ 'N101' => 'PE'
15
+ }
16
+
17
+ #Payee Address
18
+ segment Hippo::Segments::N3,
19
+ :name => 'Payee Address',
20
+ :minimum => 0,
21
+ :maximum => 1,
22
+ :position => 1600
23
+
24
+ #Payee City, State, ZIP Code
25
+ segment Hippo::Segments::N4,
26
+ :name => 'Payee City, State, ZIP Code',
27
+ :minimum => 0,
28
+ :maximum => 1,
29
+ :position => 1700
30
+
31
+ #Payee Additional Identification
32
+ segment Hippo::Segments::REF,
33
+ :name => 'Payee Additional Identification',
34
+ :minimum => 0,
35
+ :maximum => nil,
36
+ :position => 1800
37
+
38
+ #Remittance Delivery Method
39
+ segment Hippo::Segments::RDM,
40
+ :name => 'Remittance Delivery Method',
41
+ :minimum => 0,
42
+ :maximum => 1,
43
+ :position => 2000
44
+
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,37 @@
1
+ module Hippo::TransactionSets
2
+ module HIPAA_835
3
+
4
+ class L2000 < Hippo::TransactionSets::Base
5
+ loop_name 'L2000' #Header Number
6
+
7
+ #Header Number
8
+ segment Hippo::Segments::LX,
9
+ :name => 'Header Number',
10
+ :minimum => 0,
11
+ :maximum => 1,
12
+ :position => 30
13
+
14
+ #Provider Summary Information
15
+ segment Hippo::Segments::TS3,
16
+ :name => 'Provider Summary Information',
17
+ :minimum => 0,
18
+ :maximum => 1,
19
+ :position => 50
20
+
21
+ #Provider Supplemental Summary Information
22
+ segment Hippo::Segments::TS2,
23
+ :name => 'Provider Supplemental Summary Information',
24
+ :minimum => 0,
25
+ :maximum => 1,
26
+ :position => 70
27
+
28
+ #Claim Payment Information
29
+ loop Hippo::TransactionSets::HIPAA_835::L2100,
30
+ :name => 'Claim Payment Information',
31
+ :minimum => 1,
32
+ :maximum => nil,
33
+ :position => 100
34
+
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,182 @@
1
+ module Hippo::TransactionSets
2
+ module HIPAA_835
3
+
4
+ class L2100 < Hippo::TransactionSets::Base
5
+ loop_name 'L2100' #Claim Payment Information
6
+
7
+ #Claim Payment Information
8
+ segment Hippo::Segments::CLP,
9
+ :name => 'Claim Payment Information',
10
+ :minimum => 1,
11
+ :maximum => 1,
12
+ :position => 100
13
+
14
+ #Claim Adjustment
15
+ segment Hippo::Segments::CAS,
16
+ :name => 'Claim Adjustment',
17
+ :minimum => 0,
18
+ :maximum => 99,
19
+ :position => 200
20
+
21
+ #Patient Name
22
+ segment Hippo::Segments::NM1,
23
+ :name => 'Patient Name',
24
+ :minimum => 1,
25
+ :maximum => 1,
26
+ :position => 290,
27
+ :defaults => {
28
+ 'NM101' => 'QC',
29
+ 'NM102' => '1'
30
+ }
31
+
32
+ #Insured Name
33
+ segment Hippo::Segments::NM1,
34
+ :name => 'Insured Name',
35
+ :minimum => 0,
36
+ :maximum => 1,
37
+ :position => 300,
38
+ :defaults => {
39
+ 'NM101' => 'IL'
40
+ }
41
+
42
+ #Corrected Patient/Insured Name
43
+ segment Hippo::Segments::NM1,
44
+ :name => 'Corrected Patient/Insured Name',
45
+ :minimum => 0,
46
+ :maximum => 1,
47
+ :position => 310,
48
+ :defaults => {
49
+ 'NM101' => '74'
50
+ }
51
+
52
+ #Service Provider Name
53
+ segment Hippo::Segments::NM1,
54
+ :name => 'Service Provider Name',
55
+ :minimum => 0,
56
+ :maximum => 1,
57
+ :position => 320,
58
+ :defaults => {
59
+ 'NM101' => '82'
60
+ }
61
+
62
+ #Crossover Carrier Name
63
+ segment Hippo::Segments::NM1,
64
+ :name => 'Crossover Carrier Name',
65
+ :minimum => 0,
66
+ :maximum => 1,
67
+ :position => 330,
68
+ :defaults => {
69
+ 'NM101' => 'TT',
70
+ 'NM102' => '2'
71
+ }
72
+
73
+ #Corrected Priority Payer Name
74
+ segment Hippo::Segments::NM1,
75
+ :name => 'Corrected Priority Payer Name',
76
+ :minimum => 0,
77
+ :maximum => 1,
78
+ :position => 340,
79
+ :defaults => {
80
+ 'NM101' => 'PR',
81
+ 'NM102' => '2'
82
+ }
83
+
84
+ #Other Subscriber Name
85
+ segment Hippo::Segments::NM1,
86
+ :name => 'Other Subscriber Name',
87
+ :minimum => 0,
88
+ :maximum => 1,
89
+ :position => 350,
90
+ :defaults => {
91
+ 'NM101' => 'GB'
92
+ }
93
+
94
+ #Inpatient Adjudication Information
95
+ segment Hippo::Segments::MIA,
96
+ :name => 'Inpatient Adjudication Information',
97
+ :minimum => 0,
98
+ :maximum => 1,
99
+ :position => 370
100
+
101
+ #Outpatient Adjudication Information
102
+ segment Hippo::Segments::MOA,
103
+ :name => 'Outpatient Adjudication Information',
104
+ :minimum => 0,
105
+ :maximum => 1,
106
+ :position => 380
107
+
108
+ #Other Claim Related Identification
109
+ segment Hippo::Segments::REF,
110
+ :name => 'Other Claim Related Identification',
111
+ :minimum => 0,
112
+ :maximum => 5,
113
+ :position => 400
114
+
115
+ #Rendering Provider Identification
116
+ segment Hippo::Segments::REF,
117
+ :name => 'Rendering Provider Identification',
118
+ :minimum => 0,
119
+ :maximum => 10,
120
+ :position => 450
121
+
122
+ #Statement From or To Date
123
+ segment Hippo::Segments::DTM,
124
+ :name => 'Statement From or To Date',
125
+ :minimum => 0,
126
+ :maximum => 2,
127
+ :position => 500
128
+
129
+ #Coverage Expiration Date
130
+ segment Hippo::Segments::DTM,
131
+ :name => 'Coverage Expiration Date',
132
+ :minimum => 0,
133
+ :maximum => 1,
134
+ :position => 505,
135
+ :defaults => {
136
+ 'DTM01' => '036'
137
+ }
138
+
139
+ #Claim Received Date
140
+ segment Hippo::Segments::DTM,
141
+ :name => 'Claim Received Date',
142
+ :minimum => 0,
143
+ :maximum => 1,
144
+ :position => 510,
145
+ :defaults => {
146
+ 'DTM01' => '050'
147
+ }
148
+
149
+ #Claim Contact Information
150
+ segment Hippo::Segments::PER,
151
+ :name => 'Claim Contact Information',
152
+ :minimum => 0,
153
+ :maximum => 2,
154
+ :position => 600,
155
+ :defaults => {
156
+ 'PER01' => 'CX'
157
+ }
158
+
159
+ #Claim Supplemental Information
160
+ segment Hippo::Segments::AMT,
161
+ :name => 'Claim Supplemental Information',
162
+ :minimum => 0,
163
+ :maximum => 13,
164
+ :position => 620
165
+
166
+ #Claim Supplemental Information Quantity
167
+ segment Hippo::Segments::QTY,
168
+ :name => 'Claim Supplemental Information Quantity',
169
+ :minimum => 0,
170
+ :maximum => 14,
171
+ :position => 640
172
+
173
+ #Service Payment Information
174
+ loop Hippo::TransactionSets::HIPAA_835::L2110,
175
+ :name => 'Service Payment Information',
176
+ :minimum => 0,
177
+ :maximum => 999,
178
+ :position => 700
179
+
180
+ end
181
+ end
182
+ end
@@ -0,0 +1,85 @@
1
+ module Hippo::TransactionSets
2
+ module HIPAA_835
3
+
4
+ class L2110 < Hippo::TransactionSets::Base
5
+ loop_name 'L2110' #Service Payment Information
6
+
7
+ #Service Payment Information
8
+ segment Hippo::Segments::SVC,
9
+ :name => 'Service Payment Information',
10
+ :minimum => 0,
11
+ :maximum => 1,
12
+ :position => 700
13
+
14
+ #Service Date
15
+ segment Hippo::Segments::DTM,
16
+ :name => 'Service Date',
17
+ :minimum => 0,
18
+ :maximum => 2,
19
+ :position => 800
20
+
21
+ #Service Adjustment
22
+ segment Hippo::Segments::CAS,
23
+ :name => 'Service Adjustment',
24
+ :minimum => 0,
25
+ :maximum => 99,
26
+ :position => 900
27
+
28
+ #Service Identification
29
+ segment Hippo::Segments::REF,
30
+ :name => 'Service Identification',
31
+ :minimum => 0,
32
+ :maximum => 8,
33
+ :position => 1000
34
+
35
+ #Line Item Control Number
36
+ segment Hippo::Segments::REF,
37
+ :name => 'Line Item Control Number',
38
+ :minimum => 0,
39
+ :maximum => 1,
40
+ :position => 1010,
41
+ :defaults => {
42
+ 'REF01' => '6R'
43
+ }
44
+
45
+ #Rendering Provider Information
46
+ segment Hippo::Segments::REF,
47
+ :name => 'Rendering Provider Information',
48
+ :minimum => 0,
49
+ :maximum => 10,
50
+ :position => 1050
51
+
52
+ #HealthCare Policy Identification
53
+ segment Hippo::Segments::REF,
54
+ :name => 'HealthCare Policy Identification',
55
+ :minimum => 0,
56
+ :maximum => 5,
57
+ :position => 1060,
58
+ :defaults => {
59
+ 'REF01' => '0K'
60
+ }
61
+
62
+ #Service Supplemental Amount
63
+ segment Hippo::Segments::AMT,
64
+ :name => 'Service Supplemental Amount',
65
+ :minimum => 0,
66
+ :maximum => 9,
67
+ :position => 1100
68
+
69
+ #Service Supplemental Quantity
70
+ segment Hippo::Segments::QTY,
71
+ :name => 'Service Supplemental Quantity',
72
+ :minimum => 0,
73
+ :maximum => 6,
74
+ :position => 1200
75
+
76
+ #Health Care Remark Codes
77
+ segment Hippo::Segments::LQ,
78
+ :name => 'Health Care Remark Codes',
79
+ :minimum => 0,
80
+ :maximum => 99,
81
+ :position => 1300
82
+
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,112 @@
1
+ module Hippo::TransactionSets
2
+ module HIPAA_835
3
+
4
+ class Base < Hippo::TransactionSets::Base
5
+
6
+ #Transaction Set Header
7
+ segment Hippo::Segments::ST,
8
+ :name => 'Transaction Set Header',
9
+ :minimum => 1,
10
+ :maximum => 1,
11
+ :position => 100,
12
+ :defaults => {
13
+ 'ST01' => '835'
14
+ }
15
+
16
+ #Financial Information
17
+ segment Hippo::Segments::BPR,
18
+ :name => 'Financial Information',
19
+ :minimum => 1,
20
+ :maximum => 1,
21
+ :position => 200
22
+
23
+ #Reassociation Trace Number
24
+ segment Hippo::Segments::TRN,
25
+ :name => 'Reassociation Trace Number',
26
+ :minimum => 1,
27
+ :maximum => 1,
28
+ :position => 400,
29
+ :defaults => {
30
+ 'TRN01' => '1'
31
+ }
32
+
33
+ #Foreign Currency Information
34
+ segment Hippo::Segments::CUR,
35
+ :name => 'Foreign Currency Information',
36
+ :minimum => 0,
37
+ :maximum => 1,
38
+ :position => 500,
39
+ :defaults => {
40
+ 'CUR01' => 'PR'
41
+ }
42
+
43
+ #Receiver Identification
44
+ segment Hippo::Segments::REF,
45
+ :name => 'Receiver Identification',
46
+ :minimum => 0,
47
+ :maximum => 1,
48
+ :position => 590,
49
+ :defaults => {
50
+ 'REF01' => 'EV'
51
+ }
52
+
53
+ #Version Identification
54
+ segment Hippo::Segments::REF,
55
+ :name => 'Version Identification',
56
+ :minimum => 0,
57
+ :maximum => 1,
58
+ :position => 600,
59
+ :defaults => {
60
+ 'REF01' => 'F2'
61
+ }
62
+
63
+ #Production Date
64
+ segment Hippo::Segments::DTM,
65
+ :name => 'Production Date',
66
+ :minimum => 0,
67
+ :maximum => 1,
68
+ :position => 700,
69
+ :defaults => {
70
+ 'DTM01' => '405'
71
+ }
72
+
73
+ #Payer Identification
74
+ loop Hippo::TransactionSets::HIPAA_835::L1000A,
75
+ :name => 'Payer Identification',
76
+ :identified_by => {'N1.N101' => 'PR'},
77
+ :minimum => 1,
78
+ :maximum => 1,
79
+ :position => 800
80
+
81
+ #Payee Identification
82
+ loop Hippo::TransactionSets::HIPAA_835::L1000B,
83
+ :name => 'Payee Identification',
84
+ :identified_by => {'N1.N101' => 'PE'},
85
+ :minimum => 1,
86
+ :maximum => 1,
87
+ :position => 1400
88
+
89
+ #Header Number
90
+ loop Hippo::TransactionSets::HIPAA_835::L2000,
91
+ :name => 'Header Number',
92
+ :minimum => 0,
93
+ :maximum => nil,
94
+ :position => 30
95
+
96
+ #Provider Adjustment
97
+ segment Hippo::Segments::PLB,
98
+ :name => 'Provider Adjustment',
99
+ :minimum => 0,
100
+ :maximum => nil,
101
+ :position => 100
102
+
103
+ #Transaction Set Trailer
104
+ segment Hippo::Segments::SE,
105
+ :name => 'Transaction Set Trailer',
106
+ :minimum => 1,
107
+ :maximum => 1,
108
+ :position => 200
109
+
110
+ end
111
+ end
112
+ end
@@ -0,0 +1,12 @@
1
+ module Hippo::TransactionSets
2
+ module HIPAA_835
3
+
4
+ autoload :Base, 'hippo/transaction_sets/HIPAA_835/base'
5
+ autoload :L1000A, 'hippo/transaction_sets/HIPAA_835/L1000A'
6
+ autoload :L1000B, 'hippo/transaction_sets/HIPAA_835/L1000B'
7
+ autoload :L2000, 'hippo/transaction_sets/HIPAA_835/L2000'
8
+ autoload :L2100, 'hippo/transaction_sets/HIPAA_835/L2100'
9
+ autoload :L2110, 'hippo/transaction_sets/HIPAA_835/L2110'
10
+
11
+ end
12
+ end
@@ -0,0 +1,30 @@
1
+ module Hippo::TransactionSets
2
+ module HIPAA_837
3
+
4
+ class L1000A < Hippo::TransactionSets::Base
5
+ loop_name 'L1000A' #Submitter Name
6
+
7
+ #Submitter Name
8
+ segment Hippo::Segments::NM1,
9
+ :name => 'Submitter Name',
10
+ :minimum => 1,
11
+ :maximum => 1,
12
+ :position => 200,
13
+ :defaults => {
14
+ 'NM101' => '41',
15
+ 'NM108' => '46'
16
+ }
17
+
18
+ #Submitter EDI Contact Information
19
+ segment Hippo::Segments::PER,
20
+ :name => 'Submitter EDI Contact Information',
21
+ :minimum => 1,
22
+ :maximum => 2,
23
+ :position => 450,
24
+ :defaults => {
25
+ 'PER01' => 'IC'
26
+ }
27
+
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,21 @@
1
+ module Hippo::TransactionSets
2
+ module HIPAA_837
3
+
4
+ class L1000B < Hippo::TransactionSets::Base
5
+ loop_name 'L1000B' #Receiver Name
6
+
7
+ #Receiver Name
8
+ segment Hippo::Segments::NM1,
9
+ :name => 'Receiver Name',
10
+ :minimum => 1,
11
+ :maximum => 1,
12
+ :position => 500,
13
+ :defaults => {
14
+ 'NM101' => '40',
15
+ 'NM102' => '2',
16
+ 'NM108' => '46'
17
+ }
18
+
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,65 @@
1
+ module Hippo::TransactionSets
2
+ module HIPAA_837
3
+
4
+ class L2000A < Hippo::TransactionSets::Base
5
+ loop_name 'L2000A' #Billing Provider Hierarchical Level
6
+
7
+ #Billing Provider Hierarchical Level
8
+ segment Hippo::Segments::HL,
9
+ :name => 'Billing Provider Hierarchical Level',
10
+ :minimum => 1,
11
+ :maximum => 1,
12
+ :position => 10,
13
+ :defaults => {
14
+ 'HL03' => '20',
15
+ 'HL04' => '1'
16
+ }
17
+
18
+ #Billing Provider Specialty Information
19
+ segment Hippo::Segments::PRV,
20
+ :name => 'Billing Provider Specialty Information',
21
+ :minimum => 0,
22
+ :maximum => 1,
23
+ :position => 30,
24
+ :defaults => {
25
+ 'PRV01' => 'BI',
26
+ 'PRV02' => 'PXC'
27
+ }
28
+
29
+ #Foreign Currency Information
30
+ segment Hippo::Segments::CUR,
31
+ :name => 'Foreign Currency Information',
32
+ :minimum => 0,
33
+ :maximum => 1,
34
+ :position => 100,
35
+ :defaults => {
36
+ 'CUR01' => '85'
37
+ }
38
+
39
+ #Billing Provider Name
40
+ loop Hippo::TransactionSets::HIPAA_837::L2010AA,
41
+ :name => 'Billing Provider Name',
42
+ :identified_by => {'NM1.NM101' => '85'},
43
+ :minimum => 1,
44
+ :maximum => 1,
45
+ :position => 150
46
+
47
+ #Pay-to Address Name
48
+ loop Hippo::TransactionSets::HIPAA_837::L2010AB,
49
+ :name => 'Pay-to Address Name',
50
+ :identified_by => {'NM1.NM101' => '87'},
51
+ :minimum => 0,
52
+ :maximum => 1,
53
+ :position => 150
54
+
55
+ #Pay-To Plan Name
56
+ loop Hippo::TransactionSets::HIPAA_837::L2010AC,
57
+ :name => 'Pay-To Plan Name',
58
+ :identified_by => {'NM1.NM101' => 'PE'},
59
+ :minimum => 0,
60
+ :maximum => 1,
61
+ :position => 450
62
+
63
+ end
64
+ end
65
+ end