FRL/HRL Repeat

Clovertech Forums Cloverleaf FRL/HRL Repeat

  • Creator
    Topic
  • #118642
    Sandy McQuay
    Participant

      I have a flat file with multiple header/line iterations (Lawson RQ500, in case anyone knows it).  Each header/line record is 2330 in length:

      Apologies in advance if I get the BBCodes wrong.

      Here’s a sample of the file:

      [code]

      H10000000000000000PYXIS CVICU20210316202103161000600
      L10000000000000000151515659 CALCIUM ALGINTE
      L10000000000000000151517854 CANNISTER SUCTION 1200CC
      L10000000000000000151522200 SUCTION YANKER
      L10000000000000000151531524 KNEE IMMOBILIZER 22
      L10000000000000000151535005 TUBE CONN 72
      L10000000000000000151535104 TUBE CONN 144
      H10000000000000000PYXIS MICU 20210316202103161000600
      L10000000000000000151504604 CATHLON 20 X 1
      L10000000000000000151511831 SUCTION CATH CL
      L10000000000000000151516533 TUBING FILTER FOR PLATELETS
      L10000000000000000151517854 CANNISTER SUCTION 1200CC
      L10000000000000000151522200 SUCTION YANKER
      L10000000000000000151525559 TRAY URIMETER W/SENSOR
      L10000000000000000151528058 FOAM BODY CLEANSER
      L10000000000000000151529245 POWDER ANTIFUNGAL 3 OZ
      L10000000000000000151535005 TUBE CONN 72
      L10000000000000000151535104 TUBE CONN 144
      L10000000000000000555506605 NOR SAL 1000 8309
      L10000000000000000555511509 SET INFUSION 5 VALVE 138
      H10000000000000000PYXIS MICU120210316202103161000600
      L10000000000000000151515842 IV START KIT
      H10000000000000000PYXIS SICU 20210316202103161000600
      L10000000000000000101007582 DEODORIZOR ROOM
      L10000000000000000151505420 Chloraprep Applicator 3ml
      L10000000000000000151511831 SUCTION CATH CL
      L10000000000000000151515614 STATLOCK PICC PLUS PIC0222
      L10000000000000000151520800 FECAL MANAGEMENT KIT 411100
      L10000000000000000555511308 PLUM SET 1424228

      [/code]

      I created separate FRL’s for header and lines, the put them in an HRL with separate header and lines segments.

      I set the HEADER segment to repeat while HEADER.record_type value is H.

      I set the LINES segment to repeat while LINES.record_type value is L.

      All I get in the testing tool is the first header and the first set of lines.

      How do I repeat over the header/lines to get all headers and lines?

       

    Viewing 5 reply threads
    • Author
      Replies
      • #118643
        Jim Kosloskey
        Participant

          What is the record termination style you are specifying in the Testing tool?

          Is each H/L set terminated as a record or is the file one big record?

          If each H/L is terminated as a record and your style reflects that then check to make sure you have specified to process all messages in the Testing tool.

           

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

        • #118644
          Jim Kosloskey
          Participant

            I forgot to mention if there is a record separator after each H/L set there is no need to specify the Header segment as repeating in your HRL.

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

          • #118651
            Charlie Bursell
            Participant

              I dealt with Lawson records in the past.  Really convoluted 🙂

              I found it easier in some cases to normalize the record to an HL7 message.

              Create a variant call it message type LAW^A01 or whatever.

              Create a dummy MSH segment and repeating groups with HDR and REC

              For each record starting with H prepend HDR and starting with L prepend REC

              Since the fields are fixed length, I believe, it should not be that difficult to put separator like “|” between fields and a CR at the end of each record

              Takes a bit of coding but, to me, worth it.  Makes translation easier as you name fields.

            • #118654
              Sandy McQuay
              Participant

                Jim – The file is one big long record (i.e. no cr/lf).  I’m attaching a hex dump of the file.  In testing tool, I tried New Line Terminated and EOF with same results and also selected “process all records” on both NL/EOF.

                Charlie – I’m intrigued by your suggestion.  I may see what I can come up with.  I have more experience with HL7, so it might be easier to figure out the repeat.

                Thanks for the suggestions.  I’ll try to remember to post the solution.

                Sandy

                Attachments:
                You must be logged in to view attached files.
              • #118656
                Jim Kosloskey
                Participant

                  And therein lies the issue.  HRL defines one message/record.

                  Another option perhaps is to (via Tcl in the IB Tps) break the file into messages on the H1 if possible. Then each message would match your HRL (no need to repeat the H1 segment).  That is if you want to keep the message as original as possible as it traverses the engine.

                  So I think you will need Tcl. Your choice how you want to do that.

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

                • #118663
                  Charlie Bursell
                  Participant

                    Here is something I did many moons ago.  I don’t know if will help.

                    Attachments:
                    You must be logged in to view attached files.
                Viewing 5 reply threads
                • You must be logged in to reply to this topic.