Reply To: HRL Help needed, Please

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf HRL Help needed, Please Reply To: HRL Help needed, Please

#58866
Charlie Bursell
Participant

    This looks to me like a poorly designed Comma Separated Values (CSV) record format.  Normally with CSV, the double quotes are used only when the field contains special characters, i,e., a comma, etc.  CSV can be difficult to deal with sometime because of all the nuances.

    If I were doing this interface, I would deal with it as CSV.  While you can do that with VRL, I find it easier to use the csv package which is part of the tcllib library.  If you don’t have that it can easily be downloaded.  I think the latest version is tcllib1.7 o greater.

    Once installed

    package require csv

    foreach line in your data file

    set list [csv::split $line]

    This will return a list of values for each file.

    I would then normalize it to an HL7 variant.  Just change the first field to TXX, HXX, etc.  Then join the list with a pipe (|).  Now all you have to do is prepend a dummy MSH and you have an easy to deal with HL7 message that can be easily translated to whatever you want.

    Just my opinion.  I am sure there are others