FHIR Works xml type example

0

Hello,

I am trying to get an item created in AWS FHIR Works. It works fine with the json data type, but fails when using the xml type. I am using standard FHIR syntax. Please see below the two examples:

################################################### The json example below works fine. and returns following: ################################################### "name":[{"family":"RADES2","given":["PAULO"],"use":"official"}],"resourceType":"Patient","id":"38d424da-35f7-4e14-9e4a-c1ba174d26b9","meta":{"versionId":"1","lastUpdated":"2022-05-22T06:21:46.859Z"}}

curl
-H "Content-Type: application/json; charset=utf-8"
-H "Authorization: $(python3 scripts/init-auth.py xxxxxxxx us-west-2)"
-H "x-api-key:xxxxxxxxxxx"
--request POST
--data '{"name": [{"family": "RADES2", "given": ["PAULO"], "use": "official"}], "resourceType": "Patient"}'
"https://xxxxxxx.execute-api.us-west-2.amazonaws.com/dev/tenant/TenantA/Patient"

################################################### XML examples fail below. Both the below fail. The first one is the standard FHIR syntax, but also tried by adding the resourceType, but both fail with same error: ################################################### "resourceType":"OperationOutcome","text":{"status":"generated","div":"<div xmlns="http://www.w3.org/1999/xhtml"><h1>Operation Outcome</h1><table border="0"><tr><td style="font-weight: bold;">error</td><td>[]</td><td><pre>resource should have required property 'resourceType'</pre></td></tr></table></div>"},"issue":[{"severity":"error","code":"invalid","diagnostics":"resource should have required property 'resourceType'"}]}

curl
-H "Content-Type: application/xml; charset=utf-8"
-H "Authorization: $(python3 scripts/init-auth.py xxxxxxx us-west-2)"
-H "x-api-key:xxxxxxx"
--request POST
-d "<Patient xmlns="http://hl7.org/fhir"><name><family value="RADES3"/><given value="PAULO"/></name></Patient>"
"https://xxxxxxx.execute-api.us-west-2.amazonaws.com/dev/tenant/TenantA/Patient"

####### curl
-H "Content-Type: application/xml; charset=utf-8"
-H "Authorization: $(python3 scripts/init-auth.py xxxxxxx us-west-2)"
-H "x-api-key:xxxxxxx"
--request POST
-d "<Patient xmlns="http://hl7.org/fhir"><resourceType><"Patient"/></resourceType><name><family value="RADES3"/><given value="PAULO"/></name></Patient>"
"https://xxxxxxx.execute-api.us-west-2.amazonaws.com/dev/tenant/TenantA/Patient"

gefragt vor 2 Jahren255 Aufrufe
1 Antwort
0

Hello,

Thank you for using FHIR works.

Looking at the error stack, it seems to be issue with the .xml format. Due to limit visibility, I cannot identify the root cause, hence I'd recommend you to reach out to AWS Support for further investigation of the issue:

Open a support case with AWS using the link: https://console.aws.amazon.com/support/home?#/case/create

AWS
SUPPORT-TECHNIKER
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen