The get_name_info message returns the information needed to populate a tree node for a given search keyword or name. This message requires the user to pass a string that is queried against the name column.
Generate Tree NoDes for a Given Name
To generate a list of base tree nodes associated with a given search keyword or name, the sequence of events is as follows:
- The client requests node(s) for a given name / category. If the request message indicates all categories should be searched, loop through all known categories for the user (type = default)
- The WORK server performs the following steps:
- Query the table of tables to confirm that the user / role can access category passed in. If not, return coded error. The client receives an error message with the code "TABLE_ACCESS_DENIED"
- If max is set, query the database for the number of entries that meet the search criteria.
- If count <max or no max is set, query the database for entries that meet the search criteria.
- If count > max send an error message back.
- The client generates a list of nodes that match the search criteria.
- The client receives an error message with the code "MAX_EXCEEDED" and displays a dialog asking if the user wants to see all nodes. If no – done. If yes – client sends another message with max empty.
get_name_info Request Message
This message requires the user to pass a string that is queried against the "name" column. The category attribute does not have to be included and if it is not, all categories the user is allowed to see will be searched.
The remaining attributes provide information about the results to be returned. If the number of rows found is greater than the max, then an error message will be returned in the i2b2 header. If the max is left out then it is interpreted that there is no max. By default hiddens and synonyms are false, so if they are left out it will be false. The type tells which columns to select (default / core / all). By default, the type is set to default. Each message will interpret the default to be a different set of columns. The default set of columns for get_name_info includes the name column only.
- If type = core, then all columns except the blob and the system / date information will be returned.
- If type = all then all columns except the blob are returned.
The blob attribute indicates whether or not to return the blob along with the default / core / all return columns.
The <match_str> tag tells the service which string to search for. It is implied by the message get_name_info that the column to search is the name. The strategy attribute explains how the search must match (exact, left, right, contains).
<message_body>
<get_name_info category="demo" max="200""hiddens="true" type="core" blob = "false">
<match_str strategy="contains">asthma</match_str>
</get_name_info>
</message_body>
Possible "hiddens" Settings
Some ontology terms exist but for various reasons are not displayed in the query tree.
Value | Description |
false | Do not return data categorized as "hidden" |
true | Include data categorized as "hidden" |
Possible "blob" Settings
Value | Description | Example |
false | Do not return data stored as a blob or clob | xml, comments |
true | Return xml and comments |
|
Possible "strategy" Settings
Value | Description |
contains | Return data whose name contains the match string |
exact | Return data whose name exactly matches the match string |
left | Return data whose name starts with the match string |
right | Return data whose name ends with the match string |
get_name_info Response Message
The request has the following settings:
type=core
blob=false
Example:
<message_body>
<ns4:folders>
<folder>
<name>
11 years old demo
</name>
<user_id>
demo
</user_id>
<group_id>
Demo
</group_id>
<share_id>
N
</share_id>
<index>
\\demo\u5eHaJVYD2iaZ5LJu7Tw9
</index>
<parent_index>
c6Y5JaJig614lNQNPSob8
</parent_index>
<visual_attributes>
ZA
</visual_attributes>
<tooltip>
Demo - 11 years old demo
</tooltip>
<work_xml>
<ns2:plugin_drag_drop>
<ns5:concepts>
<concept>
<level>
4
</level>
<key>
\\i2b2_DEMO\demo\Demographics\Age\10-17 years old\11 years old demo\
</key>
<name>
11 years old demo
</name>
<synonym_cd>
N
</synonym_cd>
<visualattributes>
LA
</visualattributes>
<totalnum>
undefined
</totalnum>
<basecode />
<facttablecolumn>
patient_num
</facttablecolumn>
<tablename>
patient_dimension
</tablename>
<columnname>
birth_date
</columnname>
<columndatatype>
N
</columndatatype>
<operator>
BETWEEN
</operator>
<dimcode>
getdate() - (365.25 *12) +1 AND getdate() - (365.25 * 11) + 1
</dimcode>
<comment />
<tooltip>
Demographics \ Age \ 10-17 years old \ 11 years old demo
</tooltip>
</concept>
</ns5:concepts>
</ns2:plugin_drag_drop>
</work_xml>
<work_xml_i2b2_type>
CONCEPT
</work_xml_i2b2_type>
</folder>
</ns4:folders>
</message_body>