how to set unique filenames on OB fileset

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf how to set unique filenames on OB fileset

  • Creator
    Topic
  • #48255
    Nancy McDaniel
    Participant

      I have been searching the forum trying to figure out how to do this.

      Currently, I have an IB that takes HL7 ORU msgs.  It then routes them, converting them to a flat file and sends to OB FileSet thread.  I found an earlier discussin saying that there is a contrib tps called numfile in which I can pass a name (name to contain XXXX%d# – # indicating the length of the number).  It says to add this to the OB TPS for my thread.  

      How do I pass the filename to this TPS? I would assume I need to create another TPS that calls the numfile.tps and passes the NAME arg?

      Can someone provide assistance on how to do this, such as do I need to set $MH [mytpsproc NAME tafile%d4] for example?  Or do I need to set a global variable representing the filename?

      I am wanting to force each HL7 message to a flat file with unique filename.

      Any assistance on this would be helpful as I have a short deadline on this.

      thanks,

      Nancy Hellyer

      The Vancouver Clinic

      nhellyer@thevancouverclinic.com

      (360) 397-3222

    Viewing 2 reply threads
    • Author
      Replies
      • #58173
        Rentian Huang
        Participant

          Nancy,

          1. Is your IB thread TCPIP or Fileset?

          2. Where will you get the file name for each msg?

          Sam

        • #58174
          Abe Rastkar
          Participant

            Hi Nancy,

            You can add your unique file name to in the MetaData part of the message, using a statemnet as follows. This example uses a FILESET protocol.

            # Set a unique file name here

                       msgmetaset $mh DRIVERCTL “{FILESET { {OBAPPEND 1 } { OBFILE ${UNIQUE FILE NAME}.$fileExt } } }”

                       echo ” FileName: message reset with filename. “

            Let me know if you need more detail.

            Thanks

          • #58175
            Jim Kosloskey
            Participant

              Nancy,

              The NAME argument for this proc is a keyed list which you should place in the Args panel of the TPS Outbound Data entry of the Outbound Thread Configuration (Outbound Tab).

              Cloverleaf then passes the NAME keyed list to the proc which extracts it. All you need to do is to place the Key (NAME) and the value you want associated with it.

              Jim Kosloskey

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

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