Welcome, introductions and apologies | | |
Agenda review | | Review agenda for today's meeting |
Finalize syntax for cardinality | | What syntax should we use to define cardinality constraints?
- [[@Procedure]]: [[ {} [1..2] @boris]] { ..... }
- [[@Procedure]]: [[ {} [1..2] ]] { ..... }
- [[@Procedure]]: [1..2 [ @boris]] { [1..2 [ ..... ]] ..... }
- [[@Procedure]]: [1..2 [ ]] { [1..2 [ ..... ]] ..... }
- [[@Procedure]]: {{1..2 @boris }} { ..... } - ECH, JLO, MLA, RHA, LBI
- [[@Procedure]]: {{1..2 }} { ..... }
- [[@Procedure]]: ~[1..2] @boris { ..... }
- [[@Procedure]]: ~[1..2] { ..... }
- [[@Procedure]]: #[1..2] @boris { ..... }
- [[@Procedure]]: #[1..2] { ..... }
- [[@Procedure]]: %[1..2] @boris { ..... }
- [[@Procedure]]: %[1..2] { ..... }
- On a focus concept, an attribute or an attribute value - e.g. in the relevant slot [[ [1..*] < 123456 @slotName ]]
- On a relationship group - e.g. 123456 |concept|: ~[1..*] { .......}
- Note: The syntax must clearly indicate that the cardinality on a relationship group does not appear in the concrete expression that is generated when the expression template is populated. This is needed to distinguish an Expression Template (with relationship group cardinalities) from an Expression Constraint Template (for which the relationship group cardinalities do appear in the populated version of the template).
- In this example syntax, the "~" is being used to say "The following constraint needs to be removed when the template is populated."
- For example, an expression template such as:
- [[ @Procedure ]] : ~[1..2] @group1 { 405813007 |Procedure site - direct| = [[ [1..1] @bodySite ]], 260686004 |Method| = [[ [1..1] @method ]] }
- may be populated to generate the following expression:
- 71388002 |Procedure site - direct|: { 405813007 |Procedure site - direct| = 66754008 |Appendix structure|, 260686004 |Method| = 129304002 |Excision - action| }
- Note that the cardinality "[1..2]" is removed when generating the final expression.
|
Template syntax requirements | | Are there any other template requirements that we haven't yet considered (e.g. additional concept authoring requirements)? - Currently being discussed internally within IHTSDO
- Please send me any other functional requirements for templates that you know of - with examples of where and why it is needed.
|
Finalize draft template syntax | | - Goal is to start drafting the template syntax for wider review, and input from IHTSDO Tooling and Content teams.
|
Confirm next meeting date/time | | Next meeting to be held in 4 weeks on Wednesday 17th August |
3 Comments
Ed Cheetham
Thanks.
Three things from me...
(1) I've lost track (again) of the difference between an 'expression template' and an 'expression constraint template'. I dug out the 20151214 powerpoint slides which rather bundles 'expression constraint template' with 'conditional value set binding', but I'd appreciate a few more examples of which is which and when they are needed.
(2) regarding the role group cardinality question, probably been discussed already, but is there a good reason why the whole role group clause can't be treated as a slot in its own right?:
[[ @Procedure ]] : [[ [1..2] @group1 { 405813007 |Procedure site - direct| = [[ [1..1] @bodySite ]], 260686004 |Method| = [[ [1..1] @method ]] } ]]
This is a bit like Daniel's #< ># scope markers - for the groups, anyway. For expression templates it could then be treated the same as the value slots in terms of "replace me, according to the rules I contain, with 'stuff' which conforms to the compositional-grammar, and then remove all trace of me (including the [[ ]] delimiters)".
(3) Are there any other template requirements? - conditional operators
(a) I appreciate that there's been a bit of back-and-forth with a 'rule language' (with recent discussions offloading much of this to the FHIR mapping syntax), but does the template syntax need a set of conditional/flow control operators (I know they are in examples but I haven't seen them for a while)?
(b) some of these might be performed at MRCM level (e.g. no RG for a single role, introduce with 2 or more roles), but one I've been wondering about would relate to the (? 'shared variable') issue of testing that a particular value appears for > 1 attribute in a particular definition/expression. The example I can think of relates to specimens and their collection procedures, where we may want to be able to say either:
"the 'specimen substance' value for a specimen should match the 'direct substance' value of its collection procedure (in this case 'urine' for MSSU):
Or "the 'specimen topography' value for a specimen should match the 'direct site' value of its collection procedure (in this case 'kidney' for a biopsy):
I'm sure there are exceptions, but it looks like something that could be managed/specified, and the template may be the layer to do it. It *may* be enough to say that the values for both should be populated from the same source field, but if not perhaps there is a need for a reciprocal check between slots. Whatever, this might also be handled by a conditional clause which says something like "IF specimen has a specimen topography AND a specimen procedure value, THEN the specimen procedure: procedure site direct=value == specimen: specimen topography=value"
Ed
Linda Bird
Thanks Ed for your very thoughtful and helpful questions, comments and examples!
I will reply to what I can here ... and we can discuss the rest at tomorrow's meeting.
(1) The difference between an 'expression template' and an 'expression constraint template'
(2) Regarding treating the whole role group clause as a slot ...
(3) Are there any other template requirements? - Conditional operators
118171006 |Specimen procedure| = [[ @procedure < 17636008 |Specimen collection|:
([0..0] 363701004 |Direct substance| != << [[ $substance ]] AND [0..0] 405813007 |Procedure site - Direct| != << [[ $bodySite ]] ) ]],
118169006 |Specimen source topography| = [[ @bodySite < 91723000 |Anatomical structure| ]]
THEN (< 17636008 |Specimen collection|: ([0..0] 363701004 |Direct substance| != << [[ $substance ]] AND [0..0] 405813007 |Procedure site - Direct| != [[ $bodySite ]] )
ELSE (IF (($substance = NULL) AND ($bodySite !=NULL))
THEN (< 17636008 |Specimen collection|: [0..0] 405813007 |Procedure site - Direct| != [[ $bodySite ]] )
ELSE ( IF (($substance =!= NULL) AND ($bodySite = NULL)) THEN (< 17636008 |Specimen collection|: [0..0] 363701004 |Direct substance| != << [[ $substance ]]) ELSE (< 17636008 |Specimen collection|) ))
Thanks again!
Kind regards,
Linda.
Linda Bird
Hi everyone,
As a reminder ... your homework over the next four weeks is to consider (and discuss by email) the following, in the context of the SNOMED CT Template Syntax:
should we be consistent on the number of brackets used, when defining the cardinality of slots?
Thanks! Our next meeting will be held on Wednesday 17th August.
Kind regards,
Linda.