New Line using CONCAT

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf New Line using CONCAT

  • Creator
    Topic
  • #54165
    Jon Melin
    Participant

      Hello,

      I am trying to figure out the best way of converting an iterating group (I only need OBX5, repeating in the group) into a document I can output. I want this document legible, with no HL7 formatting. So far what I’ve done is basically concatenated each OBX5 into a single variable using CONCAT and I’ve tried r and nr (for the separator) to try to get it to generate a new line after each OBX5 I come across. This is in an XLATE (HL7 message in) and I am just using a 1 field VRL on the other side to dump the concatenated string. I want it to behave this way where each OBX5 it comes across it should add a new line afterward.

      I’m sure it’s something very simple, but how can I get it to do these new lines into a regular text document, or TIFF / PDF would be best. Does anyone know if a certain CONCAT separator command will do this, or does anyone know of a better way to do what I am trying to do?

      In summary: I need to take an HL7 message in, take each OBX5 in the iteration, and save it without HL7 formatting to a “flat” file (preferably TIFF or PDF, but I might have to settle with TXT initially) with something that will cause a new line per OBX5 iteration.

      Thank you in advance,

      Jon

    Viewing 4 reply threads
    • Author
      Replies
      • #80411
        James Cobane
        Participant

          Jon,

          You may want to consider doing a HL7 to HRL xlate, with your HRL definition consisting of a single FRL record that repeats.  Then you can simply map your OBX:5 iteration to the corresponding iteration on the HRL outbound record.

          Hope that makes sense.

          Jim Cobane

          Henry Ford Health

        • #80412
          Jon Melin
          Participant

            James,

            I haven’t had to use an HRL configuration yet, does this allow me to do new lines for each OBX5 iteration I come across?

            Thank you,

            Jon

          • #80413
            Jim Kosloskey
            Participant

              On the VRL which will be specified inside your HRL, specify the terminator as the hex character you want.

              For your CONCAT attempt did you escape the n or r (like this \n or \n) in the Xlate?

              email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.

            • #80414
              Jon Melin
              Participant

                Jim,

                I haven’t built the HRL yet, I’ll investigate how to do this since I haven’t had to in the past.

                I did not escape the n or r – I should try this in my CONCAT. 0A is the hex for new line so I could use that too possibly?

                Thank you,

                Jon

              • #80415
                Jim Kosloskey
                Participant

                  Jon yes x0a will work (if that is the terminator you want).

                  The CONCAT Action has a file where you can specify the separator – whatever you place there will be placed between the elements you put in Source.

                  email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.

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