Stream: conformance
Topic: sdf-20 in StructureDefinition seems incorrect
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?
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.
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
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.
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
Grahame Grieve (Sep 14 2017 at 21:13):
yes it's wrong
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?
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.differential
this is perfectly fine. I just meant that moving sdf-20 from StructureDefinition.differential
to StructureDefinition
would be harder to read, as the the invariant is described elswhere than it acts.
Patrick Werner (Sep 14 2017 at 23:10):
but your fluentpath expression solves that elegantly without the need of moving sfd-20
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?
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.
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
Michel Rutten (Sep 14 2017 at 23:26):
Right.
Last updated: Apr 12 2022 at 19:14 UTC