Stream: shorthand
Topic: Setting SD.context
Morten Ernebjerg (Jun 21 2021 at 14:45):
I wanted to set the StructureDefinition.context
element to indicate the usage context for an extension. I didn't find a keyword specifically for this and hence ended up doing it using a caret path (* ^context[0].type = ...
etc.). But just to check, is there actually a keyword hiding somewhere to do this? Sampling a few standard extensions for specific resources, it seems to be smt. that is always set for them ("Context of Use").
Chris Moesel (Jun 21 2021 at 16:34):
Using a ^
rule is the appropriate approach. This is something we could consider for a keyword though. If you use it a lot, you can also try simplifying it via a parameterized ruleset like this: https://fshschool.org/FSHOnline/#/share/2SQPJf1
Morten Ernebjerg (Jun 22 2021 at 06:34):
Thanks for the confirmation and for pointing out the ruleset solution!
Last updated: Apr 12 2022 at 19:14 UTC