+(defun find-ucon-cui-old (cui &key (srl *current-srl*))
+ "Find ucon for a cui"
+ (when (stringp cui) (setq cui (parse-cui cui)))
+ (when cui
+ (let ((ls (format nil "select KPFSTR,KCUILRL from MRCON where CUI=~d" cui)))
+ (when srl
+ (string-append ls (format nil " and KCUILRL <= ~d" srl)))
+ (string-append ls " limit 1")
+ (awhen (car (mutex-sql-query ls))
+ (make-instance 'ucon :cui cui :pfstr (car it)
+ :lrl (ensure-integer (cadr it)))))))