Stream: conformance
Topic: Bundle.entry.resource
Chris Grenz (Jul 20 2016 at 15:55):
Bundle.entry.resource has type Resource which has children of id, meta, uri, etc. By this definition, the bundle should look like this:
<Bundle> ...snip... <entry> <resource> <id value="12345" /> <identifier> ...etc...
rather than
<Bundle> ...snip... <entry> <resource> <Patient> <id value="12345" /> <identifier> ...etc...
Chris Grenz (Jul 20 2016 at 15:56):
@Lloyd McKenzie Can you provide one of your example Bundle profiles?
Lloyd McKenzie (Jul 20 2016 at 15:57):
The instance looks like "resource/Patient", but in the profile, "resource" and "Patient" are the same node. Unfortunately I'm under NDA on my current work, so I can't share example profiles.
Chris Grenz (Jul 20 2016 at 15:58):
There's some special case magic there?
Lloyd McKenzie (Jul 20 2016 at 15:58):
It's more special serialization magic
Chris Grenz (Jul 20 2016 at 15:59):
resource is actually a BackboneElement with a child of type Resource
Chris Grenz (Jul 20 2016 at 15:59):
but not really since it can't have the id attribute or extensions...
Chris Grenz (Jul 20 2016 at 16:00):
So when you profile bundle, you put the type constraints on the resource node?
Chris Grenz (Jul 20 2016 at 16:00):
(slice entry by resource.@type
)
Chris Grenz (Jul 20 2016 at 16:00):
or resource.@profile
?
Lloyd McKenzie (Jul 20 2016 at 17:53):
At the moment, slicing by resource.@type isn't supported. We approved a change request last week to fix that, but I don't anticipate it'll be fixed before the ballot opens.
Lloyd McKenzie (Jul 20 2016 at 17:54):
For now, I just assert a bunch of invariants, which is harder and not as powerful, but at least it works . . .
Chris Grenz (Jul 20 2016 at 17:59):
Can you link the GF for that change?
Lloyd McKenzie (Jul 20 2016 at 18:03):
It's a FHIR Infrastructure change but I don't remember the number and don't have time to chase it down at the moment. Look for ones submitted by me in the last month.
Grahame Grieve (Jul 20 2016 at 22:20):
slicing by resource..@type is supported in the spec, but not implemented in the instance validator
Grahame Grieve (Jul 20 2016 at 22:20):
"resource is actually a BackboneElement with a child of type Resource" - no. resource is a wrapper around the "Patient" element for the pleasure of the schemas.
Grahame Grieve (Jul 20 2016 at 22:20):
in JSON, there is no such element.
Grahame Grieve (Jul 20 2016 at 22:20):
JSON schemas are cleverer....
Grahame Grieve (Jul 20 2016 at 22:21):
at the logical level (structure definition) the resource element does not exist. It's a purely XML thing, as Lloyd said
Last updated: Apr 12 2022 at 19:14 UTC