FHIR Chat · sdf-20 in StructureDefinition seems incorrect · conformance

Stream: conformance

Topic: sdf-20 in StructureDefinition seems incorrect


view this post on Zulip Patrick Werner (Sep 14 2017 at 19:33):

sfd-20 defined on StrutureDefinition.differential is: element.first().slicing.empty()but says No slicing on the root element
element.first() != root element so i assume sfd-20 is incorrect?
Should i create a tracker item?

view this post on Zulip Patrick Werner (Sep 14 2017 at 20:42):

it could be fixed like this: element.first().slicing.empty() or element.first().id.is(parent().type).not()but i couldn't find a parent operator in fluentpath at the moment.

view this post on Zulip Stefan Lang (Sep 14 2017 at 20:46):

That seems correct, except that to my knowledge it is not possible to reference a parent element in FHIRpath, so sdf-20 would have to be moved one level up and the expression modified accordingly

view this post on Zulip Patrick Werner (Sep 14 2017 at 20:54):

i'd prefer to have the restriction of an element at the element itself. It is much easier to read it that way. But this is just my personal opinion.

view this post on Zulip Patrick Werner (Sep 14 2017 at 21:06):

it's already on the tracker: https://gforge.hl7.org/gf/project/fhir/tracker/?action=TrackerItemEdit&tracker_item_id=13768&start=0

view this post on Zulip Grahame Grieve (Sep 14 2017 at 21:13):

yes it's wrong

view this post on Zulip Michel Rutten (Sep 14 2017 at 23:03):

@Patrick Werner I guess we could move invariant sdf-20 from StructureDefinition to ElementDefinition. Do you find the current approach unclear?

view this post on Zulip Patrick Werner (Sep 14 2017 at 23:10):

your proposal in the tracker is element.where(path.contains('.').not()).slicing.empty()which would be an invariant on StructureDefinition.differentialthis is perfectly fine. I just meant that moving sdf-20 from StructureDefinition.differentialto StructureDefinition would be harder to read, as the the invariant is described elswhere than it acts.

view this post on Zulip Patrick Werner (Sep 14 2017 at 23:10):

but your fluentpath expression solves that elegantly without the need of moving sfd-20

view this post on Zulip Stefan Lang (Sep 14 2017 at 23:11):

What would be the point in moving it to ElementDefinition? I.e. where else would one need that invariant?

view this post on Zulip Michel Rutten (Sep 14 2017 at 23:16):

No functional difference. Validator will run all constraints anyway. Just a different way of expressing it. Relatively easy change, but not sure if it's worth the effort.

view this post on Zulip Patrick Werner (Sep 14 2017 at 23:22):

i don't see any benefit from moving it to ElementDefinition, as a downside sdf-20 would be evaluated on every element instead of only in StructureDefinition.differential

view this post on Zulip Michel Rutten (Sep 14 2017 at 23:26):

Right.


Last updated: Apr 12 2022 at 19:14 UTC