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,211 @@
1
+ module Hippo_eyeDoc::Segments
2
+ class CTP < Hippo_eyeDoc::Segments::Base
3
+
4
+ segment_identifier 'CTP'
5
+
6
+ field :name => 'ClassOfTradeCode',
7
+ :sequence => 1,
8
+ :datatype => :list,
9
+ :minimum => 2,
10
+ :maximum => 2,
11
+ :required => false,
12
+ :data_element_number => 687
13
+
14
+ field :name => 'PriceIdentifierCode',
15
+ :sequence => 2,
16
+ :datatype => :list,
17
+ :minimum => 3,
18
+ :maximum => 3,
19
+ :required => false,
20
+ :data_element_number => 236
21
+
22
+ field :name => 'UnitPrice',
23
+ :sequence => 3,
24
+ :datatype => :decimal,
25
+ :minimum => 1,
26
+ :maximum => 17,
27
+ :required => false,
28
+ :data_element_number => 212
29
+
30
+ field :name => 'Quantity',
31
+ :sequence => 4,
32
+ :datatype => :decimal,
33
+ :minimum => 1,
34
+ :maximum => 15,
35
+ :required => false,
36
+ :data_element_number => 380
37
+
38
+ composite_field 'CompositeUnitOfMeasure' do
39
+
40
+ field :name => 'UnitOrBasisForMeasurementCode',
41
+ :sequence => 1,
42
+ :datatype => :list,
43
+ :minimum => 2,
44
+ :maximum => 2,
45
+ :required => true,
46
+ :data_element_number => 355
47
+
48
+ field :name => 'Exponent',
49
+ :sequence => 2,
50
+ :datatype => :decimal,
51
+ :minimum => 1,
52
+ :maximum => 15,
53
+ :required => false,
54
+ :data_element_number => 1018
55
+
56
+ field :name => 'Multiplier',
57
+ :sequence => 3,
58
+ :datatype => :decimal,
59
+ :minimum => 1,
60
+ :maximum => 10,
61
+ :required => false,
62
+ :data_element_number => 649
63
+
64
+ field :name => 'UnitOrBasisForMeasurementCode',
65
+ :sequence => 4,
66
+ :datatype => :list,
67
+ :minimum => 2,
68
+ :maximum => 2,
69
+ :required => false,
70
+ :data_element_number => 355
71
+
72
+ field :name => 'Exponent',
73
+ :sequence => 5,
74
+ :datatype => :decimal,
75
+ :minimum => 1,
76
+ :maximum => 15,
77
+ :required => false,
78
+ :data_element_number => 1018
79
+
80
+ field :name => 'Multiplier',
81
+ :sequence => 6,
82
+ :datatype => :decimal,
83
+ :minimum => 1,
84
+ :maximum => 10,
85
+ :required => false,
86
+ :data_element_number => 649
87
+
88
+ field :name => 'UnitOrBasisForMeasurementCode',
89
+ :sequence => 7,
90
+ :datatype => :list,
91
+ :minimum => 2,
92
+ :maximum => 2,
93
+ :required => false,
94
+ :data_element_number => 355
95
+
96
+ field :name => 'Exponent',
97
+ :sequence => 8,
98
+ :datatype => :decimal,
99
+ :minimum => 1,
100
+ :maximum => 15,
101
+ :required => false,
102
+ :data_element_number => 1018
103
+
104
+ field :name => 'Multiplier',
105
+ :sequence => 9,
106
+ :datatype => :decimal,
107
+ :minimum => 1,
108
+ :maximum => 10,
109
+ :required => false,
110
+ :data_element_number => 649
111
+
112
+ field :name => 'UnitOrBasisForMeasurementCode',
113
+ :sequence => 10,
114
+ :datatype => :list,
115
+ :minimum => 2,
116
+ :maximum => 2,
117
+ :required => false,
118
+ :data_element_number => 355
119
+
120
+ field :name => 'Exponent',
121
+ :sequence => 11,
122
+ :datatype => :decimal,
123
+ :minimum => 1,
124
+ :maximum => 15,
125
+ :required => false,
126
+ :data_element_number => 1018
127
+
128
+ field :name => 'Multiplier',
129
+ :sequence => 12,
130
+ :datatype => :decimal,
131
+ :minimum => 1,
132
+ :maximum => 10,
133
+ :required => false,
134
+ :data_element_number => 649
135
+
136
+ field :name => 'UnitOrBasisForMeasurementCode',
137
+ :sequence => 13,
138
+ :datatype => :list,
139
+ :minimum => 2,
140
+ :maximum => 2,
141
+ :required => false,
142
+ :data_element_number => 355
143
+
144
+ field :name => 'Exponent',
145
+ :sequence => 14,
146
+ :datatype => :decimal,
147
+ :minimum => 1,
148
+ :maximum => 15,
149
+ :required => false,
150
+ :data_element_number => 1018
151
+
152
+ field :name => 'Multiplier',
153
+ :sequence => 15,
154
+ :datatype => :decimal,
155
+ :minimum => 1,
156
+ :maximum => 10,
157
+ :required => false,
158
+ :data_element_number => 649
159
+
160
+ end
161
+
162
+ field :name => 'PriceMultiplierQualifier',
163
+ :sequence => 6,
164
+ :datatype => :list,
165
+ :minimum => 3,
166
+ :maximum => 3,
167
+ :required => false,
168
+ :data_element_number => 648
169
+
170
+ field :name => 'Multiplier',
171
+ :sequence => 7,
172
+ :datatype => :decimal,
173
+ :minimum => 1,
174
+ :maximum => 10,
175
+ :required => false,
176
+ :data_element_number => 649
177
+
178
+ field :name => 'MonetaryAmount',
179
+ :sequence => 8,
180
+ :datatype => :decimal,
181
+ :minimum => 1,
182
+ :maximum => 18,
183
+ :required => false,
184
+ :data_element_number => 782
185
+
186
+ field :name => 'BasisOfUnitPriceCode',
187
+ :sequence => 9,
188
+ :datatype => :list,
189
+ :minimum => 2,
190
+ :maximum => 2,
191
+ :required => false,
192
+ :data_element_number => 639
193
+
194
+ field :name => 'ConditionValue',
195
+ :sequence => 10,
196
+ :datatype => :string,
197
+ :minimum => 1,
198
+ :maximum => 10,
199
+ :required => false,
200
+ :data_element_number => 499
201
+
202
+ field :name => 'MultiplePriceQuantity',
203
+ :sequence => 11,
204
+ :datatype => :integer,
205
+ :minimum => 1,
206
+ :maximum => 2,
207
+ :required => false,
208
+ :data_element_number => 289
209
+
210
+ end
211
+ end
@@ -0,0 +1,99 @@
1
+ module Hippo_eyeDoc::Segments
2
+ class CTX < Hippo_eyeDoc::Segments::Base
3
+
4
+ segment_identifier 'CTX'
5
+
6
+ composite_field 'ContextIdentification' do
7
+
8
+ field :name => 'ContextName',
9
+ :sequence => 1,
10
+ :datatype => :string,
11
+ :minimum => 1,
12
+ :maximum => 35,
13
+ :required => true,
14
+ :data_element_number => 9999
15
+
16
+ field :name => 'ContextReference',
17
+ :sequence => 2,
18
+ :datatype => :string,
19
+ :minimum => 1,
20
+ :maximum => 35,
21
+ :required => false,
22
+ :data_element_number => 9998
23
+
24
+ end
25
+
26
+ field :name => 'SegmentIdCode',
27
+ :sequence => 2,
28
+ :datatype => :list,
29
+ :minimum => 2,
30
+ :maximum => 3,
31
+ :required => false,
32
+ :data_element_number => 721
33
+
34
+ field :name => 'SegmentPositionInTransactionSet',
35
+ :sequence => 3,
36
+ :datatype => :integer,
37
+ :minimum => 1,
38
+ :maximum => 10,
39
+ :required => false,
40
+ :data_element_number => 719
41
+
42
+ field :name => 'LoopIdentifierCode',
43
+ :sequence => 4,
44
+ :datatype => :string,
45
+ :minimum => 1,
46
+ :maximum => 4,
47
+ :required => false,
48
+ :data_element_number => 447
49
+
50
+ composite_field 'PositionInSegment' do
51
+
52
+ field :name => 'ElementPositionInSegment',
53
+ :sequence => 1,
54
+ :datatype => :integer,
55
+ :minimum => 1,
56
+ :maximum => 2,
57
+ :required => true,
58
+ :data_element_number => 722
59
+
60
+ field :name => 'ComponentDataElementPositionInComposite',
61
+ :sequence => 2,
62
+ :datatype => :integer,
63
+ :minimum => 1,
64
+ :maximum => 2,
65
+ :required => false,
66
+ :data_element_number => 1528
67
+
68
+ field :name => 'RepeatingDataElementPosition',
69
+ :sequence => 3,
70
+ :datatype => :integer,
71
+ :minimum => 1,
72
+ :maximum => 4,
73
+ :required => false,
74
+ :data_element_number => 1686
75
+
76
+ end
77
+
78
+ composite_field 'ReferenceInSegment' do
79
+
80
+ field :name => 'DataElementReferenceNumber',
81
+ :sequence => 1,
82
+ :datatype => :integer,
83
+ :minimum => 1,
84
+ :maximum => 4,
85
+ :required => true,
86
+ :data_element_number => 725
87
+
88
+ field :name => 'DataElementReferenceNumber',
89
+ :sequence => 2,
90
+ :datatype => :integer,
91
+ :minimum => 1,
92
+ :maximum => 4,
93
+ :required => false,
94
+ :data_element_number => 725
95
+
96
+ end
97
+
98
+ end
99
+ end
@@ -0,0 +1,175 @@
1
+ module Hippo_eyeDoc::Segments
2
+ class CUR < Hippo_eyeDoc::Segments::Base
3
+
4
+ segment_identifier 'CUR'
5
+
6
+ field :name => 'EntityIdentifierCode',
7
+ :sequence => 1,
8
+ :datatype => :list,
9
+ :minimum => 2,
10
+ :maximum => 3,
11
+ :required => true,
12
+ :data_element_number => 98
13
+
14
+ field :name => 'CurrencyCode',
15
+ :sequence => 2,
16
+ :datatype => :list,
17
+ :minimum => 3,
18
+ :maximum => 3,
19
+ :required => true,
20
+ :data_element_number => 100
21
+
22
+ field :name => 'ExchangeRate',
23
+ :sequence => 3,
24
+ :datatype => :decimal,
25
+ :minimum => 4,
26
+ :maximum => 10,
27
+ :required => false,
28
+ :data_element_number => 280
29
+
30
+ field :name => 'EntityIdentifierCode',
31
+ :sequence => 4,
32
+ :datatype => :list,
33
+ :minimum => 2,
34
+ :maximum => 3,
35
+ :required => false,
36
+ :data_element_number => 98
37
+
38
+ field :name => 'CurrencyCode',
39
+ :sequence => 5,
40
+ :datatype => :list,
41
+ :minimum => 3,
42
+ :maximum => 3,
43
+ :required => false,
44
+ :data_element_number => 100
45
+
46
+ field :name => 'CurrencyMarketExchangeCode',
47
+ :sequence => 6,
48
+ :datatype => :list,
49
+ :minimum => 3,
50
+ :maximum => 3,
51
+ :required => false,
52
+ :data_element_number => 669
53
+
54
+ field :name => 'DateTimeQualifier',
55
+ :sequence => 7,
56
+ :datatype => :list,
57
+ :minimum => 3,
58
+ :maximum => 3,
59
+ :required => false,
60
+ :data_element_number => 374
61
+
62
+ field :name => 'Date',
63
+ :sequence => 8,
64
+ :datatype => :date,
65
+ :minimum => 8,
66
+ :maximum => 8,
67
+ :required => false,
68
+ :data_element_number => 373
69
+
70
+ field :name => 'Time',
71
+ :sequence => 9,
72
+ :datatype => :time,
73
+ :minimum => 4,
74
+ :maximum => 8,
75
+ :required => false,
76
+ :data_element_number => 337
77
+
78
+ field :name => 'DateTimeQualifier',
79
+ :sequence => 10,
80
+ :datatype => :list,
81
+ :minimum => 3,
82
+ :maximum => 3,
83
+ :required => false,
84
+ :data_element_number => 374
85
+
86
+ field :name => 'Date',
87
+ :sequence => 11,
88
+ :datatype => :date,
89
+ :minimum => 8,
90
+ :maximum => 8,
91
+ :required => false,
92
+ :data_element_number => 373
93
+
94
+ field :name => 'Time',
95
+ :sequence => 12,
96
+ :datatype => :time,
97
+ :minimum => 4,
98
+ :maximum => 8,
99
+ :required => false,
100
+ :data_element_number => 337
101
+
102
+ field :name => 'DateTimeQualifier',
103
+ :sequence => 13,
104
+ :datatype => :list,
105
+ :minimum => 3,
106
+ :maximum => 3,
107
+ :required => false,
108
+ :data_element_number => 374
109
+
110
+ field :name => 'Date',
111
+ :sequence => 14,
112
+ :datatype => :date,
113
+ :minimum => 8,
114
+ :maximum => 8,
115
+ :required => false,
116
+ :data_element_number => 373
117
+
118
+ field :name => 'Time',
119
+ :sequence => 15,
120
+ :datatype => :time,
121
+ :minimum => 4,
122
+ :maximum => 8,
123
+ :required => false,
124
+ :data_element_number => 337
125
+
126
+ field :name => 'DateTimeQualifier',
127
+ :sequence => 16,
128
+ :datatype => :list,
129
+ :minimum => 3,
130
+ :maximum => 3,
131
+ :required => false,
132
+ :data_element_number => 374
133
+
134
+ field :name => 'Date',
135
+ :sequence => 17,
136
+ :datatype => :date,
137
+ :minimum => 8,
138
+ :maximum => 8,
139
+ :required => false,
140
+ :data_element_number => 373
141
+
142
+ field :name => 'Time',
143
+ :sequence => 18,
144
+ :datatype => :time,
145
+ :minimum => 4,
146
+ :maximum => 8,
147
+ :required => false,
148
+ :data_element_number => 337
149
+
150
+ field :name => 'DateTimeQualifier',
151
+ :sequence => 19,
152
+ :datatype => :list,
153
+ :minimum => 3,
154
+ :maximum => 3,
155
+ :required => false,
156
+ :data_element_number => 374
157
+
158
+ field :name => 'Date',
159
+ :sequence => 20,
160
+ :datatype => :date,
161
+ :minimum => 8,
162
+ :maximum => 8,
163
+ :required => false,
164
+ :data_element_number => 373
165
+
166
+ field :name => 'Time',
167
+ :sequence => 21,
168
+ :datatype => :time,
169
+ :minimum => 4,
170
+ :maximum => 8,
171
+ :required => false,
172
+ :data_element_number => 337
173
+
174
+ end
175
+ end