Author |
Message
|
drcas |
Posted: Tue Feb 24, 2009 9:54 am Post subject: TDS question |
|
|
 Apprentice
Joined: 03 May 2002 Posts: 26
|
I'm trying to model an X12 837 HIPAA message as a X12/TDS message and have run into the following problem. The message is composed of four logical tables: Header, Table1, Table2, and Table3 and the cardinality on Table1, Table2 and Table3 being unlimited. Each of the tables start with an HL record and then the following record differs depending upon the table. Here is a high level overview:
(Header)
...
(Table1)
HL*HL01*HL02*HL03*HL04~
PRV*PRV01*...
CUR*CUR01*...
...
HL*HL01*HL02*HL03*HL04~
PRV*PRV01*...
CUR*CUR01*...
...
(Table2)
HL*HL01*HL02*HL03*HL04~
SBR*SBR01*SBR02...
...
(Table3)
HL*HL01*HL02*HL03*HL04~
PAT*PAT01*PAT02...
...
The problem occurs when the parser encounters the Table2 HL record and parses it as Table1 HL rather than a Table 2. Should it not read ahead and once it begins parsing the SBR record realize that it is parsing a Table2? Should I be modeling this as a group and have a choice between Table1, Table2, and Table3 and then programatically enforce the message structure?
Thanks for the help |
|
Back to top |
|
 |
drcas |
Posted: Tue Feb 24, 2009 10:00 am Post subject: |
|
|
 Apprentice
Joined: 03 May 2002 Posts: 26
|
Please disregard this post. Thanks! |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Feb 24, 2009 10:01 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
drcas |
Posted: Tue Feb 24, 2009 11:11 am Post subject: |
|
|
 Apprentice
Joined: 03 May 2002 Posts: 26
|
Misunderstood the message format.
Table2 is a child of Table 1 and Table3 is a child of Table2.
End of problem |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Feb 24, 2009 11:20 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Ah, so you didn't need the extra HL and PRV elements, and were able to use SBR and PAT as tag? |
|
Back to top |
|
 |
drcas |
Posted: Tue Feb 24, 2009 11:44 am Post subject: |
|
|
 Apprentice
Joined: 03 May 2002 Posts: 26
|
No haven't gotten back to implementing it yet but the structure is more like this. BTW I'm not a glutton for punishment. We just need to model 3 messages not the whole HIPAA set. If that were the case I would HIGHLY recomend purchasing software for the job.
(Header)
...
(Table1)
HL*HL01*HL02*HL03*HL04~
PRV*PRV01*...
CUR*CUR01*...
(Table2)
HL*HL01*HL02*HL03*HL04~
SBR*SBR01*SBR02...
(Table3)
HL*HL01*HL02*HL03*HL04~
PAT*PAT01*PAT02...
(Table1)
HL*HL01*HL02*HL03*HL04~
PRV*PRV01*...
CUR*CUR01*...
(Table2)
HL*HL01*HL02*HL03*HL04~
SBR*SBR01*SBR02...
(Table3)
HL*HL01*HL02*HL03*HL04~
PAT*PAT01*PAT02... |
|
Back to top |
|
 |
|