Stream: conformance
Topic: US Core Extensions
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?
Grahame Grieve (Mar 04 2020 at 19:33):
Extension.value[x] is sliced by type. Both of them constrain it to boolean
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.
Grahame Grieve (Mar 04 2020 at 19:34):
but it's not wrong
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.
Grahame Grieve (Mar 04 2020 at 19:35):
more weird is that the value.min isn't fixed to 1 in us-core
Josh Mandel (Mar 05 2020 at 02:51):
Huh, okay -- and that is a tooling bug?
Grahame Grieve (Mar 05 2020 at 03:00):
I think so
Grahame Grieve (Mar 05 2020 at 03:00):
Not sure where.
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
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
Grahame Grieve (Mar 05 2020 at 20:14):
I think min=0 is a tooling bug.
Eric Haas (Mar 05 2020 at 22:15):
The source is min=0
Grahame Grieve (Mar 05 2020 at 22:16):
for extensions, either Extension.extension is 0..0 and value is 1..1, or vice versa
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.
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)?
Grahame Grieve (Mar 06 2020 at 02:37):
oh yes, extension could be 1..*.
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