How to get a single resource from the bulk resource (bundle) pushed into Azure health Data Service - FHIR service using Postman
Hi
Using Postman I pushed a bundle resource into Azure Health Data Services - FHIR service. The request was:
POST {{fhirurl}}/Bundle
Note: This bundle has 2 claim resources in it.
Now, my requirement is : Using Postman I want to get a single claim resource from the bundle that I pushed earlier to the FHIR service.
I tried something like this:
GET {{fhirurl}}/Bundle/Claim/{{id}}
But the response was "The requested route was not found"
Kindly help me out. Thanks in advance.
Azure Health Data Services
-
P, Pioline (Cognizant) 195 Reputation points
2023-05-30T07:44:34.21+00:00 When I push a bundle resource to the FHIR service, one FHIR ID is getting generated for the bundle. However, the no FHIR IDs are getting generated for the various resources inside this bundle. Then, Is it possible to retrieve individual resource from the bundle using postman? Please let me know soon.
-
P, Pioline (Cognizant) 195 Reputation points
2023-06-01T05:27:35.6233333+00:00 Can someone provide answer to this?
-
MuthuKumaranMurugaachari-MSFT 22,341 Reputation points
2023-06-05T14:14:43.11+00:00 P, Pioline (Cognizant) Sorry for the delay in response. Are you still looking for an answer on this question?
-
P, Pioline (Cognizant) 195 Reputation points
2023-06-05T14:14:46.34+00:00 @MuthuKumaranMurugaachari-MSFT Thanks for the reply. Yes Still I am searching for the solution.
-
P, Pioline (Cognizant) 195 Reputation points
2023-06-05T14:29:30.8466667+00:00 @MuthuKumaranMurugaachari-MSFT Thanks for the reply. Yes Still I am searching for the solution.
-
MuthuKumaranMurugaachari-MSFT 22,341 Reputation points
2023-06-05T15:24:39.53+00:00 P, Pioline (Cognizant) FHIR service supports batch bundles and transactions bundles as described here. So, when you upload the supported bundle, you can access bundle endpoint and its content with supported operations and the specifications can be found in doc Resource Bundle - Content.
However, you cannot access the resources within the bundle endpoint but instead, you would need to get the references and access it by its URL externally (like GET {{fhirurl}}/Patient/{{id}}). Check out doc Resolving references in Bundles on how the references are resolved and call resources endpoint accordingly.
I hope this helps and let me know if any questions.
-
P, Pioline (Cognizant) 195 Reputation points
2023-06-06T04:00:59.26+00:00 You mentioned that I can get individual resource from the bundle through GET {{fhirurl}}/Patient/{{id}}
But How will get this ID?
Because when we POST a resource bundle, bundle ID gets generated. But individual resource IDs are not getting generated.Let me provide a sample bundle resource.
{ "resourceType": "Bundle", "type": "collection", "entry": [ { "resource": { "resourceType": "Claim", "id": "567890", } }, { "resource": { "resourceType": "Patient", "id": "123456", } } ]}
When I POST the above bundle resource to FHIR service, it will return bundle ID generated for the whole bundle. But I won't get IDs for claim or patient (resources within that bundle)
So How is it possible to make GET {{fhirurl}}/Patient/{{id}} request.
Please provide solution. Thanks.
-
MuthuKumaranMurugaachari-MSFT 22,341 Reputation points
2023-06-06T20:54:58.35+00:00 P, Pioline (Cognizant) Thanks for sharing the bundle sample JSON. There are few things I observed in the bundle:
- Instead of posting bundle to
POST {{fhirurl}}/Bundle
, you would need to doPOST {{fhirurl}}/
(root of FHIR service). This way you can access endpointGET {{fhirurl}}/Patient/{{id}}
. - You can check https://github.com/microsoft/fhir-server/blob/main/docs/rest/Data/BundleTransaction.json reference (https://www.hl7.org/fhir/bundle-transaction.json.html) and should set bundle type as
transaction
and also, includeresource
as well asrequest
. So, change it accordingly and validate.
Let me know if you have any questions.
- Instead of posting bundle to
-
P, Pioline (Cognizant) 195 Reputation points
2023-06-07T05:27:23.18+00:00 POST {{fhirurl}}/
(root of FHIR service)
What is the root of the FHIR service here? -
MuthuKumaranMurugaachari-MSFT 22,341 Reputation points
2023-06-07T13:30:11.5+00:00 The path is
POST {{fhirurl}}/
without bundle. -
P, Pioline (Cognizant) 195 Reputation points
2023-06-07T21:50:16.23+00:00 Thanks. I followed the steps you mentioned. Now, I am able to get individual resources.
ISSSUE now: Individual resource from the bundle can be viewed, but not the whole bundle with all resources.
After POST request to root of FHIR service with transaction bundle, no bundle ID is getting generated.
So how can I make a GET request to view the bundle without the bundle ID? -
P, Pioline (Cognizant) 195 Reputation points
2023-06-08T05:53:11.2533333+00:00 Also, even if I provide an "id" to the bundle while POSTing to FHIR service endpoint, I am not able to get the full bundle using the following request :
POST {{fhirurl}}/Bundle/{id}
-
P, Pioline (Cognizant) 195 Reputation points
2023-06-13T08:01:51.68+00:00 Hi Please reply on this.
Thanks
Sign in to comment