Home » Server Options » Text & interMedia » Find subset of string (Oracle 11g, Win 7)
Find subset of string [message #636011] Tue, 14 April 2015 11:14 Go to previous message
rajivn786
Messages: 161
Registered: January 2010
Senior Member
Hi,

I am having a hard time to extract text.

Here is the sample create & insert statements.
 

Create table x (a varchar2(4000)); 
Insert into x values ('CT head neg (-) Pt reportedly has 20-39% stenosis of carotid arteries. EKG NSR@70bpm, Trop (-) x2 Unlikely to be cardiac in etiology. Likely ');       
Insert into x values ('Midbrain lacunar CVA+L 40-59% carotid stenosis+TIA 6/2010 (finished Stein sr center outpt PT+pt reports improving word finding.  Did reschedule fu  outpt PT');
Insert into x values ('Repeat Carotid Dopplers 12/12: <20% stenosis b/l at the bifurcation  TTE 10/2014: EF 49%  TEE: 12/15 EF 35% and fibroelastic lesion of the aortic valve  EEG');

CREATE  /*+ parallel(x 32) */    index x_idx on  x (a) indextype
        is ctxsys.context parameters ('stoplist ctxsys.empty_stoplist')
        parallel 32 
       


The o/p needed

20-39%
40-59%
<20%
 


So, effectively, the output should search for term " "stenosis" and ( "carotid" or "%") within 5 words & pick up the range mentioned before or after term stenosis which will be followed or preceeded within 2/3 words mostly.

The code which I started is :

Select  --+ parallel(t 32)
  a 
  from   x
 where contains(a, 'near((stenosis,carotid={%}), 5)') > 0    
 
Read Message
Read Message
Previous Topic: Abbreviations and acronyms thesaurus
Next Topic: wild card search on CLOB not giving require result in 12C
Goto Forum:
  


Current Time: Wed Apr 24 05:12:48 CDT 2024