Hi,
I've just started with Mirth 1.6. and it looks promising for our UK project.
I have set up a channel with a FileReader source going into a SQL server 2000 database table. I'm having problems reading dates date/times from HL7 messages and these are crucial for the application.
I realise I need to use a Javascript step in the Transformer as Mirth doesn't seem to handle dates as we would expect.
I'm not clear on how to use a Javascript step. I have written this to convert the Admit date:-
var datechange = DateUtil.getDate("yyyyMMddHHmmss", msg['PV1']['PV1.44']['PV1.44.1']);
localMap.put('AdmitDateConvert', datechange);
return;
But I get the following error
"Can't find method com.webreach.mirth.server.util.DateUtil.formatDate string,function)"
which is surprising as it's an internal function.
How should I be converting a date to go into a datetime filed in a SQL Server table?
And how then do I apply the result for this step in the SQL clause
INSERT IGNORE INTO ....... VALUES (...... in the destination.
Appreciate this may be a basic question but any guidance would be appreciated.
Cheers
Robin
I've just started with Mirth 1.6. and it looks promising for our UK project.
I have set up a channel with a FileReader source going into a SQL server 2000 database table. I'm having problems reading dates date/times from HL7 messages and these are crucial for the application.
I realise I need to use a Javascript step in the Transformer as Mirth doesn't seem to handle dates as we would expect.
I'm not clear on how to use a Javascript step. I have written this to convert the Admit date:-
var datechange = DateUtil.getDate("yyyyMMddHHmmss", msg['PV1']['PV1.44']['PV1.44.1']);
localMap.put('AdmitDateConvert', datechange);
return;
But I get the following error
"Can't find method com.webreach.mirth.server.util.DateUtil.formatDate string,function)"
which is surprising as it's an internal function.
How should I be converting a date to go into a datetime filed in a SQL Server table?
And how then do I apply the result for this step in the SQL clause
INSERT IGNORE INTO ....... VALUES (...... in the destination.
Appreciate this may be a basic question but any guidance would be appreciated.
Cheers
Robin
Comment