Temporal Mediators:Integration of Temporal Reasoning and Temporal-Data Maintenance
Yuval Shahar MD, PhDYuval Shahar MD, PhD
Temporal Reasoning and Planning in Medicine
Temporal Reasoning and Temporal Maintenance
Temporal reasoningTemporal reasoning supports inference tasks supports inference tasks involving time-oriented data; often connected with involving time-oriented data; often connected with artificial-intelligence methodsartificial-intelligence methods
Temporal data maintenanceTemporal data maintenance deals with storage and deals with storage and retrieval of data that has multiple temporal retrieval of data that has multiple temporal dimensions; often connected with database systemsdimensions; often connected with database systems
Both require temporal data modellingBoth require temporal data modelling
Clinicaldecision-supportapplication
TM TR DB
Examples of Temporal-Maintenance Systems
TSQL2TSQL2, a bitemporal-database query , a bitemporal-database query language (Snodgrass et al., Arizona)language (Snodgrass et al., Arizona)
TNETTNET and the and the TQueryTQuery language (Kahn, language (Kahn, Stanford/UCSF)Stanford/UCSF)
The The ChronusChronus//Chronus2Chronus2 projects (Stanford) projects (Stanford)
Examples of Temporal-Reasoning Systems
RÉSUMÉRÉSUMÉ M-HTPM-HTP TOPAZTOPAZ TrenDxTrenDx
A Typical TM and TR Application:Automated Support to Therapy by
Clinical Guidelines/Protocols
Clinical guidelines/protocols contain Clinical guidelines/protocols contain recommendations for medical interventions that recommendations for medical interventions that are predicated on the observation of:are predicated on the observation of: relevant temporal patterns of these statesrelevant temporal patterns of these states relevant patient statesrelevant patient states
CCTG-522 Recommendation
Modify the standard dose of AZT for a patient Modify the standard dose of AZT for a patient if, if, during treatment with the protocolduring treatment with the protocol, the , the patient experiences a patient experiences a second episodesecond episode of of moderate anemiamoderate anemia that has that has persisted for more persisted for more than two weeksthan two weeks
Protocol-Based Decision Support System
Presents patient-specific recommendationsPresents patient-specific recommendations Needs a method for verifying the presence of Needs a method for verifying the presence of
time-oriented patient conditions in a databasetime-oriented patient conditions in a database
Information Mismatch
Temporal Abstraction
Defined as the creation of high-level summaries of Defined as the creation of high-level summaries of time-oriented datatime-oriented data
Necessary becauseNecessary because clinical databases usually store raw, time-stamped dataclinical databases usually store raw, time-stamped data protocols often require information in high-level termsprotocols often require information in high-level terms
Temporal Patterns
Temporal Maintenance
Defined as the storage of time-oriented data and Defined as the storage of time-oriented data and the selective retrieval of that data based on some the selective retrieval of that data based on some time-oriented constrainttime-oriented constraint
Necessary because clinical conditions may be Necessary because clinical conditions may be defined as temporal patternsdefined as temporal patterns temporal ordertemporal order temporal durationtemporal duration temporal contexttemporal context
Temporal Data Manager
PerformsPerforms temporal abstraction of time-oriented datatemporal abstraction of time-oriented data temporal maintenancetemporal maintenance
Used for tasks such as finding in a patient Used for tasks such as finding in a patient database which patients fulfil eligibility conditions database which patients fulfil eligibility conditions (expressed as temporal patterns), assessing the (expressed as temporal patterns), assessing the quality of care by comparison to predefined time-quality of care by comparison to predefined time-oriented goals, or visualization temporal patterns oriented goals, or visualization temporal patterns in the patient datain the patient data
Embedding A Temporal Data Manager Within a Guideline-
Support System Can be embedded within a Can be embedded within a
larger decision support larger decision support framework, e.g., EONframework, e.g., EON
Mediates all access to the Mediates all access to the external clinical databaseexternal clinical database
1) Extend DBMS 2) Extend Application
Two Implementation Strategies
Database
Application
Temporal Data Management
Database
Application
Temporal Data Management
Problems Extending DBMS
Temporal data Temporal data management methods management methods implemented in implemented in DBMS:DBMS: are limited to are limited to
producing very simple producing very simple abstractionsabstractions
are often database-are often database-specificspecific
Database
Application
Temporal Data Management
Problems Extending Applications
Temporal data Temporal data management methods management methods implemented in implemented in applications: applications: duplicate some duplicate some
functions of the DBMSfunctions of the DBMS are application-specificare application-specific Database
Application
Temporal Data Management
Our Strategy
Separates data Separates data management methods management methods from the application from the application and the databaseand the database
Decomposes temporal Decomposes temporal data management into data management into two general tasks:two general tasks: temporal abstractiontemporal abstraction temporal maintenancetemporal maintenance
Database
Application
Temporal AbstractionTemporal Querying
The Tzolkin Temporal Mediator Architecture
Database
Application
Temporal-QueryingModule
TemporalAbstraction
Module
KnowledgeBase
Tzolkin
ResultsQuery
AbstractionKnowledge
RÉSUMÉ: Temporal AbstractionRÉSUMÉ: Temporal Abstraction
Creates summaries of time-oriented dataCreates summaries of time-oriented data Clinical data is usually stored as “low-level” dataClinical data is usually stored as “low-level” data Protocols often specify conditions as “high-level”, Protocols often specify conditions as “high-level”,
interval-based conceptsinterval-based concepts
Is domain-independentIs domain-independent Has a tool that facilitates knowledge acquisition Has a tool that facilitates knowledge acquisition
and maintenanceand maintenance
Temporal Abstraction of Hb
Chronus: Temporal Maintenance
Provides temporal extensions to SQLProvides temporal extensions to SQL
Historical relational modelHistorical relational model Each tuple has two time stampsEach tuple has two time stamps Time stamps conferred special statusTime stamps conferred special status
Temporal algebra that supports temporal Temporal algebra that supports temporal manipulationsmanipulations Closed algebraClosed algebra Complete for the temporal conditions found in Complete for the temporal conditions found in
protocolsprotocols
Chronus TimeLine SQL (TL-SQL)
GRAIN WEEKSELECT 2ND problem_nameFROM problems_tableWHERE problem_name = ‘Hb’WHENSTART_TIME BEFORE 1/1/99
Coupling RÉSUMÉ and ChronusRÉSUMÉ and Chronus
Integrates Integrates temporal abstractiontemporal abstraction and and temporal temporal query processingquery processing
Allows retrieval of summaries of clinical data Allows retrieval of summaries of clinical data using time-oriented conditionsusing time-oriented conditions
Modify the standard dose of AZT for a patient if, Modify the standard dose of AZT for a patient if, during treatment with the protocolduring treatment with the protocol, the patient , the patient experiences a experiences a second episodesecond episode of of moderate anemiamoderate anemia that has that has persisted for more than two weekspersisted for more than two weeks
SQLA Interface Language
Based on SQLBased on SQL Supports temporal queriesSupports temporal queries Detects when abstractions are requested and computes them Detects when abstractions are requested and computes them
on the flyon the fly
GRAINGRAIN WEEKWEEK CONTEXTCONTEXT CCTG-522CCTG-522
SELECTSELECT 2ND2ND problem_name problem_nameFROMFROM problems_tableproblems_tableWHEREWHERE problem_name = problem_name = ‘HbState’‘HbState’
and value = ‘moderate anemia’and value = ‘moderate anemia’WHENWHEN DURATION (start, stop) > 2DURATION (start, stop) > 2
Query-Evaluation Algorithm
A Detailed Example
GRAINGRAIN WEEKWEEK CONTEXTCONTEXT CCTG-522CCTG-522
SELECTSELECT 2ND2ND problem_name problem_nameFROMFROM problems_tableproblems_tableWHEREWHERE problem_name = problem_name = ‘HbState’‘HbState’
and value = ‘moderate anemia’and value = ‘moderate anemia’WHENWHEN DURATION (start, stop) > 2DURATION (start, stop) > 2
Loading the Domain Knowledge
Examine the context clause of the SQLA statement, which Examine the context clause of the SQLA statement, which contains a reference to a knowledge basecontains a reference to a knowledge base
Use the reference to locate and load the appropriate Use the reference to locate and load the appropriate knowledge baseknowledge base
Detecting the Need for Abstractions
Find non-Find non-SQLASQLA terms in terms in WHEREWHERE clause clause (“HbState” and (“HbState” and
““moderate anemia”)moderate anemia”)
Look up terms in Look up terms in RESUME KBRESUME KB
If look-up succeeds, If look-up succeeds, Tzolkin needs to compute Tzolkin needs to compute abstractionsabstractions(“HbState”)(“HbState”)
Hb WBC Plt
HbState WBCState PltState
Blood State
Loading the Data Primitives
Locate the requested Locate the requested abstraction in the abstraction in the RESUME KBRESUME KB(“HbState”)(“HbState”)
Find the primitive Find the primitive parameters (leaves of the parameters (leaves of the tree) below ittree) below it(“Hb”)(“Hb”)
Load all patient data of Load all patient data of these parameter types into these parameter types into RESUMERESUME
Hb WBC Plt
HbState WBCState PltState
Blood State
Generating the Interpretation Contexts within RÉSUMÉRÉSUMÉ
Find the Find the typestypes of events and abstractions that can induce of events and abstractions that can induce a context (via a dynamic induction relation of contexts)a context (via a dynamic induction relation of contexts)(context CCTG522 can be induced by event: “enroll-CCTG 522”)(context CCTG522 can be induced by event: “enroll-CCTG 522”)
Locate patient-specific instances of these eventsLocate patient-specific instances of these events(patient enrolled in CCTG 522 on 10/10/1999)(patient enrolled in CCTG 522 on 10/10/1999)
Compute all abstractions that can induce a context Compute all abstractions that can induce a context (recursive process)(recursive process)
RESUME will then generate the appropriate contextsRESUME will then generate the appropriate contexts
Invoking RÉSUMÉRÉSUMÉ and Chronus
Execute RESUME to compute the requested abstractionsExecute RESUME to compute the requested abstractions The computed abstractions are stored in the databaseThe computed abstractions are stored in the database RESUME signals Tzolkin when it is doneRESUME signals Tzolkin when it is done
Then execute Chronus to retrieve the results Then execute Chronus to retrieve the results
Future Research Directions
Enhancement of the query languageEnhancement of the query language Addition of Addition of truth-maintenancetruth-maintenance capabilities to the capabilities to the
databasedatabase Addition of “Addition of “what-ifwhat-if” query support” query support Provision of complete Provision of complete dynamicdynamic ( (goal-directedgoal-directed) )
query computationquery computation