X-Git-Url: http://git.kpe.io/?p=umlisp.git;a=blobdiff_plain;f=classes.lisp;h=ce08ece3ac09671aebc21c4f17686e955b3d129a;hp=cee2fcd3b8db1569c77bf39a97d5713f336a58c8;hb=HEAD;hpb=51451987c4fee40b475e014ee5c801b1657d119d diff --git a/classes.lisp b/classes.lisp index cee2fcd..ce08ece 100644 --- a/classes.lisp +++ b/classes.lisp @@ -7,10 +7,8 @@ ;;;; Author: Kevin M. Rosenberg ;;;; Created: Apr 2000 ;;;; -;;;; $Id$ -;;;; ;;;; This file, part of UMLisp, is -;;;; Copyright (c) 2000-2006 by Kevin M. Rosenberg, M.D. +;;;; Copyright (c) 2000-2010 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. @@ -32,15 +30,15 @@ (:default-print-slots sab srl) (:description "Custom Table: Source Restriction Level")) - + (defclass urank (umlsclass) ((rank :value-type fixnum :initarg :rank :reader rank) (sab :value-type string :initarg :sab :reader sab) (tty :value-type string :initarg :tty :reader tty) - (suppres :value-type string :initarg :suppres :reader suppres)) + (suppress :value-type string :initarg :suppress :reader suppress)) (:metaclass hyperobject-class) (:user-name "Rank") - (:default-print-slots rank sab tty suppres)) + (:default-print-slots rank sab tty suppress)) (defclass udef (umlsclass) ((def :value-type cdata :initarg :def :reader def) @@ -64,7 +62,7 @@ (rcui :value-type fixnum :initarg :rcui :reader rcui :print-formatter fmt-cui) (vsab :value-type string :initarg :vsab :reader vsab) (rsab :value-type string :initarg :rsab :reader rsab :hyperlink find-ustr-sab - :hyperlink-parameters (("subobjects" . "no"))) + :hyperlink-parameters (("subobjects" . "no"))) (son :value-type string :initarg :son :reader son) (sf :value-type string :initarg :sf :reader sf) (sver :value-type string :initarg :sver :reader sver) @@ -89,36 +87,17 @@ (:metaclass hyperobject-class) (:user-name "Source Abbreviation") (:default-print-slots vcui rcui vsab rsab son sf sver vstart vend imeta - rmeta slc scc srl tfr cfr cxty ttyl atnl lat cenc - curver sabin ssn scit)) - -(defclass ucxt (umlsclass) - ((sab :value-type string :initarg :sab :reader sab :hyperlink find-usab-rsab) - (code :value-type string :initarg :code :reader code) - (cxn :value-type fixnum :initarg :cxn :reader cxn) - (cxl :value-type string :initarg :cxl :reader cxl) - (rank :value-type string :initarg :rank :reader rank) - (cxs :value-type cdata :initarg :cxs :reader cxs) - (cui2 :value-type fixnum :initarg :cui2 :reader cui2 :hyperlink find-ucon-cui - :print-formatter fmt-cui) - (aui2 :value-type fixnum :initarg :aui2 :reader aui2 :hyperlink find-ucon-aui - :print-formatter fmt-aui) - (hcd :value-type string :initarg :hcd :reader hcd) - (rela :value-type string :initarg :rela :reader rela) - (xc :value-type string :initarg :xc :reader xc) - (cvf :value-type string :initarg :cvf :reader cvf)) - (:metaclass hyperobject-class) - (:user-name "Context") - (:default-print-slots sab code cxn cxl hcd rela xc cui2 cxs)) + rmeta slc scc srl tfr cfr cxty ttyl atnl lat cenc + curver sabin ssn scit)) (defclass uhier (umlsclass) ((cui :value-type fixnum :initarg :cui :reader cui :hyperlink find-ucon-cui - :print-formatter fmt-cui) + :print-formatter fmt-cui) (aui :value-type fixnum :initarg :aui :reader aui :hyperlink find-ucon-aui - :print-formatter fmt-aui) + :print-formatter fmt-aui) (cxn :value-type fixnum :initarg :cxn :reader cxn) (paui :value-type fixnum :initarg :paui :reader paui - :print-formatter fmt-aui) + :print-formatter fmt-aui) (sab :value-type string :initarg :sab :reader sab :hyperlink find-usab-rsab) (rela :value-type string :initarg :rela :reader rela) (ptr :value-type string :initarg :ptr :reader ptr) @@ -130,60 +109,49 @@ (defclass ustr (umlsclass) ((sui :value-type fixnum :initarg :sui :reader sui :print-formatter fmt-sui - :hyperlink find-ustr-sui) + :hyperlink find-ustr-sui) (cui :value-type fixnum :initarg :cui :reader cui :print-formatter fmt-cui - :hyperlink find-ucon-cui) + :hyperlink find-ucon-cui) (lui :value-type fixnum :initarg :lui :reader lui :print-formatter fmt-lui - :hyperlink find-uterm-lui) + :hyperlink find-uterm-lui) (cuisui :value-type integer :initarg :cuisui :reader cuisui ) (str :value-type cdata :initarg :str :reader str) (lrl :value-type fixnum :initarg :lrl :reader lrl) (stt :value-type string :initarg :stt :reader stt) (suppress :value-type string :initarg :suppress :reader suppress) (s#so :reader s#so :subobject (find-uso-cuisui cui sui)) - (s#sat :reader s#sat :subobject (find-usat-ui cui lui sui)) - (s#cxt :reader s#cxt :subobject (find-ucxt-cuisui cui sui))) + (s#sat :reader s#sat :subobject (find-usat-ui cui lui sui))) (:metaclass hyperobject-class) (:user-name "String") (:default-print-slots sui stt lrl str suppress)) - + (defclass uso (umlsclass) ((aui :value-type fixnum :initarg :aui :reader aui :print-formatter fmt-aui :hyperlink find-ucon-aui) (cui :value-type fixnum :initarg :cui :reader cui :print-formatter fmt-cui - :hyperlink find-ucon-cui) + :hyperlink find-ucon-cui) (sui :value-type fixnum :initarg :sui :reader sui :print-formatter fmt-sui - :hyperlink find-ucon-sui) + :hyperlink find-ucon-sui) (saui :value-type string :initarg :saui :reader saui) (sdui :value-type string :initarg :sdui :reader sdui) (scui :value-type string :initarg :scui :reader scui) - (tty :value-type string :initarg :tty :reader tty :hyperlink find-btty-tty) + (tty :value-type string :initarg :tty :reader tty) (code :value-type string :initarg :code :reader code) (sab :value-type string :initarg :sab :reader sab :hyperlink find-usab-rsab) (lat :value-type string :initarg :lat :reader lat) (str :value-type cdata :initarg :str :reader str) - (srl :value-type fixnum :initarg :srl :reader srl)) + (srl :value-type fixnum :initarg :srl :reader srl) + (ts :value-type string :initarg :ts :reader ts)) (:metaclass hyperobject-class) (:user-name "Source") - (:default-print-slots aui sab code saui sdui scui tty srl)) - -(defclass ulo (umlsclass) - ((isn :value-type string :initarg :isn :reader isn) - (fr :value-type fixnum :initarg :fr :reader fr) - (un :value-type string :initarg :un :reader un) - (sui :value-type fixnum :initarg :sui :reader sui :print-formatter fmt-sui) - (sna :value-type string :initarg :sna :reader sna) - (soui :value-type string :initarg :soui :reader soui)) - (:metaclass hyperobject-class) - (:user-name "Locator") - (:default-print-slots isn fr un sna soui sui)) + (:default-print-slots aui sab code saui sdui scui tty srl ts)) (defclass uterm (umlsclass) ((lui :value-type fixnum :initarg :lui :reader lui :print-formatter fmt-lui - :hyperlink find-uterm-lui) + :hyperlink find-uterm-lui) (cui :value-type fixnum :initarg :cui :reader cui :print-formatter fmt-cui - :hyperlink find-ucon-cui) + :hyperlink find-ucon-cui) (lat :value-type string :initarg :lat :reader lat) (ts :value-type string :initarg :ts :reader ts) (lrl :value-type fixnum :initarg :lrl :reader lrl) @@ -195,22 +163,22 @@ (defclass usty (umlsclass) ((tui :value-type fixnum :initarg :tui :reader tui :print-formatter fmt-tui - :hyperlink find-ucon-tui - :hyperlink-parameters (("subobjects" . "no"))) + :hyperlink find-ucon-tui + :hyperlink-parameters (("subobjects" . "no"))) (sty :value-type string :initarg :sty :reader sty)) (:metaclass hyperobject-class) (:user-name "Semantic Type") (:default-print-slots tui sty)) (defclass urel (umlsclass) - ((rel :value-type string :initarg :rel :reader rel :hyperlink find-brel-rel) + ((rel :value-type string :initarg :rel :reader rel) (cui1 :value-type fixnum :initarg :cui1 :reader cui1 :print-formatter fmt-cui) (aui1 :value-type fixnum :initarg :aui1 :reader aui1 :print-formatter fmt-aui) (stype1 :value-type string :initarg :stype1 :reader stype1) - (cui2 :value-type fixnum :initarg :cui2 :reader cui2 :hyperlink find-ucon-sui - :print-formatter fmt-cui) + (cui2 :value-type fixnum :initarg :cui2 :reader cui2 :hyperlink find-ucon-cui + :print-formatter fmt-cui) (aui2 :value-type fixnum :initarg :aui2 :reader aui2 :hyperlink find-ucon-aui - :print-formatter fmt-aui) + :print-formatter fmt-aui) (pfstr2 :value-type cdata :initarg :pfstr2 :reader pfstr2) (stype2 :value-type string :initarg :stype2 :reader stype2) (rela :value-type string :initarg :rela :reader rela) @@ -225,14 +193,15 @@ (:metaclass hyperobject-class) (:user-name "Relationship") (:default-print-slots stype1 rel cui2 aui2 stype2 rela rui srui sab sl rg dir suppress pfstr2)) - + +#+mrcoc (defclass ucoc (umlsclass) ((cui1 :value-type fixnum :initarg :cui1 :reader cui1 :print-formatter fmt-cui) (aui1 :value-type fixnum :initarg :aui1 :reader aui1 :print-formatter fmt-aui) (cui2 :value-type fixnum :initarg :cui2 :reader cui2 :print-formatter fmt-cui - :hyperlink find-ucon-cui) + :hyperlink find-ucon-cui) (aui2 :value-type fixnum :initarg :aui2 :reader aui2 :print-formatter fmt-aui - :hyperlink find-ucon-aui) + :hyperlink find-ucon-aui) (pfstr2 :value-type cdata :initarg :pfstr2 :reader pfstr2) (sab :value-type string :initarg :sab :reader sab) (cot :value-type string :initarg :cot :reader cot) @@ -245,21 +214,71 @@ (defclass ucon (umlsclass) ((cui :value-type fixnum :initarg :cui :reader cui :print-formatter fmt-cui - :hyperlink find-ucon-cui) - (lrl :value-type fixnum :initarg :lrl :reader lrl) - (pfstr :value-type cdata :initarg :pfstr :reader pfstr) + :hyperlink find-ucon-cui) + (lrl :value-type fixnum :initarg :lrl :reader lrl + :compute-cached-value (find-lrl-cui cui)) + (pfstr :value-type cdata :initarg :pfstr :reader pfstr + :compute-cached-value (find-pfstr-cui cui)) (s#def :reader s#def :subobject (find-udef-cui cui)) (s#so :reader s#so :subobject (find-uso-cui cui)) + (s#hier :reader s#hier :subobject (find-uhier-cui cui)) + (s#map :reader s#map :subobject (find-umap-cui cui)) + (s#smap :reader s#smap :subobject (find-usmap-cui cui)) (s#sty :reader s#sty :subobject (find-usty-cui cui)) - (s#lo :reader s#lo :subobject (find-ulo-cui cui)) (s#term :reader s#term :subobject (find-uterm-cui cui)) (s#sat :reader s#sat :subobject (find-usat-ui cui)) (s#rel :reader s#rel :subobject (find-urel-cui cui)) - (s#coc :reader s#coc :subobject (find-ucoc-cui cui))) + #+mrcoc (s#coc :reader s#coc :subobject (find-ucoc-cui cui)) + ) (:metaclass hyperobject-class) (:user-name "Concept") (:default-print-slots cui lrl pfstr)) + +(defclass uconso (umlsclass) + ((cui :value-type fixnum :initarg :cui :reader cui :print-formatter fmt-cui + :hyperlink find-ucon-cui) + (pfstr :value-type cdata :initarg :pfstr :reader pfstr + :compute-cached-value (find-pfstr-cui cui)) + (lat :value-type string :initarg :lat :reader lat) + (ts :value-type string :initarg :ts :reader ts) + (lui :value-type fixnum :initarg :lui :reader lui :print-formatter fmt-lui) + (stt :value-type string :initarg :stt :reader stt) + (sui :value-type fixnum :initarg :sui :reader sui :print-formatter fmt-sui) + (ispref :value-type string :initarg :ispref :reader ispref) + (aui :value-type fixnum :initarg :aui :reader aui :print-formatter fmt-aui) + (saui :value-type string :initarg :saui :reader saui) + (scui :value-type string :initarg :scui :reader scui) + (sdui :value-type string :initarg :sdui :reader sdui) + (sab :value-type string :initarg :sab :reader sab) + (tty :value-type string :initarg :tty :reader tty) + (code :value-type string :initarg :code :reader code) + (str :value-type string :initarg :str :reader str) + (srl :value-type fixnum :initarg :srl :reader srl) + (suppress :value-type string :initarg :suppress :reader suppress) + (cvf :value-type string :initarg :cvf :reader cvf) + (kpfeng :value-type string :initarg :kpfeng :reader kpfeng) + (kcuisui :value-type bigint :initarg :kcuisui :reader kcuisui) + (kcuilui :value-type bigint :initarg :kcuilui :reader kcuilui) + (kcuilrl :value-type fixnum :initarg :kcuilrl :reader kcuilrl) + (kluilrl :value-type fixnum :initarg :kluilrl :reader kluilrl) + (ksuilrl :value-type fixnum :initarg :ksuilrl :reader ksuilrl) + (s#def :reader s#def :subobject (find-udef-cui cui)) + (s#so :reader s#so :subobject (find-uso-cui cui)) + (s#hier :reader s#hier :subobject (find-uhier-cui cui)) + (s#map :reader s#map :subobject (find-umap-cui cui)) + (s#smap :reader s#smap :subobject (find-usmap-cui cui)) + (s#sty :reader s#sty :subobject (find-usty-cui cui)) + (s#term :reader s#term :subobject (find-uterm-cui cui)) + (s#sat :reader s#sat :subobject (find-usat-ui cui)) + (s#rel :reader s#rel :subobject (find-urel-cui cui)) + #+mrcoc (s#coc :reader s#coc :subobject (find-ucoc-cui cui)) + ) + (:documentation "CONSO is a new concept from the RRF files.") + (:metaclass hyperobject-class) + (:user-name "Concept") + (:default-print-slots cui kcuilrl str sab)) + (defclass umap (umlsclass) ((mapsetcui :value-type fixnum :initarg :mapsetcui :reader mapsetcui) (mapsetsab :value-type string :initarg :mapsetsab :reader mapsetsab) @@ -288,8 +307,8 @@ (:metaclass hyperobject-class) (:user-name "Mapping") (:default-print-slots mapsetcui mapsetsab mapsubsetid maprank fromid fromsid fromexpr fromtype - fromrule fromres rel rela toid tosid toexpr totype torule tores maprule - maptype mapatn mapatv)) + fromrule fromres rel rela toid tosid toexpr totype torule tores maprule + maptype mapatn mapatv)) (defclass usmap (umlsclass) ((mapsetcui :value-type fixnum :initarg :mapsetcui :reader mapsetcui) @@ -355,7 +374,7 @@ (defclass lexterm (umlsclass) ((eui :value-type fixnum :initarg :eui :reader eui :print-formatter fmt-eui - :hyperlink find-lexterm-eui) + :hyperlink find-lexterm-eui) (wrd :value-type string :initarg :wrd :reader wrd) (s#abr :reader s#abr :subobject (find-labr-eui eui)) (s#agr :reader s#agr :subobject (find-lagr-eui eui)) @@ -512,7 +531,7 @@ (ui3 :value-type integer :initarg :ui3 :reader ui3 :print-formatter fmt-tui)) (:metaclass hyperobject-class) (:user-name "Fully Inherited Set of Relation (TUIs)" - "Fully Inherited Set of Relations (TUIs)") + "Fully Inherited Set of Relations (TUIs)") (:default-print-slots ui ui2 ui3)) (defclass sstre2 (umlsclass) @@ -521,7 +540,7 @@ (sty2 :value-type string :initarg :ui3 :reader sty2)) (:metaclass hyperobject-class) (:user-name "Fully Inherited Set of Relation (strings)" - "Fully Inherited Set of Relations (strings)") + "Fully Inherited Set of Relations (strings)") (:default-print-slots sty rl sty2)) @@ -532,12 +551,11 @@ (defclass ustats (umlsclass) ((name :value-type string :initarg :name :reader name) (hits :value-type integer :initarg :hits :reader hits - :user-name "count" - :print-formatter fmt-comma-integer) + :user-name "count" + :print-formatter fmt-comma-integer) (srl :value-type fixnum :initarg :srl :reader srl)) (:metaclass hyperobject-class) (:default-initargs :name nil :hits nil :srl nil) (:user-name "UMLS Statistic") (:default-print-slots name hits srl) (:documentation "Custom Table: UMLS Database statistics.")) -