|iNTERFACEWARE Products Manual > Installing and Using Chameleon > Troubleshooting > Only Getting One OBX Segment Row When There are Multiple OBX Segments|
This, and similar questions, are common to customers who are just starting out with Chameleon. The symptom of this problem is when one has a table that is mapped to some fields in an OBX segment. There are multiple OBX segments - but the table is only showing one row.
The heart of the issue is understanding the concept of a table's grammar root. The grammar root is key to understanding how we map from a tree structure - i.e. a HL7 message to flat table with rows.
The grammar root of a table determines what constitutes a new row for the table. If a table has a grammar root that is mapped to the message itself, it will never have more than one row. This is a common cause of the problem that customers come across.
The fix to the problem is simple - change the grammar root of the table to be the actual repeating segment. If the segment repeats, then the table will be populated with multiple rows.
The only other dimension to the problem is when one has a deeply nested message. One must use table groups in this situation. Often or not, it is better to flatten out the message definitions - this is discussed in the design chapter. In general, the official HL7 definitions for certain messages like lab results are notoriously over-nested compared to how most real world systems are implemented.