X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql-classes.lisp;h=0718c808f7cb101db3c68b727926a7e190bdc86d;hb=2b7ed71b18cf7713d80631ae32850959a9ef9355;hp=60eeb23389809e16ae3a3feb29b3125c09b06408;hpb=ef96032ed2706ac8934640773fa5bec6747abbb7;p=umlisp.git diff --git a/sql-classes.lisp b/sql-classes.lisp index 60eeb23..0718c80 100644 --- a/sql-classes.lisp +++ b/sql-classes.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: sql-classes.lisp,v 1.6 2002/10/18 03:57:39 kevin Exp $ +;;;; $Id: sql-classes.lisp,v 1.7 2002/11/07 23:08:00 kevin Exp $ ;;;; ;;;; This file, part of UMLisp, is ;;;; Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D. @@ -183,6 +183,22 @@ ls :database db)))) +(defun map-ucon-all (fn &key (srl *current-srl*)) + "Return list of all ucon's" + (let ((ls "select distinct CUI,KPFSTR,KCUILRL from MRCON")) + (when srl + (string-append ls (format nil " where KCUILRL <= ~d" srl))) + (string-append ls " order by CUI asc") + (with-sql-connection (db) + (clsql:map-query + nil + #'(lambda (cui pfstr cuilrl) + (funcall fn + (make-instance 'ucon :cui (ensure-integer cui) + :pfstr pfstr + :lrl (ensure-integer cuilrl)))) + ls + :database db)))) (defun find-udef-cui (cui &key (srl *current-srl*))