web stats
Mirth Community - View Single Post - Using JavaScript Objects for Transformations
View Single Post
Old 06-28-2019, 07:51 AM
shishirakram shishirakram is offline
Mirth Newb
Join Date: Jun 2018
Posts: 14
shishirakram is on a distinguished road

Sorry I meant SQL Server. I think I was not clear with the question.

What I was asking is I'm storing all the mapping details in the database.
Ex: FirstName(Column) - msg['PID']['PID.5']['PID.5.2'](Value).

Now suppose my channel is say HL7 to CSV converter. And I'm mapping first name in HL7 message to a particular field in csv, I would ask mirth to go to database and find out what is the location of firstname in HL7 message and get the value and map it to a particular field.

so if I write something like tmp['somepath'] = result of the database query(To fetch the mapping of the firstname) it will not work right....

How do I make this work???

Should I store those Xpath(msg['PID']['PID.5']['PID.5.2']) in DB as I mentioned in the above example or should I use a different approach altogether?

Or is there any way of telling mirth that the result you got from database is not the value that you have to map, but it is the path in HL7 message where you can find the actual value of First name and map that to the tmp???
Reply With Quote