r11438: remove MRLO as this has been deleted from the UMLS since 2004AB
[umlisp.git] / classes.lisp
1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: umlisp -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
4 ;;;;
5 ;;;; Name:     classes.lisp
6 ;;;; Purpose:  Class defintions for UMLisp
7 ;;;; Author:   Kevin M. Rosenberg
8 ;;;; Created:  Apr 2000
9 ;;;;
10 ;;;; $Id$
11 ;;;;
12 ;;;; This file, part of UMLisp, is
13 ;;;;    Copyright (c) 2000-2006 by Kevin M. Rosenberg, M.D.
14 ;;;;
15 ;;;; UMLisp users are granted the rights to distribute and use this software
16 ;;;; as governed by the terms of the GNU General Public License.
17 ;;;; *************************************************************************
18
19 (in-package #:umlisp)
20
21 (defclass umlsclass (hyperobject)
22   ()
23   (:metaclass hyperobject-class)
24   (:description "Parent class of all UMLS objects. It is based on the HYPEROBJECT-CLASS metaclass that provides object printing functions."))
25
26
27 (defclass usrl (umlsclass)
28   ((sab :value-type string :initarg :sab :reader sab)
29    (srl :value-type fixnum :initarg :srl :reader srl))
30   (:metaclass hyperobject-class)
31   (:user-name "Source Restriction Level")
32   (:default-print-slots sab srl)
33   (:description "Custom Table: Source Restriction Level"))
34
35
36 (defclass urank (umlsclass)
37   ((rank :value-type fixnum :initarg :rank :reader rank)
38    (sab :value-type string :initarg :sab :reader sab)
39    (tty :value-type string :initarg :tty :reader tty)
40    (suppress :value-type string :initarg :suppress :reader suppress))
41   (:metaclass hyperobject-class)
42   (:user-name "Rank")
43   (:default-print-slots rank sab tty suppres))
44
45 (defclass udef (umlsclass)
46   ((def :value-type cdata :initarg :def :reader def)
47    (sab :value-type string :initarg :sab :reader sab :hyperlink find-usab-rsab)
48    (suppress :value-type string :initarg :suppress :reader suppress))
49   (:metaclass hyperobject-class)
50   (:user-name "Definition")
51   (:default-print-slots sab def))
52
53 (defclass usat (umlsclass)
54   ((sab :value-type string :initarg :sab :reader sab :hyperlink find-usab-rsab)
55    (code :value-type string :initarg :code :reader code)
56    (atn :value-type string :initarg :atn :reader atn)
57    (atv :value-type cdata :initarg :atv :reader atv))
58   (:metaclass hyperobject-class)
59   (:user-name "Simple Attribute")
60   (:default-print-slots sab code atn atv))
61
62 (defclass usab (umlsclass)
63   ((vcui :value-type fixnum :initarg :vcui :reader vcui :print-formatter fmt-cui)
64    (rcui :value-type fixnum :initarg :rcui :reader rcui :print-formatter fmt-cui)
65    (vsab :value-type string :initarg :vsab :reader vsab)
66    (rsab :value-type string :initarg :rsab :reader rsab :hyperlink find-ustr-sab
67          :hyperlink-parameters (("subobjects" . "no")))
68    (son :value-type string :initarg :son :reader son)
69    (sf :value-type string :initarg :sf :reader sf)
70    (sver :value-type string :initarg :sver :reader sver)
71    (vstart :value-type string :initarg :vstart :reader vstart)
72    (vend :value-type string :initarg :vend :reader vend)
73    (imeta :value-type string :initarg :imeta :reader imeta)
74    (rmeta :value-type string :initarg :rmeta :reader rmeta)
75    (slc :value-type cdata :initarg :slc :reader slc)
76    (scc :value-type cdata :initarg :scc :reader scc)
77    (srl :value-type fixnum :initarg :srl :reader srl)
78    (tfr :value-type fixnum :initarg :tfr :reader tfr :print-formatter fmt-comma-integer)
79    (cfr :value-type fixnum :initarg :cfr :reader cfr :print-formatter fmt-comma-integer)
80    (cxty :value-type string :initarg :cxty :reader cxty)
81    (ttyl :value-type string :initarg :ttyl :reader ttyl)
82    (atnl :value-type string :initarg :atnl :reader atnl)
83    (lat :value-type string :initarg :lat :reader lat)
84    (cenc :value-type string :initarg :cenc :reader cenc)
85    (curver :value-type string :initarg :curver :reader curver)
86    (sabin :value-type string :initarg :sabin :reader sabin)
87    (ssn :value-type string :initarg :ssn :reader ssn)
88    (scit :value-type string :initarg :scit :reader scit))
89   (:metaclass hyperobject-class)
90   (:user-name "Source Abbreviation")
91   (:default-print-slots vcui rcui vsab rsab son sf sver vstart vend imeta
92                 rmeta slc scc srl tfr cfr cxty ttyl atnl lat cenc
93                 curver sabin ssn scit))
94
95 (defclass ucxt (umlsclass)
96   ((sab :value-type string :initarg :sab :reader sab :hyperlink find-usab-rsab)
97    (code :value-type string :initarg :code :reader code)
98    (cxn :value-type fixnum :initarg :cxn :reader cxn)
99    (cxl :value-type string :initarg :cxl :reader cxl)
100    (rank :value-type string :initarg :rank :reader rank)
101    (cxs :value-type cdata :initarg :cxs :reader cxs)
102    (cui2 :value-type fixnum :initarg :cui2 :reader cui2 :hyperlink find-ucon-cui
103          :print-formatter fmt-cui)
104    (aui2 :value-type fixnum :initarg :aui2 :reader aui2 :hyperlink find-ucon-aui
105          :print-formatter fmt-aui)
106    (hcd :value-type string :initarg :hcd :reader hcd)
107    (rela :value-type string :initarg :rela :reader rela)
108    (xc :value-type string  :initarg :xc :reader xc)
109    (cvf :value-type string  :initarg :cvf :reader cvf))
110   (:metaclass hyperobject-class)
111   (:user-name "Context")
112   (:default-print-slots sab code cxn cxl hcd rela xc cui2 cxs))
113
114 (defclass uhier (umlsclass)
115   ((cui :value-type fixnum :initarg :cui :reader cui :hyperlink find-ucon-cui
116         :print-formatter fmt-cui)
117    (aui :value-type fixnum :initarg :aui :reader aui :hyperlink find-ucon-aui
118          :print-formatter fmt-aui)
119    (cxn :value-type fixnum :initarg :cxn :reader cxn)
120    (paui :value-type fixnum :initarg :paui :reader paui
121          :print-formatter fmt-aui)
122    (sab :value-type string :initarg :sab :reader sab :hyperlink find-usab-rsab)
123    (rela :value-type string :initarg :rela :reader rela)
124    (ptr :value-type string :initarg :ptr :reader ptr)
125    (hcd :value-type string :initarg :hcd :reader hcd)
126    (cvf :value-type string  :initarg :cvf :reader cvf))
127   (:metaclass hyperobject-class)
128   (:user-name "Context")
129   (:default-print-slots cxn paui sab rela ptr hcd))
130
131 (defclass ustr (umlsclass)
132   ((sui :value-type fixnum :initarg :sui :reader sui :print-formatter fmt-sui
133         :hyperlink find-ustr-sui)
134    (cui :value-type fixnum :initarg :cui :reader cui :print-formatter fmt-cui
135         :hyperlink find-ucon-cui)
136    (lui :value-type fixnum :initarg :lui :reader lui :print-formatter fmt-lui
137         :hyperlink find-uterm-lui)
138    (cuisui :value-type integer :initarg :cuisui :reader cuisui )
139    (str :value-type cdata :initarg :str :reader str)
140    (lrl :value-type fixnum :initarg :lrl :reader lrl)
141    (stt :value-type string :initarg :stt :reader stt)
142    (suppress :value-type string :initarg :suppress :reader suppress)
143    (s#so :reader s#so :subobject (find-uso-cuisui cui sui))
144    (s#sat :reader s#sat :subobject (find-usat-ui cui lui sui))
145    (s#cxt :reader s#cxt :subobject (find-ucxt-cuisui cui sui)))
146   (:metaclass hyperobject-class)
147   (:user-name "String")
148   (:default-print-slots sui stt lrl str suppress))
149
150
151 (defclass uso (umlsclass)
152   ((aui :value-type fixnum :initarg :aui :reader aui :print-formatter fmt-aui
153         :hyperlink find-ucon-aui)
154    (cui :value-type fixnum :initarg :cui :reader cui :print-formatter fmt-cui
155         :hyperlink find-ucon-cui)
156    (sui :value-type fixnum :initarg :sui :reader sui :print-formatter fmt-sui
157         :hyperlink find-ucon-sui)
158    (saui :value-type string :initarg :saui :reader saui)
159    (sdui :value-type string :initarg :sdui :reader sdui)
160    (scui :value-type string :initarg :scui :reader scui)
161    (tty :value-type string :initarg :tty :reader tty)
162    (code :value-type string :initarg :code :reader code)
163    (sab :value-type string :initarg :sab :reader sab :hyperlink find-usab-rsab)
164    (lat :value-type string :initarg :lat :reader lat)
165    (str :value-type cdata :initarg :str :reader str)
166    (srl :value-type fixnum :initarg :srl :reader srl))
167   (:metaclass hyperobject-class)
168   (:user-name "Source")
169   (:default-print-slots aui sab code saui sdui scui tty srl))
170
171 (defclass uterm (umlsclass)
172   ((lui :value-type fixnum :initarg :lui :reader lui :print-formatter fmt-lui
173         :hyperlink find-uterm-lui)
174    (cui :value-type fixnum :initarg :cui :reader cui :print-formatter fmt-cui
175         :hyperlink find-ucon-cui)
176    (lat :value-type string :initarg :lat :reader lat)
177    (ts :value-type string  :initarg :ts :reader ts)
178    (lrl :value-type fixnum :initarg :lrl :reader lrl)
179    (s#str :reader s#str :subobject (find-ustr-cuilui cui lui))
180    (s#sat :reader s#sat :subobject (find-usat-ui cui lui)))
181   (:metaclass hyperobject-class)
182   (:user-name "Term")
183   (:default-print-slots lui lat ts lrl))
184
185 (defclass usty (umlsclass)
186   ((tui :value-type fixnum :initarg :tui :reader tui :print-formatter fmt-tui
187         :hyperlink find-ucon-tui
188         :hyperlink-parameters (("subobjects" . "no")))
189    (sty :value-type string :initarg :sty :reader sty))
190   (:metaclass hyperobject-class)
191   (:user-name "Semantic Type")
192   (:default-print-slots tui sty))
193
194 (defclass urel (umlsclass)
195   ((rel :value-type string :initarg :rel :reader rel :hyperlink find-brel-rel)
196    (cui1 :value-type fixnum :initarg :cui1 :reader cui1 :print-formatter fmt-cui)
197    (aui1 :value-type fixnum :initarg :aui1 :reader aui1 :print-formatter fmt-aui)
198    (stype1 :value-type string  :initarg :stype1 :reader stype1)
199    (cui2 :value-type fixnum :initarg :cui2 :reader cui2 :hyperlink find-ucon-sui
200          :print-formatter fmt-cui)
201    (aui2 :value-type fixnum :initarg :aui2 :reader aui2 :hyperlink find-ucon-aui
202          :print-formatter fmt-aui)
203    (pfstr2 :value-type cdata :initarg :pfstr2 :reader pfstr2)
204    (stype2 :value-type string  :initarg :stype2 :reader stype2)
205    (rela :value-type string :initarg :rela :reader rela)
206    (rui :value-type fixnum  :initarg :rui :reader rui :print-formatter fmt-rui)
207    (srui :value-type string  :initarg :srui :reader srui)
208    (sab :value-type string :initarg :sab :reader sab :hyperlink find-usab-rsab)
209    (sl :value-type string  :initarg :sl :reader sl)
210    (rg :value-type string  :initarg :rg :reader rg)
211    (dir :value-type string  :initarg :dir :reader dir)
212    (suppress :value-type string  :initarg :suppress :reader suppress)
213    (cvf :value-type string  :initarg :cvf :reader cvf))
214   (:metaclass hyperobject-class)
215   (:user-name "Relationship")
216   (:default-print-slots stype1 rel cui2 aui2 stype2 rela rui srui sab sl rg dir suppress pfstr2))
217
218 (defclass ucoc (umlsclass)
219   ((cui1 :value-type fixnum :initarg :cui1 :reader cui1 :print-formatter fmt-cui)
220    (aui1 :value-type fixnum :initarg :aui1 :reader aui1 :print-formatter fmt-aui)
221    (cui2 :value-type fixnum :initarg :cui2 :reader cui2 :print-formatter fmt-cui
222          :hyperlink find-ucon-cui)
223    (aui2 :value-type fixnum :initarg :aui2 :reader aui2 :print-formatter fmt-aui
224          :hyperlink find-ucon-aui)
225    (pfstr2 :value-type cdata :initarg :pfstr2 :reader pfstr2)
226    (sab :value-type string :initarg :sab :reader sab)
227    (cot :value-type string :initarg :cot :reader cot)
228    (cof :value-type fixnum :initarg :cof :reader cof)
229    (coa :value-type cdata :initarg :coa :reader coa)
230    (cvf :value-type string  :initarg :cvf :reader cvf))
231   (:metaclass hyperobject-class)
232   (:user-name "Co-occuring Concept")
233   (:default-print-slots cot cof coa cui2 aui2 sab pfstr2))
234
235 (defclass ucon (umlsclass)
236   ((cui :value-type fixnum :initarg :cui :reader cui :print-formatter fmt-cui
237         :hyperlink find-ucon-cui)
238    (lrl :value-type fixnum :initarg :lrl :reader lrl
239         :subobject (find-lrl-cui cui))
240    (pfstr :value-type cdata :initarg :pfstr :reader pfstr
241           :subobject (find-pfstr-cui cui))
242    (s#def :reader s#def :subobject (find-udef-cui cui))
243    (s#so :reader s#so :subobject (find-uso-cui cui))
244    (s#hier :reader s#hier :subobject (find-uhier-cui cui))
245    (s#map :reader s#map :subobject (find-umap-cui cui))
246    (s#smap :reader s#smap :subobject (find-usmap-cui cui))
247    (s#sty :reader s#sty :subobject (find-usty-cui cui))
248    (s#term :reader s#term :subobject (find-uterm-cui cui))
249    (s#sat :reader s#sat :subobject (find-usat-ui cui))
250    (s#rel :reader s#rel :subobject (find-urel-cui cui))
251    (s#coc :reader s#coc :subobject (find-ucoc-cui cui)))
252   (:metaclass hyperobject-class)
253   (:user-name "Concept")
254   (:default-print-slots cui lrl pfstr))
255
256
257 (defclass uconso (umlsclass)
258   ((cui :value-type fixnum :initarg :cui :reader cui :print-formatter fmt-cui
259         :hyperlink find-ucon-cui)
260    (lat :value-type string :initarg :lat :reader lat)
261    (ts :value-type string :initarg :ts :reader ts)
262    (lui :value-type fixnum :initarg :lui :reader lui :print-formatter fmt-lui)
263    (stt :value-type string :initarg :stt :reader stt)
264    (sui :value-type fixnum :initarg :sui :reader sui :print-formatter fmt-sui)
265    (ispref :value-type string :initarg :ispref :reader ispref)
266    (aui :value-type fixnum :initarg :aui :reader aui :print-formatter fmt-aui)
267    (saui :value-type string :initarg :saui :reader saui)
268    (scui :value-type string :initarg :scui :reader scui)
269    (sdui :value-type string :initarg :sdui :reader sdui)
270    (sab :value-type string :initarg :sab :reader sab)
271    (tty :value-type string :initarg :tty :reader tty)
272    (code :value-type string :initarg :code :reader code)
273    (str :value-type string :initarg :str :reader str)
274    (srl :value-type fixnum :initarg :srl :reader srl)
275    (suppress :value-type string :initarg :suppress :reader suppress)
276    (cvf :value-type string :initarg :cvf :reader cvf)
277    (kpfeng :value-type string :initarg :kpfeng :reader kpfeng)
278    (kcuisui :value-type bigint :initarg :kcuisui :reader kcuisui)
279    (kcuilui :value-type bigint :initarg :kcuilui :reader kcuilui)
280    (kcuilrl :value-type fixnum :initarg :kcuilrl :reader kcuilrl)
281    (kluilrl :value-type fixnum :initarg :kluilrl :reader kluilrl)
282    (ksuilrl :value-type fixnum :initarg :ksuilrl :reader ksuilrl)
283    (s#def :reader s#def :subobject (find-udef-cui cui))
284    (s#so :reader s#so :subobject (find-uso-cui cui))
285    (s#hier :reader s#hier :subobject (find-uhier-cui cui))
286    (s#map :reader s#map :subobject (find-umap-cui cui))
287    (s#smap :reader s#smap :subobject (find-usmap-cui cui))
288    (s#sty :reader s#sty :subobject (find-usty-cui cui))
289    (s#term :reader s#term :subobject (find-uterm-cui cui))
290    (s#sat :reader s#sat :subobject (find-usat-ui cui))
291    (s#rel :reader s#rel :subobject (find-urel-cui cui))
292    (s#coc :reader s#coc :subobject (find-ucoc-cui cui)))
293   (:documentation "CONSO is a new concept from the RRF files. This object is a rather raw row from the MRCONSO table.")
294   (:metaclass hyperobject-class)
295   (:user-name "Concept")
296   (:default-print-slots cui lrl str sab))
297
298 (defclass umap (umlsclass)
299   ((mapsetcui :value-type fixnum :initarg :mapsetcui :reader mapsetcui)
300    (mapsetsab :value-type string :initarg :mapsetsab :reader mapsetsab)
301    (mapsubsetid :value-type string :initarg :mapsubsetid :reader mapsubsetid)
302    ;; fixme: will convert to integer
303    (maprank :value-type string :initarg :maprank :reader maprank)
304    (fromid :value-type string :initarg :fromid :reader fromid)
305    (fromsid :value-type string :initarg :fromsid :reader fromsid)
306    (fromexpr :value-type string :initarg :fromexpr :reader fromexpr)
307    (fromtype :value-type string :initarg :fromtype :reader fromtype)
308    (fromrule :value-type string :initarg :fromrule :reader fromrule)
309    (fromres :value-type string :initarg :fromres :reader fromres)
310    (rel :value-type string :initarg :rel :reader rel)
311    (rela :value-type string :initarg :rela :reader rela)
312    (toid :value-type string :initarg :toid :reader toid)
313    (tosid :value-type string :initarg :tosid :reader tosid)
314    (toexpr :value-type string :initarg :toexpr :reader toexpr)
315    (totype :value-type string :initarg :totype :reader totype)
316    (torule :value-type string :initarg :torule :reader torule)
317    (tores :value-type string :initarg :tores :reader tores)
318    (maprule :value-type string :initarg :maprule :reader maprule)
319    (maptype :value-type string :initarg :maptype :reader maptype)
320    (mapatn :value-type string :initarg :mapatn :reader mapatn)
321    (mapatv :value-type string :initarg :mapatv :reader mapatv)
322    (cvf :value-type string  :initarg :cvf :reader cvf))
323   (:metaclass hyperobject-class)
324   (:user-name "Mapping")
325   (:default-print-slots mapsetcui mapsetsab mapsubsetid maprank fromid fromsid fromexpr fromtype
326                         fromrule fromres rel rela toid tosid toexpr totype torule tores maprule
327                         maptype mapatn mapatv))
328
329 (defclass usmap (umlsclass)
330   ((mapsetcui :value-type fixnum :initarg :mapsetcui :reader mapsetcui)
331    (mapsetsab :value-type string :initarg :mapsetsab :reader mapsetsab)
332    (fromexpr :value-type string :initarg :fromexpr :reader fromexpr)
333    (fromtype :value-type string :initarg :fromtype :reader fromtype)
334    (rel :value-type string :initarg :rel :reader rel)
335    (rela :value-type string :initarg :rela :reader rela)
336    (toexpr :value-type string :initarg :toexpr :reader toexpr)
337    (totype :value-type string :initarg :totype :reader totype)
338    (cvf :value-type string  :initarg :cvf :reader cvf))
339   (:metaclass hyperobject-class)
340   (:user-name "Simple Mapping")
341   (:default-print-slots mapsetcui mapsetsab fromexpr fromtype rel rela toexpr totype))
342
343 (defclass uxw (umlsclass)
344   ((wd :value-type string :initarg :wd :reader wd)
345    (cui :value-type fixnum :initform nil :initarg :cui :reader cui :print-formatter fmt-cui)
346    (lui :value-type fixnum :initform nil :initarg :lui :reader lui :print-formatter fmt-lui)
347    (sui :value-type fixnum :initform nil :initarg :sui :reader sui :print-formatter fmt-sui))
348   (:metaclass hyperobject-class)
349   (:user-name "XW Index" "XW Indices")
350   (:default-print-slots wd cui lui sui))
351
352 (defclass uxw-noneng (umlsclass)
353   ((lat :value-type string :initarg :lat :reader lat)
354    (wd :value-type string :initarg :wd :reader wd)
355    (cui :value-type fixnum :initform nil :initarg :cui :reader cui :print-formatter fmt-cui)
356    (lui :value-type fixnum :initform nil :initarg :lui :reader lui :print-formatter fmt-lui)
357    (sui :value-type fixnum :initform nil :initarg :sui :reader sui :print-formatter fmt-sui)
358    (lrl :value-type fixnum :initform nil :initarg :lrl :reader lrl))
359   (:metaclass hyperobject-class)
360   (:user-name "XW Non-English Index" "XW Non-English Indices")
361   (:default-print-slots wd cui lui sui))
362
363 (defclass uxnw (umlsclass)
364   ((lat :value-type string :initarg :lat :reader lat)
365    (nwd :value-type string :initarg :nwd :reader nwd)
366    (cuilist :value-type list :initarg :cuilist :reader uxnw-cuilist))
367   (:metaclass hyperobject-class)
368   (:user-name "XNW Index" "XNW Indices")
369   (:default-print-slots lat nwd cuilist))
370
371 (defclass uxns (umlsclass)
372   ((lat :value-type string :initarg :lat :reader lat)
373    (nstr :value-type string :initarg :nstr :reader nstr)
374    (cuilist :value-type list :initarg :cuilist :reader cuilist))
375   (:metaclass hyperobject-class)
376   (:user-name "XNS Index" "XNS Indices")
377   (:default-print-slots lat nstr cuilist))
378
379 (defclass udoc (umlsclass)
380   ((dockey :value-type string :initarg :dockey :reader dockey)
381    (expl :value-type cdata :initarg :expl :reader expl)
382    (dtype :value-type cdata :initarg :dtype :reader dtype)
383    (dvalue :value-type cdata :initarg :dvalue :reader dvalue))
384   (:metaclass hyperobject-class)
385   (:user-name "Documentation record")
386   (:default-print-slots dockey expl dtype dvalue))
387
388
389 ;;; LEX objects
390
391 (defclass lexterm (umlsclass)
392   ((eui :value-type fixnum :initarg :eui :reader eui :print-formatter fmt-eui
393         :hyperlink find-lexterm-eui)
394    (wrd :value-type string :initarg :wrd :reader wrd)
395    (s#abr :reader s#abr :subobject (find-labr-eui eui))
396    (s#agr :reader s#agr :subobject (find-lagr-eui eui))
397    (s#cmp :reader s#cmp :subobject (find-lcmp-eui eui))
398    (s#mod :reader s#mod :subobject (find-lmod-eui eui))
399    (s#nom :reader s#nom :subobject (find-lnom-eui eui))
400    (s#prn :reader s#prn :subobject (find-lprn-eui eui))
401    (s#prp :reader s#prp :subobject (find-lprp-eui eui))
402    (s#spl :reader s#spl :subobject (find-lspl-eui eui))
403    (s#trm :reader s#trm :subobject (find-ltrm-eui eui))
404    (s#typ :reader s#typ :subobject (find-ltyp-eui eui)))
405   (:metaclass hyperobject-class)
406   (:user-name "Lexical Term")
407   (:default-print-slots eui wrd))
408
409
410 (defclass labr  (umlsclass)
411   ((eui :value-type integer :initarg :eui :reader eui :print-formatter fmt-eui)
412    (bas :value-type string :initarg :bas :reader bas)
413    (abr :value-type string :initarg :abr :reader abr)
414    (eui2 :value-type integer :initarg :eui2 :reader eui2 :print-formatter fmt-eui)
415    (bas2 :value-type string :initarg :bas2 :reader bas2))
416   (:metaclass hyperobject-class)
417   (:user-name "Abbreviations and Acronym")
418   (:default-print-slots eui bas abr eui2 bas2))
419
420 (defclass lagr  (umlsclass)
421   ((eui :value-type integer :initarg :eui :reader eui :print-formatter fmt-eui)
422    (str :value-type string :initarg :str :reader str)
423    (sca :value-type string :initarg :sca :reader sca)
424    (agr :value-type string :initarg :agr :reader agr)
425    (cit :value-type string :initarg :cit :reader cit)
426    (bas :value-type string :initarg :bas :reader bas))
427   (:metaclass hyperobject-class)
428   (:user-name "Agreement and Inflection")
429   (:default-print-slots eui str sca agr cit bas))
430
431 (defclass lcmp  (umlsclass)
432   ((eui :value-type integer :initarg :eui :reader eui :print-formatter fmt-eui)
433    (bas :value-type string :initarg :bas :reader bas)
434    (sca :value-type string :initarg :sca :reader sca)
435    (com :value-type string :initarg :com :reader com))
436   (:metaclass hyperobject-class)
437   (:user-name "Complementation")
438   (:default-print-slots eui bas sca com))
439
440 (defclass lmod  (umlsclass)
441   ((eui :value-type integer :initarg :eui :reader eui :print-formatter fmt-eui)
442    (bas :value-type string :initarg :bas :reader bas)
443    (sca :value-type string :initarg :sca :reader sca)
444    (psnmod :value-type string :initarg :psnmod :reader psnmod)
445    (fea :value-type string :initarg :fea :reader fea))
446   (:metaclass hyperobject-class)
447   (:user-name "Modifier")
448   (:default-print-slots eui bas sca psnmod fea))
449
450 (defclass lnom  (umlsclass)
451   ((eui :value-type integer :initarg :eui :reader eui :print-formatter fmt-eui)
452    (bas :value-type string :initarg :bas :reader bas)
453    (sca :value-type string :initarg :sca :reader sca)
454    (eui2 :value-type integer :initarg :eui2 :reader eui2 :print-formatter fmt-eui)
455    (bas2 :value-type string :initarg :bas2 :reader bas2)
456    (sca2 :value-type string :initarg :sca2 :reader sca2))
457   (:metaclass hyperobject-class)
458   (:user-name "Nominalization")
459   (:default-print-slots eui bas sca eui2 bas2 sca2))
460
461 (defclass lprn  (umlsclass)
462   ((eui :value-type integer :initarg :eui :reader eui :print-formatter fmt-eui)
463    (bas :value-type string :initarg :bas :reader bas)
464    (num :value-type string :initarg :num :reader num)
465    (gnd :value-type string :initarg :gnd :reader gnd)
466    (cas :value-type string :initarg :cas :reader cas)
467    (pos :value-type string :initarg :pos :reader pos)
468    (qnt :value-type string :initarg :qnt :reader qnt)
469    (fea :value-type string :initarg :fea :reader fea))
470   (:metaclass hyperobject-class)
471   (:user-name "Pronoun")
472   (:default-print-slots eui bas num gnd cas pos qnt fea))
473
474 (defclass lprp  (umlsclass)
475   ((eui :value-type integer :initarg :eui :reader eui :print-formatter fmt-eui)
476    (bas :value-type string :initarg :bas :reader bas)
477    (str :value-type string :initarg :str :reader str)
478    (sca :value-type string :initarg :sca :reader sca)
479    (fea :value-type string :initarg :fea :reader fea))
480   (:metaclass hyperobject-class)
481   (:user-name "Property" "Properties")
482   (:default-print-slots eui bas str sca fea))
483
484
485 (defclass lspl  (umlsclass)
486   ((eui :value-type integer :initarg :eui :reader eui :print-formatter fmt-eui)
487    (spv :value-type string :initarg :spv :reader spv)
488    (bas :value-type string :initarg :bas :reader bas))
489   (:metaclass hyperobject-class)
490   (:user-name "Spelling Variant")
491   (:default-print-slots eui spv bas))
492
493
494 (defclass ltrm  (umlsclass)
495   ((eui :value-type integer :initarg :eui :reader eui :print-formatter fmt-eui)
496    (bas :value-type string :initarg :bas :reader bas)
497    (gen :value-type string :initarg :gen :reader gen))
498   (:metaclass hyperobject-class)
499   (:user-name "Trade Mark")
500   (:default-print-slots eui bas gen))
501
502 (defclass ltyp  (umlsclass)
503   ((eui :value-type integer :initarg :eui :reader eui :print-formatter fmt-eui)
504    (bas :value-type string :initarg :bas :reader bas)
505    (sca :value-type string :initarg :sca :reader sca)
506    (typ :value-type string :initarg :typ :reader typ))
507   (:metaclass hyperobject-class)
508   (:user-name "Inflection Type")
509   (:default-print-slots eui bas sca typ))
510
511 (defclass lwd (umlsclass)
512   ((wrd :value-type string :initarg :wrd :reader wrd)
513    (euilist :value-type list :initarg :euilist :reader euilist))
514   (:metaclass hyperobject-class)
515   (:user-name "Lexical Word Index" "Lexical Word Indices")
516   (:default-print-slots wrd euilist))
517
518 ;;; Semantic NET objects
519
520 (defclass sdef (umlsclass)
521   ((rt :value-type string :initarg :rt :reader rt)
522    (ui :value-type integer :initarg :ui :reader ui :print-formatter fmt-tui)
523    (styrl :value-type string :initarg :styrl :reader styrl)
524    (stnrtn :value-type string :initarg :stnrtn :reader stnrtn)
525    (def :value-type string :initarg :def :reader def)
526    (ex :value-type string :initarg :ex :reader ex)
527    (un :value-type string :initarg :un :reader un)
528    (rh :value-type string :initarg :rh :reader rh)
529    (abr :value-type string :initarg :abr :reader abr)
530    (rin :value-type string :initarg :rin :reader rin))
531   (:metaclass hyperobject-class)
532   (:user-name "Basic information about Semantic Types and Relation")
533   (:default-print-slots rt ui styrl stnrtn def ex un rh abr rin))
534
535 (defclass sstr (umlsclass)
536   ((styrl :value-type string :initarg :styrl :reader styrl)
537    (rl :value-type string :initarg :rl :reader rl)
538    (styrl2 :value-type string :initarg :styrl2 :reader styrl2)
539    (ls :value-type string :initarg :ls :reader ls))
540   (:metaclass hyperobject-class)
541   (:user-name "Structure of the Network")
542   (:default-print-slots styrl rl styrl2 ls))
543
544 (defclass sstre1 (umlsclass)
545   ((ui :value-type integer :initarg :ui :reader ui :print-formatter fmt-tui)
546    (ui2 :value-type integer :initarg :ui2 :reader ui2 :print-formatter fmt-tui)
547    (ui3 :value-type integer :initarg :ui3 :reader ui3 :print-formatter fmt-tui))
548   (:metaclass hyperobject-class)
549   (:user-name "Fully Inherited Set of Relation (TUIs)"
550               "Fully Inherited Set of Relations (TUIs)")
551   (:default-print-slots ui ui2 ui3))
552
553 (defclass sstre2 (umlsclass)
554   ((sty :value-type string :initarg :ui :reader sty)
555    (rl :value-type string :initarg :ui2 :reader rl)
556    (sty2 :value-type string :initarg :ui3 :reader sty2))
557   (:metaclass hyperobject-class)
558   (:user-name "Fully Inherited Set of Relation (strings)"
559               "Fully Inherited Set of Relations (strings)")
560   (:default-print-slots sty rl sty2))
561
562
563 ;;; **************************
564 ;;; Local Classes
565 ;;; **************************
566
567 (defclass ustats (umlsclass)
568   ((name :value-type string :initarg :name :reader name)
569    (hits :value-type integer :initarg :hits :reader hits
570          :user-name "count"
571          :print-formatter fmt-comma-integer)
572    (srl :value-type fixnum :initarg :srl :reader srl))
573   (:metaclass hyperobject-class)
574   (:default-initargs :name nil :hits nil :srl nil)
575   (:user-name "UMLS Statistic")
576   (:default-print-slots name hits srl)
577   (:documentation "Custom Table: UMLS Database statistics."))
578