web stats
encoding from xml to hl7 v3 with javascript - Page 2 - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #11  
Old 09-14-2010, 12:31 PM
dans dans is offline
Mirth Employee
 
Join Date: Apr 2007
Location: Irvine, CA
Posts: 590
dans is an unknown quantity at this point
Default

So you will need to wildcard or specify the namespace when you get a value from the incoming data as it is using a different namespace (namespace is blank).

This should work:
Code:
default xml namespace = "urn:hl7-org:v3";
tmp['PRPM_IN301010']['controlActProcess']['subject']['registrationEvent']['subject1']['healthCareProvider']['id']['validTime']['low'] = msg..*::Provider_Identifier_Effective_Start_Date.toString();
__________________
Daniel Svanstedt
Software Engineer
Mirth Corporation

Want professional services, support, and enterprise or virtual appliances? It's all available from the Mirth Corporation:
Mirth Support | Mirth Training | Mirth Appliances | Online Training | Developer Q&A

Don't forget, Mirth Support gives you access to all of our online training videos, and silver support gives you access to developer Q&As!
Reply With Quote
  #12  
Old 09-16-2010, 12:04 AM
buschert buschert is offline
OBX.1 Kenobi
 
Join Date: May 2010
Posts: 26
buschert is on a distinguished road
Default This works

so this works for me in binding the xml value to hl7v3 template. It was a namespace issue. I used the following wildcard and syntax .

var surname1 = msg.*::['Surname'].toString();
then

tmp['PRPM_IN301010']['controlActProcess']['subject']['registrationEvent']['subject1']['healthCareProvider']['healthCarePrincipalPerson']['name']['family']= surname1;
Reply With Quote
  #13  
Old 10-13-2010, 11:09 PM
irener irener is offline
What's HL7?
 
Join Date: Sep 2010
Posts: 4
irener is on a distinguished road
Default

Did you finally get the solution to this?
I'm having the same problem with the namespaces when I try to map from XML to HL7v3 messages...

My question is:
did you put 'default xml namespace = "urn:hl7-org:v3";' before those assign statements?

Last edited by irener; 10-13-2010 at 11:17 PM.
Reply With Quote
Reply

Tags
encoding, hl7v3, javascript

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 09:08 AM.


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