Stream: shorthand
Topic: Caret paths in "deeply inserted" rulesets
Martin Höcker (Jul 02 2021 at 08:54):
Hooray for the new 2.0.0.beta2 release! I played around with the new "deep" insertion of rulesets, and I like it! But there is one thing I can't quite figure out. I would like to use caret-paths in rulesets, a little bit like so:
RuleSet: rs
* ^short = "test"
Profile: TestPatient
Parent: Patient
* name insert rs
Unfortunately, this leads to the error No element found at path name. for CaretValueRule in TestPatient, skipping rule
.
The following things are additional variants of "deeply inserted" rulesets, where I also need caret paths:
Using parameterized rulesets:
RuleSet: rs(thing)
* ^short = "{thing}"
Profile: TestPatient
Parent: Patient
* name insert rs(hello)
Placing extensions into the StructureDefinition:
RuleSet: rs(thing)
* ^extension[MyExt].valueString = "{thing}"
Profile: TestPatient
Parent: Patient
* name insert rs(hello)
Both these examples lead to the same error as the first example.
As a workaround, I currently parameterize the preceding path. It "feels" wrong, but it works! Applied to the last example, it looks like this:
RuleSet: rs(path, thing)
* {path} ^extension[MyExt].valueString = "{thing}"
Profile: TestPatient
Parent: Patient
* insert rs(name, hello)
Is there a better way to use caret-paths with inserted rulesets?
Chris Moesel (Jul 02 2021 at 13:35):
@Nick Freiter -- can you take a look at this and/or advise?
Nick Freiter (Jul 02 2021 at 14:01):
@Martin Höcker, what you're trying to do is valid, that is definitely a bug. We will get that fixed as soon as possible. Sorry to make you use that workaround in the mean time, thanks for taking on the testing burden of being a beta
user!
Martin Höcker (Jul 02 2021 at 14:47):
Thank you for raising the PR so quickly! I tested it and it is indeed solving my issue!
Last updated: Apr 12 2022 at 19:14 UTC