1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: umlisp -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
5 ;;;; Name: data-structures.lisp
6 ;;;; Purpose: Basic data objects for UMLisp
7 ;;;; Author: Kevin M. Rosenberg
8 ;;;; Date Started: Apr 2000
10 ;;;; $Id: data-structures.lisp,v 1.7 2003/05/06 06:09:29 kevin Exp $
12 ;;;; This file, part of UMLisp, is
13 ;;;; Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D.
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 ;;;; *************************************************************************
21 (eval-when (:compile-toplevel)
22 (declaim (optimize (speed 3) (safety 1) (compilation-speed 0) (debug 3))))
27 (make-pathname :directory '(:absolute "data" "umls" "2003AA"))
28 "Path for base of UMLS data files")
32 (make-pathname :directory '(:relative "META"))
37 (make-pathname :directory '(:relative "LEX"))
42 (make-pathname :directory '(:relative "NET"))
49 ;;; Structures for parsing UMLS text files
51 (defparameter *umls-files* nil
52 "List of umls file structures. Used when parsing text files.")
53 (defparameter *umls-cols* nil
54 "List of meta column structures. Used when parsing text files.")
57 ;; Preliminary objects to replace structures
61 (table :initarg :table)
67 (fields :initarg :fields)
68 (ucols :initarg ucols))
69 (:documentation "A UMLS File"))
79 (sqltype :initarg :sqltype)
80 (dty :initarg :dty :documentation "new in 2002: suggested SQL datatype")
81 (parsefunc :initarg :parsefunc)
82 (quotechar :initarg :quotechar)
83 (datatype :initarg :datatype)
84 (custom-value-func :initarg :custom-value-func))
85 (:documentation "A UMLS column"))
87 (defstruct (umls-file)
88 "Record for each UMLS File"
89 fil table des fmt cls rws bts fields colstructs)
92 "Record for each UMLS Column in each file"
93 col des ref min av max fil sqltype
94 dty ;; new in 2002 umls: suggested SQL datatype
95 parsefunc quotechar datatype custom-value-func)