Hi kclark747,
Usually, a HL segment starts, I mean, its first element, is a unique, normally sequencial number, starting with 1, then when you are mapping a subordinated HL segment you normally map the Id number the HL segment above (parent) has, like a tree.
...
HL*1*0*S
...
HL*2*1*O
...