hippo_eyeDoc 0.0.1

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 (284) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG +124 -0
  3. data/Gemfile +10 -0
  4. data/Guardfile +14 -0
  5. data/LICENSE +24 -0
  6. data/README.md +385 -0
  7. data/Rakefile +12 -0
  8. data/hippo_eyeDoc.gemspec +25 -0
  9. data/lib/hippo_eyeDoc.rb +15 -0
  10. data/lib/hippo_eyeDoc/code_lists.rb +10 -0
  11. data/lib/hippo_eyeDoc/code_lists/claim_adjustment_reason_codes.rb +2252 -0
  12. data/lib/hippo_eyeDoc/code_lists/claim_status_category_codes.rb +376 -0
  13. data/lib/hippo_eyeDoc/code_lists/claim_status_codes.rb +5456 -0
  14. data/lib/hippo_eyeDoc/code_lists/remittance_advice_remark_codes.rb +6280 -0
  15. data/lib/hippo_eyeDoc/code_lists/service_type_codes.rb +1299 -0
  16. data/lib/hippo_eyeDoc/code_lists/taxonomy_codes.rb +9224 -0
  17. data/lib/hippo_eyeDoc/exceptions.rb +10 -0
  18. data/lib/hippo_eyeDoc/field.rb +149 -0
  19. data/lib/hippo_eyeDoc/outputters.rb +4 -0
  20. data/lib/hippo_eyeDoc/outputters/html.rb +39 -0
  21. data/lib/hippo_eyeDoc/outputters/paper_claim.rb +7 -0
  22. data/lib/hippo_eyeDoc/outputters/pdf.rb +18 -0
  23. data/lib/hippo_eyeDoc/outputters/pretty_string.rb +45 -0
  24. data/lib/hippo_eyeDoc/parser.rb +70 -0
  25. data/lib/hippo_eyeDoc/parser/segment.rb +35 -0
  26. data/lib/hippo_eyeDoc/parser/transaction_set.rb +45 -0
  27. data/lib/hippo_eyeDoc/segments.rb +111 -0
  28. data/lib/hippo_eyeDoc/segments/AAA.rb +39 -0
  29. data/lib/hippo_eyeDoc/segments/AK1.rb +31 -0
  30. data/lib/hippo_eyeDoc/segments/AK2.rb +31 -0
  31. data/lib/hippo_eyeDoc/segments/AK3.rb +39 -0
  32. data/lib/hippo_eyeDoc/segments/AK4.rb +59 -0
  33. data/lib/hippo_eyeDoc/segments/AK5.rb +55 -0
  34. data/lib/hippo_eyeDoc/segments/AK9.rb +79 -0
  35. data/lib/hippo_eyeDoc/segments/AMT.rb +31 -0
  36. data/lib/hippo_eyeDoc/segments/BHT.rb +55 -0
  37. data/lib/hippo_eyeDoc/segments/BPR.rb +175 -0
  38. data/lib/hippo_eyeDoc/segments/CAS.rb +159 -0
  39. data/lib/hippo_eyeDoc/segments/CL1.rb +39 -0
  40. data/lib/hippo_eyeDoc/segments/CLM.rb +223 -0
  41. data/lib/hippo_eyeDoc/segments/CLP.rb +119 -0
  42. data/lib/hippo_eyeDoc/segments/CN1.rb +55 -0
  43. data/lib/hippo_eyeDoc/segments/CR1.rb +87 -0
  44. data/lib/hippo_eyeDoc/segments/CR2.rb +103 -0
  45. data/lib/hippo_eyeDoc/segments/CR3.rb +47 -0
  46. data/lib/hippo_eyeDoc/segments/CR4.rb +239 -0
  47. data/lib/hippo_eyeDoc/segments/CR5.rb +151 -0
  48. data/lib/hippo_eyeDoc/segments/CR6.rb +175 -0
  49. data/lib/hippo_eyeDoc/segments/CR7.rb +31 -0
  50. data/lib/hippo_eyeDoc/segments/CR8.rb +79 -0
  51. data/lib/hippo_eyeDoc/segments/CRC.rb +63 -0
  52. data/lib/hippo_eyeDoc/segments/CTP.rb +211 -0
  53. data/lib/hippo_eyeDoc/segments/CTX.rb +99 -0
  54. data/lib/hippo_eyeDoc/segments/CUR.rb +175 -0
  55. data/lib/hippo_eyeDoc/segments/DMG.rb +115 -0
  56. data/lib/hippo_eyeDoc/segments/DN1.rb +39 -0
  57. data/lib/hippo_eyeDoc/segments/DN2.rb +55 -0
  58. data/lib/hippo_eyeDoc/segments/DSB.rb +71 -0
  59. data/lib/hippo_eyeDoc/segments/DTM.rb +55 -0
  60. data/lib/hippo_eyeDoc/segments/DTP.rb +31 -0
  61. data/lib/hippo_eyeDoc/segments/EB.rb +207 -0
  62. data/lib/hippo_eyeDoc/segments/EM.rb +63 -0
  63. data/lib/hippo_eyeDoc/segments/EQ.rb +135 -0
  64. data/lib/hippo_eyeDoc/segments/FRM.rb +47 -0
  65. data/lib/hippo_eyeDoc/segments/GE.rb +23 -0
  66. data/lib/hippo_eyeDoc/segments/GS.rb +71 -0
  67. data/lib/hippo_eyeDoc/segments/HCP.rb +127 -0
  68. data/lib/hippo_eyeDoc/segments/HI.rb +919 -0
  69. data/lib/hippo_eyeDoc/segments/HL.rb +44 -0
  70. data/lib/hippo_eyeDoc/segments/HSD.rb +71 -0
  71. data/lib/hippo_eyeDoc/segments/IEA.rb +23 -0
  72. data/lib/hippo_eyeDoc/segments/III.rb +195 -0
  73. data/lib/hippo_eyeDoc/segments/IK3.rb +39 -0
  74. data/lib/hippo_eyeDoc/segments/IK4.rb +59 -0
  75. data/lib/hippo_eyeDoc/segments/IK5.rb +55 -0
  76. data/lib/hippo_eyeDoc/segments/IMM.rb +55 -0
  77. data/lib/hippo_eyeDoc/segments/INS.rb +171 -0
  78. data/lib/hippo_eyeDoc/segments/ISA.rb +136 -0
  79. data/lib/hippo_eyeDoc/segments/K3.rb +147 -0
  80. data/lib/hippo_eyeDoc/segments/LE.rb +15 -0
  81. data/lib/hippo_eyeDoc/segments/LIN.rb +255 -0
  82. data/lib/hippo_eyeDoc/segments/LQ.rb +23 -0
  83. data/lib/hippo_eyeDoc/segments/LS.rb +15 -0
  84. data/lib/hippo_eyeDoc/segments/LX.rb +20 -0
  85. data/lib/hippo_eyeDoc/segments/MEA.rb +219 -0
  86. data/lib/hippo_eyeDoc/segments/MIA.rb +199 -0
  87. data/lib/hippo_eyeDoc/segments/MOA.rb +79 -0
  88. data/lib/hippo_eyeDoc/segments/MPI.rb +63 -0
  89. data/lib/hippo_eyeDoc/segments/MSG.rb +31 -0
  90. data/lib/hippo_eyeDoc/segments/N1.rb +55 -0
  91. data/lib/hippo_eyeDoc/segments/N2.rb +23 -0
  92. data/lib/hippo_eyeDoc/segments/N3.rb +23 -0
  93. data/lib/hippo_eyeDoc/segments/N4.rb +63 -0
  94. data/lib/hippo_eyeDoc/segments/NM1.rb +103 -0
  95. data/lib/hippo_eyeDoc/segments/NTE.rb +23 -0
  96. data/lib/hippo_eyeDoc/segments/OI.rb +55 -0
  97. data/lib/hippo_eyeDoc/segments/PAT.rb +79 -0
  98. data/lib/hippo_eyeDoc/segments/PCT.rb +23 -0
  99. data/lib/hippo_eyeDoc/segments/PDP.rb +31 -0
  100. data/lib/hippo_eyeDoc/segments/PDR.rb +39 -0
  101. data/lib/hippo_eyeDoc/segments/PER.rb +79 -0
  102. data/lib/hippo_eyeDoc/segments/PID.rb +79 -0
  103. data/lib/hippo_eyeDoc/segments/PKD.rb +47 -0
  104. data/lib/hippo_eyeDoc/segments/PLB.rb +191 -0
  105. data/lib/hippo_eyeDoc/segments/PRV.rb +75 -0
  106. data/lib/hippo_eyeDoc/segments/PS1.rb +31 -0
  107. data/lib/hippo_eyeDoc/segments/PWK.rb +115 -0
  108. data/lib/hippo_eyeDoc/segments/QTY.rb +155 -0
  109. data/lib/hippo_eyeDoc/segments/RDM.rb +135 -0
  110. data/lib/hippo_eyeDoc/segments/REF.rb +83 -0
  111. data/lib/hippo_eyeDoc/segments/SBR.rb +79 -0
  112. data/lib/hippo_eyeDoc/segments/SD1.rb +71 -0
  113. data/lib/hippo_eyeDoc/segments/SE.rb +23 -0
  114. data/lib/hippo_eyeDoc/segments/ST.rb +31 -0
  115. data/lib/hippo_eyeDoc/segments/STC.rb +187 -0
  116. data/lib/hippo_eyeDoc/segments/SV1.rb +263 -0
  117. data/lib/hippo_eyeDoc/segments/SV2.rb +147 -0
  118. data/lib/hippo_eyeDoc/segments/SV3.rb +219 -0
  119. data/lib/hippo_eyeDoc/segments/SV4.rb +211 -0
  120. data/lib/hippo_eyeDoc/segments/SV5.rb +123 -0
  121. data/lib/hippo_eyeDoc/segments/SV6.rb +151 -0
  122. data/lib/hippo_eyeDoc/segments/SV7.rb +55 -0
  123. data/lib/hippo_eyeDoc/segments/SVC.rb +183 -0
  124. data/lib/hippo_eyeDoc/segments/SVD.rb +115 -0
  125. data/lib/hippo_eyeDoc/segments/TA1.rb +46 -0
  126. data/lib/hippo_eyeDoc/segments/TOO.rb +67 -0
  127. data/lib/hippo_eyeDoc/segments/TRN.rb +39 -0
  128. data/lib/hippo_eyeDoc/segments/TS2.rb +159 -0
  129. data/lib/hippo_eyeDoc/segments/TS3.rb +199 -0
  130. data/lib/hippo_eyeDoc/segments/UR.rb +23 -0
  131. data/lib/hippo_eyeDoc/segments/VEH.rb +159 -0
  132. data/lib/hippo_eyeDoc/segments/base.rb +190 -0
  133. data/lib/hippo_eyeDoc/separator.rb +79 -0
  134. data/lib/hippo_eyeDoc/transaction_sets.rb +16 -0
  135. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_270.rb +15 -0
  136. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_270/L2000A.rb +43 -0
  137. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_270/L2000B.rb +42 -0
  138. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_270/L2000C.rb +52 -0
  139. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_270/L2000D.rb +41 -0
  140. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_270/L2100A.rb +21 -0
  141. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_270/L2100B.rb +55 -0
  142. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_270/L2100C.rb +97 -0
  143. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_270/L2100D.rb +0 -0
  144. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_270/L2110C.rb +67 -0
  145. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_270/L2110D.rb +47 -0
  146. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_270/base.rb +47 -0
  147. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_271.rb +19 -0
  148. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_271/L2000A.rb +55 -0
  149. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_271/L2000B.rb +43 -0
  150. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_271/L2000C.rb +52 -0
  151. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_271/L2000D.rb +41 -0
  152. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_271/L2100A.rb +43 -0
  153. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_271/L2100B.rb +67 -0
  154. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_271/L2100C.rb +124 -0
  155. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_271/L2100D.rb +124 -0
  156. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_271/L2110C.rb +98 -0
  157. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_271/L2110D.rb +98 -0
  158. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_271/L2115C.rb +16 -0
  159. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_271/L2115D.rb +16 -0
  160. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_271/L2120C.rb +54 -0
  161. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_271/L2120D.rb +54 -0
  162. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_271/base.rb +47 -0
  163. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_276.rb +19 -0
  164. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_276/L2000A.rb +32 -0
  165. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_276/L2000B.rb +32 -0
  166. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_276/L2000C.rb +32 -0
  167. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_276/L2000D.rb +52 -0
  168. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_276/L2000E.rb +50 -0
  169. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_276/L2100A.rb +21 -0
  170. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_276/L2100B.rb +21 -0
  171. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_276/L2100C.rb +21 -0
  172. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_276/L2100D.rb +21 -0
  173. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_276/L2100E.rb +20 -0
  174. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_276/L2200D.rb +117 -0
  175. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_276/L2200E.rb +117 -0
  176. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_276/L2210D.rb +37 -0
  177. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_276/L2210E.rb +37 -0
  178. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_276/base.rb +90 -0
  179. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_277.rb +22 -0
  180. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_277/L2000A.rb +42 -0
  181. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_277/L2000B.rb +42 -0
  182. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_277/L2000C.rb +52 -0
  183. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_277/L2000D.rb +41 -0
  184. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_277/L2000E.rb +40 -0
  185. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_277/L2100A.rb +21 -0
  186. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_277/L2100B.rb +21 -0
  187. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_277/L2100C.rb +21 -0
  188. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_277/L2100D.rb +21 -0
  189. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_277/L2100E.rb +20 -0
  190. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_277/L2200A.rb +41 -0
  191. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_277/L2200B.rb +69 -0
  192. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_277/L2200C.rb +79 -0
  193. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_277/L2200D.rb +77 -0
  194. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_277/L2200E.rb +104 -0
  195. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_277/L2220D.rb +57 -0
  196. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_277/L2220E.rb +44 -0
  197. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_277/base.rb +70 -0
  198. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_835.rb +10 -0
  199. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_835/L1000A.rb +74 -0
  200. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_835/L1000B.rb +54 -0
  201. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_835/L2000.rb +41 -0
  202. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_835/L2100.rb +213 -0
  203. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_835/L2110.rb +106 -0
  204. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_835/base.rb +122 -0
  205. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837.rb +43 -0
  206. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L1000A.rb +32 -0
  207. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L1000B.rb +21 -0
  208. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2000A.rb +88 -0
  209. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2000B.rb +87 -0
  210. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2000C.rb +54 -0
  211. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2010AA.rb +65 -0
  212. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2010AB.rb +34 -0
  213. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2010AC.rb +55 -0
  214. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2010BA.rb +76 -0
  215. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2010BB.rb +55 -0
  216. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2010CA.rb +76 -0
  217. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2300.rb +570 -0
  218. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2310A.rb +30 -0
  219. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2310B.rb +41 -0
  220. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2310C.rb +55 -0
  221. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2310D.rb +30 -0
  222. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2310E.rb +34 -0
  223. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2310F.rb +34 -0
  224. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2320.rb +157 -0
  225. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2330A.rb +45 -0
  226. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2330B.rb +96 -0
  227. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2330C.rb +30 -0
  228. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2330D.rb +30 -0
  229. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2330E.rb +30 -0
  230. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2330F.rb +30 -0
  231. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2330G.rb +30 -0
  232. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2400.rb +537 -0
  233. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2410.rb +36 -0
  234. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2420A.rb +41 -0
  235. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2420B.rb +30 -0
  236. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2420C.rb +44 -0
  237. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2420D.rb +30 -0
  238. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2420E.rb +55 -0
  239. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2420F.rb +30 -0
  240. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2420G.rb +34 -0
  241. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2420H.rb +34 -0
  242. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2430.rb +47 -0
  243. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/L2440.rb +26 -0
  244. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_837/base.rb +71 -0
  245. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_997.rb +7 -0
  246. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_997/L2000.rb +36 -0
  247. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_997/L2100.rb +29 -0
  248. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_997/base.rb +49 -0
  249. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_999.rb +8 -0
  250. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_999/L2000 - AK2.rb +30 -0
  251. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_999/L2000AK2.rb +36 -0
  252. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_999/L2100 - AK2.rb +37 -0
  253. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_999/L2100AK2.rb +43 -0
  254. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_999/L2110 - AK2.rb +23 -0
  255. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_999/L2110AK2.rb +26 -0
  256. data/lib/hippo_eyeDoc/transaction_sets/HIPAA_999/base.rb +49 -0
  257. data/lib/hippo_eyeDoc/transaction_sets/base.rb +236 -0
  258. data/lib/hippo_eyeDoc/transaction_sets/component.rb +96 -0
  259. data/lib/hippo_eyeDoc/transaction_sets/repeating_component.rb +48 -0
  260. data/lib/hippo_eyeDoc/utilities.rb +37 -0
  261. data/lib/hippo_eyeDoc/version.rb +3 -0
  262. data/samples/005010X221A1_business_scenario_1.edi +1 -0
  263. data/samples/005010X221A1_tmhp_example.edi +1 -0
  264. data/samples/005010X222A1_anesthesia.edi +1 -0
  265. data/samples/005010X222A1_commercial_health_insurance.edi +1 -0
  266. data/samples/005010X231A1_01.edi +11 -0
  267. data/samples/005010X231A1_02.edi +11 -0
  268. data/samples/200823.EDI +22 -0
  269. data/samples/837_L2000A_01.edi +1 -0
  270. data/samples/837_L2000A_02.edi +1 -0
  271. data/samples/parse_277.rb +127 -0
  272. data/samples/parse_999.rb +122 -0
  273. data/samples/sample835.html +1 -0
  274. data/samples/sample835.pretty_string +28 -0
  275. data/samples/sample837.html +1 -0
  276. data/test/test_helper.rb +155 -0
  277. data/test/test_hipaa_835.rb +229 -0
  278. data/test/test_hipaa_837.rb +596 -0
  279. data/test/test_html_outputter.rb +22 -0
  280. data/test/test_parser.rb +138 -0
  281. data/test/test_pretty_string_outputter.rb +33 -0
  282. data/test/test_segments_base.rb +201 -0
  283. data/test/test_transaction_sets_base.rb +122 -0
  284. metadata +356 -0
