|
#1
|
|||
|
|||
|
Hi all,
I need to populate the MSH.7.1 in my output message with the current date and time. I'm not familiar enough with how the transform steps work outside of dragging and dropping from the message trees. So I thought I could simply drag MSH.7.1 from the outbound message template tree to the Variable text field on the left, and it does populate it. Then I thought I could drag the "Get Current Date" from the References tab and drop it into the Mapping text field on the left, and I'd be set. But that's not right as I get a warning: "The variable name contains invalid characters. Please enter a new variable name." I guess I'm not sure how to fix the warning and get the current date populated in the field I need it to. What is the right way to do this? |
|
#2
|
|||
|
|||
|
That Mapping field basically requires an RHS (right hand side) expression. Try the following:
Code:
DateUtil.getCurrentDate('yyyyMMddHHmmss')
|
|
#3
|
|||
|
|||
|
When building HL7 messages, I use something like the following Javascript transformer step:
Code:
var startDate = DateUtil.getCurrentDate("yyyyMMddHHmm");
tmp['MSH']['MSH.7']['MSH.7.1'] = startDate
|
|
#4
|
|||
|
|||
|
I guess I still don't understand, trying to follow your suggestions.
I've attached another picture. I still get the same error. I appreciate the help |
|
#5
|
|||
|
|||
|
Just remove the "var startDate = " and the semicolon at the end.
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|