web stats
Destination Mappings in File Writer Template - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 12-11-2012, 08:02 AM
R A R A is offline
Mirth Guru
 
Join Date: Jan 2012
Location: London, UK
Posts: 181
R A is on a distinguished road
Default Destination Mappings in File Writer Template

in my file writter I have the below in the template section and I have a list Destination Mappings listed in the appropriate section. Have drag and droped these across. As below.

Code:
<?xml version="1.0" encoding="UTF-8"?> 
<HL7> 
<HL7Message>
	 <MSH> 
		<MessageTypeID>ADT</MessageTypeID><TriggerEventID>A01</TriggerEventID>
	  </MSH>    
	<PID>
		<PatientIDInternal>${@NHS_No_varchar}</PatientIDInternal>
		<PatientLastName>${@SURNAME_varchar}</PatientLastName>
		<PatientFirstName>${@FNAME1_varchar}</PatientFirstName>
		<PatientMiddleNameInitial></PatientMiddleNameInitial>
		<PatientDateTimeofBirth>${@DOB_varchar}</PatientDateTimeofBirth>
		<PatientSex>${@GENDER_varchar}</PatientSex>
		<PatientStreetAddress>${@ADDRESS1_varchar}</PatientStreetAddress>
		<PatientAddressOtherDesignation>${@ADDRESS2_varchar}</PatientAddressOtherDesignation>
		<PatientCity>${@ADDRESS3_varchar}</PatientCity>
		<PatientStateorProvince>${@ADDRESS4_varchar}</PatientStateorProvince>
		<PatientZiporPostalCode>${@POSTCODE_varchar}</PatientZiporPostalCode>
		<PatientCountry>UK</PatientCountry>
		<PatientHomePhone>${@TEL_varchar}</PatientHomePhone>
		<ReferringPhysician>[RF_FULL_NAME@v_OCS_REFERRER@OCS_NUMBER@OCS]</ReferringPhysician>
		<BillingID>${@NHS_varchar}</BillingID>
		<ChartNo>[TEST]</ChartNo>
		<Ward></Ward>
		<Weight></Weight>
		<Height></Height>
		<Category></Category>
	</PID>    
	<PV1>       
		<ReferringPhysicianLastName></ReferringPhysicianLastName>       
		<ReferringPhysicianFirstName/>       
		<ReferringPhysicianMiddleName></ReferringPhysicianMiddleName>
		<VisitNumber>[EV_NUMBER@OCS@OCS_NUMBER@OCS]</VisitNumber>    
	</PV1>  
</HL7Message> 
</HL7>
Just in case your wondering how I got the mappings

Code:
var dbConn;

// General, query-independent info goes here
//tmp.action = msg.OCS['OCS.1']['OCS.1.1'].toString();


try {
	// Create the database connection
	
	dbConn = DatabaseConnectionFactory.createDatabaseConnection('net.sourceforge.jtds.jdbc.Driver','jdbc:jtds:sqlserver://localhost:1433/P7','prism','prism').GetConnection();

	// Query for patient information
	var ps = dbConn.preparestatment('SELECT MS_HOSP_NO, MS_SURNAME, MS_FNAME1, PAT_DOB, MS_GENDER, MS_ADDRESS_1, MS_ADDRESS_2, MS_ADDRESS_3, MS_ADDRESS_4, MS_POST_CODE, MS_TEL_NO, MS_NHS_NO FROM MASTER WHERE id = 14');
	ps.setString(1,msg['OCS']['OCS.2']['OCS.2.1'].toString());
	var rs = ps.executeQuery();

	if (rs.next()) {
		var MS_HOSP_NO = rs.getstring(1);
		var MS_SURNAME = rs.getstring(2);
		var MS_FNAME1 = rs.getstring(3);
		var PAT_DOB = rs.getstring(4);
		var MS_GENDER = rs.getstring(5);
		var MS_ADDRESS1 = rs.getstring(6);
		var MS_ADDRESS2 = rs.getstring(7);
		var MS_ADDRESS3 = rs.getstring(8);
		var MS_ADDRESS4 = rs.getstring(9);
		var MS_POST_CODE = rs.getstring(10);
		var MS_TEL_NO = rs.getstring(11);
		var MS_NHS_NO = rs.getstring(12);
	
		globalMap.put("@MS_HOSP_varchar", MS_HOSP_NO);
		globalMap.put("@SURNAME_varchar", MS_SURNAME);
		globalMap.put("@FNAME1_varchar", MS_FNAME1);
		globalMap.put("@DOB_varchar", PAT_DOB);
		globalMap.put("@GENDER_varchar", MS_GENDER);
		globalMap.put("@ADDRESS1_varchar", MS_ADDRESS1);
		globalMap.put("@ADDRESS2_varchar", MS_ADDRESS2);
		globalMap.put("@ADDRESS3_varchar", MS_ADDRESS3);
		globalMap.put("@ADDRESS4_varchar", MS_ADDRESS4);
		globalMap.put("@POSTCODE_varchar", MS_POST_CODE);
		globalMap.put("@TEL_varchar", MS_TEL_NO);
		globalMap.put("@NHS_varchar", MS_NHS_NO);
		// Set the patient information
		//tmp.patient.firstname = rs.getString(1);
		//tmp.patient.lastname = rs.getString(2);
	}

	// Query for order information
	//ps = dbConn.prepareStatement('SELECT value, units FROM orders WHERE id = ?');
	//ps.setString(1,msg.OCS['OCS.3']['OCS.3.1'].toString());
	//rs = ps.executeQuery();

	//if (rs.next()) {
		// Set the order information
		//tmp.order.value = rs.getString(1);
		//tmp.order.units = rs.getString(2);
	//}
} finally {
	// Always close the connection
	try {dbConn.close()} catch(e) {}
}
However my output currently lacks any values and looks like the values as above with the variables for destination mappings?

