iteration on VRL records..using HRL’s?

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf iteration on VRL records..using HRL’s?

  • Creator
    Topic
  • #47812
    Julie Kimmel
    Participant

    Hello to all!

    I am very new to Cloverleaf, and I have a task that I am sure would have a simple solution, but I am having a hard time finding it.

    What I have is a VRL file that contains multiple records

Viewing 5 reply threads
  • Author
    Replies
    • #56777
      Robert Kersemakers
      Participant

      Hi Julie,

      I think you have to define a new HRL that’s made up out of a repetition of your VRL. Next you need to get your VRL file as ‘single’ so all VRL records are seen as one message: the HRL.

      On iterating the HRL: I would search the archive for that. I’ve already posted some answers on this subject there, like this:

      Quote:


      I have made several HRL’s, so I’ll try to explain how I did it.

      I have a message, consisting of a header-line and one or more text-lines.

      The content of the header is completely different from the text, so I

      created a 2 FRL’s: msg_header.frl and msg_text.frl. Every text-line will

      start with the string ‘TXT’; this is the segmentname.

      Then I created an HRL, which looks like this:

      Segment 1

      ========

      Name: header

      File name: msg_header.frl

      Repeat options: No Repeat

      Segment 2

      ========

      Name: text

      File name: msg_text.frl

      Repeat options: Repeat while

      Field: text.segmentname

      Value: TXT

      It took me a while before I figured out that in the fieldname of the

      repeating field, you need to specify

      .‘ as the field.

      Hope this helps!

      Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

    • #56778
      Julie Kimmel
      Participant

      Hi Robert,

      I am still having troubles with the HRL configuration.

      I tried to do an HRL using my VRL lay out (my input file has multiple records in it, and I would like to copy the first record and then iterate on all records for only one field to create multiple segments in one HL7 message)

      I called my HRL segment RECORD and in my translation I would translate:

      RECORD.field –> someHL7field.00XXX

      Iterate on segment, RECORD, %s1

           RECORD(%s1).feild2  –> someHL7field(%s1).00XXX

      But when I do the translation, it still processes each record as separate messages, and the iteration made no difference.

      Can you tell what I am doing incorrectly, or is what I am trying to do even possible?

      I really appreciate your help,

      Julie

    • #56779
      Robert Kersemakers
      Participant

      Hi Julie,

      I don’t think it’s impossible what you’re trying to do. But all depends on a correct definition of the HRL.

      So I think you first need to make sure your HRL-definition is working correctly. From what you describe, it seems as each line (=record?) is seen as a separate message.

      Open the testing tool, click the ‘HRL’ tab. In ‘HRL File’ select your HRL definition and then choose a data file with an example of your HRL to be processed. If this example comes from SMAT, choose ‘Length Encoded’ as format; else choose ‘EOF Terminated’ to make sure the complete file (= all records) is seen as one message.

      Then hit ‘Run Command’ to see what the HRL definition makes of your message. This should give an indication on what’s wrong.

      Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

    • #56780
      Julie Kimmel
      Participant

      Hello again Robert,

      I think that my problem might be that I do not know what the format of the input needs to be. I assumed that I could use newline termination and have one record after the other in the text file

    • #56781
      Rick Martin
      Participant

      Hi Julie,

      Did you set your Options | Global Parameters for your VRL?  That’s something I always seem to forget when setting up a VRL for use in an HRL.

      Rick

    • #56782
      Julie Kimmel
      Participant

      OH! well, I did….but I had n as termination, so I had been trying newline in my input and characters representing newline, but I just now put the characters ‘n’ into my input file…and it worked!

      So, all is good! The problem was the disjoint of the global parameters.

      Thank you so much for your help, and enjoy your weekend!

      Julie

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

Forum Statistics

Registered Users
5,126
Forums
28
Topics
9,295
Replies
34,439
Topic Tags
287
Empty Topic Tags
10