Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   General Discussion (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=7)
-   -   Mirth Code template (http://www.mirthcorp.com/community/forums/showthread.php?t=220909)

prakashjoy 10-07-2019 10:31 PM

Mirth Code template
 
1 Attachment(s)
Hi,

I created two code templates Library as follows.
1. DB Library
2. HL7 ADT V25 Library

1. DB Library - Using for below data base operations.
1.1 getDBConnnection - create connection object
1.2 executeSelect - executing select query
1.2 executeInsertOrUpdate - Performing insert update operations.

2. HL7 ADT V25 Library - For ADT segments creation (set and get method).
Eg
2.1 setPID - Select records from database and make object for constructing PID segment..
2.2 getPID - Constructing PID segment.

All the methods provided in the attached file.

The transformation script channel is provided below.
var dBConn = getDBConnnection($('dBProfile')); -- getting connection.
//script for setup object
var inPutPID = setPID(dBConn, hL7ADT.inPutPV1.mr_no, triggerEventID);
//getting hl7 PID segment
var pID = <PID/>;
var inputDataPID = $('hL7ADT').inPutPID
pID = getPID(inputDataPID);
tmp.appendChild(pID);


Mirth version using is 3.4.2.8129

I can access code template "executeSelect" (created in Library - DB Library)
from setPID(Library - HL7 ADT V25 Library).

Its working in my development environment.

My aim is for all the ADT's i am creating separate channels and i need to reuse all the set , get and db code templates for constructing all ADT messages.

My questions are below. Please help me.
1. The process I am following is correct?
2. Is it possible to call one code template created in Library 1 from another code template created in another code library. Is working in my dev setup. Please help me on this.
3. Writing js for constructing hl7 message is right?

pacmano 10-08-2019 02:17 PM

You posted this in support as well. Maybe keep a single thread.


All times are GMT -8. The time now is 11:26 AM.

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