Any help appreciated.


Many Thanks
Reply With Quote
  #2  
Old 12-11-2012, 08:15 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road
Default

Valid property names in ECMAScript is less restrictive than Velocity; the former allows the "@" character while the latter only allows [\w\-]+. Try removing those characters and see if it works.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #3  
Old 12-11-2012, 08:38 AM
R A R A is offline
Mirth Guru
 
Join Date: Jan 2012
Location: London, UK
Posts: 181
R A is on a distinguished road
Default

Hey, have updated to prepareStatement. And I think the connection is now working, without errors. Not sure if the query is bringing back my values. Will add some logging.

However my template in the file writer lacks any value from the quries in the transformer. Template as it is in code below.

Code:
<?xml version="1.0" encoding="UTF-8"?> 
<HL7> 
<HL7Message>
	 <MSH> 
		<MessageTypeID>ADT</MessageTypeID><TriggerEventID>A01</TriggerEventID>
	  </MSH>    
	<PID>
		<PatientIDInternal>${@MS_HOSP_varchar}</PatientIDInternal>
		<PatientLastName>${@SURNAME_varchar}</PatientLastName>
		<PatientFirstName>${@FNAME1_varchar}</PatientFirstName>
		<PatientMiddleNameInitial></PatientMiddleNameInitial>
		<PatientDateTimeofBirth>${@DOB_varchar}</PatientDateTimeofBirth>
		<PatientSex>${@GENDER_varchar}</PatientSex>
		<PatientStreetAddress>${@ADDRESS1_varchar}</PatientStreetAddress>
		<PatientAddressOtherDesignation>${@ADDRESS2_varchar}</PatientAddressOtherDesignation>
		<PatientCity>${@ADDRESS3_varchar}</PatientCity>
		<PatientStateorProvince>${@ADDRESS4_varchar}</PatientStateorProvince>
		<PatientZiporPostalCode>${@POSTCODE_varchar}</PatientZiporPostalCode>
		<PatientCountry>UK</PatientCountry>
		<PatientHomePhone>${@TEL_varchar}</PatientHomePhone>
		<ReferringPhysician>[RF_FULL_NAME@v_OCS_REFERRER@OCS_NUMBER@OCS]</ReferringPhysician>
		<BillingID>${@NHS_varchar}</BillingID>
		<ChartNo>[TEST]</ChartNo>
		<Ward></Ward>
		<Weight></Weight>
		<Height></Height>
		<Category></Category>
	</PID>    
	<PV1>       
		<ReferringPhysicianLastName></ReferringPhysicianLastName>       
		<ReferringPhysicianFirstName/>       
		<ReferringPhysicianMiddleName></ReferringPhysicianMiddleName>
		<VisitNumber>[EV_NUMBER@OCS@OCS_NUMBER@OCS]</VisitNumber>    
	</PV1>  
</HL7Message> 
</HL7>
I am thinking my Syntax might be wrong around the template? As I would assume if the values were wrong it would be a blank as opposed to just looking like the variable text, hence I am assuming the template is just putting out the textof the destination mapping of ${@xxx}???
Attached Images
File Type: jpg MirthDest.JPG (144.0 KB, 30 views)
Reply With Quote
  #4  
