FHIR Chat · Bundle.entry.resource · conformance

Stream: conformance

Topic: Bundle.entry.resource


view this post on Zulip 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...

view this post on Zulip Chris Grenz (Jul 20 2016 at 15:56):

@Lloyd McKenzie Can you provide one of your example Bundle profiles?

view this post on Zulip 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.

view this post on Zulip Chris Grenz (Jul 20 2016 at 15:58):

There's some special case magic there?

view this post on Zulip Lloyd McKenzie (Jul 20 2016 at 15:58):

It's more special serialization magic

view this post on Zulip Chris Grenz (Jul 20 2016 at 15:59):

resource is actually a BackboneElement with a child of type Resource

view this post on Zulip Chris Grenz (Jul 20 2016 at 15:59):

but not really since it can't have the id attribute or extensions...

view this post on Zulip Chris Grenz (Jul 20 2016 at 16:00):

So when you profile bundle, you put the type constraints on the resource node?

view this post on Zulip Chris Grenz (Jul 20 2016 at 16:00):

(slice entry by resource.@type)

view this post on Zulip Chris Grenz (Jul 20 2016 at 16:00):

or resource.@profile?

view this post on Zulip 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.

view this post on Zulip 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 . . .

view this post on Zulip Chris Grenz (Jul 20 2016 at 17:59):

Can you link the GF for that change?

view this post on Zulip 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.

view this post on Zulip Grahame Grieve (Jul 20 2016 at 22:20):

slicing by resource..@type is supported in the spec, but not implemented in the instance validator

view this post on Zulip 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.

view this post on Zulip Grahame Grieve (Jul 20 2016 at 22:20):

in JSON, there is no such element.

view this post on Zulip Grahame Grieve (Jul 20 2016 at 22:20):

JSON schemas are cleverer....

view this post on Zulip 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