ftp-fileset protocol outbound problem setting filename

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf ftp-fileset protocol outbound problem setting filename

  • Creator
    Topic
  • #55123
    Chuck Busch
    Participant

      Please see attached word document for screen shots of my code and output directory

      1. Details

      a. Protocol = fileset-ftp

      b. This is an outbound thread that is transferring files to a directory on another server

      c. I want to take the value in the PID-3 field and use it to name each file.

      2. Problem

      a. I cannot get the name that I am assigning to the FILESET.OBFILE to use my variable name unless I explicitly assign it in the code.

      3. Example of a failure

      a. Here is the code

      i. _

      b. Here is what is transferred to the directory

      i. Notice that only the value in variable $ext is sent.

      c. When I echo the value in the $mrn variable I get a value so I know it is not blank.

      4. Example of a success using an explicit value of 999999 for the variable $mrn

      a. Here is the code

      i. _

      b. Here is what is transferred to the directory

      i. _

      5. Any help would be greatly appreciated.

    Viewing 7 reply threads
    • Author
      Replies
      • #84191
        Chuck Busch
        Participant

          Here is the msgdump from the failed attempt.  Notice the value in the msgDriverControl is the value I am passing to it.

          msg: 0x0204BCB4

             msgType           : DATA

             msgClass          :

             msgState          : Unknown: 0 (0)

             msgPriority       : 5120

             msgRecoveryDbState: Log:off (1)

             msgFlags          : 0x2

             msgMid            : [0.0.0]

             msgSrcMid         : midNULL

             msgSrcMidGroup    : midNULL

             msgHostId         : 4028562964

             msgOrigSrcThread  :

             msgOrigDestThread :

             msgSrcThread      :

             msgDestThread     :

             msgXlateThread    :

             msgSkipXlate      : 0

             msgSepChars       :

             msgNumRetries     : 0

             msgGroupId        : 0

             msgDriverControl  : {FILESET {{OBFILE 3100069429.txt}}}

             msgRecordFormat   :

             msgRoutes         :

             msgUserData       :

             msgStaticIsDirty  : 0

             msgVariableIsDirty: 1

             msgTimeStartIb    : 1466801162.528

             msgTimeStartOb    : 1466801162.528

             msgTimeCurQueStart: 0.000

             msgTimeTotalQue   : 0.000

             msgTimeRecovery   : 1466801162.528

             msgEoConfig       : 0x00000000

             msgData (BO)      : 0x0204BDB8

        • #84192
          Chuck Busch
          Participant

            Please disregard this post.  I discovered the problem.  I was testing the proc with and HL7 message and those instances worked.  When I attempted to use this script in the route it was failing because the message was altered by the time it reached my proc.  Thus there was no value in PID-3 to pull because the message was no longer formatted like an HL7.

          • #84193
            Chuck Busch
            Participant

              Here are the details of this solution for anyone who needs to:

              1. Take an inbound HL7 message

              2. Parse this message and store specific pieces of data in METADATA USERDATE

              3. Format this HL7 to a readable document using a VRL

              4. FTP this document to a server with the data from the USERDATA as the filename.

              5. Each message gets it own named text document

            • #84194
              Chuck Busch
              Participant

                Interface description

              • #84195
                Chuck Busch
                Participant

                  Script on the inbound thread that stores the value from PID-3 in the USERDATA key

                • #84196
                  Chuck Busch
                  Participant

                    XLATE for the conversion of the HL7 to the VRL format

                  • #84197
                    Chuck Busch
                    Participant

                      Script that takes the data from the USERDATA key and assigns it to the OBFILE key.  This is what names the outbound file.

                    • #84198
                      Chuck Busch
                      Participant

                        Here is a sample of the output

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