web stats
Database Reader not able to recognize response - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 10-05-2017, 01:22 AM
mytestdemo123 mytestdemo123 is offline
What's HL7?
 
Join Date: Oct 2017
Posts: 1
mytestdemo123 is on a distinguished road
Default Database Reader not able to recognize response

Hi

I have created a channel with source as database Reader, it reads patient details like firtname, lastname, age , then using transformer i converted it to HL7 ADT-A04 message, then in destination connection type is "TCP Sender" in which i configured using HAPI Reciving connection. when i execute its working fine. IN the source panel, i have following query in the "Run post-process sql" field, ( UPDATE user SET status = 'processed' where user.id = ${user_id} ) . Its executed and changing the status of user record to "processed" everytime. THe problem is when i configure destination with incorrect port number for testing, we are getting error message in the log panel. But this update query in the Source section ( Run Post-Process Script) is executing always. SO this is not working properly, so please help me find the status and acknowledgement ,then i want to update the status to "processed" for user table. I have attached my channel files.
Attached Files
File Type: xml DbReaderDemo2.xml (26.1 KB, 5 views)
Reply With Quote
  #2  
Old 11-03-2017, 06:46 AM
kirbykn2's Avatar
kirbykn2 kirbykn2 is offline
Mirth Guru
 
Join Date: Sep 2014
Location: Michigan
Posts: 577
kirbykn2 is on a distinguished road
Default

what is the error message.
__________________
Kirby

Mirth Certified|Epic Bridges Certified|Cloverleaf Level 2 Certified

Appliance Version 3.11.2
Mirth Connect Version 3.6.1
Java Version 1.6.0_45-b06
Java (64 bit) Version 1.6.0_45-b06
Java 7 (64 bit) Version 1.7.0_151-b15
Java 8 (64 bit) Version 1.8.0_121-b13
PostgreSQL Version 9.6.3
Reply With Quote
  #3  
Old 11-03-2017, 06:58 AM
appsbyaaron's Avatar
appsbyaaron appsbyaaron is offline
Mirth Guru
 
Join Date: Nov 2011
Location: Florida, USA
Posts: 377
appsbyaaron is on a distinguished road
Default

The post processor code will run after every message process. You'll need to add code to check for an error and skip the update.
Reply With Quote
  #4  
Old 11-06-2017, 06:11 AM
AlexNeiva AlexNeiva is offline
Mirth Guru
 
Join Date: Oct 2013
Location: Portugal
Posts: 277
AlexNeiva is on a distinguished road
Default

Process the TCP Destination response, and check if is was sent or not sent or with some error.
Create a variable (channelMap) to store the "processed" or "non processed" value, and in query replace with this variable mapper:

UPDATE user SET status = ${processResponse} where user.id = ${user_id};

If it was processed update with value 'processed' if not put another value.

Hope i explain well.

Best Regards
Reply With Quote
Reply

Tags
database reader, response message

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 02:29 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation