...
The expression template below uses a value list constraint to constrain the value of the slot to the string "PANADOL", the string "TYLENOL", or the string “HERRON”.
Footnote Macro |
---|
Please note that these example expression templates are based on a hypothetical drug concept model, and are not intended to reflect any specific drug model. In these expressions, the SNOMED CT identifiers created with the '9999999' namespace are for example only, and should not be used in a production environment. |
Scg expression |
---|
Border | ridge |
---|
ShowFormat | block |
---|
|
322236009 |Paracetamol 500mg oral tablet|: 209999999104774167006 |Has tradeProduct name (product name)| = [[+str ("PANADOL" "TYLENOL" "HERRON")]] |
...
Scg expression |
---|
Border | ridge |
---|
ShowFormat | block |
---|
|
322236009 |Paracetamol 500mg oral tablet|: 209999999104774167006 |Has tradeProduct name (product name)| = "PANADOL" |
Scg expression |
---|
Border | ridge |
---|
ShowFormat | block |
---|
|
322236009 |Paracetamol 500mg oral tablet| : 209999999104774167006 |Has tradeProduct name (product name)| = "TYLENOL" |
Scg expression |
---|
Border | ridge |
---|
ShowFormat | block |
---|
|
322236009 |Paracetamol 500mg oral tablet|: 209999999104774167006 |Has tradeProduct name (product name)| = "HERRON" |
In the next example, a value constraint is used to constrain a replacement slot of type int. In this case, the slot may be replaced by the integer values 10, 20 or 30.
Scg expression |
---|
Border | ridge |
---|
ShowFormat | block |
---|
|
323510009417720003 |AmoxycillinZinc 25mg 500mgoral capsule|:
{ 7499999991081142142004 |Has pack size magnitude(attribute)| = [[+int (#10 #20 #30)]],
759999999106774163005 |Has pack size unit units(attribute)| = 428641000 |Capsule| } |
...
Scg expression |
---|
Border | ridge |
---|
ShowFormat | block |
---|
|
323510009417720003 |AmoxycillinZinc 25mg 500mgoral capsule|:
{ 7499999991081142142004 |Has pack size magnitude(attribute)| = #10,
759999999106774163005 |Has pack size unit units(attribute)| = 428641000 |Capsule| } |
...
Scg expression |
---|
Border | ridge |
---|
ShowFormat | block |
---|
|
417720003 |Zinc 323510009 |Amoxycillin 500mg25mg oral capsule|:
{ 7499999991081142142004 |Has pack size magnitude(attribute)| = #20,
759999999106774163005 |Has pack size unit units(attribute)| = 428641000 |Capsule| } |
...
Scg expression |
---|
Border | ridge |
---|
ShowFormat | block |
---|
|
323510009417720003 |AmoxycillinZinc 25mg 500mgoral capsule|:
{ 7499999991081142142004 |Has pack size magnitude(attribute)| = #30,
759999999106774163005 |Has pack size unit units(attribute)| = 428641000 |Capsule| } |
...
Range constraints can be used by slots of type int or dec to constrain the permitted replacement values. Range constraints may specify the minimum permitted value, the maximum permitted value, or both. By default, ranges are inclusive (that is, the range includes the stated minimum and maximum values). However exclusive ranges (in which the stated minimum or maximum is not itself allows as a value) may be specified.
For example, the following expression template allows any pack size to be used that is between 20 and 30 capsules (inclusive).
...
.
Scg expression |
---|
Border | ridge |
---|
ShowFormat | block |
---|
|
323510009417720003 |AmoxycillinZinc 25mg 500mgoral capsule|:
{ 7499999991081142142004 |Has pack size magnitude(attribute)| = [[+int (#20..#30)]],
759999999106774163005 |Has pack size unitsunit (attribute)| = 428641000 |Capsule| } |
To specify exclusive minimum values, a greater than sign (‘>’) is placed before the minimum value, and to specify exclusive maximum values, a less than sign (‘<’) is placed before the maximum value. For example, the following expression template allows any pack size that is between 20 and 30 capsules (exclusive). This range constraint is equivalent to an inclusive range of 21..29.
Scg expression |
---|
Border | ridge |
---|
ShowFormat | block |
---|
|
323510009417720003 |AmoxycillinZinc 25mg 500mgoral capsule|:
{ 7499999991081142142004 |Has pack size magnitude(attribute)| = [[+int (>#20..<#30)]],
759999999106774163005 |Has pack size unit units(attribute)| = 428641000 |Capsule| } |
Multiple ranges may be specified in a single range constraint. When multiple ranges are specified, these should be interpreted as alternative ranges. For example, the expression template below permits any pack size between 10 and 20 capsules (inclusive), or between 30 and 40 capsules (inclusive). This template does not, for example, permit a pack size between 21 and 29 capsules.
Scg expression |
---|
Border | ridge |
---|
ShowFormat | block |
---|
|
323510009417720003 |AmoxycillinZinc 25mg 500mgoral capsule|:
{ 7499999991081142142004 |Has pack size magnitude(attribute)| = [[+int (#10..#20 #30..#40)]],
759999999106774163005 |Has pack size unitsunit (attribute)| = 428641000 |Capsule| } |
When a minimum value is required with no maximum, it is possible to omit the maximum value in a range constraint. For example, the expression template below permits any pack size greater than or equal to 20 capsules.
Scg expression |
---|
Border | ridge |
---|
ShowFormat | block |
---|
|
323510009417720003 |AmoxycillinZinc 25mg 500mgoral capsule|:
{ 7499999991081142142004 |Has pack size magnitude(attribute)| = [[+int (#20..)]],
759999999106774163005 |Has pack size unit units(attribute)| = 428641000 |Capsule| } |
Similarly, it is also possible to state a maximum without a minimum constraint. For example, the expression template below permits any pack size less than or equal to 20 capsules. It should be noted that without a concept model rule to ensure that all pack sizes are greater than zero, this template will, by default, allow a pack size of zero or a negative pack size to be defined.
Scg expression |
---|
Border | ridge |
---|
ShowFormat | block |
---|
|
323510009417720003 |AmoxycillinZinc 25mg 500mgoral capsule|:
{ 7499999991081142142004 |Has pack size magnitude(attribute)| = [[+int (..#20)]],
759999999106774163005 |Has pack size unitsunit (attribute)| = 428641000 |Capsule| } |