Stream: hapi
Topic: Disappearing logical id's on Bundle entries
Michael Christensen (Feb 20 2018 at 13:13):
I have a HAPI FHIR server with a Bundle resource provider with a createBundle method defined like this:
public MethodOutcome createBundle(@ResourceParam Bundle bundle, HttpServletRequest theRequest, HttpServletResponse theResponse)
To this server I am POST'ing a transaction Bundle specified according to Continua's profile H812.5. Inside this bundle the DeviceComponent resources have their logical id's specified like this:
"resource": { "resourceType": "DeviceComponent", "id": "7EEDABEE34ADBEEF.C4B301D280C6", ....
This is according to H812.5 appendix A 3.1.2. However, when I traverse the Bundle resource inside the createBundle method all logical id's are null. Is this by choice or by accident?
Joel Schneider (Feb 20 2018 at 14:40):
To assign the id when creating a resource, you could use a HTTP PUT command.
http://build.fhir.org/http.html#update
Note that servers MAY choose to allow clients to PUT a resource to a location that does not yet exist on the server - effectively, allowing the client to define the id of the resource.
Otherwise, FHIR logical id's are assigned by the server.
http://build.fhir.org/resource.html#id
There was once some discussion about propagating id's (and resource versions) between servers, which may be of interest if you have a strong use case for that kind of thing.
https://chat.fhir.org/#narrow/stream/implementers/subject/HTTP.2C.20Idempotency.2C.20and.20FHIR
Last updated: Apr 12 2022 at 19:14 UTC