;*------------------------------------------------------------------23/Aug/94-*
;*  File  - TRIAD.gf
;*  
;*  Contains a first attempt at coding the triad medical vocabulary
;*  into Ontolingua, specifically into GENERIC FRAMES.
;*--------------------------------------------------------------------gennari-*

(in-package "ONTOLINGUA-USER")
(in-package :ol-user)

(define-theory triad-mini-vocab (frame-ontology slot-constraint-sugar)
   "The theory defining the terms and relations of the triad medical vocabulary."
)
(in-theory 'triad-mini-vocab)

;*------------------------------------------------------------------25/Aug/94-*
;* Defining a set of relations for the "own-slots" needed in Triad.
;*--------------------------------------------------------------------gennari-*

(define-frame Code
 :theory triad-mini-vocab
 :own-slots (
  (INSTANCE-OF relation)
  (ARITY 2)
  (RANGE Integer)
  (DOMAIN ENTITY)
  (DOCUMENTATION
    "unique concept code number - for compact reference - also, the
name might change as we make more explicit what we mean by the concept
or correct a misspelling (range is an integer, unique for each
entity)"
  ))
 :issues (
   ("I believe this is currently the same as the MED code used at Columbia. Will this
lead to problems?")
  )
)

(define-frame Snomed-Code
 :theory triad-mini-vocab
 :own-slots (
  (INSTANCE-OF relation)
  (ARITY 2)
  (RANGE String)
  (DOMAIN ENTITY)
  (DOCUMENTATION "This is the Snomed code for the equivalent concept (range is a string)."
  ))
)

(define-frame UMLS-Code
 :theory triad-mini-vocab
 :own-slots (
  (INSTANCE-OF relation)
  (ARITY 2)
  (RANGE String)
  (DOMAIN ENTITY)
  (DOCUMENTATION "This is the UMLS code for the equivalent concept (range is a string).")
  )
)

(define-frame Synonym
 :theory triad-mini-vocab
 :own-slots (
  (INSTANCE-OF relation)
  (RANGE String)
  (DOMAIN ENTITY)
  (DOCUMENTATION "A list of other synonyms for the concept. (more explanation?)"
  ))
)

(define-frame Print-name
 :theory triad-mini-vocab
 :own-slots (
  (INSTANCE-OF relation)
  (ARITY 2)
  (RANGE String)
  (DOMAIN ENTITY)
  (DOCUMENTATION "This is the pretty-print name - to allow for
case-sensitive things like 'pH'." 
  ))
 :issues ( ("It can be argued that this could be unique and serve as
    the unique concept name or that we don't need such a unique name at
    all.  My feeling is that having more than one concept with the same
    name is confusing and that not having any name is also confusing.
    As for using the pretty name as the unique name, this might be done
    but we might further impose the rule that the uniquness test is
    case-insensitive."))
)

;*------------------------------------------------------------------26/Aug/94-*
;* Defining a set of relations for the template slots.
;*--------------------------------------------------------------------gennari-*

(define-frame HAS-UNITS
 :theory triad-mini-vocab
 :own-slots (
  (INSTANCE-OF relation)
  (ARITY 2)
  (RANGE FINDING)
  (DOCUMENTATION "This is the slot name (relation) with range 'UNITS'")
  )
)

(define-frame UNITS
 :theory triad-mini-vocab
 :own-slots (
  (INSTANCE-OF relation)
  (ARITY 2)
  (RANGE STRING)
  (DOCUMENTATION "You know, like 'mg/dl'.  Still, nontrivial. Some tests get
reported in 'mg/ml' and others in 'g/l'.  Technically synonymous.  Do we
distinguish?  If not, then why distinguish between any interconvertable
units, like pound and kilogram (all right, so one is weight and
the other is mass) or inch and centimeter?"
  ))
)


(define-frame MEASURES
 :theory triad-mini-vocab
 :own-slots (
  (INSTANCE-OF relation)
  (ARITY 2)
  (RANGE MEASURABLE-SUBSTANCE)
  (DOCUMENTATION "This is the slot name (relation) that has range 'measurable-substance'")
  )
)


(define-frame MEASURABLE-SUBSTANCE
 :theory triad-mini-vocab
 :own-slots (
  (INSTANCE-OF class)
  (DOCUMENTATION "This is a pretty broad class - it can include things
like physiologic processes, chemicals, cells, physical properties, etc.
I don't think we want a deep model of how the universe is measured, just
enough info to be able to classify and translate test terms.  For example,
we will need to decide how to differentiate all the different red blood
cell indices - MCV, MCH and MCHC all measure hemoglobin, just with
different units - and the units attribute will take care of that nicely."
  ))
)

(define-frame HAS-FINDING
 :theory triad-mini-vocab
 :own-slots (
  (INSTANCE-OF relation)
  (ARITY 2)
  (RANGE FINDING)
  (DOCUMENTATION "This is the slot name (relation) with range 'FINDING'")
  )
)

(define-frame FINDING
 :theory triad-mini-vocab
 :own-slots (
  (INSTANCE-OF class)
  (DOCUMENTATION "This will be tricky - ultimately, almost anything can be a
finding.  Most lab tests report numbers or cells or organisms, as opposed 
to interpretations like 'hyperkalemia'.  The also may report results like
'hemolyzed' or 'my dog ate brain biopsy specimen - please obtain another'."
  ))
)

(define-frame HAS-SPECIMEN
 :theory triad-mini-vocab
 :own-slots (
  (INSTANCE-OF relation)
  (ARITY 2)
  (RANGE SPECIMEN)
  (DOCUMENTATION "This is the slot name (relation) with range 'SPECIMEN'")
  )
)

(define-frame SPECIMEN
 :theory triad-mini-vocab
 :own-slots (
  (INSTANCE-OF class)
  (DOCUMENTATION "we can discuss another day whether specimens are simply 
anatomic and other substances (pool water, etc.) or whether there should be
some other attributes, such as collection method (blood collected with
heparin vs citrate vs sterile collection).  The UMLS would treat them as
anatomic substances.  The work Stan is doing with Clem et al. on lab codes
standards purports to treat them as anatomic substances but will
differentiate as needed to distinguish tests with different reference
ranges.  If it gets too complicated ('blood from left arm on ice') they
would instantiate the information at the time of an actual patient event.
But at some level, I believe there is a notion of a specimen as different
from a body part (such as the color of the stopper on the tube)."
  ))
)

(define-frame HAS-COMPONENT-TESTS
 :theory triad-mini-vocab
 :own-slots (
  (INSTANCE-OF relation)
  (ARITY 2)
  (RANGE SINGLE-RESULT-LABORATORY-TEST)
  )
)

;*------------------------------------------------------------------25/Aug/94-*
;* Here are the actual "content" concepts...
;*--------------------------------------------------------------------gennari-*

(define-frame ENTITY
 :theory triad-mini-vocab
 :own-slots (
  (INSTANCE-OF class)
  (DOCUMENTATION "The class of all concepts to be included in the
collaborative vocabulary knowledge base")
  (SYNONYM "Medical Entity")
  (PRINT-NAME "Entity")
  (UMLS-CODE "T071")
  (CODE 1)
  )
)

(define-frame PROCEDURE
 :theory triad-mini-vocab
 :own-slots (
  (INSTANCE-OF class)
  (SUBCLASS-OF ENTITY)
  (DOCUMENTATION "A named sequence of actions which forms a coherent process
or activity")
  (PRINT-NAME "Procedure")
  (SNOMED-CODE "P0-00000")
  (CODE 2)
  )
)

(define-frame DIAGNOSTIC-PROCEDURE
 :theory triad-mini-vocab
 :own-slots (
  (INSTANCE-OF class)
  (SUBCLASS-OF PROCEDURE)
  (DOCUMENTATION "A procedure, method, or technique used to determine the
nature or identity of a disease or disorder.  Its performance is
associated with some kind of result." )
  (PRINT-NAME "Diagnostic Procedure")
  (UMLS-CODE "T060")
  (CODE 3)
  )
 :template-slots (
  (HAS-FINDING (Slot-Value-Type FINDING))
  )
)

(define-frame ANALYTIC-TECHNIQUE
 :theory triad-mini-vocab
 :own-slots (
  (INSTANCE-OF class)
  (SUBCLASS-OF PROCEDURE)
  (PRINT-NAME "Analytic Technique")
  (UMLS-CODE "T059")
  (CODE 32)
  )
)

(define-frame LABORATORY-DIAGNOSTIC-PROCEDURE
 :theory triad-mini-vocab
 :own-slots (
  (INSTANCE-OF class)
  (SUBCLASS-OF DIAGNOSTIC-PROCEDURE)
  (DOCUMENTATION "A diagnostic procedure which is performed remotely from
the patient in question.  It generally involves the extraction of some
physical component from its original site (usually a patient), transport
to another location and performance of the procedure.  Sometimes, there
is no patient involved (such as testing drinking water), sometimes the
entire patient is removed (as in an autopsy) and sometimes the test may
be done quite close to the patient (such as a stool blood test)." )
  (PRINT-NAME "Laboratory Diagnostic Procedure")
  (UMLS-CODE "T059")
  (SNOMED-CODE "P3-00000")
  (CODE 4)
  )
 :template-slots (
  (HAS-FINDING (Slot-Value-Type FINDING))
  (HAS-SPECIMEN (Slot-Value-Type SPECIMEN))
 )
)

(define-frame SINGLE-RESULT-LABORATORY-TEST
 :theory triad-mini-vocab
 :own-slots (
  (INSTANCE-OF class)
  (SUBCLASS-OF LABORATORY-DIAGNOSTIC-PROCEDURE)
  (DOCUMENTATION "A laboratory diagnostic procedure associated with a single
measurement or result." )
  (PRINT-NAME "Single-result Laboratory Diagnostic Test")
  (SNOMED-CODE "P3-00030")
  (CODE 5)
  )
 :template-slots (
    (HAS-FINDING (Slot-Value-Type FINDING))
    (HAS-SPECIMEN (Slot-Value-Type SPECIMEN))
    (MEASURES (Slot-Value-Type MEASURABLE-SUBSTANCE))
  )
)

(define-frame MULTI-COMPONENT-LABORATORY-PROCEDURE
 :theory triad-mini-vocab
 :own-slots (
  (INSTANCE-OF class)
  (SUBCLASS-OF LABORATORY-DIAGNOSTIC-PROCEDURE)
  (DOCUMENTATION "A laboratory diagnostic procedure composed of single-result tests.")
  (PRINT-NAME "Single-result Laboratory Diagnostic Test")
  (CODE 6)
  )
 :template-slots (
    (HAS-FINDING (Slot-Value-Type FINDING))
    (HAS-SPECIMEN (Slot-Value-Type SPECIMEN))
    (HAS-COMPONENT-TESTS (Slot-Value-Type SINGLE-RESULT-LABORATORY-TEST))
  )
)

This Lisp-to-HTML translation was brought to you by
François Gerbaux and Tom Gruber