NetworkError: Failed to execute 'send' on xmlhttprequest. Failed to load resource on cerner secure sandbox

2,294 views
Skip to first unread message

thiyagu83.j

unread,
Jul 9, 2020, 1:10:19 AM7/9/20
to Cerner FHIR Developers

Hi,

Iam going to fetch the patients who are all having appointments for the selected date using authentication cerner sandbox.
After successfull authentication i can able to fetch the appointments for the selected dates by using the below URL with auth token,
https://fhir-ehr.sandboxcerner.com/dstu2/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/Appointment .
After getting the patient Ids from the appointment iam going to fetch the patient information like Temperature,Weight, height, systolic BP,Glucose Fasting,RBC,WBC Intra Ocular Pressure left and right, Visual acuity left & right and glaucoma by using the below following Condition & Observation resources with authe token,

For Observation with AuthToken, https://fhir-ehr.sandboxcerner.com/dstu2/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/Observation?patient=7586007
For Condition with AuthToken, https://fhir-ehr.sandboxcerner.com/dstu2/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/Condition?patient=7586007

But i got error for both Condition & Observation resources,
NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://fhir-ehr.sandboxcerner.com/dstu2/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/Observation?patient=758600'

Observation resource: X-Request-Id: ea7db0f2-679f-4acd-82f3-8452cb714477
Condition resource: X-Request-Id: ffe48675-7cef-4511-83fb-646d2f270bc5

Can anybody please help what am i doing wrong.

Also please provide some practitioner IDs for testing the appointment schedule in cerner secure sandbox.

Thanks,
Thiyagu.

thiyagarajan jagan

unread,
Jul 10, 2020, 7:37:30 AM7/10/20
to cerner-fhir...@googlegroups.com
Hi, 
Can anybody please help me how to resolve the issue iam facing.

Thanks,
Thiyagu.

--
You received this message because you are subscribed to the Google Groups "Cerner FHIR Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cerner-fhir-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cerner-fhir-developers/ede39703-0b46-4a39-8dc8-0785f60f9059o%40googlegroups.com.

Max Philips (Cerner)

unread,
Jul 10, 2020, 9:36:35 AM7/10/20
to Cerner FHIR Developers
Hi Thiyagu,

I looked for those two X-Request-Id values in the logs and could not find them. Can you explain a bit more about exactly what request provided them to you?

I can see successful (HTTP 200) responses for your application in the logs over the past few days. I notice that nearly all of your Condition and Observation requests use HTTP method OPTIONS instead of GET.

I would look into the following:
  • The error message "Failed to execute 'send' on 'XMLHttpRequest'" makes me think that perhaps requests are not even making it out to Cerner's FHIR server
  • Ensure you are consuming fhir-client.js in such a way that it issues GET requests
Cerner exposes the Practitioner search API for both DSTU 2 and R4, please consume that API to find practitioner IDs.

Thanks,
Max (Cerner)

thiyagarajan jagan

unread,
Jul 10, 2020, 10:31:06 AM7/10/20
to cerner-fhir...@googlegroups.com
Hi Max,
	Thanks for the reply.
	Actually i can able to get the auth token successfully. After that iam requesting appointments for selected dates by using below URL and get successfull responses.
	https://fhir-ehr.sandboxcerner.com/dstu2/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/Appointment
	With that response i take the patientID and request for patient basic information using the below URL. I got successful response
	https://fhir-ehr.sandboxcerner.com/dstu2/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/
	After that i request for observation resource for getting patient blood pressure,.. etc using below URL
	https://fhir-ehr.sandboxcerner.com/dstu2/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/Observation?patient=" + PatientID
	with auth token but i got error as like below 
	NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://fhir-ehr.sandboxcerner.com/dstu2/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/Observation?patient=758600'
	
	I tried in many ways but i could not able to move a bit.
	
	I will try with method 'OPTIONS' and let you know.
	Iam authenticating using FHIR.oauth2.authorize({}) and getting the auth token using FHIR.oauth2.ready(function(smart) { });
	After that iam requesting the appointments, patients, condition, Observation using ajax method as like below,
	
	$.ajax({
			type: "GET",
			headers: {
                        Accept: "application/json+fhir",
                        "Content-Type": "application/json+fhir",
						"Authorization":"Bearer " + authToken    
				     },
			url: "https://fhir-ehr.sandboxcerner.com/dstu2/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/Observation?patient=" + PatientID,
			dataType: "json",
            async: false,
            success: function (response) {
			
			}
			});
	I will try method OPTIONS and let you know.
	
	Please suggest me what am i wrong.
	
	Thanks,
	Thiyagu.

--
You received this message because you are subscribed to the Google Groups "Cerner FHIR Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cerner-fhir-devel...@googlegroups.com.

thiyagarajan jagan

unread,
Jul 11, 2020, 6:48:15 AM7/11/20
to cerner-fhir...@googlegroups.com
Hi Max,
I tried the method OPTIONS in my request but it gives me error.

Thanks,
Thiyagu.

thiyagarajan jagan

unread,
Jul 20, 2020, 9:39:04 AM7/20/20
to cerner-fhir...@googlegroups.com
Hi Max,
Any update? I could not access the condition resources after authentication. 
It displayed error message as Access to Xmlhttprequest at '  '  from origin has been blocked by CORS policy.
Can you please help me on this max.

Thanks,
Thiyagu.


Max Philips (Cerner)

unread,
Jul 20, 2020, 10:35:51 AM7/20/20
to Cerner FHIR Developers
Hi Thiyagu,

Unfortunately we cannot offer to troubleshoot generic errors or generic error messages. Per group rules, please provide X-Request-Id response header values for the failures you are receiving.

If you are receiving CORS errors, please additionally provide the origin you are issuing requests from and the origin you are issuing requests to (assuming this is Cerner's sandbox).

Thanks,
Max (Cerner)

thiyagarajan jagan

unread,
Jul 21, 2020, 10:56:55 AM7/21/20
to cerner-fhir...@googlegroups.com
Hi Max,
I resolved the issue. Issue due to scope was mismatched. I enabled both user scope and patient scope. Actually the user scope should be enabled. No patient scope should be enabled.
Another issue I got was while connecting patient resource I got 500 internal error. Attached image with x request ID for your reference.
Thanks,
Thiyagu.


--
You received this message because you are subscribed to the Google Groups "Cerner FHIR Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cerner-fhir-devel...@googlegroups.com.
20200721_201834.jpg

Cerner FHIR Developers

unread,
Jul 21, 2020, 11:01:44 AM7/21/20
to Cerner FHIR Developers
Hi Thiyagu,

We are aware of the incident involving the Patient resource. Please see the pinned thread at the top of this group for further updates.

Thank you,

thiyagarajan jagan

unread,
Jul 21, 2020, 11:07:29 AM7/21/20
to cerner-fhir...@googlegroups.com
Hi Max,
Thanks for the reply.

Thanks,
Thiyagu.

--
You received this message because you are subscribed to the Google Groups "Cerner FHIR Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cerner-fhir-devel...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages