Clinical trials curation

From DISI
Revision as of 17:41, 17 August 2017 by Frodo (talk | contribs) (asdf)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is the curator page for clinical trials curation.

update subname set name=regexp_replace(name, ' *.inn.*$',) where name like '%[inn%';
begin; delete from subname where length(name) < 10 and name like '% %';
begin; delete from subname where length(name) < 7 and name like '9%'; 1-9
begin; update subname set terms=to_tsvector('english',name),query=plainto_tsquery(name);
  1. to solve the no lexemees
select * from subname where numnode(plainto_tsquery(name))=0 limit 10;
  1. create the mapping table between them....
insert into clinical1.ct2subint (sub_id_fk, ct2int_fk)
select distinct sub_id_fk, ct2int_id from ctinttemp as ct
join clinical1.ct2 on ct.code=ct_code
join clinical1.ct2int as cti on ct2_id=cti.ct2_fk and cti.name=ct.name
join subname on ct.terms@@subname.query
where not exists(select 1 from clinical1.ct2subint as e where e.sub_id_fk=subname.sub_id_fk and e.ct2int_fk=cti.ct2int_id);