i2b2 Developer's Forum
Space shortcuts
Space Tools

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

1.6.0302

The i2b2 metadata allows a text search of the observation_fact table.  Two columns may be searched, the TVal_Char column, and the observation_blob column  (coming soon).  The search is initiated by pulling concepts from the "Navigate Terms" or "Find Terms" in the Vocabulary Areas of the i2b2 Client for which you want to search for values in their associated text.  There are several strategies undertaken while loading the data where values may have been included that one wants to search, such as:

...

Text constrain options

Sql

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="cc095eb7996249b0-21faef84-4b984bd8-aecca7b7-372d94bcd885f0a93290b3eb"><ac:plain-text-body><![CDATA[

LIKE[exact] 
]]></ac:plain-text-body></ac:structured-macro>
     Case insensitive search.

<constrain_by_value>
      <value_type>TEXT</value_type>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="88c00116e06ffa15-55dc5853-41784637-bbe1ac7d-36bc078db8531b2456610538"><ac:plain-text-body><![CDATA[       <value_operator> LIKE[exact]</value_operator>
]]></ac:plain-text-body></ac:structured-macro>
      <value_constraint> NEG </value_constraint>
 </constrain_by_value>

Select * from  observation_fact where
Concept_cd in (select concept_Cd from concept_dimension where ..)  and
valtype_cd = 'T' and
 upper(tval_char) =  upper('NEG')

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="ec14978b3d7d9cb6-3d24f316-46554864-ab46beb2-8eb8b4a051e0733fd20bb665"><ac:plain-text-body><![CDATA[

LIKE[begin]
]]></ac:plain-text-body></ac:structured-macro>
    Begin will be the default option if the optional tag is not present. This will support backward compatibility.

<constrain_by_value>
      <value_type>TEXT</value_type>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="bec5cb745a272bc9-0a8d0b59-42f24175-8b1dbe51-9e480c063fa0371c425c5435"><ac:plain-text-body><![CDATA[       <value_operator>LIKE[begin]</value_operator>
]]></ac:plain-text-body></ac:structured-macro>
      <value_constraint> NEG </value_constraint>
 </constrain_by_value>

Select * from  observation_fact where
Concept_cd in (select concept_Cd from concept_dimension where ..)
and
valtype_cd = 'T' and
 upper(tval_char)  LIKE upper('NEG%') 

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="f38d35a7d4758d5c-031e19c7-4e7c42bd-bfae9456-ec179c648ed7d1534cce6c8a"><ac:plain-text-body><![CDATA[

LIKE[end]
]]></ac:plain-text-body></ac:structured-macro>
<constrain_by_value>
      <value_type>TEXT</value_type>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="9971e121eaaa6f83-4d728fd6-45d04086-912bb70e-65fc5d4488161f0136486644"><ac:plain-text-body><![CDATA[       <value_operator>LIKE[end]</value_operator>
]]></ac:plain-text-body></ac:structured-macro>
      <value_constraint> NEG </value_constraint>
 </constrain_by_value>

Select * from  observation_fact where
Concept_cd in (select concept_Cd from concept_dimension where ..)
and
valtype_cd = 'T' and
 tval_char  LIKE '%NEG'

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="01b5f81cb40b17c9-337f2750-4f214026-a57e8272-132d34b0b865b97f39ce70a5"><ac:plain-text-body><![CDATA[

LIKE[contains]
]]></ac:plain-text-body></ac:structured-macro>
<constrain_by_value>
      <value_type>TEXT</value_type>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="61666d04f0c12f3a-05b8f0e2-48b546b1-a8bfa870-8a01ba18f03633e72b64716f"><ac:plain-text-body><![CDATA[       <value_operator>LIKE[contains] </value_operator>
]]></ac:plain-text-body></ac:structured-macro>
      <value_constraint>NEG </value_constraint>
 </constrain_by_value>

Select * from  observation_fact where
concept_cd in (select concept_Cd from concept_dimension where ..)
and
valtype_cd = 'T' and
 tval_char  LIKE '%NEG%'

...