HolyRoller
Programmer
I'm attempting to create an HL7 (an EDI format) parser. The following is an example of the data:
MSH|^~\&|AMR18||SCH06||20040524140917||SIU^S12^SIU_S12|4561|P|2.3.1||
SCH||1275381|||||GAKL2||10|MIN|^^^20040524003500|SSMITH^SMITH^STEVEN
^^^^||||SSMITH^SMITH^STEVEN^^^^||||SSMITH^SMITH^STEVEN^^^^|||||SCHEDULED
PID|||00434028^^^KP1105^MR||JONES^JESSICA^^^^^PR||19840701|F|||17789 MONTEREY PINE DRIVE^^STRONGSVILLE^OH^44136^^RS||^PRN^PH^^^440^5726054|^WPN^PH^^^216^
4335252||||||||||||||||N
PV1|||^^^PRM||||||||||||||||1275381
RGS|1||RAD*
AIS|1||GAKL2|||||||SCHEDULED
AIG|1||RAD20|2^RESOURCE||||20040524003500|0|MIN|10|MIN
So, what I've been able to set up is a record-by-record read of the file (which contains the above data) and by using a loop until the text file is EOF, I create one tab for each record (labelled MSH, SCH, PID, etc...). What I want to do is take every field on each record and put it in its corresponding tab on the form.
I've tried to dynamically put a text field on the tabs, tried to think of using a grid, but I'm perplexed on how I might be able to accomplish what I'm looking to do.
Any help will be gratefully received!
MSH|^~\&|AMR18||SCH06||20040524140917||SIU^S12^SIU_S12|4561|P|2.3.1||
SCH||1275381|||||GAKL2||10|MIN|^^^20040524003500|SSMITH^SMITH^STEVEN
^^^^||||SSMITH^SMITH^STEVEN^^^^||||SSMITH^SMITH^STEVEN^^^^|||||SCHEDULED
PID|||00434028^^^KP1105^MR||JONES^JESSICA^^^^^PR||19840701|F|||17789 MONTEREY PINE DRIVE^^STRONGSVILLE^OH^44136^^RS||^PRN^PH^^^440^5726054|^WPN^PH^^^216^
4335252||||||||||||||||N
PV1|||^^^PRM||||||||||||||||1275381
RGS|1||RAD*
AIS|1||GAKL2|||||||SCHEDULED
AIG|1||RAD20|2^RESOURCE||||20040524003500|0|MIN|10|MIN
So, what I've been able to set up is a record-by-record read of the file (which contains the above data) and by using a loop until the text file is EOF, I create one tab for each record (labelled MSH, SCH, PID, etc...). What I want to do is take every field on each record and put it in its corresponding tab on the form.
I've tried to dynamically put a text field on the tabs, tried to think of using a grid, but I'm perplexed on how I might be able to accomplish what I'm looking to do.
Any help will be gratefully received!