Skip to content
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

Fix invalid slot reference according to ETL v1.0 specification #2

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

nagyo
Copy link
Contributor

@nagyo nagyo commented Feb 13, 2020

All existing template definitions in this repository are using the ETL v0.2 specification where the following grammar element was allowed:

templateSlotInfo = [cardinality ws] [templateSlotName ws] [templateSlotReference ws]
templateSlotName = "@" templateString
> templateSlotReference = "$" templateString

The templateSlotReference grammar element was however removed from the final language specification currently available.

The current specification looks like this:

templateSlot =  templateReplacementSlot / templateInformationSlot
templateReplacementSlot = conceptReplacementSlot / expressionReplacementSlot / tokenReplacementSlot / concreteValueReplacementSlot
conceptReplacementSlot = "[[" ws "+" ws "id" ws [ "(" ws expressionConstraint ws ")" ws] [slotName ws] "]]"
...
templateInformationSlot = "[[" ws slotInformation ws "]]"
slotInformation = [cardinality ws] [slotName ws]
...
slotName = "@" (nonQuoteStringValue / slotString)

External stakeholders who would like to implement support for ETL must depend on the first official and currently available language specification v1.0 (http://snomed.org/sts)

According to the General SNOMED CT Language Requirements:

Requirement G.1: Backward compatibility

The language must be backwardly compatible with any version of the language that has previously been adopted as an IHTSDO standard. Please note that this requirement is not applicable to this version of the Template Syntax, as no previous version has been published as an IHTSDO standard.

A grammar parser implemented against ETL v1.0 specification would fail if the current format of CT guided [procedure] of [body structure] (procedure) is kept, hence this pull request to fix this one occasion where a slot reference is used.

Using the same slot name multiple times is allowed according to the specification:

Slot names may be repeated within a template. When the same slot name is associated with more than one slot in the same template, it indicates that these slots must be populated with the same value.

P.S.: the cardinality format is also different between the two versions e.g. [1..1] vs [~1..1] but that one is much easier to bypass compared to the above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant