SMAT database
In the SMAT database GUI, the system engine stores SMAT messages in a SQLite database in an encrypted form.
SMAT database timestamps are in milliseconds. This adds a finer granularity when, for example, you write a widget to calculate latency or processing time.
Time-related fields have 13 digits. Because the feature bitmap is set, there cannot be two different types of time format in one SMAT database.
The top 58 bits are the feature bitmap.
The lowest bit of the 58 bits is “1”, which means milliseconds is implanted.
The lower 8 bits are the SMAT database version.
The smat_info.version field contains 0x102(=00000001 00000010b).
The database is cycled if the earlier version is detected.
Starting a search
When starting a search, you select the content to search for.
This table shows the
menu options:Search option | Description |
---|---|
By default, the auto-complete database uses the segment list from the HL7 2.7 standard. To use a variant (for example, to search on a Z segment field and have auto-complete), run hcicreateformatdb. This should be run after an HL7 variant operation. | |
and | These are intended to specify the formats of the messages that the content search is applied on. |
When you change from the other options to is enabled when this option is selected for the search content. This performs an instant content search for all message formats, and a way to view what was created by the HL7/HPRIM regex builders. If you create an ad-hoc regex and switch the context back to the HL7/HPRIM options, then it is unavailable. If the regular expression is modified, then when you select a confirm dialog prompts whether to save the modified regular expression as a search criteria. Selecting inserts the modified regular expression into the Advanced Criteria table as a regular expression criteria.Regular expression syntax is based on PCRE (Perl Compatible Regular Expressions). |
, the
field populates with the regular expressions that are pre-built from the
Field/Alias search expression. You can then modify the regular expression.
Entering text into the Content field opens a list of auto-complete choices.
You can search messages with a field/alias. The search supports auto-complete and instant searches.
When changing from a regular expression back to the format specific one:
- If the pre-built regular expression is not edited in the text field, then the text field shows the original field/alias search expression.
- If the regular expression has been edited, then a warning message is displayed, This gives you an opportunity to save it to advanced criteria before clearing the text field.
hcicreateformatdb is automatically called when saving a variant through the HL7 GUI or deploying a BOX with HL7 variants included.
If the variant is changed outside the GUI, then you must use hcicreateformatdb to add the variant to the menu.
After configuring your search parameters, click Save Criterion Definition dialog box. The current criteria are saved in $HCISITE/smatdb/criteria_defs/criteria_def_username.ini.
. This opens theCanceling a search
In some instances, you could accidentally start a SMAT Database search for a large amount of files. When this happens, you can cancel the search after it has started.
The
and functions share the same button.Before a search is initiated, the button is labeled
. After clicking , the button label changes to .After the message search has completed, the button label changes back to
.Symlinking and NFS file systems
SMAT Database is designed for local file systems.
Symlinking should not be used, especially with NFS (Network File System) file systems. In this scenario, SMAT Database is implemented with SQLite database, but SQLite database has known locking control difficulties on NFS file systems. The SQLite database is prone to corruption on NFS file systems. You should avoid using SMAT Database on NFS file systems or symlinking SMAT Database.