Stream: conformance
Topic: How to express min and max types for reference
Eric Haas (Nov 02 2019 at 00:04):
Is there a way to say must support at least type a and type b and may support type c when profiling a element of type reference 1..1 ?
Lloyd McKenzie (Nov 02 2019 at 00:10):
Not formally. You could do it with text or define an extension
Eric Haas (Nov 02 2019 at 18:03):
Or multiple profiles like a min max profile and then declare profile in cap statements
Lloyd McKenzie (Nov 03 2019 at 01:15):
Not sure how capability statement would help - you get one profile per resource to declare what you support
Michel Rutten (Nov 04 2019 at 09:22):
Min and max requires an ordering. How would this work?
Lloyd McKenzie (Nov 04 2019 at 14:18):
This isn't ordered. It's setting mustSupport expectations
Eric Haas (Nov 04 2019 at 17:40):
I agree the min max profile is not really a solution since they are mutually exclusive since min would be 'foo' type Reference(A|B) and max would be 'foo' type Reference(A|B|C) so a server that supports the max could not say is conformant to min....since it would not invalidate 'foo'
= Reference(C)
Grahame Grieve (Nov 07 2019 at 03:55):
it seems like an extension on ElementDefinition.type to me
Richard Townley-O'Neill (Nov 07 2019 at 04:31):
mustSupport says that you define the meaning somewhere else in the profile. As I see it, testing of mustSupport conditions is outside the scope of the FHIR validator.
Richard Townley-O'Neill (Nov 07 2019 at 04:31):
The complex meaning @Eric Haas proposes would go in text where ever you describe the meaning of must support.
Eric Haas (Nov 07 2019 at 06:34):
so use http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation in this context for ElementDefinition.type.profile
or ElementDefinition.type. targetProfile
? Although it would be in this case a modifier I guess. So I'd need to define a new one.
So what would it would mean is an implementer could support only the SHALLS +/- more types. But I am not sure how profile validators would handle this level of variability.
Grahame Grieve (Nov 07 2019 at 06:51):
how is it relevant to profile validators?
Lloyd McKenzie (Nov 07 2019 at 15:06):
Validators couldn't do anything about the 'min', only check the max.
Last updated: Apr 12 2022 at 19:14 UTC