Old 12-11-2012, 08:41 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road
Default

Quote:
Originally Posted by R A View Post
Hey, have updated to prepareStatement. And I think the connection is now working, without errors. Not sure if the query is bringing back my values. Will add some logging.

However my template in the file writer lacks any value from the quries in the transformer. Template as it is in code below.

Code:
<?xml version="1.0" encoding="UTF-8"?> 
<HL7> 
<HL7Message>
	 <MSH> 
		<MessageTypeID>ADT</MessageTypeID><TriggerEventID>A01</TriggerEventID>
	  </MSH>    
	<PID>
		<PatientIDInternal>${@MS_HOSP_varchar}</PatientIDInternal>
		<PatientLastName>${@SURNAME_varchar}</PatientLastName>
		<PatientFirstName>${@FNAME1_varchar}</PatientFirstName>
		<PatientMiddleNameInitial></PatientMiddleNameInitial>
		<PatientDateTimeofBirth>${@DOB_varchar}</PatientDateTimeofBirth>
		<PatientSex>${@GENDER_varchar}</PatientSex>
		<PatientStreetAddress>${@ADDRESS1_varchar}</PatientStreetAddress>
		<PatientAddressOtherDesignation>${@ADDRESS2_varchar}</PatientAddressOtherDesignation>
		<PatientCity>${@ADDRESS3_varchar}</PatientCity>
		<PatientStateorProvince>${@ADDRESS4_varchar}</PatientStateorProvince>
		<PatientZiporPostalCode>${@POSTCODE_varchar}</PatientZiporPostalCode>
		<PatientCountry>UK</PatientCountry>
		<PatientHomePhone>${@TEL_varchar}</PatientHomePhone>
		<ReferringPhysician>[RF_FULL_NAME@v_OCS_REFERRER@OCS_NUMBER@OCS]</ReferringPhysician>
		<BillingID>${@NHS_varchar}</BillingID>
		<ChartNo>[TEST]</ChartNo>
		<Ward></Ward>
		<Weight></Weight>
		<Height></Height>
		<Category></Category>
	</PID>    
	<PV1>       
		<ReferringPhysicianLastName></ReferringPhysicianLastName>       
		<ReferringPhysicianFirstName/>       
		<ReferringPhysicianMiddleName></ReferringPhysicianMiddleName>
		<VisitNumber>[EV_NUMBER@OCS@OCS_NUMBER@OCS]</VisitNumber>    
	</PV1>  
</HL7Message> 
</HL7>
I am thinking my Syntax might be wrong around the template? As I would assume if the values were wrong it would be a blank as opposed to just looking like the variable text, hence I am assuming the template is just putting out the textof the destination mapping of ${@xxx}???
See:

Quote:
Originally Posted by narupley View Post
Valid property names in ECMAScript is less restrictive than Velocity; the former allows the "@" character while the latter only allows [\w\-]+. Try removing those characters and see if it works.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #5  
Old 12-11-2012, 09:10 AM
R A R A is offline
Mirth Guru
 
Join Date: Jan 2012
Location: London, UK
Posts: 181
R A is on a distinguished road
Default

Many Thanks

I remived the '@', removed the '_' and am left with:
Code:
</MSH>    
	<PID>
		<PatientIDInternal>${MSHOSPvarchar}</PatientIDInternal>
		<PatientLastName>${@SURNAME_varchar}</PatientLastName>
		<PatientFirstName>${@FNAME1_varchar}</PatientFirstName>
yet still no joy.

I was then thinking maybe my transformer was wrong, so hard coded names

