hippo 0.0.10 → 0.0.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.
data/CHANGELOG CHANGED
@@ -1,3 +1,20 @@
1
+ 0.0.11 - 2011/12/18
2
+ * Ignore Base Control Set when parsing input files.
3
+ * Make sure to only append a segment when we are within a transaction.
4
+ * Added TA1 segment.
5
+ * Add ISA, GS, GE, and IEA to TransactionSets::Base, and populate them
6
+ when parsing. This allows the client application to access each
7
+ transaction sets individual envelope.
8
+ * Added common code lists including:
9
+ - Claim Adjustment Reason Codes
10
+ - Claim Status Category Codes
11
+ - Claim Status Codes
12
+ - Remittance Advice Remark Codes
13
+ - Service Type Codes
14
+ - Taxonomy Codes
15
+ * Fix issue preventing repeating loops from being parsed properly.
16
+ * Allow accessing composite fields via shorthand notation. (e.g
17
+ SV101_01 = SV1.ProductServiceIdQualifier)
1
18
  0.0.10 - 2011/11/29
2
19
  * Fix autoload issue with enveloping structures.
3
20
  0.0.9 - 2011/11/29
@@ -20,4 +37,4 @@
20
37
  * Fix issue when no values are set in any subfield of a composite field.
21
38
  * Add more segment tests.
22
39
  * Import all segments and loops from the X12 CSV Table Data
23
- * Intial version.
40
+ * Initial version.
data/README.md CHANGED
@@ -173,7 +173,13 @@ instance for each repeat. (You will be returned the first instance each time if
173
173
  do not call #build.)
174
174
 
175
175
  ```ruby
176
- ts.TSS.build
176
+ tss = ts.TSS.build
177
+
178
+ # or
179
+
180
+ ts.TSS.build do |tss|
181
+ # do something here...
182
+ end
177
183
  ```
178
184
 
179
185
  The code above produces the following string output (notice how the values from
@@ -184,8 +190,10 @@ that the segments were declared):
184
190
  # ts.to_s => 'TSS*Blah~TCS***Preset Field 7~'
185
191
  ```
186
192
 
187
- To set field values on a given segment you can access it either by calling the field directly
188
- on the segment or by passing a block to the segment.
193
+ You can set the field values on a given segment a few different ways.
194
+
195
+ First you must access the segment that the field belongs to. You can
196
+ either access the fields directly on the segment or use the block syntax.
189
197
 
190
198
  ```ruby
191
199
  # this is one way to populate the fields
@@ -200,10 +208,19 @@ on the segment or by passing a block to the segment.
200
208
  ts.TSS do |tss|
201
209
  tss.Field2 = 'Bar'
202
210
  end
211
+ ```
203
212
 
204
- # both of the mechanisms above have the same string representation:
205
- #
206
- # ts.to_s => 'TSS*Blah*Bar~TCS*Foo**Preset Field 7~'
213
+ Once you have access to the segment you can set the field values by either
214
+ calling the field name or using its relative position in the segment. If the
215
+ field name is used more than once in a segment or if you are accessing a
216
+ composite field you can optionally pass the index of the field to access.
217
+ ```ruby
218
+ ts.TCS do |tcs|
219
+ tcs.Field1 = 'Foo' # use the field name
220
+ tcs.TCS01_01 = 'Bar' # use shorthand notation:
221
+ # TCS01 refers to the composite field
222
+ # _01 refers to the first field within the composite
223
+ end
207
224
  ```
208
225
 
209
226
  If you read the transaction set declaration from above you will notice that the TSS segment