Multiple record FRL -> HL7

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Multiple record FRL -> HL7

  • Creator
    Topic
  • #53037
    Scott Barrett
    Participant

      I have an inbound file with multiple records, FRL. Here is the basic format:

      record indicator

      account number

      data field1

      data field2

      etc……

      where record indicator is:

      01 = patient data

      02 = guarantor data

      04 = insurance data

      05 = insured data

      04 = insurance data

      05 = insured data

      etc

      I always have an 01 record and 02 record, and 0 to many 04 and 05 records. Each 01 designates a new patient “message”, and groupings confirmed by the account number in each record.

      Is there a way to handle this without tcl trickery?

      I’ve tried making an FRL for each, then an HRL that includes, but it seems to expect all the records to really be 1 record.

      So far I’m somewhat disappointed. This layout is common, and a similar structure to HL7, but it doesn’t seem that Cloverleaf can handle it gracefully. I also have several variations of this, some being VRL.

      Thanks in advance,

      Scott

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

          Scott,

          I think you may need to define the 04 and 05 group as FRLs then use an HRL to group those.

          Then you would have an HRL which would define the non repeating FRLs (01 and 02), then the group (need to get the repeating group piece of the HRL set properly). Hopefully there is some sort of separator between the records.

          So FRL for 01 02 04 05.

          HRL for 04 and 05 (call this subgroup for argument sake).

          HRL that has

             01 FRL

             02 FRL

             subgroup HRL (which includes 04 and 05 FRL from above).

          I think that will get you closer.

          Of course a lot depends on how the records are separated and the file is terminated (style) for pickup by Cloverleaf.

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

        • #76324
          Scott Barrett
          Participant

            Thanks Jim.

            I got a little closer….

            I set up the HRL as you suggested and set testing tool to read EOF instead of EOL, and defined the carriage return character into each FRL. This got it to read properly through the first complete recordset, but it won’t pick up the next 01 and so on.

          • #76325
            Jim Kosloskey
            Participant

              Scott,

              Does the inbound file have a separate separator between the 01 sets?

              Sometimes just like HL/7 it will be CR between sub-records and CR/LF or LF between records.

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

            • #76326
              Scott Barrett
              Participant

                It’s on a UNIX system, so there is a line-feed for each segment/record.

                01……

                02……

                04……

                01……

                etc

                Do you think that converting the line-feed character to something else before processing will make a difference?

              • #76327
                Jim Kosloskey
                Participant

                  Scott,

                  Is this a vendor providing the file?

                  Ordinarily I would expect there to be different terminator after the last 05.

                  Is this file being FTP’d from perhaps a windows platform or is this how the sending system says it should be? If FTP’d it may be possible that unless Binary is expressed an ASCII transfer has occurred and that might have stripped off something. Worth a check.

                  If it is the way it is and the source system cannot change the terminators, then you may need a small Tcl proc to accumulate all of the individual records into one message before passing on. This proc would exist in the Inbound TPS.

                  The proc would need to check the first 2 characters and when a 01 is detected that would indicate the end of the prevous messaage (unless this is the first 01). At that point the accumulated (in memory) message would be CONTINUEd and that would then be Xlated – and so on…

                  Records being accumulated will be presented as messages and because they are being accumulated, need to be KILLed. It is the accumulated message that will be CONTINUEd.

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

                • #76328
                  Scott Barrett
                  Participant

                    This is a very common flat-file format.  I have it in several varieties as well, from several different hospitals.

                    They are just groupings of records that make 1 patient record, and all lines in the file are LF for UNIX, and CRLF for dos.

                    Essentially the previous method of programming used 01 (in this case) to indicate that a new patient record is beginning (much like MSH indicates a new message)….and also qualified each individual record with an account number in each.

                    Based on your last suggestion, I tried to convert all LF to CR, but that didn’t improve things.  I think I’ll write a pre-pass script to place a special character before the 01, then remove all LF, then change the special character to LF.  I think this will put an end to it.

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