loincmgr -[crux] files ... loincmgr -[dq] field == value [field op value] ... loincmgr -D [field == value [field op value] ...] loincmgr -R
loincmgr program is the "manager" of the LOINC code
database. It is used to convert between tabular and compiled, hashed
form of the database. Moreover it offers shell level access to the
querying feature of the underlying ODBM object database management
The first form is used in order to create (`-c') the compiled, hashed and indexed database, add (`-u'), replace (`-r'), or delete (`-x') objects from the database. The tuples are submitted as files in the tabular format (see section The `LOINC.tab' and `LOINC+.tab' Databases).
The second form is used to query or delete objects from the database. The query is specified by a clause asking for the key or an indexed field to be equal to some string value; followed by other clauses further testing the operator op on other fields and values. The operator op can be `==' (equal) or `!=' (not equal). The clauses are linked by logical and. The field can be specified either by a number or by the LOINC standard name for the field: `LOINC_NUM', `MEASURE', `PROPERTY', `TIMING', `SPECIMEN', `PRECISION', `METHOD', `RELAT_NMS', `CLASS', `SOURCE', `EUCLIDE_CD', `ASTM_CD', `IUPAC_CD', `DT_LAST_CH', `COMMENTS', `ANSWERLIST', `STATUS', `SCOPE', `SNOMED_CD', `VA_CD', `METPATH_CODE', `HCFA_CODE', `NORM_RANGE', `UNITS', and `MAP_TO'.
The third form is used to regain the tabular source form of the database from the compiled form. It is possible, but not required, to use a query clause as described above in order to limit the amount of data that is printed to the standard output.
The last form is used to reorganize the database, i.e. to delete all indices that have doubled or became void because of data being replaced or removed from the database.
-c files ...
-r files ...
-u files ...
-x files ...
-q field == value [field op value] ...
-d field == value [field op value] ...
-D [field == value [field op value] ...]
Writing errors to the logfile is not useful since this is a program that is normally invoked manually by an operator.
The table parser is a bit itchy about end of lines.
The `-r' option is not yet implemented
The `-R' option is not implemented yet. It can be emulated by
loincmgr -D > /tmp/loinc.tmp loincmgr -c /tmp/loinc.tmp
See the file `./loinc.log' to make sure that no error has occurred.
odbm(3), gdbm(3), section The `LOINC.tab' and `LOINC+.tab' Databases, section The LabEventInfo Table.