r4971: Auto commit for Debian build
authorKevin M. Rosenberg <kevin@rosenberg.net>
Fri, 16 May 2003 08:34:00 +0000 (08:34 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Fri, 16 May 2003 08:34:00 +0000 (08:34 +0000)
sql-classes.lisp

index 02182f67a0c6fe126df92a0f19cdc86d968a56b4..5c6ddea8f1e931a7462f4da27d37c67cbf696e2b 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Author:        Kevin M. Rosenberg
 ;;;; Date Started:  Apr 2000
 ;;;;
-;;;; $Id: sql-classes.lisp,v 1.82 2003/05/16 03:10:18 kevin Exp $
+;;;; $Id: sql-classes.lisp,v 1.83 2003/05/16 08:34:00 kevin Exp $
 ;;;;
 ;;;; This file, part of UMLisp, is
 ;;;;    Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D.
@@ -463,14 +463,17 @@ is OBJNAME from TABLE where WHERE-NAME field = WHERE-VALUE with FIELDS"
   (ensure-cui-integer cui)
   (ensure-lui-integer lui)
   (ensure-sui-integer sui)
-  (let ((ls (format nil "select CODE,ATN,SAB,ATV from MRSAT where ")))
+  (let ((ls "select CODE,ATN,SAB,ATV from MRSAT where "))
     (cond
-      (sui (string-append ls (format nil "KCUISUI=~D" (make-cuisui cui sui))))
-      (lui (string-append ls (format nil "KCUILUI=~D and sui=0"
-                                    (make-cuilui cui lui))))
-      (t (string-append ls (format nil "cui=~D and lui=0 and sui=0" cui))))
+      (sui (string-append ls "KCUISUI="
+                         (integer-string (make-cuisui cui sui) 14)))
+      (lui (string-append ls "KCUILUI="
+                         (integer-string (make-cuilui cui lui) 14)
+                         " and sui=0"))
+      (t (string-append ls "cui=" (prefixed-fixnum-string cui nil 7)
+                       " and lui=0 and sui=0")))
     (when srl
-      (string-append ls (format nil " and KSRL <= ~D" srl)))
+      (string-append ls " and KSRL<=" (prefixed-fixnum-string srl nil 3)))
     (loop for tuple in (mutex-sql-query ls) collect 
          (destructuring-bind (code atn sab atv) tuple
            (make-instance 'usat :code code :atn atn :sab sab :atv atv)))))