web stats
CCDA-JSON error - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-06-2015, 01:55 AM
vibinChander vibinChander is offline
OBX.2 Kenobi
 
Join Date: Jul 2015
Location: Chennai
Posts: 74
vibinChander is on a distinguished road
Send a message via Skype™ to vibinChander
Default CCDA-JSON error

I'm trying to parse CCDA to JSON without using MDHT libraries I'm facing an error in structure of JSON this is my code.

if(msg['templateId'][0]['@root'].length()!=0 && msg['templateId'][0]['@root']=="2.16.840.1.113883.10.20.22.1.1")
{
var obj1={"Demographics":
{"date":msg['effectiveTime']['@value'].toString()},
{"title":msg['title'].toString()},
{"author":{
"name":{
"prefix":msg['author']['assignedAuthor']['assignedPerson']['name']['prefix'].toString()},
{"given":msg['author']['assignedAuthor']['assignedPerson']['name']['given'].toString()},
{"family":msg['author']['assignedAuthor']['assignedPerson']['name']['family'].toString()},
{"address":[
"street":msg['author']['assignedAuthor']['addr']['streetAddressLine'].toString()],
{"city":msg['author']['assignedAuthor']['addr']['city'].toString()},
{"state":msg['author']['assignedAuthor']['addr']['state'].toString()},
{"postalcode":msg['author']['assignedAuthor']['addr']['postalCode'].toString()},
{"country":msg['author']['assignedAuthor']['addr']['country'].toString()},
}

}
}
}
}
var ob1= JSON.stringify(obj1);
logger.info(ob1);


Im getting the error in "Error on line 5: invalid property id" could anyone help me findout the problem?
Reply With Quote
 

Tags
ccda, json, mirth 3.2.0

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 04:17 PM.


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