Json coding issue, error is 502 Internal server error

26 Views Asked by At

I am trying to run a workato recipe using template which uses json code. I tried with all my knowledge and created json file suited to my requirements and created a template. but when I try to run the workato recipe which uses this json file, I am facing an issue with :"502 internal server error" . Also I tried checking the json file with json validator but it is showing the syntactical error like it is showing an invalid comma etc. Something I am missing, can anyone please help me here.

{
    "resourceType": "Patient",
     "identifier": [
        {
            "extension": [
                {
                    {{#AccountID}}
                    "id": "{{AccountID}}",
                    {{/AccountID}}
                    {{#AccountURL}}
                    "url": "{{AccountURL}}",
                    {{/AccountURL}}
                    "valueString": "Salesforce"
                }
            ]
        }
    ],
    "active": {{isActive}},
    "name": [
        {
            "use": "official",
            "family": "{{{lastName}}}",
            "given": [
                "{{{firstName}}}"
            ]
        }
    ],
    "telecom": [        
        {{#homePhone}}
        {
            "system": "phone",
            "value": "{{homePhone}}",
            "use": "home"
        },
        {{/homePhone}}
        {{#mobilePhone}}
        {
            "system": "phone",
            "use": "mobile",
            "value": "{{mobilePhone}}"
        },
        {{/mobilePhone}}
        {
            "system": "email",
            "value": "{{email}}"
        }
    ]
    {{#address}}
    ,"address": [
        {
            "use": "home"
            {{#address.streetAddress}}
            ,"text": "{{address.streetAddress}}",
            "line": [
                "{{address.streetAddress}}"
            ]
            {{/address.streetAddress}}
            {{#address.city}}
            ,"city": "{{address.city}}"
            {{/address.city}}
            {{#address.state}}
            ,"state": "{{address.state}}"
            {{/address.state}}
            {{#address.country}}
            ,"country": "{{address.country}}"
            {{/address.country}}
            {{#address.postalCode}}
            ,"postalCode": "{{address.postalCode}}"
            {{/address.postalCode}}
        }
    ]
    {{/address}}
    {{#gender}}
    ,"gender": "{{gender}}"
    {{/gender}}
    {{#birthDate}}
    ,"birthDate": "{{birthDate}}"
    {{/birthDate}},
    "communication": [
        {
            "coding": [
                {
                    "code": "en-us",
                    "display": "English"
                }
            ],
            "text": "Language"
        }
    ],
    "meta": {
      "tag": [
            {
                "code": "isClient",
                "display": true
            },
            {{#ExternalID}}
            {
                "code": "externalId",
                "display": "{{ExternalID}}"
            },
            {{/ExternalID}}
            {{#locationID}}
            {
                "code": "locationId",
                "display":{{locationID}}
            },
            {{/locationID}}
            {{#locationName}}
            {
                "code": "locationName",
                "display": "{{locationName}}"
            },
            {{/locationName}}
            {
                "code": "agencyId",
                "display":{{agencyID}}
            }
        ]
    }
}
0

There are 0 best solutions below