Announcement

Collapse

NextGen (Mirth) Connect 3.9.1 Released!

NextGen (Mirth) Connect 3.9.1 is now available as an appliance update and on our GitHub page. This release contains bug fixes and adds support for eHealth Exchange UDDI providers in the Interoperability plugin. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

${ORIGINALNAME} in Source and Destination

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ${ORIGINALNAME} in Source and Destination

    I&#039;m moving messages (files) after they&#039;re parsed in a directory and named them sa ${ORIGINALNAME} and everything is working fine but at my Destination, I have an insert statement that inserts ${ORIGINALNAME} into a field and instead of saving the Original Name, the format is saves is <systime>.dat. is this a bug or I did something worng?


    Thanks!

  • #2
    Re: ${ORIGINALNAME} in Source and Destination

    Also, the reason for this one is I&#039;m trying to save the original HL7 message into a SQL Server table for future use or maybe for reparsing of the file. I&#039;m using SQL Server 2005 for this one.

    INSERT IGNORE INTO HL7FileArrival
    (FileName, TransData, FileETA)
    SELECT &#039;D:\Message_IN\&#039; + ${ORIGINALNAME}, BulkColumn from Openrowset( Bulk &#039;D:\Message_IN\&#039; + ${ORIGINALNAME}, Single_Blob) as FileM, getdate()


    Thanks!


    Comment


    • #3
      Re: ${ORIGINALNAME} in Source and Destination

      Anything on this inquiry?

      Comment


      • #4
        Re: ${ORIGINALNAME} in Source and Destination

        Try using ${ORIGINALFILE} variable name.

        Comment


        • #5
          Re: ${ORIGINALNAME} in Source and Destination

          I believe this may be a bug. I created a simple file to file channel using ${ORIGINALNAME} in both the move-to-filename as well as the file name of the destination file.

          The move-to-filename is retaining the correct original name, however the destination filename is a 13 digit .DAT file.

          Chris, can you see if there is any misconfiguration in the channel. I will paste it below.

          Thanks!

          - <com.webreach.mirth.model.Channel>
          <id>ecacd44c-69e9-4c00-9fae-8165d6b410c9</id>
          <name>MESSAGE PARSER - NO DB</name>
          <description />
          <enabled>true</enabled>
          <version>1.3.2</version>
          <revision>3</revision>
          <direction>INBOUND</direction>
          <protocol>HL7</protocol>
          <mode>ROUTER</mode>
          - <sourceConnector>
          <name>sourceConnector</name>
          - <properties>
          <property name="checkFileAge">1</property>
          <property name="charsetEncoding">DEFAULT_ENCODING</property>
          <property name="fileAge">100</property>
          <property name="autoDelete">1</property>
          <property name="pollingFrequency">1000</property>
          <property name="DataType">File Reader</property>
          <property name="moveToDirectory">C:/HOST/RES_DONE</property>
          <property name="sortAttribute">date</property>
          <property name="fileFilter">*.*</property>
          <property name="host">C:/HOST/RES_IN</property>
          <property name="moveToPattern">${ORIGINALNAME}</property>
          </properties>
          - <transformer>
          <steps />
          </transformer>
          - <filter>
          <rules />
          </filter>
          <transportName>File Reader</transportName>
          </sourceConnector>
          - <destinationConnectors>
          - <com.webreach.mirth.model.Connector>
          <name>Destination 1</name>
          - <properties>
          <property name="charsetEncoding">DEFAULT_ENCODING</property>
          <property name="host">C:/HOST/HL7_DONE</property>
          <property name="outputPattern">${ORIGINALNAME}</property>
          <property name="DataType">File Writer</property>
          <property name="template">${message.encodedData}</property>
          <property name="outputAppend">1</property>
          </properties>
          - <transformer>
          <steps />
          <template>MSH|^~\&|SENDING APP|SENDING FACILITY|RECEIVING APP|RECEIVING FACILITY|20060925173628||ORU^R01|43838|P|2.5|||AL| NE|US EVN|R01|20060925173628 PID|1|9170200^1^C^AA^CT^AF~9170201^1^C^AA^CT^AF~91 70202^1^C^AA^CT^AF|8170200^1^C^AA^CT^AF~8170201^1^ C^AA^CT^AF~8170202^1^C^AA^CT^AF|546610914^1^C^AA^C T^AF|PXLASTNAME^PXFIRSTNAME^MI^SUFX^PREFX|MOMLN^MO MFN^MOMMI^MOMSFX^MOMPRFX|19390509|M|PXALIASLN^PXAL IASFIRSTNAME^PXALMI^PXALSUFX^PXALPREFX|W|PX ADDRESS1^PX ADDRESS2^PXCITY^PXSTATE^90210^USA|USA|(317) 564-2456|(888) 564-2456|ENG|S|RC|12345|546610901|DLN12345|MOTHID|ETHN ICGRP|BIRTH PLACE|MULTBIRTH|BIRTHORDER#|CITIZENSHIP|VET|NATION |20060925173628|Y|ALTPID1|ALTPID2|ALTPID3|ALTPID4| ALTPID5 NTE|1|SOURCECOMMENT|Patient comment PV1|1|PCLASS|LOCHC^ROOM^BED^LOCABBREV^LOCSTATUS^LO CTYPE^BUILDING^FLOOR^LOCDESC|ADTYPE|PREADMIT#|PRLO CHC^PRROOM^PRBED^PRLOCABBREV^PRLOCSTATUS^PRLOCTYPE ^PRBUILDING^PRFLOOR^PRLOCDESC|ATTENDING DOCTOR HC^LN^FN^MN^SUFX^PREFX^MD^SOURCETBL^^^^^IDTYPECODE ^ASSGN FACILITY|REFERRING DOCTOR HC^LN^FN^MN^SUFX^PREFX^MD^SOURCETBL^^^^^IDTYPECODE ^ASSGN FACILITY|CONSULTING MD HC^LN^FN^MN^SUFX^PREFX^MD^SOURCETBL^^^^^IDTYPECODE ^ASSGN FACILITY||||||||ADMITTING MD HC^LN^FN^MN^SUFX^PREFX^MD^SOURCETBL^^^^^IDTYPECODE ^ASSGN FACILITY|PTYPE|12345|FCLASS|||||||||||||||||||SVCF ACILTIY|||||20060924170742|20060924170750|||||ALT VISIT#|VISIT IND|OTHER PROVIDER HC^LN^FN^MN^SUFX^PREFX^MD^SOURCETBL^ASSGNAUTH^^^^I DTYPECODE^ASSGN FACILITY ORC|RE|PLACER12345|FILLER6268001|PLACERGRP12345|OR CSTATUS|ORCRESPONSEFLAG|QUANT^INTERVAL^DURATION^ST ARTDATE^ENDDATE^PRIORITY|PARENT|DATETIMETRANSACTIO N|ORDERENTRYTECH HC^LN^FN^MN^SUFX^PREFX^MD^SOURCETBL^ASSGNAUTH^^^^I DTYPECODE^ASSGN FACILITY||ORDERINGPROVIDER HC^LN^FN^MN^SUFX^PREFX^MD^SOURCETBL^^^^^IDTYPECODE ^ASSGN FACILITY|LOCHC^ROOM^BED^LOCABBREV^LOCSTATUS^LOCTYP E^BUILDING^FLOOR^LOCDESC|CALLBACKPHN~CALLBACKPHN|2 0060925173628|ORDERCONTROLCODEREASON|ENTERINGORG|E NTERINGDEV| NTE|1||ID Comment NTE|2||Order comment NTE|3||Items in this order include: Basic Metabolic Panel, Coronary Risk Profile OBR|1|PLACER12345^PLACERID^PLACERIDTYPE|FILLER6268 001^FILLERID^FILLERIDTYPE|PANELHC^PANELTXT^CODESYS TEM^PANELHCALT^PANELTXTALT^CODESYSTEMALT|PRIORITY| 20060924163934|20060925163934|20060925164034|COLLV OL^COLLVOLUNITS|COLLECTORHC^LN^FN^MN^SUFX^PREFX^MD ^SOURCETBL^^^^^IDTYPECODE^ASSGN FACILITY|SPECCODE|DANGERCODEID^DANGERCODETXT~DANGE RCODEID^DANGERCODETXT|CLININFO|200609251639|SPECSR CHC&SPECSRCTXT&SPECSRCCODESYS&SPECSRCHCALT&SPECSRC TXTALT&SPECSRCCODESYSALT^SPECSRCADDTV^SPECSRCFREET XT^BDYSTEHC&BDYSTETXT&BDYSTECODESYS&BDYSTEHCALT&BD YSTETXTALT&BDYSTECODESYSALT^SITEMODHC&SITEMODTXT&S ITEMODCODESYS&SITEMODHCALT&SITEMODTXTALT&SITEMODCO DESYSALT^COLLMODHC&COLLMODTXT&COLLMODCODESYS&COLLM ODHCALT&COLLMODTXTALT&COLLMODCODESYSALT|ORDERINGPR OVIDER HC^LN^FN^MN^SUFX^PREFX^MD^SOURCETBL^^^^^IDTYPECODE ^ASSGN FACILITY|317) 564-2456~317) 564-2455|PLACERFIELD1|PLACERFIELD2|FILLERFIELD1|FILLER FIELD2|200609251703|CHRGQNT&CHRGDENOM^CHRGID^CHRGT XT^CHRGCODESYS^CHRGIDALT^CHRGTXTALT^CHRGCODESYSALT |DIAGSECTID^DIAGSECTTXT^DIAGSECTCODESYS^DIAGSECTID ALT^DIAGSECTTXTALT^DIAGSECTCODESYSALT|RESSTATUS|PA RENTID&PARENTTXT&PARENTCODESYS&PARENTIDALT&PARENTT XTALT&PARENTCODESYSALT^PARENTRESID^PARENTRESV|QTQU ANT^QTINT^QTDUR^QTSTART_DT^QTEND_DT^PRIORITY~QTQUA NT^QTINT^QTDUR^QTSTART_DT^QTEND_DT^PRIORITY|CCPROV IDER HC^LN^FN^MN^SUFX^PREFX^MD^SOURCETBL^ASSGNAUTH^^^^I DTYPECODE^ASSGN FACILITY~CCPROVIDER HC^LN^FN^MN^SUFX^PREFX^MD^SOURCETBL^ASSGNAUTH^^^^I DTYPECODE^ASSGN FACILITY~CCPROVIDER HC^LN^FN^MN^SUFX^PREFX^MD^SOURCETBL^ASSGNAUTH^^^^I DTYPECODE^ASSGN FACILITY~CCPROVIDER HC^LN^FN^MN^SUFX^PREFX^MD^SOURCETBL^ASSGNAUTH^^^^I DTYPECODE^ASSGN FACILITY~CCPROVIDER HC^LN^FN^MN^SUFX^PREFX^MD^SOURCETBL^ASSGNAUTH^^^^I DTYPECODE^ASSGN FACILITY|PARENTPLACERID&PARENTPLACERNAME^PARENTFIL LERID&PARENTFILLERNAME|TRANSPORTAION|REASONSTDYID^ REASONSTDYTXT^REASONSTDYCODESYS^REASONSTDYIDALT^RE ASONSTDYTXTALT^REASONSTDYCODESYSALT|PRINCPLINTERPR ET HC^LN^FN^MN^SUFX^PREFX^MD^SOURCETBL^ASSGNAUTH^^^^I DTYPECODE^ASSGN FACILITY|ASSISTINTERPRET HC^LN^FN^MN^SUFX^PREFX^MD^SOURCETBL^ASSGNAUTH^^^^I DTYPECODE^ASSGN FACILITY|TECHHC^LN^FN^MN^SUFX^PREFX^MD^SOURCETBL^A SSGNAUTH^^^^IDTYPECODE^ASSGN FACILITY|TRANSCPTHC^LN^FN^MN^SUFX^PREFX^MD^SOURCET BL^ASSGNAUTH^^^^IDTYPECODE^ASSGN FACILITY|SCHED_DT|NMSAMPLECONT|TRANSPORTOFSAMPLE|C OLLECTORCOMNT|TRANSPORTRESP|TRANSPORTARRNG|ESCORTR EQ|PLANNEDPTTRNSCOM NTE|1||Panel level comment OBX|1|ST|OBXID^OBXTXT^OBXCODESYS^OBXIDALT^OBXTXTAL T^OBXCODESYSALT|OBXSUBID|RESULT|UNITSHC^UNITSTXT^U NITSCODESYS^UNITSHCALT^UNITSTXTALT^UNITSCODESYSALT |REFRANGE|FLAGS|PROBABILTY|NATUREOFABNORMAL~NATURE OFABNORMAL~NATUREOFABNORMAL~NATUREOFABNORMAL~NATUR EOFABNORMAL|OBXSTATUS|DTLASTNORMAL|USERACCESSCHKS| DTOFOBX|PRODUCERHC^LABNAME\F\LABSTREET\F\LABCITY\F \LABSTATE\F\LABZIP\F\LABDIR\F\LABTXT^PRODUCERCODES YS^PRODUCERHCALT^PRODUCERTXTALT^PRODUCERCODESYSALT |APPROVALTECH HC^LN^FN^MN^SUFX^PREFX^MD^SOURCETBL^ASSGNAUTH^^^^I DTYPECODE^ASSGN FACILITY|OBXMETHOD|EQUIPMNTID_POC|DTANALYSIS_ELINC S NTE|1|L|Glucose reference range based on fasting specimen. NTE|2|L|Test level comment</template>
          </transformer>
          - <filter>
          <rules />
          </filter>
          <transportName>File Writer</transportName>
          </com.webreach.mirth.model.Connector>
          </destinationConnectors>
          - <properties>
          <property name="synchronous">true</property>
          <property name="encryptData">false</property>
          <property name="store_messages">true</property>
          <property name="initialState">started</property>
          <property name="max_message_age">-1</property>
          <property name="transactional">false</property>
          <property name="error_messages_only">false</property>
          <property name="recv_xml_encoded">false</property>
          </properties>
          <preprocessingScript>// Modify the message variable below to pre process data return message;</preprocessingScript>
          </com.webreach.mirth.model.Channel>

          Comment


          • #6
            Re: ${ORIGINALNAME} in Source and Destination

            Unfortunately, it is not a bug. Mirth doesn&#039;t carry state information about the filename to the destination, so there is no "original name" variable. It uses a randomly generated GUID to do the processing. We&#039;ll look into removing the originalName var from the destination tab in the next release.

            Chris Lang

            Comment

            Working...
            X