+(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))))