web stats
pass a list of consulting physician from javascript to java code - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 12-03-2013, 07:01 PM
rahil rahil is offline
Mirth Newb
Join Date: Nov 2013
Posts: 6
rahil is on a distinguished road
Default pass a list of consulting physician from javascript to java code

In my case...

source inbound = HL7 2.x
source outbound = HL7 2.x
destination inbound = HL7 2.x
destination outbound = HL7 2.x

There is a multiple consulting physician on 9th filed of PV1 Segment. And
Now I want to pass this physician list to java code. And
I have written a javascript in desination transformer like this.
================================================== ====
var physicianList = [];
var totalPhysician = msg['PV1']['PV1.9'].length();
for (var i = 0; i < totalPhysician ; i++)
var physician =
physicianID : msg['PV1']['PV1.9']['PV1.9.1'].toString(),
lastName: msg['PV1']['PV1.9']['PV1.9.2'].toString(),
suffix : msg['PV1']['PV1.9']['PV1.9.5'].toString(),
return physicianList;
================================================== ====

And I am calling java code from destination(connector type = javascript).
like this
================================================== ====
var dbWriter = Packages.com.test.DataBaseWriter();
================================================== ====

Is it possible ?
If not then pls... pls.. suggest me best way to do this.

Thanks to all.
Reply With Quote
Old 12-04-2013, 05:18 AM
cory_cole cory_cole is offline
Mirth Guru
Join Date: Mar 2012
Posts: 1,277
cory_cole is on a distinguished road

var physician =
physicianID : msg['PV1']['PV1.9'][i]['PV1.9.1'].toString(),
lastName: msg['PV1']['PV1.9'][i]['PV1.9.2'].toString(),
suffix : msg['PV1']['PV1.9'][i]['PV1.9.5'].toString(),
Reply With Quote

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 07:24 PM.

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