@@ -0,0 +1,213 @@
1
+ module Hippo_eyeDoc::TransactionSets
2
+ module HIPAA_835
3
+
4
+ class L2100 < Hippo_eyeDoc::TransactionSets::Base
5
+ loop_name 'L2100' #Claim Payment Information
6
+
7
+ #Claim Payment Information
8
+ segment Hippo_eyeDoc::Segments::CLP,
9
+ :name => 'Claim Payment Information',
10
+ :minimum => 1,
11
+ :maximum => 1,
12
+ :position => 100,
13
+ :identified_by => {
14
+ 'CLP02' => ["1", "2", "3", "4", "19", "20", "21", "22", "23", "25"],
15
+ 'CLP06' => ["12", "13", "14", "15", "16", "17", "AM", "CH", "DS", "HM", "LM", "MA", "MB", "MC", "OF", "TV", "VA", "WC", "ZZ"]
16
+ }
17
+
18
+ #Claim Adjustment
19
+ segment Hippo_eyeDoc::Segments::CAS,
20
+ :name => 'Claim Adjustment',
21
+ :minimum => 0,
22
+ :maximum => 99,
23
+ :position => 200,
24
+ :identified_by => {
25
+ 'CAS01' => ["CO", "OA", "PI", "PR"]
26
+ }
27
+
28
+ #Patient Name
29
+ segment Hippo_eyeDoc::Segments::NM1,
30
+ :name => 'Patient Name',
31
+ :minimum => 1,
32
+ :maximum => 1,
33
+ :position => 290,
34
+ :identified_by => {
35
+ 'NM101' => 'QC',
36
+ 'NM102' => '1'
37
+ }
38
+
39
+ #Insured Name
40
+ segment Hippo_eyeDoc::Segments::NM1,
41
+ :name => 'Insured Name',
42
+ :minimum => 0,
43
+ :maximum => 1,
44
+ :position => 300,
45
+ :identified_by => {
46
+ 'NM101' => 'IL',
47
+ 'NM102' => ["1", "2"],
48
+ 'NM108' => ["FI", "II", "MI"]
49
+ }
50
+
51
+ #Corrected Patient/Insured Name
52
+ segment Hippo_eyeDoc::Segments::NM1,
53
+ :name => 'Corrected Patient/Insured Name',
54
+ :minimum => 0,
55
+ :maximum => 1,
56
+ :position => 310,
57
+ :identified_by => {
58
+ 'NM101' => '74',
59
+ 'NM102' => ["1", "2"]
60
+ }
61
+
62
+ #Service Provider Name
63
+ segment Hippo_eyeDoc::Segments::NM1,
64
+ :name => 'Service Provider Name',
65
+ :minimum => 0,
66
+ :maximum => 1,
67
+ :position => 320,
68
+ :identified_by => {
69
+ 'NM101' => '82',
70
+ 'NM102' => ["1", "2"],
71
+ 'NM108' => ["BD", "BS", "FI", "MC", "PC", "SL", "UP", "XX"]
72
+ }
73
+
74
+ #Crossover Carrier Name
75
+ segment Hippo_eyeDoc::Segments::NM1,
76
+ :name => 'Crossover Carrier Name',
77
+ :minimum => 0,
78
+ :maximum => 1,
79
+ :position => 330,
80
+ :identified_by => {
81
+ 'NM101' => 'TT',
82
+ 'NM102' => '2',
83
+ 'NM108' => ["AD", "FI", "NI", "PI", "PP", "XV"]
84
+ }
85
+
86
+ #Corrected Priority Payer Name
87
+ segment Hippo_eyeDoc::Segments::NM1,
88
+ :name => 'Corrected Priority Payer Name',
89
+ :minimum => 0,
90
+ :maximum => 1,
91
+ :position => 340,
92
+ :identified_by => {
93
+ 'NM101' => 'PR',
94
+ 'NM102' => '2',
95
+ 'NM108' => ["AD", "FI", "NI", "PI", "PP", "XV"]
96
+ }
97
+
98
+ #Other Subscriber Name
99
+ segment Hippo_eyeDoc::Segments::NM1,
100
+ :name => 'Other Subscriber Name',
101
+ :minimum => 0,
102
+ :maximum => 1,
103
+ :position => 350,
104
+ :identified_by => {
105
+ 'NM101' => 'GB',
106
+ 'NM102' => ["1", "2"]
107
+ }
108
+
109
+ #Inpatient Adjudication Information
110
+ segment Hippo_eyeDoc::Segments::MIA,
111
+ :name => 'Inpatient Adjudication Information',
112
+ :minimum => 0,
113
+ :maximum => 1,
114
+ :position => 370
115
+
116
+ #Outpatient Adjudication Information
117
+ segment Hippo_eyeDoc::Segments::MOA,
118
+ :name => 'Outpatient Adjudication Information',
119
+ :minimum => 0,
120
+ :maximum => 1,
121
+ :position => 380
122
+
123
+ #Other Claim Related Identification
124
+ segment Hippo_eyeDoc::Segments::REF,
125
+ :name => 'Other Claim Related Identification',
126
+ :minimum => 0,
127
+ :maximum => 5,
128
+ :position => 400,
129
+ :identified_by => {
130
+ 'REF01' => ["1L", "1W", "28", "6P", "9A", "9C", "BB", "CE", "EA", "F8", "G1", "G3", "IG", "SY"]
131
+ }
132
+
133
+ #Rendering Provider Identification
134
+ segment Hippo_eyeDoc::Segments::REF,
135
+ :name => 'Rendering Provider Identification',
136
+ :minimum => 0,
137
+ :maximum => 10,
138
+ :position => 450,
139
+ :identified_by => {
140
+ 'REF01' => ["0B", "1A", "1B", "1C", "1D", "1G", "1H", "1J", "D3", "G2", "LU"]
141
+ }
142
+
143
+ #Statement From or To Date
144
+ segment Hippo_eyeDoc::Segments::DTM,
145
+ :name => 'Statement From or To Date',
146
+ :minimum => 0,
147
+ :maximum => 2,
148
+ :position => 500,
149
+ :identified_by => {
150
+ 'DTM01' => ["232", "233"]
151
+ }
152
+
153
+ #Coverage Expiration Date
154
+ segment Hippo_eyeDoc::Segments::DTM,
155
+ :name => 'Coverage Expiration Date',
156
+ :minimum => 0,
157
+ :maximum => 1,
158
+ :position => 505,
159
+ :identified_by => {
160
+ 'DTM01' => '036'
161
+ }
162
+
163
+ #Claim Received Date
164
+ segment Hippo_eyeDoc::Segments::DTM,
165
+ :name => 'Claim Received Date',
166
+ :minimum => 0,
167
+ :maximum => 1,
168
+ :position => 510,
169
+ :identified_by => {
170
+ 'DTM01' => '050'
171
+ }
172
+
173
+ #Claim Contact Information
174
+ segment Hippo_eyeDoc::Segments::PER,
175
+ :name => 'Claim Contact Information',
176
+ :minimum => 0,
177
+ :maximum => 2,
178
+ :position => 600,
179
+ :identified_by => {
180
+ 'PER01' => 'CX',
181
+ 'PER03' => ["EM", "FX", "TE"]
182
+ }
183
+
184
+ #Claim Supplemental Information
185
+ segment Hippo_eyeDoc::Segments::AMT,
186
+ :name => 'Claim Supplemental Information',
187
+ :minimum => 0,
188
+ :maximum => 13,
189
+ :position => 620,
190
+ :identified_by => {
191
+ 'AMT01' => ["AU", "D8", "DY", "F5", "I", "NL", "T", "T2", "ZK", "ZL", "ZM", "ZN", "ZO"]
192
+ }
193
+
194
+ #Claim Supplemental Information Quantity
195
+ segment Hippo_eyeDoc::Segments::QTY,
196
+ :name => 'Claim Supplemental Information Quantity',
197
+ :minimum => 0,
198
+ :maximum => 14,
199
+ :position => 640,
200
+ :identified_by => {
201
+ 'QTY01' => ["CA", "CD", "LA", "LE", "NE", "NR", "OU", "PS", "VS", "ZK", "ZL", "ZM", "ZN", "ZO"]
202
+ }
203
+
204
+ #Service Payment Information
205
+ loop Hippo_eyeDoc::TransactionSets::HIPAA_835::L2110,
206
+ :name => 'Service Payment Information',
207
+ :minimum => 0,
208
+ :maximum => 999,
209
+ :position => 700
210
+
211
+ end
212
+ end
213
+ end
@@ -0,0 +1,106 @@
1
+ module Hippo_eyeDoc::TransactionSets
2
+ module HIPAA_835
3
+
4
+ class L2110 < Hippo_eyeDoc::TransactionSets::Base
5
+ loop_name 'L2110' #Service Payment Information
6
+
7
+ #Service Payment Information
8
+ segment Hippo_eyeDoc::Segments::SVC,
9
+ :name => 'Service Payment Information',
10
+ :minimum => 0,
11
+ :maximum => 1,
12
+ :position => 700
13
+
14
+ #Service Date
15
+ segment Hippo_eyeDoc::Segments::DTM,
16
+ :name => 'Service Date',
17
+ :minimum => 0,
18
+ :maximum => 2,
19
+ :position => 800,
20
+ :identified_by => {
21
+ 'DTM01' => ["150", "151", "472"]
22
+ }
23
+
24
+ #Service Adjustment
25
+ segment Hippo_eyeDoc::Segments::CAS,
26
+ :name => 'Service Adjustment',
27
+ :minimum => 0,
28
+ :maximum => 99,
29
+ :position => 900,
30
+ :identified_by => {
31
+ 'CAS01' => ["CO", "OA", "PI", "PR"]
32
+ }
33
+
34
+ #Service Identification
35
+ segment Hippo_eyeDoc::Segments::REF,
36
+ :name => 'Service Identification',
37
+ :minimum => 0,
38
+ :maximum => 8,
39
+ :position => 1000,
40
+ :identified_by => {
41
+ 'REF01' => ["1S", "APC", "BB", "E9", "G1", "G3", "LU", "RB"]
42
+ }
43
+
44
+ #Line Item Control Number
45
+ segment Hippo_eyeDoc::Segments::REF,
46
+ :name => 'Line Item Control Number',
47
+ :minimum => 0,
48
+ :maximum => 1,
49
+ :position => 1010,
50
+ :identified_by => {
51
+ 'REF01' => '6R'
52
+ }
53
+
54
+ #Rendering Provider Information
55
+ segment Hippo_eyeDoc::Segments::REF,
56
+ :name => 'Rendering Provider Information',
57
+ :minimum => 0,
58
+ :maximum => 10,
59
+ :position => 1050,
60
+ :identified_by => {
61
+ 'REF01' => ["0B", "1A", "1B", "1C", "1D", "1G", "1H", "1J", "D3", "G2", "HPI", "SY", "TJ"]
62
+ }
63
+
64
+ #HealthCare Policy Identification
65
+ segment Hippo_eyeDoc::Segments::REF,
66
+ :name => 'HealthCare Policy Identification',
67
+ :minimum => 0,
68
+ :maximum => 5,
69
+ :position => 1060,
70
+ :identified_by => {
71
+ 'REF01' => '0K'
72
+ }
73
+
74
+ #Service Supplemental Amount
75
+ segment Hippo_eyeDoc::Segments::AMT,
76
+ :name => 'Service Supplemental Amount',
77
+ :minimum => 0,
78
+ :maximum => 9,
79
+ :position => 1100,
80
+ :identified_by => {
81
+ 'AMT01' => ["B6", "KH", "T", "T2", "ZK", "ZL", "ZM", "ZN", "ZO"]
82
+ }
83
+
84
+ #Service Supplemental Quantity
85
+ segment Hippo_eyeDoc::Segments::QTY,
86
+ :name => 'Service Supplemental Quantity',
87
+ :minimum => 0,
88
+ :maximum => 6,
89
+ :position => 1200,
90
+ :identified_by => {
91
+ 'QTY01' => ["ZK", "ZL", "ZM", "ZN", "ZO"]
92
+ }
93
+
94
+ #Health Care Remark Codes
95
+ segment Hippo_eyeDoc::Segments::LQ,
96
+ :name => 'Health Care Remark Codes',
97
+ :minimum => 0,
98
+ :maximum => 99,
99
+ :position => 1300,
100
+ :identified_by => {
101
+ 'LQ01' => ["HE", "RX"]
102
+ }
103
+
104
+ end
105
+ end
106
+ end
@@ -0,0 +1,122 @@
1
+ module Hippo_eyeDoc::TransactionSets
2
+ module HIPAA_835
3
+
4
+ class Base < Hippo_eyeDoc::TransactionSets::Base
5
+
6
+ #Transaction Set Header
7
+ segment Hippo_eyeDoc::Segments::ST,
8
+ :name => 'Transaction Set Header',
9
+ :minimum => 1,
10
+ :maximum => 1,
11
+ :position => 100,
12
+ :identified_by => {
13
+ 'ST01' => '835'
14
+ }
15
+
16
+ #Financial Information
17
+ segment Hippo_eyeDoc::Segments::BPR,
18
+ :name => 'Financial Information',
19
+ :minimum => 1,
20
+ :maximum => 1,
21
+ :position => 200,
22
+ :identified_by => {
23
+ 'BPR01' => ["C", "D", "H", "I", "P", "U", "X"],
24
+ 'BPR03' => ["C", "D"],
25
+ 'BPR04' => ["ACH", "BOP", "CHK", "FWT", "NON"]
26
+ }
27
+
28
+ #Reassociation Trace Number
29
+ segment Hippo_eyeDoc::Segments::TRN,
30
+ :name => 'Reassociation Trace Number',
31
+ :minimum => 1,
32
+ :maximum => 1,
33
+ :position => 400,
34
+ :identified_by => {
35
+ 'TRN01' => '1'
36
+ }
37
+
38
+ #Foreign Currency Information
39
+ segment Hippo_eyeDoc::Segments::CUR,
40
+ :name => 'Foreign Currency Information',
41
+ :minimum => 0,
42
+ :maximum => 1,
43
+ :position => 500,
44
+ :identified_by => {
45
+ 'CUR01' => 'PR'
46
+ }
47
+
48
+ #Receiver Identification
49
+ segment Hippo_eyeDoc::Segments::REF,
50
+ :name => 'Receiver Identification',
51
+ :minimum => 0,
52
+ :maximum => 1,
53
+ :position => 590,
54
+ :identified_by => {
55
+ 'REF01' => 'EV'
56
+ }
57
+
58
+ #Version Identification
59
+ segment Hippo_eyeDoc::Segments::REF,
60
+ :name => 'Version Identification',
61
+ :minimum => 0,
62
+ :maximum => 1,
63
+ :position => 600,
64
+ :identified_by => {
65
+ 'REF01' => 'F2'
66
+ }
67
+
68
+ #Production Date
69
+ segment Hippo_eyeDoc::Segments::DTM,
70
+ :name => 'Production Date',
71
+ :minimum => 0,
72
+ :maximum => 1,
73
+ :position => 700,
74
+ :identified_by => {
75
+ 'DTM01' => '405'
76
+ }
77
+
78
+ #Payer Identification
79
+ loop Hippo_eyeDoc::TransactionSets::HIPAA_835::L1000A,
80
+ :name => 'Payer Identification',
81
+ :minimum => 1,
82
+ :maximum => 1,
83
+ :position => 800,
84
+ :identified_by => {
85
+ 'N1.N101' => 'PR'
86
+ }
87
+
88
+ #Payee Identification
89
+ loop Hippo_eyeDoc::TransactionSets::HIPAA_835::L1000B,
90
+ :name => 'Payee Identification',
91
+ :minimum => 1,
92
+ :maximum => 1,
93
+ :position => 1400,
94
+ :identified_by => {
95
+ 'N1.N101' => 'PE',
96
+ 'N1.N103' => ["FI", "XV", "XX"]
97
+ }
98
+
99
+ #Header Number
100
+ loop Hippo_eyeDoc::TransactionSets::HIPAA_835::L2000,
101
+ :name => 'Header Number',
102
+ :minimum => 0,
103
+ :maximum => 99999,
104
+ :position => 30
105
+
106
+ #Provider Adjustment
107
+ segment Hippo_eyeDoc::Segments::PLB,
108
+ :name => 'Provider Adjustment',
109
+ :minimum => 0,
110
+ :maximum => 99999,
111
+ :position => 100
112
+
113
+ #Transaction Set Trailer
114
+ segment Hippo_eyeDoc::Segments::SE,
115
+ :name => 'Transaction Set Trailer',
116
+ :minimum => 1,
117
+ :maximum => 1,
118
+ :position => 200
119
+
120
+ end
121
+ end
122
+ end
@@ -0,0 +1,43 @@
1
+ module Hippo_eyeDoc::TransactionSets
2
+ module HIPAA_837
3
+ autoload_relative :Base, 'HIPAA_837/base'
4
+ autoload_relative :L1000A, 'HIPAA_837/L1000A'
5
+ autoload_relative :L1000B, 'HIPAA_837/L1000B'
6
+ autoload_relative :L2000A, 'HIPAA_837/L2000A'
7
+ autoload_relative :L2000B, 'HIPAA_837/L2000B'
8
+ autoload_relative :L2000C, 'HIPAA_837/L2000C'
9
+ autoload_relative :L2010AA, 'HIPAA_837/L2010AA'
10
+ autoload_relative :L2010AB, 'HIPAA_837/L2010AB'
11
+ autoload_relative :L2010AC, 'HIPAA_837/L2010AC'
12
+ autoload_relative :L2010BA, 'HIPAA_837/L2010BA'
13
+ autoload_relative :L2010BB, 'HIPAA_837/L2010BB'
14
+ autoload_relative :L2010CA, 'HIPAA_837/L2010CA'
15
+ autoload_relative :L2300, 'HIPAA_837/L2300'
16
+ autoload_relative :L2310A, 'HIPAA_837/L2310A'
17
+ autoload_relative :L2310B, 'HIPAA_837/L2310B'
18
+ autoload_relative :L2310C, 'HIPAA_837/L2310C'
19
+ autoload_relative :L2310D, 'HIPAA_837/L2310D'
20
+ autoload_relative :L2310E, 'HIPAA_837/L2310E'
21
+ autoload_relative :L2310F, 'HIPAA_837/L2310F'
22
+ autoload_relative :L2320, 'HIPAA_837/L2320'
23
+ autoload_relative :L2330A, 'HIPAA_837/L2330A'
24
+ autoload_relative :L2330B, 'HIPAA_837/L2330B'
25
+ autoload_relative :L2330C, 'HIPAA_837/L2330C'
26
+ autoload_relative :L2330D, 'HIPAA_837/L2330D'
27
+ autoload_relative :L2330E, 'HIPAA_837/L2330E'
28
+ autoload_relative :L2330F, 'HIPAA_837/L2330F'
29
+ autoload_relative :L2330G, 'HIPAA_837/L2330G'
30
+ autoload_relative :L2400, 'HIPAA_837/L2400'
31
+ autoload_relative :L2410, 'HIPAA_837/L2410'
32
+ autoload_relative :L2420A, 'HIPAA_837/L2420A'
33
+ autoload_relative :L2420B, 'HIPAA_837/L2420B'
34
+ autoload_relative :L2420C, 'HIPAA_837/L2420C'
35
+ autoload_relative :L2420D, 'HIPAA_837/L2420D'
36
+ autoload_relative :L2420E, 'HIPAA_837/L2420E'
37
+ autoload_relative :L2420F, 'HIPAA_837/L2420F'
38
+ autoload_relative :L2420G, 'HIPAA_837/L2420G'
39
+ autoload_relative :L2420H, 'HIPAA_837/L2420H'
40
+ autoload_relative :L2430, 'HIPAA_837/L2430'
41
+ autoload_relative :L2440, 'HIPAA_837/L2440'
42
+ end
43
+ end