r3368: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 10 Nov 2002 22:43:07 +0000 (22:43 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 10 Nov 2002 22:43:07 +0000 (22:43 +0000)
classes.lisp
data-structures.lisp
debian/changelog
parse-2002.lisp
sql-classes.lisp

index 3e40a53527b421662c6f8b11fe77bb3454e12f79..aaa932ab7535589673fb99b12fa66c1edece8841 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Apr 2000
 ;;;;
-;;;; $Id: classes.lisp,v 1.10 2002/11/04 19:19:04 kevin Exp $
+;;;; $Id: classes.lisp,v 1.11 2002/11/10 22:39:15 kevin Exp $
 ;;;;
 ;;;; This file, part of UMLisp, is
 ;;;;    Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D.
   (:ref-fields (sab find-bsab-sab))
   (:fields (sab :string) (code :string) (atn :string) (atv :cdata)))
 
+(defclass usab (umlsclass)
+  ((vcui :type fixnum :initarg :vcui :reader vcui)
+   (rcui :type fixnum :initarg :rcui :reader rcui)
+   (vsab :type string :initarg :vsab :reader vsab)
+   (rsab :type string :initarg :rsab :reader rsab)
+   (son :type string :initarg :son :reader son)
+   (sf :type string :initarg :sf :reader sf)
+   (sver :type string :initarg :sver :reader sver)
+   (mstart :type string :initarg :mstart :reader mstart)
+   (mend :type string :initarg :mend :reader mend)
+   (imeta :type string :initarg :imeta :reader imeta)
+   (rmeta :type string :initarg :rmeta :reader rmeta)
+   (slc :type string :initarg :slc :reader slc)
+   (scc :type string :initarg :scc :reader scc)
+   (srl :type fixnum :initarg :srl :reader srl)
+   (tfr :type fixnum :initarg :tfr :reader tfr)
+   (cfr :type fixnum :initarg :cfr :reader cfr)
+   (cxty :type string :initarg :cxty :reader cxty)
+   (ttyl :type string :initarg :ttyl :reader ttyl)
+   (atnl :type string :initarg :atnl :reader atnl)
+   (lat :type string :initarg :lat :reader lat)
+   (cenc :type string :initarg :cenc :reader cenc)
+   (curver :type string :initarg :curver :reader curver)
+   (sabin :type string :initarg :sabin :reader sabin))
+  (:metaclass hyperobject-class)
+  (:default-initargs :vcui nil :rcui nil :vsab nil :rsab nil :son nil :sf nil
+                    :sver nil :mstart nil :mend nil :imeta nil :rmeta nil
+                    :slc nil :scc nil :srl nil :tfr nil :cfr nil :cxty nil
+                    :ttyl nil :atnl nil :lat nil :cenc nil :curver nil
+                    :sabin nil)
+  (:title "Source Abbreviation")
+  (:ref-fields (rsab find-ucon-sab))
+  (:fields (vcui :string fmt-cui) (rcui :string fmt-cui)
+          (vsab :string) (rsab :string) (son :cdata) (sf :string)
+          (sver :string) (mstart :string) (mend :string) (imeta :string)
+          (rmeta :string) (slc :cdata) (scc :cdata) (srl :fixnum)
+          (tfr :commainteger) (cfr :commainteger) (cxty :string)
+          (ttyl :string) (atnl :string) (lat :string) (cenc :string)
+          (curver :string) (sabin :string)))
+
 (defclass uso (umlsclass)
   ((sab :type string :initarg :sab :reader sab)
    (code :type string :initarg :code :reader code)
index 15684ebd1214db5bf11758dc87f53f31b25512fc..0d8a291d871d3bb3cc2ed7787f3e89f2a97a5106 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Apr 2000
 ;;;;
-;;;; $Id: data-structures.lisp,v 1.3 2002/10/09 23:03:41 kevin Exp $
+;;;; $Id: data-structures.lisp,v 1.4 2002/11/10 22:39:15 kevin Exp $
 ;;;;
 ;;;; This file, part of UMLisp, is
 ;;;;    Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D.
@@ -23,7 +23,7 @@
 ;;; Paths for files
 
 (defvar *umls-path*
-  (make-pathname :directory '(:absolute "data" "umls" "2002AC"))
+  (make-pathname :directory '(:absolute "data" "umls" "2002AD"))
   "Path for base of UMLS data files")
 
 (defvar *meta-path* 
index 6ef75d3483d142a2a354535f8b2a7973bf3e5825..8af9096f081ad8250e09cb1b25a0cce95b7c1651 100644 (file)
@@ -1,3 +1,9 @@
+cl-umlisp (2.0-1) unstable; urgency=low
+
+  * Support UMLS 2002AD
+
+ -- Kevin M. Rosenberg <kmr@debian.org>  Fri,  8 Nov 2002 09:40:01 -0700
+
 cl-umlisp (1.3.1-1) unstable; urgency=low
 
   * Remove 'load-compiled-op from changelog
index 67a4e0274a80acff2b8b8993e88f430f8baf0946..9d76d2e15382265c96ae4676b81186f1bb43a0ce 100644 (file)
@@ -8,7 +8,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Apr 2000
 ;;;;
-;;;; $Id: parse-2002.lisp,v 1.4 2002/10/14 09:25:20 kevin Exp $
+;;;; $Id: parse-2002.lisp,v 1.5 2002/11/10 22:39:15 kevin Exp $
 ;;;;
 ;;;; This file, part of UMLisp, is
 ;;;;    Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D.
       ;;; LEX columns
       ("EUI" sql-u) ("EUI2" sql-u)
       ;;; Semantic net columns
-      ("UI" sql-u) ("UI2" sql-u) ("UI3" sql-u)) 
+      ("UI" sql-u) ("UI2" sql-u) ("UI3" sql-u)
+      ;; New fields for 2002AD
+      ("RCUI" sql-u) ("VCUI" sql-u) ("CFR" sql-i) ("TFR" sql-i)
+      ) 
     "SQL data types for each non-string column")
 
 (defparameter +custom-tables+
       ;; Semantic NET indices
       ("UI" "SRSTRE1") ("UI2" "SRSTRE1") ("UI3" "SRSTRE1") 
       ("STY_RL" "SRDEF") ("RT" "SRDEF") ("STY_RL" "SRSTR") ("STY_RL2" "SRSTR")
-      ("RL" "SRSTR"))
+      ("RL" "SRSTR")
+      ("SRL" "MRSAB") ("RSAB" "MRSAB") ("VSAB" "MRSAB") ("RCUI" "MRSAB")
+      ("VCUI" "MRSAB") ("LAT" "MRSAB"))
   "Columns in files to index")
 
