HRL Help

  • Creator
    Topic
  • #53790
    Vidya Sridhar
    Participant

    Hello,

    I am trying to create a csv file out of pharmacy charge messages that error out due to a missing required field in the FT1 segment. I am trying to send these messages to the error database and make a csv file for the pharmacy dept to enter them manually in our financial systerm.

    The issue I am having is in setting up the HRL for the outbound in the Xlate. The Xlate has DFT P03 as inbound and HRL as outbound, as I have to output a header for column heading and a bunch of rows all comma delimited.  My outbound HRL comprises of two VRL’s – the header (never repeats, just the column headings) and footer is one that repeats for how many ever messages we find in error. So what is basis for the Repeat condtion in the HRL below? The cerner_chg_rpt.vrl has the MRN, Patient Name, DOB, Date of Service, Charge code and Description and Dose defined in it. If got HRL’s right, the repeat is based on a repeating value in the inbound HL7 message, but how do I set this up in the outbound HRL?

    Thanks!

    Vidya

Viewing 4 reply threads
  • Author
    Replies
    • #78943
      Jim Kosloskey
      Participant

      Vidya,

      Is this a case where the inbound DFT has multiple FT1 segments and more than one of those can error so you want to create a outbound message per inbound that errors – or – is this a case where you want one outbound file to contain all of the errors for all FT1 segments in ALL inbound messages?

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

    • #78944
      Vidya Sridhar
      Participant

      Jim,

      The inbound DFT message has no repeating FT1 segments. This is how it looks inbound

      MSH

      PID

      PV1

      FT1

      Vidya

    • #78945
      Jim Kosloskey
      Participant

      Vidya,

      OK so you will have some number of inbound messages of which some number will fail.

      So your outbound file will be constructed thus:

      Col title, col title, col title …

      detail,detail,detail…

      and you wan tto describe the file in a single HRL.

      I don’t think that is possible because you will cut a new ‘record’ for the outbound with each inbound message in the Xlate. In other words, the Xlate outbound defintion does not transcend inbound messages.

      In order to accomplish what you want you will need to create the column header record indpendent of creating the detail I think.

      What I would attempt to do is to first see if the receiving system really needs the coulmn headers (if it is being imported into something like a spreadsheet or a DB that is not always necessary – convenient just not necessary). That would simplify matters. Then just a VRL definition and cut a outbound VRL with each inbound that fails (using CONTINUE).

      If the column headers are necessary then I would still have a single VRL and inside the Integration attempt to determine when this is the start so that the column header message can be generated from literals in the Xlate.

      If this is a batch integration then perhaps something triggering off of a BHS or FHS (depending on the inbound batch structure). That will require some Tcl most likely.

      In any case I don’t think HRL will serve your purpose but VRL can.

      If you need the column headers you will need to be able to determine when the process starts and when it ends so you can begin the output file (including the column header) and shut it down so the file gets closed.

      A lot of the start/stop recognition depends on how you are receiving the inbound messages.

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

    • #78946
      Vidya Sridhar
      Participant

      Jim,

      The headers or columns heading are required, so I think I am going to try to insert them as post proc after the Xlate. Or just do a all tcl process to pick off the errors and make a csv file right there.

      I tried to insert the headers as literals at the top in the Xlate using VRL as outbound, but the headers repeat for each detail, which is not what I want. Unless I am missing something you said in your reply with the VRL option, I am think I am going use the Tcl route. Thanks for you help!

      Vidya

    • #78947
      Jim Kosloskey
      Participant

      Vidya,

      You got what I would expect unless you have some intelligence inside the Xlate to understand when it is time to create the Headers so that you only build the headers once. There are a few techniques which come to mind but most will require some research and some may require a little Tcl.

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

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

Forum Statistics

Registered Users
5,129
Forums
28
Topics
9,301
Replies
34,447
Topic Tags
288
Empty Topic Tags
10