HL7 to flat file



Does anyone have logic to take an hl7 file format and create a flat file.

I am having a bit of difficulty..............

Any help would be a lifesaver....

Thanks

Greg

.