Stream: implementers
Topic: POSTing as bundle to Azure
Lauri Karppinen (Sep 30 2019 at 07:42):
Hi! I have been trying to make a bundle post to Azure but can't ficure out what is the problem. I am able to POST separate resources and even everything together as bundle with no separate requests for each resource. It seems like server does not do the separate requests inside bundle. It justs POSTs the whole thing as one. This is my simple test wihch I have been trying to POST. Plese point out if there is something obvious wrong. (Earlier I was able to test this kind of bundle to test server (http://hapi.fhir.org/baseDstu3)). Server gave me response for each request separately and I could make searches etc... to everything separately. Here is my demo file:
`{
"entry": [
{
"resource":
{
"birthDate": "2005-01-02",
"gender": "female",
"id": "4bd68d3d-ab98-4f61-9d19-061f2e6dceac",
"name": [
{
"family": "BundleTest",
"given": [
"BundleDude",
"Seppo"
]
}
],
"resourceType": "Patient"
}, "request": { "method": "PUT", "url": "Patient/4bd68d3d-ab98-4f61-9d19-061f2e6dceac" } }, { "resource": { "id": "c04d8694-0c17-435c-ab0c-28dce1c9832c", "name": [ { "family": "Testinen", "given": [ "Hoitaja", "Hanna" ] } ], "resourceType": "Practitioner", }, "request": { "method": "PUT", "url": "Practitioner/c04d8694-0c17-435c-ab0c-28dce1c9832c" } }, { "resource": { "category": [ { "coding": [ { "code": "vital-signs", "system": "http://hl7.org/fhir/observation-category" } ] } ], "code": { "coding": [ { "code": "8302-2", "display": "Body height", "system": "http://loinc.org" } ] }, "effectiveDateTime": "2019-05-06T12:02:34Z", "id": "93a1e2ae-0c87-1000-b3a6-db1200003c15", "issued": "2019-05-06T12:02:58Z", "language": "en", "meta": { "profile": [ "http://phr.kanta.fi/StructureDefinition/fiphr-bodyheight-stu3" ] }, "performer": [ { "reference": "Practitioner/c04d8694-0c17-435c-ab0c-28dce1c9832c" } ], "resourceType": "Observation", "status": "final", "subject": { "reference": "Patient/4bd68d3d-ab98-4f61-9d19-061f2e6dceac" }, "valueQuantity": { "code": "cm", "system": "http://unitsofmeasure.org", "unit": "cm", "value": 155 } }, "request": { "method": "PUT", "url": "Observation/93a1e2ae-0c87-1000-b3a6-db1200003c15" } } ], "id": "93a1e2ba-0c87-1000-b622-915900009d40", "resourceType": "Bundle", "type": "transaction"
}`
Lauri Karppinen (Sep 30 2019 at 07:45):
If I test this file for example to http://hapi.fhir.org/baseDstu3 , I get response like this:
{
"resourceType": "Bundle",
"id": "644a6999-a03a-4225-827e-04162501ed06",
"type": "transaction-response",
"link": [
{
"relation": "self",
"url": "http://hapi.fhir.org/baseDstu3"
}
],
"entry": [
{
"response": {
"status": "200 OK",
"location": "Patient/93a14fea-0c87-1000-b132-4d4c00009619/_history/2",
"etag": "2"
}
},
{
"response": {
"status": "201 Created",
"location": "Practitioner/c04d8694-0c17-435c-ab0c-28dce1c9832c/_history/1",
"etag": "1",
"lastModified": "2019-05-16T11:46:11.297+00:00"
}
},
{
"response": {
"status": "201 Created",
"location": "Observation/93a1e2ae-0c87-1000-b3a6-db1200003c15/_history/1",
"etag": "1",
"lastModified": "2019-05-16T11:46:11.310+00:00"
}
}
]
}
When I POST Azure, I get only 201 Created and it makes only one bundle. I should be able to make the same kind of bundle with separate requests to Azure as well???
Last updated: Apr 12 2022 at 19:14 UTC