Code:
if (rs.next()) {
		var MS_HOSP_NO = "123"; //rs.getstring(1);
		var MS_SURNAME = "John"; //rs.getstring(2);
		var MS_FNAME1 = rs.getstring(3);

Yet the output file drop still looks like the raw template with the destination maps???

Rather frustrating day, being a clueless numpty. lol, so any help appreciated
Reply With Quote
  #6  
Old 12-11-2012, 09:17 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road
Default

First, note that capitalization in programming languages is generally important, so "getstring" isn't the same as "getString".

Second, can you post your channel? If you're placing a variable "MSHOSPvarchar" in the global map and then accessing it in the template with "${MSHOSPvarchar}" then it should work just fine.

Just FYI, the global map is used for inter-channel communication, the global channel map for intra-channel, the channel map for intra-message, and the connector map for intra-connector. So while the global map will certainly do the job, it's superfluous and generally less efficient then using the connector or channel maps.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #7  
Old 12-11-2012, 12:02 PM
R A R A is offline
Mirth Guru
 
Join Date: Jan 2012
Location: London, UK
Posts: 181
R A is on a distinguished road
Default

Quote:
Originally Posted by narupley View Post
First, note that capitalization in programming languages is generally important, so "getstring" isn't the same as "getString".

Second, can you post your channel? If you're placing a variable "MSHOSPvarchar" in the global map and then accessing it in the template with "${MSHOSPvarchar}" then it should work just fine.

Just FYI, the global map is used for inter-channel communication, the global channel map for intra-channel, the channel map for intra-message, and the connector map for intra-connector. So while the global map will certainly do the job, it's superfluous and generally less efficient then using the connector or channel maps.
Hey buddy, did make those changes, and was a case of trial and error.

Message processes through, but the XML output seems static at minute. Changed to channel map as suggested along with some getString rectifications?

But still no joy.

Have attached the channel. Hope that might make it clearer? Am a bit lost myself.

Many many thanks
Attached Files
File Type: xml OPTIMA_XML_OUT.xml (15.6 KB, 19 views)
Reply With Quote
  #8  
Old 12-11-2012, 01:08 PM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road
Default

Quote:
Originally Posted by R A View Post
Hey buddy, did make those changes, and was a case of trial and error.

Message processes through, but the XML output seems static at minute. Changed to channel map as suggested along with some getString rectifications?

But still no joy.

Have attached the channel. Hope that might make it clearer? Am a bit lost myself.

Many many thanks
In my original suggestion I had the following source transformer code:

Code:
tmp = new XML(SerializerFactory.getHL7Serializer().toXML('MSH|^~\\&\r'+msg.ocs.toString()+'\r'));
You appear to have this:

Code:
hl7 = new XML(SerializerFactory.getHL7Serializer().toXML('MSH|^~\\&\r'+msg.ocs.toString()+'\r'));
Therefore, the OCS segment won't get propagated to the destination connector, so the query won't pick up anything, so the variables won't ever get put in the channel map, so Velocity has nothing to replace.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #9  
Old 12-11-2012, 02:48 PM
R A R A is offline
Mirth Guru
 
Join Date: Jan 2012
Location: London, UK
Posts: 181
R A is on a distinguished road
Default

I thought I would be able to change, is the tmp specific representation, I assume I could assign a new name like a var, but you pointing it out assume it has a more meaningful use?

I have returned to tmp, but template still has raw values???

I also commented out in the destination transformer;
Code:
//tmp.action = msg.OCS['OCS.1']['OCS.1.1'].toString();
but have re-included it?

Assume this needs to remain active in which case?

I am also wondering if my outbound message whilst in transformer needs something? As you had XML listed out whereas I thought having a template in file writer and have all as global but now channel map?

Apologies, just trying to make sure I understand it all.

Many Many Thanks again.
Reply With Quote
  #10  
Old 12-11-2012, 03:03 PM
R A R A is offline
Mirth Guru
 
Join Date: Jan 2012
Location: London, UK
Posts: 181
R A is on a distinguished road
Default

Just realised

Code:
tmp = new XML(SerializerFactory.getHL7Serializer().toXML('MSH|^~\\&\r'+msg.ocs.toString()+'\r'));
I am bringing back 'process' in my query (name of the field), in the example you had ocs.

So assume this changes to suit mine to

Code:
tmp = new XML(SerializerFactory.getHL7Serializer().toXML('MSH|^~\\&\r'+msg.process.toString()+'\r'));
Made the change and now getting an error?

Code:
2012-12-11 22:52:13,734]  ERROR (org.mule.impl.DefaultComponentExceptionStrategy:95): Caught exception in Exception Strategy for: 4e3c7b15-017f-47fe-bffa-56bb4da44082: org.mule.umo.routing.RoutingException: Failed to route event via endpoint: null. Message payload is of type: com.mirth.connect.model.MessageObject
org.mule.umo.routing.RoutingException: Failed to route event via endpoint: null. Message payload is of type: com.mirth.connect.model.MessageObject
	at org.mule.routing.outbound.OutboundMessageRouter.route(OutboundMessageRouter.java:84)
	at org.mule.impl.model.DefaultMuleProxy.onCall(DefaultMuleProxy.java:247)
	at org.mule.impl.model.seda.SedaComponent.doSend(SedaComponent.java:209)
	at org.mule.impl.model.AbstractComponent.sendEvent(AbstractComponent.java:277)
	at org.mule.impl.MuleSession.sendEvent(MuleSession.java:201)
	at org.mule.routing.inbound.InboundMessageRouter.send(InboundMessageRouter.java:176)
	at org.mule.routing.inbound.InboundMessageRouter.route(InboundMessageRouter.java:143)
	at org.mule.providers.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:487)
	at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:266)
	at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:229)
	at com.mirth.connect.connectors.jdbc.JdbcMessageReceiver.processMessage(JdbcMessageReceiver.java:180)
	at org.mule.providers.TransactedPollingMessageReceiver$1.doInTransaction(TransactedPollingMessageReceiver.java:98)
	at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:72)
	at org.mule.providers.TransactedPollingMessageReceiver.poll(TransactedPollingMessageReceiver.java:104)
	at org.mule.providers.PollingMessageReceiver.run(PollingMessageReceiver.java:97)
	at org.mule.impl.work.WorkerContext.run(WorkerContext.java:290)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
	at java.lang.Thread.run(Unknown Source)Caused by: org.mule.umo.routing.CouldNotRouteOutboundMessageException: Failed to route event via endpoint: ImmutableMuleEndpoint{connector=com.mirth.connect.connectors.file.FileConnector@614bec00, endpointUri=file://C:/Optima/Order, transformer=Transformer{name='4e3c7b15-017f-47fe-bffa-56bb4da44082_destination_1_transformer', returnClass=false, returnClass=false, sourceTypes=[]}, name='_fileEndpoint#-260443227', type='sender', properties={}, transactionConfig=org.mule.impl.MuleTransactionConfig@4e9af21b, filter=null, deleteUnacceptedMessages=false, initialised=true, securityFilter=null, synchronous=true, initialState=started, createConnector=0}. Message payload is of type: com.mirth.connect.model.MessageObject
	at org.mule.routing.outbound.FilteringMulticastingRouter.route(FilteringMulticastingRouter.java:72)
	at org.mule.routing.outbound.OutboundMessageRouter$1.doInTransaction(OutboundMessageRouter.java:78)
	at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:48)
	at org.mule.routing.outbound.OutboundMessageRouter.route(OutboundMessageRouter.java:82)
	... 18 moreCaused by: org.mule.umo.provider.DispatchException: Failed to route event via endpoint: ImmutableMuleEndpoint{connector=com.mirth.connect.connectors.file.FileConnector@614bec00, endpointUri=file://C:/Optima/Order, transformer=Transformer{name='4e3c7b15-017f-47fe-bffa-56bb4da44082_destination_1_transformer', returnClass=false, returnClass=false, sourceTypes=[]}, name='_fileEndpoint#-260443227', type='sender', properties={}, transactionConfig=org.mule.impl.MuleTransactionConfig@4e9af21b, filter=null, deleteUnacceptedMessages=false, initialised=true, securityFilter=null, synchronous=true, initialState=started, createConnector=0}. Message payload is of type: com.mirth.connect.model.MessageObject
	at org.mule.providers.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:177)
	at org.mule.impl.MuleSession.sendEvent(MuleSession.java:191)
	at org.mule.impl.MuleSession.sendEvent(MuleSession.java:130)
	at org.mule.routing.outbound.AbstractOutboundRouter.send(AbstractOutboundRouter.java:85)
	at org.mule.routing.outbound.FilteringMulticastingRouter.route(FilteringMulticastingRouter.java:54)
	... 21 moreCaused by: org.mule.umo.transformer.TransformerException: CHANNEL:
	OPTIMA_XML_OUTCONNECTOR:
	OPTIMA_XML_ORDERSCRIPT SOURCE:
	SOURCE CODE:
	46: 
	
	channelMap.put("DOB_varchar", PAT_DOB);47: 
	
	channelMap.put("GENDER_varchar", MS_GENDER);48: 
	
	channelMap.put("ADDRESS1_varchar", MS_ADDRESS1);49: 
	
	channelMap.put("ADDRESS2_varchar", MS_ADDRESS2);50: 
	
	channelMap.put("ADDRESS3_varchar", MS_ADDRESS3);51: 
	
	channelMap.put("ADDRESS4_varchar", MS_ADDRESS4);52: 
	
	channelMap.put("POSTCODE_varchar", MS_POST_CODE);53: 
	
	channelMap.put("TEL_varchar", MS_TEL_NO);54: 
	
	channelMap.put("NHS_varchar", MS_NHS_NO);55: 
	
	// Set the patient informationLINE NUMBER:
	51DETAILS:
	Wrapped java.lang.NullPointerException (com.mirth.connect.server.MirthJavascriptTransformerException) (org.mule.umo.transformer.TransformerException)
	at com.mirth.connect.server.mule.transformers.JavaScriptTransformer.transform(JavaScriptTransformer.java:316)
	at org.mule.transformers.AbstractEventAwareTransformer.doTransform(AbstractEventAwareTransformer.java:48)
	at org.mule.transformers.AbstractTransformer.transform(AbstractTransformer.java:197)
	at org.mule.impl.MuleEvent.getTransformedMessage(MuleEvent.java:251)
	at com.mirth.connect.server.controllers.DefaultMessageObjectController.getMessageObjectFromEvent(DefaultMessageObjectController.java:790)
	at com.mirth.connect.connectors.file.FileMessageDispatcher.doDispatch(FileMessageDispatcher.java:50)
	at com.mirth.connect.connectors.file.FileMessageDispatcher.doSend(FileMessageDispatcher.java:139)
	at org.mule.providers.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:164)
	... 25 moreCaused by: org.mule.umo.transformer.TransformerException: CHANNEL:
	OPTIMA_XML_OUTCONNECTOR:
	OPTIMA_XML_ORDERSCRIPT SOURCE:
	SOURCE CODE:
	46: 
	
	channelMap.put("DOB_varchar", PAT_DOB);47: 
	
	channelMap.put("GENDER_varchar", MS_GENDER);48: 
	
	channelMap.put("ADDRESS1_varchar", MS_ADDRESS1);49: 
	
	channelMap.put("ADDRESS2_varchar", MS_ADDRESS2);50: 
	
	channelMap.put("ADDRESS3_varchar", MS_ADDRESS3);51: 
	
	channelMap.put("ADDRESS4_varchar", MS_ADDRESS4);52: 
	
	channelMap.put("POSTCODE_varchar", MS_POST_CODE);53: 
	
	channelMap.put("TEL_varchar", MS_TEL_NO);54: 
	
	channelMap.put("NHS_varchar", MS_NHS_NO);55: 
	
	// Set the patient informationLINE NUMBER:
	51DETAILS:
	Wrapped java.lang.NullPointerException (com.mirth.connect.server.MirthJavascriptTransformerException)
	at com.mirth.connect.server.mule.transformers.JavaScriptTransformer.evaluateScript(JavaScriptTransformer.java:410)
	at com.mirth.connect.server.mule.transformers.JavaScriptTransformer.transform(JavaScriptTransformer.java:296)
	... 32 moreCaused by: com.mirth.connect.server.MirthJavascriptTransformerException: CHANNEL:
	OPTIMA_XML_OUTCONNECTOR:
	OPTIMA_XML_ORDERSCRIPT SOURCE:
	SOURCE CODE:
	46: 
	
	channelMap.put("DOB_varchar", PAT_DOB);47: 
	
	channelMap.put("GENDER_varchar", MS_GENDER);48: 
	
	channelMap.put("ADDRESS1_varchar", MS_ADDRESS1);49: 
	
	channelMap.put("ADDRESS2_varchar", MS_ADDRESS2);50: 
	
	channelMap.put("ADDRESS3_varchar", MS_ADDRESS3);51: 
	
	channelMap.put("ADDRESS4_varchar", MS_ADDRESS4);52: 
	
	channelMap.put("POSTCODE_varchar", MS_POST_CODE);53: 
	
	channelMap.put("TEL_varchar", MS_TEL_NO);54: 
	
	channelMap.put("NHS_varchar", MS_NHS_NO);55: 
	
	// Set the patient informationLINE NUMBER:
	51DETAILS:
	Wrapped java.lang.NullPointerException
	at com.mirth.connect.server.mule.transformers.JavaScriptTransformer.evaluateScript(JavaScriptTransformer.java:398)
	... 33 moreCaused by: java.lang.NullPointerException
	at java.util.concurrent.ConcurrentHashMap.put(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)
	at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:247)
	at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1702)
	at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:845)
	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3157)
	at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)
	at com.mirth.connect.server.mule.transformers.JavaScriptTransformer.evaluateScript(JavaScriptTransformer.java:342)
	... 33 more
Reply With Quote
Reply

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 11:13 AM.


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