From a209b7326f8b762d28daa65dafa30224a84a26ce Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sun, 10 Nov 2002 22:43:07 +0000 Subject: [PATCH] r3368: *** empty log message *** --- classes.lisp | 42 +++++++++++++++++++++++++++++++++++++++++- data-structures.lisp | 4 ++-- debian/changelog | 6 ++++++ parse-2002.lisp | 12 ++++++++---- sql-classes.lisp | 15 ++++++++++++++- 5 files changed, 71 insertions(+), 8 deletions(-) diff --git a/classes.lisp b/classes.lisp index 3e40a53..aaa932a 100644 --- a/classes.lisp +++ b/classes.lisp @@ -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. @@ -65,6 +65,46 @@ (: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) diff --git a/data-structures.lisp b/data-structures.lisp index 15684eb..0d8a291 100644 --- a/data-structures.lisp +++ b/data-structures.lisp @@ -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* diff --git a/debian/changelog b/debian/changelog index 6ef75d3..8af9096 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +cl-umlisp (2.0-1) unstable; urgency=low + + * Support UMLS 2002AD + + -- Kevin M. Rosenberg Fri, 8 Nov 2002 09:40:01 -0700 + cl-umlisp (1.3.1-1) unstable; urgency=low * Remove 'load-compiled-op from changelog diff --git a/parse-2002.lisp b/parse-2002.lisp index 67a4e02..9d76d2e 100644 --- a/parse-2002.lisp +++ b/parse-2002.lisp @@ -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. @@ -143,7 +143,10 @@ ;;; 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+ @@ -255,10 +258,11 @@ ;; 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 diff --git a/sql-classes.lisp b/sql-classes.lisp index 0718c80..c9e7c36 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.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. @@ -579,6 +579,19 @@ (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))) -- 2.34.1