-
 (defparameter +custom-index-cols+
   nil
   #+ignore
index 0718c808f7cb101db3c68b727926a7e190bdc86d..c9e7c3617ab3560dde60dd776d6947a22a340720 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Apr 2000
 ;;;;
-;;;; $Id: sql-classes.lisp,v 1.7 2002/11/07 23:08:00 kevin Exp $
+;;;; $Id: sql-classes.lisp,v 1.8 2002/11/10 22:39:15 kevin Exp $
 ;;;;
 ;;;; This file, part of UMLisp, is
 ;;;;    Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D.
     (nreverse ustys)))
 
 
+(defun find-usab-rsab (rsab)
+  "Find usab for rsab"
+  (aif (car (mutex-sql-query 
+            (format nil "select VCUI,RCUI,VSAB,RSAB,SON,SF,SVER,MSTART,MEND,IMETA,RMETA,SLC,SCC,SRL,TFR,CFR,CXTY,TTYL,ATNL,LAT,CENC,CURVER,SABIN from MRSAB where RSAB='~A'" rsab)))
+       (multiple-value-bind
+            (vcui rcui vsab rsab son sf sver mstart mend imeta rmeta slc scc srl tfr cfr cxty ttyl atnl lat cenc curver sabin) it
+       (make-instance 'usab :vcui (ensure-integer vcui) :rcui (ensure-integer rcui)
+                     :vsab vsab :rsab rsab :son son :sf sf :sver sver :mstart mstart
+                     :mend mend :imeta imeta :rmeta rmeta :slc slc :scc scc
+                     :srl (ensure-integer srl) :tfr (ensure-integer tfr) :cfr (ensure-integer cfr)
+                     :cxty cxty :ttyl ttyl :atnl atnl :lat lat :cenc cenc :curver curver
+                     :sabin sabin))))
+
 (defun find-cui-max ()
   (let ((cui (caar (mutex-sql-query "select max(CUI) from MRCON"))))
     (ensure-integer cui)))