r4837: Auto commit for Debian build
[umlisp.git] / parse-2002.lisp
index 67a4e0274a80acff2b8b8993e88f430f8baf0946..79119fd9639192d15c498a00b4b6fe739256ab93 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.6 2003/05/06 06:09:29 kevin Exp $
 ;;;;
 ;;;; This file, part of UMLisp, is
 ;;;;    Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D.
        (setf (gethash key hash) lrl))))
 
 ;; UMLS file and column structures
-
-(defstruct (umls-file)
-  "Record for each UMLS File"
-  fil table des fmt cls rws bts fields colstructs)
-
-(defstruct (umls-col)
-  "Record for each UMLS Column in each file"
-  col des ref min av max fil sqltype
-  dty ;; new in 2002 umls: suggested SQL datatype
-  parsefunc quotechar datatype custom-value-func)
-
 ;;; SQL datatypes symbols
 ;;; sql-u - Unique identifier
 ;;; sql-s - Small integer (16-bit)
       ;;; 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+
        (lambda (x) (format nil "~d" (make-cuisui (parse-ui (nth 2 x)) (parse-ui (nth 4 x))))))
       ("MRXW.NONENG" "LAT" "CHAR" 3 (lambda (x) (nth 0 x)))
       ("MRXW.NONENG" "WD"  "CHAR" 200  (lambda (x) (nth 1 x)))
-      ("MRXW.NONENG" "CUI" "INTEGER" 0 (lambda (x) (nth 2 x)))
-      ("MRXW.NONENG" "LUI" "INTEGER" 0 (lambda (x) (nth 3 x)))
-      ("MRXW.NONENG" "SUI" "INTEGER" 0 (lambda (x) (nth 4 x)))
+      ("MRXW.NONENG" "CUI" "INTEGER" 0 (lambda (x) (parse-ui (nth 2 x))))
+      ("MRXW.NONENG" "LUI" "INTEGER" 0 (lambda (x) (parse-ui (nth 3 x))))
+      ("MRXW.NONENG" "SUI" "INTEGER" 0 (lambda (x) (parse-ui (nth 4 x))))
       ("MRXW.NONENG" "KCUISUI" "BIGINT" 0 
        (lambda (x) (format nil "~d" (make-cuisui (parse-ui (nth 2 x)) (parse-ui (nth 4 x)))))))
   "Custom columns to create.(filename, col, sqltype, value-func).")
       ;; 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