X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;ds=sidebyside;f=sql-classes.lisp;h=293c961b43157fb7d6af9c7fa97c696a0a325bf1;hb=8e895602ced5ab847ecc36c1eaa7be1c9a872a22;hp=2b7869cb3438a2bcae33eab850b628a532276b15;hpb=fab71e6fecf552789593d979b85cea58099f236d;p=umlisp.git diff --git a/sql-classes.lisp b/sql-classes.lisp index 2b7869c..293c961 100644 --- a/sql-classes.lisp +++ b/sql-classes.lisp @@ -10,7 +10,7 @@ ;;;; $Id$ ;;;; ;;;; This file, part of UMLisp, is -;;;; Copyright (c) 2000-2003 by Kevin M. Rosenberg, M.D. +;;;; Copyright (c) 2000-2006 by Kevin M. Rosenberg, M.D. ;;;; ;;;; UMLisp users are granted the rights to distribute and use this software ;;;; as governed by the terms of the GNU General Public License. @@ -507,9 +507,10 @@ is OBJNAME from TABLE where WHERE-NAME field = WHERE-VALUE with FIELDS" (defun find-ucxt-cuisui (cui sui &key (srl *current-srl*)) (ensure-cui-integer cui) (ensure-sui-integer sui) - (collect-umlisp-query (mrcxt (sab code cxn cxl cxs cui2 hcd rela xc) + (collect-umlisp-query (mrcxt (sab rank code cxn cxl cxs cui2 hcd rela xc) srl kcuisui (make-cuisui cui sui) :lrl ksrl) - (make-instance 'ucxt :sab sab :code code + (make-instance 'ucxt :sab sab :code code + :rank rank :cxn (ensure-integer cxn) :cxl cxl :cxs cxs :hcd hcd :rela rela :xc xc :cui2 (ensure-integer cui2)))) @@ -583,16 +584,18 @@ is OBJNAME from TABLE where WHERE-NAME field = WHERE-VALUE with FIELDS" (defun find-usab-by-key (key-name key) "Find usab for a key" (collect-umlisp-query-eval ('mrsab '(vcui rcui vsab rsab son sf sver vstart - vend imeta rmeta slc scc srl tfr cfr cxty - ttyl atnl lat cenc curver sabin) - nil key-name key :single t) - (make-instance 'usab :vcui (ensure-integer vcui) - :rcui (ensure-integer rcui) :vsab vsab :rsab rsab :son son - :sf sf :sver sver :vstart vstart :vend vend :imeta imeta - :rmeta rmeta :slc slc :scc scc :srl (ensure-integer srl) - :tfr (ensure-integer tfr) :cfr (ensure-integer cfr) - :cxty cxty :ttyl ttyl :atnl atnl :lat lat :cenc cenc - :curver curver :sabin sabin))) + vend imeta rmeta slc scc srl tfr cfr cxty + ttyl atnl lat cenc curver sabin + ssn scit) + nil key-name key :single t) + (make-instance 'usab :vcui (ensure-integer vcui) + :rcui (ensure-integer rcui) :vsab vsab :rsab rsab :son son + :sf sf :sver sver :vstart vstart :vend vend :imeta imeta + :rmeta rmeta :slc slc :scc scc :srl (ensure-integer srl) + :tfr (ensure-integer tfr) :cfr (ensure-integer cfr) + :cxty cxty :ttyl ttyl :atnl atnl :lat lat :cenc cenc + :curver curver :sabin sabin + :ssn ssn :scit scit))) (defun find-usab-rsab (rsab) "Find usab for rsab" @@ -866,7 +869,7 @@ is OBJNAME from TABLE where WHERE-NAME field = WHERE-VALUE with FIELDS" (ignore-errors (sql-execute "drop table USTATS" conn)) (sql-execute "create table USTATS (NAME varchar(160), COUNT bigint, SRL integer)" conn) - (dotimes (srl 4) + (dotimes (srl 5) (insert-ustats-count conn "Concept Count" "MRCONSO" "distinct CUI" "KCUILRL" srl) (insert-ustats-count conn "Term Count" "MRCONSO" "distinct KCUILUI" "KCUILRL" srl) (insert-ustats-count conn "Distinct Term Count" "MRCONSO" "distinct LUI" "KLUILRL" srl)