r4858: *** empty log message ***
[umlisp.git] / sql-classes.lisp
index a66a455495ccc4ef02bd745af308dc11b39ebc3b..608c463ad6a7e44020c5bd3be8cac675b13d9411 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Author:        Kevin M. Rosenberg
 ;;;; Date Started:  Apr 2000
 ;;;;
-;;;; $Id: sql-classes.lisp,v 1.72 2003/05/06 02:41:01 kevin Exp $
+;;;; $Id: sql-classes.lisp,v 1.74 2003/05/06 21:52:34 kevin Exp $
 ;;;;
 ;;;; This file, part of UMLisp, is
 ;;;;    Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D.
@@ -277,7 +277,7 @@ is OBJNAME from TABLE where WHERE-NAME field = WHERE-VALUE with FIELDS"
 (defun find-ucoc-cui (cui &key (srl *current-srl*))
   "Return a list of ucoc for cui"
   (with-umlisp-query (mrcoc (cui2 soc cot cof coa kpfstr2) srl cui1
-                           (parse-cui cui) :lrl "KSRL" :order (cof asc))
+                           (parse-cui cui) :lrl klrl :order (cof asc))
     (setq cui2 (ensure-integer cui2))
     (when (zerop cui2) (setq cui2 nil))
     (make-instance 'ucoc :cui1 (parse-cui cui) :cui2 (ensure-integer cui2)
@@ -287,7 +287,7 @@ is OBJNAME from TABLE where WHERE-NAME field = WHERE-VALUE with FIELDS"
 (defun find-ucoc-cui2 (cui2 &key (srl *current-srl*))
   "Return a list of ucoc for cui2"
   (with-umlisp-query (mrcoc (cui1 soc cot cof coa kpfstr2) srl cui2
-                           (parse-cui cui2) :lrl "KSRL" :order (cof asc))
+                           (parse-cui cui2) :lrl klrl :order (cof asc))
     (setq cui2 (ensure-integer cui2))
     (when (zerop cui2) (setq cui2 nil))
     (make-instance 'ucoc :cui1 (ensure-integer cui1) :cui2 (parse-cui cui2)
@@ -505,6 +505,18 @@ is OBJNAME from TABLE where WHERE-NAME field = WHERE-VALUE with FIELDS"
                                 :order (cui asc sui asc))
     (find-ustr-cuisui (ensure-integer cui) (ensure-integer sui) :srl srl)))
 
+(defun find-ucon-noneng-word (word &key (srl *current-srl*) (like nil))
+  "Return list of ucons that match non-english word"
+  (with-umlisp-query-eval ('mrxw_noneng '(cui) srl 'wd word :like like
+                                       :distinct t :lrl 'klrl :order '(cui asc))
+    (find-ucon-cui cui :srl srl)))
+
+(defun find-ustr-noneng-word (word &key (srl *current-srl*))
+  "Return list of ustrs that match non-english word"
+  (with-umlisp-query (mrxw_noneng (cui sui) srl wd word :lrl klrl
+                                 :order (cui asc sui asc))
+    (find-ustr-cuisui (ensure-integer cui) (ensure-integer sui) :srl srl)))
+
 ;; Special tables
 
 (defun find-usrl-all ()