No announcement yet.


  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?

    Mirth Interface Engineer
    AWS DevOps

  • #2
    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: 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.