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:
- DATADIR <path>
Specifies the directory where databases are to be created, opened or copied. Example:
DATADIR H:\SNOMED\snob - SOURCES <path>
Specifies the directory where the SNOMED sources can be found. Example:
SOURCES H:\SNOMED\2007\Content - CREATE <database file name>
The database file name may be either absolute or relative to a previous DATADIR statement or the default data dictionary. Examples:
CREATE H:\SNOMED\snob\data\test.db
CREATE test.db
- OPEN <database file name>
The database file name may be either absolute or relative to a previous DATADIR statement or the default data dictionary. Examples:
OPEN H:\SNOMED\snob\data\test.db
OPEN test.db
- COPYTO <database file name>
Copies the current database to the specified file. The database file name may be either absolute or relative to a previous DATADIR statement or the default data dictionary. Examples:
COPYTO H:\SNOMED\snob\data\test2.db
COPYTO test2.db
- NAME <name>
Sets the name of the current database. This is the name that is displayed in SNOBs window bar and which can be set under File-Properties. Example:
NAME SNOMED Core 2007 - IMPORT <source file>
Imports the specified file into the current database. The source file name may be either absolute or relative to a previous SOURCES statement.
IMPORT H:\SNOMED\2007a\sct_concepts_20070131.txt
IMPORT sct_concepts_20070131.txt - COLLECTRELATIONSHIPS
When you are importing a new release of SNOMED into a database containing a previous release, this command collects the imported relationships. This collection is later used by the command INACTIVATERELATIONSHIPS to inactivate relationships that are present in the database, but are not present anymore in the new release. - INACTIVATERELATIONSHIPS
See previous command COLLECTRELATIONSHIPS, see second example below. - INDEX
index the database - EXIT
exits SNOB
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