So, an I2E user has built a great query that detects side effects and adverse events for a drug. It looks ideal as a candidate for repeated use: for example, search MEDLINE whenever it is updated.
The I2E user has also saved this query as a Smart Query, meaning the drug can be changed when the query is run. Changing the settings of a smart query in the I2E client is easy: type in a few words, click to add a class or load in a list of alternatives, or some combination of those options.
So how can options like these be transferred to the I2E server as part of the query using the Web Services API?
The answer (if you haven’t guessed from the title of this post) is to use the I2E Query Notation, a simple textual syntax for specifying words, phrases, alternatives, classes and macros. It is based on the notation that has been in use in I2E Express queries for some time, so a compound search like:
["big brown bear" mouse* CAT^]
would find the phrase “big brown bear” or mouse (and variants like mice) or CAT (but not cat, Cat or cAt).
As well as words, phrases and alternatives, you can refer to classes in your I2E indexes using the identifier for the class (its “nodeid”) and the identifier for the ontology to which it belongs (its “supplierid”): together they uniquely identify a class in an index. The format is
For example, cyclosporine is C406 in the NCI Thesaurus and so it would be specified as “/sn<nci.C406>” using the I2E Query Notation. From I2E version 4.1 onwards, you can also refer to a macro term in your smart query, with
Finally, there are some reserved terms that can be used to add a linguistic wildcard to your search: examples include /word, /chunk and /ng (noun group).
Once you have composed the string, it is added to your Query Template as the setting for your Drug Smart Query item and POSTed to the Query Tasks folder to trigger the search.