Removing escape pairs in a VRL file

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Removing escape pairs in a VRL file

  • Creator
    Topic
  • #52445
    Tom Canavan
    Participant

      I had the impression that Cloverleaf would remove the escape pairs during translation from VRL to HL7 but I’m having problems with my first use of this. If my input is a VRL record like this “01”,”xxxyyy”,”mydata” and I output it to an HL7 ADT message why does it keep the quotes when they’re marked as my escape pair? Am I missing a step somewhere?

      Any help would be appreciated. Thanks.

      Tom

    Viewing 4 reply threads
    • Author
      Replies
      • #74220
        Jim Kosloskey
        Participant

          Tom,

          It has been my experience these need to be removed via Tcl code in the Xlate.

          I don’t think it should be that way but it appears it is (at least with Cloverleaf 5.6).

          If we have to use Tcl to remove these at least it would be nice if you could get the VRL options in the Metadata or somewhere so we could construct a proc that adapts to eadch VRL.

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #74221
          Tom Canavan
          Participant

            Thanks Jim. I was hoping to avoid field by field removal since every field has the quotes on it. Maybe I’ll preprocess the file to remove quotes.

          • #74222
            Jim Kosloskey
            Participant

              Tom,

              That certainly is an option – but what do you do when an inbound field contains the field separator?

              After all, the purpose of the encapsulation character set is to allow the use of a field separator inside a field.

              The safest (albeit more painful) way IMO is to do this field by field in the Xlate (that way theoretically at least) imbedded field separators will be preserved as text.

              email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

            • #74223
              Charlie Bursell
              Participant

                Your best bet here is to use the CSV package that is part of tcllib supplied with Cloverleaf.  VRL does not do true CSV it simply works with separators

              • #74224
                Tom Canavan
                Participant

                  Thanks Jim and Charlie. I know I’m slow to get back here but I was working with your suggestions and haven’t been back here in a while. I worked with the customer to resolve the issue with the quotes and everything is working now.

              Viewing 4 reply threads
              • The forum ‘Cloverleaf’ is closed to new topics and replies.