Multiple records into one message

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Multiple records into one message

  • Creator
    Topic
  • #47774
    Julie Kimmel
    Participant

      Hello,

      I have searched through the sticky archives, and I can not seem to find what I am looking for, so I just want to throw this out to see if anyone knows how to do it:

      I have a VRL translated to an HL7, the VRL has multiple records that are exactly the same with the exception of one field. I would like to turn these multiple records into one HL7 message with a concatenation of the differing fields.

      Ex:

      From:

      record 1:

      — — — —

      — — — a —

      record 2:

      — — — —

      — — — b —

       

      record 3

      — — — —

      — — — c

    Viewing 3 reply threads
    • Author
      Replies
      • #56682
        David Caragay
        Participant

          Julie,

          Quick question.  Will your VRL have a set number of messages that will need to be combined or will the actual count vary?   Also, do you have a sample vrl file I could look at?

        • #56683
          Julie Kimmel
          Participant

            Thank you for responding! I was giving up hope!

            It will be an undetermined amount of records.

            I did make a tps to run before the translation that seems to do the trick. It counts the number of records, collects all of the specific fields that I was wanting to collect (the a, b, c in the above example), and creates one record with a list for that field.

            The only problem is setting the max size of that field in the VRL configuration

          • #56684
            David Caragay
            Participant

              Hi Julie,

              Is you inbound data coming in as a file containing similar records except for the last field?  Your proc looks like it would expect an EOF terminated file format.  If this is true, your proc is probably a good way to go.  If you are concerned with setting a correct field size, you could always add a check in your proc to kick out an error if max number of recs are received.

              You may also want to define multiple subfields in your VRL to hold the concatenated numbers.  This would allow you to utilize the built in xlate functions such as iterate.  Your subfields would look like:

              your_field35_name.[0]

              your_field35_name.[1]

              your_field35_name.[2]

              Your xlate could then iter through the subfields.  

              Hope this helps.

            • #56685
              Julie Kimmel
              Participant

                Hi David,

                Thank you for the ideas,

                As it is, we are using files that are in the format that you saw…but it is a new system, so it is, for sure, subject to change!

                I especially like the error message idea…I had not thought of that.

                Thank you so much for you help,

                Julie

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