eggbird
software development and
knowledge engineering

Mail

SNOB - A SNOMED Browser

Manual

Scripting

SNOB can also be started with command line options to automatically execute a previously generated script file. SNOB can create a script file for the current database under File-Properties. A script file can for example be used to automatically call SNOB from your Task Manager and build a new database during the night. The following command line starts SNOB and executes the script file snomed.script.

c:\path1\snob.exe scr:H:\SNOMED\snomed.script

A script file may use the following commands:

Below is an example script file that creates two databases Core2007 with just the core content and Complete2007 with the core content plus extensions.

'create a database Core2007 in the directory H:\SNOMED
DATADIR H:\SNOMED
CREATE Core2007
NAME SNOMED Core 2007

'import core content from H:\SNOMED\SCT2007\Content
SOURCES H:\SNOMED\SCT2007\Content\
IMPORT sct_concepts.txt
IMPORT sct_descriptions.txt
IMPORT sct_relationships.txt

' make the copy Complete2007
COPYTO Complete2007

'built index in Core2007
INDEX

'open Complete2007
OPEN Complete2007
NAME SNOMED Core and Extensions 2007

'import extensions into Complete2007
SOURCES H:\SNOMED\SCT2007\Content\Extensions
IMPORT sct_concepts.txt
IMPORT sct_descriptions.txt
IMPORT sct_relationships.txt

'index Complete2007
INDEX

'and exit
EXIT

The second example creates a database and imports multiple editions of SNOMED into that database.

'create a database Core2006_7 in the directory H:\SNOMED
DATADIR H:\SNOMED
CREATE Core2006_7
NAME SNOMED Core 2006b+7a

'import core content from 2006b release
SOURCES H:\SNOMED\SCT2006b\Content\
IMPORT sct_concepts_20060731.txt
IMPORT sct_descriptions_20060731.txt
IMPORT sct_relationships_20060731.txt

'import core content from 2007a release
SOURCES H:\SNOMED\SCT2007a\Content\
IMPORT sct_concepts_20070131.txt
IMPORT sct_descriptions_20070131.txt

'collect the relationships in the source file
COLLECTRELATIONSHIPS

'import the relationships
IMPORT sct_relationships_20070131.txt

'inactivate the relationships that were not present in the source file
INACTIVATERELATIONSHIPS

'and exit
EXIT