web stats
CCDA-JSON error - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 08-06-2015, 02:55 AM
vibinChander vibinChander is offline
OBX.2 Kenobi
Join Date: Jul 2015
Location: Chennai
Posts: 75
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.")
var obj1={"Demographics":

var ob1= JSON.stringify(obj1);

Im getting the error in "Error on line 5: invalid property id" could anyone help me findout the problem?
Reply With Quote
Old 08-06-2015, 07:36 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road

You're creating that object incorrectly. Each property of an object needs to be given a proper ID. You're doing that correctly for "Demographics", but almost everything else after that is incorrect. Go here to learn about what JSON is and how it's used: http://json.org/. Although technically what you're creating is a JavaScript Object, not JSON, it will still help.
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

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 07:36 AM.

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