X-Git-Url: http://git.kpe.io/?p=umlisp.git;a=blobdiff_plain;f=parse-rrf.lisp;h=ad9105aa546ee2b9e33b5cfbddbb5d6c879b5d4b;hp=960653e5a9982960212966a699eef61f2df058ab;hb=f4ea91e2cf0eb22db02498e54d1f75ef5dcd4239;hpb=5a49f7c38351f819fe9b59f565f6e241aa2ffe0d diff --git a/parse-rrf.lisp b/parse-rrf.lisp index 960653e..ad9105a 100644 --- a/parse-rrf.lisp +++ b/parse-rrf.lisp @@ -2,7 +2,7 @@ ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; -;;;; Name: parse-2002.lisp +;;;; Name: parse-rrf.lisp ;;;; Purpose: Parsing and SQL insertion routines for UMLisp which may ;;;; change from year to year ;;;; Author: Kevin M. Rosenberg @@ -40,11 +40,11 @@ (clrhash cuisui-lrl-hash) (clrhash sab-srl-hash)) (setf - pfstr-hash (make-hash-table :size 800000) - cui-lrl-hash (make-hash-table :size 800000) - lui-lrl-hash (make-hash-table :size 1500000) - sui-lrl-hash (make-hash-table :size 1500000) - cuisui-lrl-hash (make-hash-table :size 1800000) + pfstr-hash (make-hash-table :size 1300000) + cui-lrl-hash (make-hash-table :size 1300000) + lui-lrl-hash (make-hash-table :size 4600000) + sui-lrl-hash (make-hash-table :size 5100000) + cuisui-lrl-hash (make-hash-table :size 2000000) sab-srl-hash (make-hash-table :size 100 :test 'equal)))) (defun ensure-preparse (&optional (force-read nil)) @@ -57,10 +57,12 @@ (sui (parse-ui (nth 5 line))) (sab (nth 11 line)) (srl (parse-integer (nth 15 line)))) + ;; pfstr deprecated by KPKENG field in MRCONSO + #+nil (unless (gethash cui pfstr-hash) ;; if haven't stored pfstr for cui - (if (and (string-equal (nth 1 line) "ENG") ; LAT - (string-equal (nth 2 line) "P") ; ts - (string-equal (nth 4 line) "PF")) ; stt + (when (and (string-equal (nth 1 line) "ENG") ; LAT + (string-equal (nth 2 line) "P") ; ts + (string-equal (nth 4 line) "PF")) ; stt (setf (gethash cui pfstr-hash) (nth 14 line)))) (set-lrl-hash cui srl cui-lrl-hash) (set-lrl-hash lui srl lui-lrl-hash) @@ -73,7 +75,7 @@ (setq *preparse-hash-init?* t) t) - (defun pfstr-hash (cui) (gethash cui pfstr-hash)) + #+nil (defun pfstr-hash (cui) (gethash cui pfstr-hash)) (defun cui-lrl (cui) (gethash cui cui-lrl-hash)) (defun lui-lrl (lui) (gethash lui lui-lrl-hash)) (defun sui-lrl (sui) (gethash sui sui-lrl-hash)) @@ -100,7 +102,7 @@ (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) ("PAUI" sql-u) + ("PLUI" sql-u) ("PAUI" sql-u) ("RUI" 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) ("PTR" sql-c) @@ -210,10 +212,14 @@ (defparameter +index-cols+ '(("CUI1" "MRCOC") ("CUI" "MRCONSO") ("LUI" "MRCONSO") ("SRL" "MRCONSO") ("AUI" "MRCONSO") ("KPFENG" "MRCONSO") - ("SUI" "MRCONSO") ("CUI" "MRDEF") - ("CUI1" "MRREL") ("CUI" "MRSAT") ("LUI" "MRSAT") ("SUI" "MRSAT") - ("CUI" "MRSTY") - ("TUI" "MRSTY") ("CUI" "MRXNS_ENG") + ("SUI" "MRCONSO") ("SAUI" "MRCONSO") ("CODE" "MRCONSO") + ("SCUI" "MRCONSO") + ("CUI" "MRDEF") + ("CUI1" "MRREL") ("CUI2" "MRREL") + ("RUI" "MRREL") ("AUI1" "MRREL") ("AUI2" "MRREL") + ("CUI" "MRSAT") ("LUI" "MRSAT") ("SUI" "MRSAT") + ("METAUI" "MRSAT") ("ATN" "MRSAT") + ("CUI" "MRSTY") ("TUI" "MRSTY") ("CUI" "MRXNS_ENG") ("AUI" "MRHIER") ("PTR" "MRHIER" 255) ("CUI" "MRHIER") ("CXN" "MRHIER") ("RELA" "MRHIER") ("PAUI" "MRHIER") ("SAB" "MRHIER") #+ignore ("NSTR" "MRXNS_ENG" 10)