-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Insert RuleSet at code path #942
Conversation
An insert rule on a CodeSystem or RuleSet can start with a code path. This allows the code path to act as the context for the rules contained in the inserted RuleSet. When an InsertRule has a code path, it is applied to ConceptRules and CaretValueRules in the inserted RuleSet. An InsertRule with a code path on an entity other than a CodeSystem or RuleSet is syntactically invalid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeSystem: MyCS
* #cookie
* insert MyRuleSet
RuleSet: MyRuleSet
* ^property[0].valueString = "They are strong climbers."
Seems to cause errors, but I believe this would be expected to work right?
@@ -28,10 +28,10 @@ vsMetadata: id | title | description; | |||
vsRule: vsComponent | caretValueRule | insertRule; | |||
codeSystem: KW_CODESYSTEM name csMetadata* csRule*; | |||
csMetadata: id | title | description; | |||
csRule: concept | codeCaretValueRule | insertRule; | |||
csRule: concept | codeCaretValueRule | codeInsertRule; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will want to update the spec with this new grammar, which I think shouldn't be fine, since the grammar is just informative.
When checking if a parser context contains a code path, consider the presence of a RULESET_REFERENCE or PARAM_RULESET_REFERENCE to be sufficient. Although this will include insert rules that contain a regular path, those will also get picked up by containsPathContext, so there are no consequences.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Radical 🛹
Completes task CIMPL-808.
An insert rule on a CodeSystem or RuleSet can start with a code path. This allows the code path to act as the context for the rules contained in the inserted RuleSet. When an InsertRule has a code path, it is applied to ConceptRules and CaretValueRules in the inserted RuleSet. An InsertRule with a code path on an entity other than a CodeSystem or RuleSet is syntactically invalid.