Stream: conformance
Topic: FHIRPath vs. element
Chris Grenz (Sep 28 2017 at 16:14):
There are constraints written as FHIRPath expressions that could be written as element constraints. For example, dom-1 has contained.text.empty()
which could be written max:0 on path Resource.contained.text
Chris Grenz (Sep 28 2017 at 16:16):
It seems to me that avoiding expressions to the greatest extent possible allows for the most optimization by validators, especially when considering search to find candidates for profile conformance. How would everyone feel about changing these?
Chris Grenz (Sep 28 2017 at 16:19):
- dom-1, dom-2, dom-4
Brian Postlethwaite (Oct 02 2017 at 23:46):
Except that I don't want that dom-1 constraint at all, it prevents containing narrative only resources. (logged the issue)
Brian Postlethwaite (Oct 02 2017 at 23:47):
(but do agree that we should try and simplify as you've suggested)
Grahame Grieve (Oct 03 2017 at 03:00):
there's a reason that particular constraint is written by FHIRPath, which is that contained resources do not need to be DomainResources. In general, it is better to use structured constraints in preference to an invariant expression, and I always choose to when I can
Grahame Grieve (Oct 03 2017 at 03:02):
dom-4 could be an exception to that, but it already applies over the top of the resource, and it seemed to me that the complication of expressing in a structured form - given that dom-1 to dom-3 couldn't be - wasn't justified. (walking into the contained resource at the level of Resource). How does that help code generators, for instance.
Last updated: Apr 12 2022 at 19:14 UTC