FHIR Chat · US Core Extensions · conformance

Stream: conformance

Topic: US Core Extensions


view this post on Zulip Josh Mandel (Mar 04 2020 at 16:44):

When I look at http://hl7.org/fhir/us/core/StructureDefinition-us-core-direct.json.html (an IG-based example of a "simple" boolean extension), there are differences in comparison with http://hl7.org/fhir/extension-auditevent-anonymized.json.html (a core spec-based example of a "simple" boolean extension).

The IG example includes things like

     "id" : "Extension.value[x]:valueBoolean",

... whereas the core spec example doesn't traverse that deep.

Are both correct? Is one preferred?

view this post on Zulip Grahame Grieve (Mar 04 2020 at 19:33):

Extension.value[x] is sliced by type. Both of them constrain it to boolean

view this post on Zulip Grahame Grieve (Mar 04 2020 at 19:34):

the us-core version also includes the slice details for the boolean slice, but since that's the only one that can appear anyway, and the slice details don't actually say anything, the slice is superfluous.

view this post on Zulip Grahame Grieve (Mar 04 2020 at 19:34):

but it's not wrong

view this post on Zulip Grahame Grieve (Mar 04 2020 at 19:35):

the one that doesn't contain the superfluous details would be preferred, I suppose. I'm not going to look through the tooling to check why it is produced.

view this post on Zulip Grahame Grieve (Mar 04 2020 at 19:35):

more weird is that the value.min isn't fixed to 1 in us-core

view this post on Zulip Josh Mandel (Mar 05 2020 at 02:51):

Huh, okay -- and that is a tooling bug?

view this post on Zulip Grahame Grieve (Mar 05 2020 at 03:00):

I think so

view this post on Zulip Grahame Grieve (Mar 05 2020 at 03:00):

Not sure where.

view this post on Zulip Grahame Grieve (Mar 05 2020 at 03:00):

Or maybe it’s just a deficiency - I don’t try to figure out whether the slice actually says anything

view this post on Zulip Eric Haas (Mar 05 2020 at 17:18):

is min = 0 in source. IRL if you go to the trouble of adding an extension unlikely is going to be empty? but I will make a tracker to make min=1

view this post on Zulip Grahame Grieve (Mar 05 2020 at 20:14):

I think min=0 is a tooling bug.

view this post on Zulip Eric Haas (Mar 05 2020 at 22:15):

The source is min=0

view this post on Zulip Grahame Grieve (Mar 05 2020 at 22:16):

for extensions, either Extension.extension is 0..0 and value is 1..1, or vice versa

view this post on Zulip Eric Haas (Mar 06 2020 at 02:09):

I looked for an invariant. but all I see is this: http://build.fhir.org/extensibility.html
"An extension SHALL have either a value (i.e. a value[x] element) or sub-extensions, but not both. If present, the value[x] element SHALL have content (value attribute or other elements)"

so is that evaluated at the instance level or the profile level.

view this post on Zulip Chris Moesel (Mar 06 2020 at 02:32):

for extensions, either Extension.extension is 0..0 and value is 1..1, or vice versa

I don't think that's exactly what you mean, right? For sure you could have value 0..0 and extension 1..* (otherwise complex extensions wouldn't be very complex). But couldn't you also have extension 0..0 and value[x] 1..* (or really any min >= 1 and any max >= min)?

view this post on Zulip Grahame Grieve (Mar 06 2020 at 02:37):

oh yes, extension could be 1..*.

view this post on Zulip Lloyd McKenzie (Mar 06 2020 at 02:56):

It's evaluated at the instance level, but it's much clearer to readers when you make it explicit at the profile level.


Last updated: Apr 12 2022 at 19:14 UTC