X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=parse-rrf.lisp;h=0842d97135ebc174d7bf9b67be8a384a26816745;hb=8e895602ced5ab847ecc36c1eaa7be1c9a872a22;hp=0f89b148b4e3b3b5476dce43714f1d7aea515ad7;hpb=eadf93ecf9164f5e0a1ec0be102624d1a383f677;p=umlisp.git diff --git a/parse-rrf.lisp b/parse-rrf.lisp index 0f89b14..0842d97 100644 --- a/parse-rrf.lisp +++ b/parse-rrf.lisp @@ -11,7 +11,7 @@ ;;;; $Id$ ;;;; ;;;; This file, part of UMLisp, is -;;;; Copyright (c) 2000-2004 by Kevin M. Rosenberg, M.D. +;;;; Copyright (c) 2000-2006 by Kevin M. Rosenberg, M.D. ;;;; ;;;; UMLisp users are granted the rights to distribute and use this software ;;;; as governed by the terms of the GNU General Public License. @@ -33,12 +33,12 @@ (defun make-preparse-hash-table () (if sui-lrl-hash (progn - (clrhash pfstr-hash) - (clrhash cui-lrl-hash) - (clrhash lui-lrl-hash) - (clrhash sui-lrl-hash) - (clrhash cuisui-lrl-hash) - (clrhash sab-srl-hash)) + (clrhash pfstr-hash) + (clrhash cui-lrl-hash) + (clrhash lui-lrl-hash) + (clrhash sui-lrl-hash) + (clrhash cuisui-lrl-hash) + (clrhash sab-srl-hash)) (setf pfstr-hash (make-hash-table :size 800000) cui-lrl-hash (make-hash-table :size 800000) @@ -49,8 +49,7 @@ (defun ensure-preparse (&optional (force-read nil)) (when (or force-read (not *preparse-hash-init?*)) - (make-preparse-hash-table) - (setq *preparse-hash-init?* t)) + (make-preparse-hash-table)) (with-umls-file (line "MRCONSO.RRF") (let ((cui (parse-ui (nth 0 line))) (lui (parse-ui (nth 3 line))) @@ -69,7 +68,8 @@ (multiple-value-bind (val found) (gethash sab sab-srl-hash) (declare (ignore val)) (unless found - (setf (gethash sab sab-srl-hash) srl)))))) + (setf (gethash sab sab-srl-hash) srl))))) + (setq *preparse-hash-init?* t)) (defun pfstr-hash (cui) (gethash cui pfstr-hash)) (defun cui-lrl (cui) (gethash cui cui-lrl-hash)) @@ -98,10 +98,11 @@ (defparameter +col-datatypes+ '(("AV" sql-f) ("BTS" sql-i) ("CLS" sql-i) ("COF" sql-i) ("CUI1" sql-u) ("AUI" sql-u) ("AUI1" sql-u) ("AUI2" sql-u) ("PCUI" sql-u) - ("PLUI" sql-u) + ("PLUI" sql-u) ("PAUI" sql-u) ("CUI2" sql-u) ("CUI" sql-u) ("CXN" sql-s) ("FR" sql-i) ("LRL" sql-s) ("LUI" sql-u) ("MAX" sql-s) ("MIN" sql-s) ("RANK" sql-s) ("REF" sql-c) ("RNK" sql-s) ("RWS" sql-i) ("SRL" sql-s) ("SUI" sql-u) ("TUI" sql-u) + ("MAPRANK" sql-s) ;;; Custom columns ("KCUISUI" sql-l) ("KCUILUI" sql-l) ("KCUILRL" sql-i) ("KLUILRL" sql-i) ("KSUILRL" sql-i) @@ -112,6 +113,7 @@ ("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) + ;; New fields for 2004AA ("MAPSETCUI" sql-u) ) "SQL data types for each non-string column") @@ -228,8 +230,10 @@ ("UI" "SRSTRE1") ("UI2" "SRSTRE1") ("UI3" "SRSTRE1") ("STY_RL" "SRDEF") ("RT" "SRDEF") ("STY_RL" "SRSTR") ("STY_RL2" "SRSTR") ("RL" "SRSTR") + ("SRL" "MRSAB") ("RSAB" "MRSAB") ("VSAB" "MRSAB") ("RCUI" "MRSAB") - ("VCUI" "MRSAB") ("LAT" "MRSAB")) + ("VCUI" "MRSAB") ("LAT" "MRSAB") ("MAPSETCUI" "MRMAP") ("MAPSETCUI" "MRSMAP") + ("CUI" "MRHIER") ("AUI" "MRHIER") ("PAUI" "MRHIER")) "Columns in files to index")