Thread Output – Naming the file

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Thread Output – Naming the file

  • Creator
    Topic
  • #47892
    Tony Benitz
    Participant

      I need to be able to create a single file with a single message for an outbound thread.  The file name is composed of values in the message, MRN and document type, plus a time stamp, and perhaps a sequence number.

      MRN-DOCTYPE-DATETIME-SEQ

      Does any know of the protocol that would allow me to do this.

      My thoughts at this point are around modifying the meta data with an outbound TPS.

      Please advise

      Thanks in advance

    Viewing 1 reply thread
    • Author
      Replies
      • #57002
        David Caragay
        Participant

          I don’t know of a protocol that would do this automatically.  Do a archive search on numfile.tcl.  This will give you an example of how to create your own ob filename for each msg.  This proc appends a unique number to a passed file name argument.  You should be able to modify it to read you msg data and then create any obfile name you desire.  Numfile.tcl does not retrieve your HL7 data so you will have to add this code to pull the required data fields (I have sample code if your need it).  Revising the metadata field is the way I’ve handled this requests.  

          If there is another way to accomplish this, I’d also be interested.

        • #57003
          James McPheron
          Participant

            Tony – and others

              I replied to a similar question, and I am re-pasting my answer here also.

              Whatever value the metadata has for OBFILE will ultimately be the file name.

             Example –

                      # The fileset driver’s configuration in NetConfig

                      # may be overridden by setting the equivelant key

                      # to the desired value in the messaga meta data

                      # field DRIVERCTL.

                      #

                      # Here the name of the outbound field is changed

                      # from what is configured in NetConfig to the

                      # value supplied by the user by setting file name to

                      # the value currently in the variable ‘file_name’.

                      set dvr_ctl_str “{FILESET {{OBFILE $file_name}}}”

                      msgmetaset $mh DRIVERCTL $dvr_ctl_str

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