I built a parser for HL7 based on documentation I found and thought it was working well--until I got examples of test data. I built it with the following assumptions:

* The `~` is a "repeat" character. Basically meaning the value of the field passed is an array of the given values.
* The `^` indicates the field is represented by an array, but the expectation is the array items are used to build a final value.
* The `&` is similar to the `^`, but is a nested array inside of a `^`.

These assumptions don't appear very accurate given the test data I have. Can someone help set me straight on what the right way to interpret these are?