I am trying to write a crude parser for HL7 for our internal testing.
What happens is the user pastes the HL7 message in the Data Sheet.
Each segment is preceded by a set of identifiers like MSH, PID and many more (which are standard and do not change). There are sheets created for each of these segments.
In each segment, all fields are SEPARATED by a "|" (pipe).
Upon click of a button or as soon as the message is pasted, I would like to split each of the segment and paste the data (pipe separated) into the corresponding sheets. I am not sure if we can use VBA / Macros to accomplish the task.
Sample Hl7 Message.
n Indian or Alaska Native^HL70005|2 Dr^^Houston^TX^01321|US|33
^Hispanic or Latino|||||||||||||||||
Attached is the excel file containing the prototype and how the fields should be parsed.
Any help is appreciated.