FHIR Chat · Issue enabling CORS on Furore Spark · implementers

Stream: implementers

Topic: Issue enabling CORS on Furore Spark


view this post on Zulip Nikolaos Tselas (Aug 02 2017 at 14:06):

Hello ! I need your help !
I have deployed Spark in my IIS Server and I am trying to use clinFhir to test it.
When trying to import a patient initially I was receiving the following message:

Unable to create the Patient. This can be caused by a CORS error on the server you're talking to. Here's the error I got: {"err":"The server did not return a valid id"}

After I enabled CORS in the web.config :

Unable to create the Patient. This can be caused by a CORS error on the server you're talking to. Here's the error I got:

{
    "data": null,
    "status": -1,
    "config": {
        "method": "POST",
        "transformRequest": [null],
        "transformResponse": [null],
        "url": "http://139.91.190.63/spark/fhir/Patient",
        "data": {
            "resourceType": "Patient",
            "name": [{
                    "use": "official",
                    "family": "Williams",
                    "given": ["Aaliyah"],
                    "text": "Aaliyah Williams"
                }
            ],
            "gender": "female",
            "birthDate": "1982-12-10",
            "text": {
                "status": "generated",
                "div": "<div xmlns='http://www.w3.org/1999/xhtml'>Aaliyah Williams</div>"
            }
        },
        "headers": {
            "Accept": "application/json, text/plain, */*",
            "Content-Type": "application/json;charset=utf-8"
        }
    },
    "statusText": ""
}

Any help would be highly appreciated !!
Thank you very much !!

view this post on Zulip David Hay (Aug 03 2017 at 08:10):

1. Can you create a resource from, say, a REST client
2. What errors are shown in the console?
I presume you added your server directly in the main page?

view this post on Zulip David Hay (Aug 03 2017 at 08:17):

btw - there's a specific clinFHIR stream that might be better for CF issues (I can find stuff there more easily!)


Last updated: Apr 12 2022 at 19:14 UTC