SNOMED Documentation Search


Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Replacement slots may be given a replacement type to indicate what type of value may be used to replace the slot. The replacement type directly follows the '+' symbol inside the slot (with optional whitespace between). Permitted replacement types include:

  • id: The slot may be replaced by a single SNOMED CT concept reference.
  • scg: The slot may be replaced by a SNOMED CT compositional grammar expression (either a precoordinated or postcoordinated expression).
  • tok: The slot may be replaced by a token (or symbol) that is defined in the base syntax.
  • str: The slot may be replaced by a quoted string of characters. This is used to represent a concrete attribute value that is typed as a string.
  • int: The slot may be replaced by a integer (preceded by a '#' symbol). This is used to represent a concrete attribute value that is typed as an integer.
  • dec: The slot may be replaced by a decimal (preceded by a '#' symbol). This is used to represent a concrete attribute value that is typed as a decimal.
  • bool: The slot may be replaced by a boolean. This is used to represent a concrete attribute value that is typed as a boolean.

Please note, that if no replacement type is specified after the '+' symbol, then a replacement type of 'scg' is assumed.

Concept Replacement Slots

Slots with a replacement type of 'id' may only be replaced by a single concept reference. For example, the replacement slot in the following expression template

...

However, it is not possible to generate a nested expression using this expression template, as the slot may not be replaced by a postcoordinated expression.

Expression Replacement Slots

Slots with a replacement type of 'scg' may be replaced by any (precoordinated or postcoordinated) expression. For example, the slot in the following expression template

Scg expression
Borderridge
ShowFormatblock
   	404684003 |Clinical finding|: 255234002 |After| = [[+scg]]

...

Scg expression
Borderridge
ShowFormatblock
   	82271004 |Injury of head|
   	417163006 |Injury|: 363698007 |Finding site| = 69536005 |Head structure|
   	417163006 |Injury| + 118934005 |Disorder of head|

...

Scg expression
Borderridge
ShowFormatblock
   	404684003 |Clinical finding|: 255234002 |After| = 82271004 |Injury of head|
   	404684003 |Clinical finding|: 255234002 |After| = (417163006 |Injury|: 363698007 |Finding site| = 69536005 |Head structure|)
   	404684003 |Clinical finding|: 255234002 |After| = (417163006 |Injury| + 118934005 |Disorder of head|)

Please note that for the second and third replacements, the template processor must add round brackets around the subexpression to ensure that the resulting expression is syntactically valid.

Token Replacement Slots

Slots with a replacement type of 'tok' may be replaced by any token (or symbol) that is defined in the base language. For example, the following expression has a definition status that has not yet been defined.

Scg expression
Borderridge
ShowFormatblock
   	[[+tok]] 73211009 |Diabetes mellitus| :  363698007 |Finding site|  =  113331007 |Endocrine system|

...

Scg expression
Borderridge
ShowFormatblock
   	<<< 73211009 |Diabetes mellitus| :  363698007 |Finding site|  =  113331007 |Endocrine system|

Concrete Value Replacement Slots

Slots with a replacement type of 'str', 'int', 'dec' or 'decbool' may be replaced by any string, integer, decimal or decimal boolean value respectively. For example, the slot in the expression template below:

...

Scg expression
Borderridge
ShowFormatblock
   	322236009 |Paracetamol 500mg tablet| :   209999999104774167006 |HasProduct trade name|  = [[+str]]

may be replaced by the string PANADOL to form the following expression

Scg expression
Borderridge
ShowFormatblock
   	322236009 |Paracetamol 500mg tablet| :  209999999104 774167006 |HasProduct trade name|  = "PANADOL"

Please note that the template processor must add quotation marks around the string to ensure that the resulting expression is syntactically valid.

...

Scg expression
Borderridge
ShowFormatblock
 	417720003 |Zinc 32351000925 |Amoxycillinmg 500mgoral capsule|: 
      {		{ 749999999108 |Has pack size magnitude| = [[+int]], 
       759999999106 			774163005 |Has pack size unitsunit| = 428641000 |Capsule| }

may be replaced by the integer value 30 to form the expression

Scg expression
Borderridge
ShowFormatblock
	417720003 |Zinc 25 323510009 |Amoxycillin 500mgmg oral capsule|: 
		{ 1142142004     {749999999108 |Has pack size magnitude| = #30, 
       759999999106			774163005 |Has pack size unitsunit| = 428641000 |Capsule| }

Please note that the template processor must add a hash symbol ("#") before the integer value to ensure that the resulting expression is syntactically valid.

And the The slot in the following expression template:

Scg expression
Borderridge
ShowFormatblock
   326645001	426016003 |ChlorhexidineDiazepam gluconate 0.02% irrigation5 mg/mL oral solution|: 
		{      {749999999108 1142142004 |Has pack size magnitude| = [[+dec]],
       759999999106			774163005 |Has pack size unitsunit| = 258770004 |Liter| }

may be replaced by the decimal value 1.5 to form the expression

Scg expression
Borderridge
ShowFormatblock
  	426016003 326645001 |ChlorhexidineDiazepam gluconate 0.02% irrigation5 mg/mL oral solution|: 
      {749999999108		{ 1142142004 |Has pack size magnitude| = #1.5,
       759999999106 			 774163005 |Has pack size unitsunit| = 258770004 |Liter| }

Please note that the template processor must add a hash symbol ("#") before the decimal value to ensure that the resulting expression is syntactically valid.

And lastly, the slot in the following expression template:

Scg expression
Borderridge
ShowFormatblock
	318969005 |Irbesartan 150 mg oral tablet|:  859999999102 |Is in national benefit scheme| = [[+bool]]

may be replaced by the boolean value TRUE to form the expression

Footnote Macro

Please note that the concept 859999999102 |Is in national benefit scheme| is a fictitious attribute used here to illustrate boolean values.


Scg expression
Borderridge
ShowFormatblock
	318969005 |Irbesartan 150 mg oral tablet|:  859999999102 |Is in national benefit scheme| = TRUE


Display Footnotes Macro