web stats
Saving HL7 data to database - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 10-24-2019, 10:58 PM
cwaweru cwaweru is offline
What's HL7?
 
Join Date: Oct 2019
Posts: 1
cwaweru is on a distinguished road
Default Saving HL7 data to database

I have followed examples with a view to creating a channel to receive data from a sender to destination that saves HL7 data to database.

The challenge is that the channel is saving data in form of the referenced object and not the value.

Code snippet:

var dbConn;

try {
dbConn = DatabaseConnectionFactory.createDatabaseConnection ('org.postgresql.Driver','jdbcostgresql://localhost:5432/mirthdb','postgres','afrisystems..');

var result = dbConn.executeUpdate("INSERT INTO hp_xray_results (patient_no) VALUES ('"+$('patientIdentification_patientIdentifierList _id')+"')");


} finally {
if (dbConn) {
dbConn.close();
}
}

This is what I get on the table field:

[Ljava.lang.Object;@1eb42f29
Reply With Quote
  #2  
Old 10-28-2019, 03:35 PM
stormcel stormcel is offline
OBX.3 Kenobi
 
Join Date: Mar 2010
Location: Phoenix
Posts: 173
stormcel is on a distinguished road
Default

Code:
$('patientIdentification_patientIdentifierList _id').toString()
Reply With Quote
  #3  
Old 10-29-2019, 12:23 PM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 1,176
agermano is on a distinguished road
Default

Looks like you are storing a java array in that map variable instead of a string.
Reply With Quote
Reply

Tags
database, hl7

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 03:19 AM.


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