VRL vs. HRL

  • Creator
    Topic
  • #54316
    Anonymous

      All,

      I have an input file with a couple of records, each records has the format

      – 3 bytes: record length (including CR LF at record end)

      – 4 bytes: record ID, (example: ID 3000 in 6th line stands for patient ID, ID 3103 in 10th line stands for date of birth…)

      – variable length: value

      – 2 bytes: Carriage Return, Line Feed

      A sample for a input file looks like this:

      01380006302

      014810000227

      0178315Auuuuuuu

      0178316TurboMed

      014921802.00

      01330002084

      0093100

      0173101LastName

      0233102Firstname

      017310301011957

      0093104

      024310648231 Berlin

      0303107Charlottenburgerstr. 36b

      01031101

      0138402EKG04

      The content of the file has to be translated into one ADT A01.

      What approach is better to read the file into a structure, VRL or HRL?

      I tried with VRL but had no success. For me it seems that CR+LF as record delimiter do not work.

      Any ideas, any hints? Every help is highly appriciated.

    Viewing 2 reply threads
    • Author
      Replies
      • #80972
        Robert Milfajt
        Participant

          There is a lot going on here.

          First, will each file only have one patient record, i.e., each file will translate to one ADT^A01??

          Robert Milfajt
          Northwestern Medicine
          Chicago, IL

        • #80973
          Jim Kosloskey
          Participant

            If using VRL try setting your Global Options separator to x0d (or whatever code is you need). See if that does not accommodate your CR of the CR/LF (the LF which should be stripped off if specifying New-Line Style on the Fileset will leave the CR).

            That may eliminate the need for any Tcl or handling of that terminator in the Xlate.

            If any of the individual records can repeat though and you want to ITERATE through them then you will need to use an HRL with VRL I think.

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

          • #80974
            Robert Milfajt
            Participant

              Good tip Jim.  I don’t do much with VRL, and that’s handy!

              Robert Milfajt
              Northwestern Medicine
              Chicago, IL

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