Iterate a field in a csv file

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Iterate a field in a csv file

  • Creator
    Topic
  • #52292
    John Calhoun
    Participant

      Hello all,

      I am working on a visit conversion from our old CE HIS into our new HIS, Epic.

      I’m exporting the data from CE to a csv file but the diagnosis code field is a repeating field. So for example my file layout is this

      File Layout

      -Acct #

      -MRN

      -Diagnosis Codes

      -Patient Lastname

      And my csv file would look like this

      12345,345,961.10~V95~37.35,Johnson

      24452,212,567.89~564.11~V88.23,Smith

      ….more records….

      The diagnosis codes could field could have 1 or more entries.  

      I want to take this csv file and turn it into an ADT^A01 HL7 message. The diagnosis codes will be split into different DG1 segments

      What is the best route in doing this in the engine.  I thought I could do a simple VRL but I’m having trouble with the iteration of the diagnosis code field.  I’ve seen some posts on doing an HRL with two different VRL but I am having trouble setting this up.

      Any tips or advice would be greatly appreciated.

      Thanks,

      John Calhoun

      Owensboro Medical Health System

      john.calhoun@omhs.org

    Viewing 1 reply thread
    • Author
      Replies
      • #73709
        Robert Kersemakers
        Participant

          Hi John,

          I wouldn’t try to use an HRL for this, I don’t think it will work.

          You should be able to do this with just one VRL, since every line of the csv-file means one message. The only thing that you then need to do is take field Diagnosis Codes, split this field on ‘~’ and then make a DG1 segment for each element of the resulting list.

          Sounds pretty straightforward, but you need to use sort of a DO-WHILE for this. For this, have a look at https://usspvlclovertch2.infor.com/viewtopic.php?t=2213. It explains how to do this. You have to know how to use the $%l1 notation though.

          Let me know if this is enough for you or if you need some more help with this.

          Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

        • #73710
          John Calhoun
          Participant

            Thanks to Jim Kosloskey

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