Applying formal methods to clinical guidelines: the case of temporal information
Paolo TerenzianiDipartimento di Informatica,
Univ. del Piemonte Orientale “Amedeo Avogadro”, Via Bellini 25\g, 15100 Alessandria, Italy
Aberdeen,June4th,2008
Myfavouriteresearchtopic:Dealingwithtime-relatedphenomena
Knowl.Repr.
ConstraintsPeriodicity
TDBSemanticsConstraintsDB
PeriodicityDB
MedicalInfo.
TIME
Overview of the presentation
• experienceintheGLcontext:theGLAREproject(sketch)
• temporalinformationinclinicalrecordstemporaldatabases
• temporalinformationintheguidelinesreasoningabouttemporalconstraints
• conclusions
GLARE(GuideLineAcquisitionRepresentationand
Execution)
- Jointproject(startedin1997):Dept.Comp.Sci.,Univ.Alessandria(It):P.Terenziani,S.Montani,A.BottrighiDept.Comp.Sci.,Univ.Torino(It):L.Anselma,G.CorrendoAz.Osp.S.GiovanniBattista,Torino(It):G.Molino,M.TorchioKoinèSistemiS.p.A,Torino(It)(from2005)
- Domain independent(e.g.,bladdercancer,refluxesophagitis,heartfailure,ichemic
stroke)
- Phisician-oriented & User-friendly
GLARE Representation Formalism
InGLARE,aclinicalguidelineisahierarchicalgraphsofactions
GLARE: Architecture of the KERNEL
ClinicalDB
Pharmac.DB
ResourceDB
ICDDB
ExpertPhysician
AcquisitionInterface
GuidelinesDB
KnowledgeManager
UserPhysician
ExecutionInterface
GuidelinesInstantiationDB
PatientDB
ExecutionModule
GLARE: Architecture of the system
GLAREKERNEL
Decision-MakingModule
TemporalReasoningModule
UpdateModule
ContextualizationModule
Model-CheckingModule
SPIN
Overview of the presentation
• experienceintheGLcontext:theGLAREproject(sketch)
• temporal information in clinical records temporal databases (TDBs)
• temporalinformationintheguidelinesreasoningabouttemporalconstraints
• conclusions
Copingwithtemporalinformationinpatients’records:theneedforTemporalDatabases
(1) Needforcopingwithtemporaldata(bothVTandTT)
(2) Justadding1(or2,or4)temporalattributes(andmaybesomead-hocprocedures)doesnotwork!
(3) First,arigoroussemanticframeworkisneeded,togiveformalspecificationtotheimplementation.Properties:clearness,expressiveness,upwardcompatibiliy.Ex.BCDM
(4) Second,theimplementationmustbeproventorespectthesemantics.Coreissuehere:efficient(1-NF)
implementationshardlygrantuniquenessof representation.ExTSQL2
(5) Otherissues(myworkinthearea)
(1)Needforcopingwithtemporaldatainpatients’clinicalrecords
Thetimewhenpatients’symptomshold,laboratoryexaminationsandclinicalactionsareperformed,etc.arecorepiecesofinformationvalidtime
Thetimewhendataareinserted\deletedintotheDBisimportant(e.g.,justificationofactions,legalpurposes)transactiontime
Ex.LabtestXhasbeenexecutedonJan1st,2008,andresultshavebeeninsertedinthepatient’sclinicalrecordonJan3rd
NOTICE:majorproblemsevenwithvalidtimealone!
Copingwithtemporalinformationinpatients’records:theneedforTemporalDatabases
(1) Needforcopingwithtemporaldata(bothVTandTT)
(2) Justadding1(or2,or4)temporalattributes(andmaybesomead-hocprocedures)doesnotwork!
(3) First,arigoroussemanticframeworkisneeded,togiveformalspecificationtotheimplementation.Properties:clearness,expressiveness,upwardcompatibiliy.Ex.BCDM
(4) Second,theimplementationmustbeproventorespectthesemantics.Coreissuehere:efficient(1-NF)
implementationshardlygrantuniquenessof representation.ExTSQL2
(5) Otherissues(myworkinthearea)
Ad-hocapproachesarecomplexandarenotlikelytowork
Example1.Projection(andtemporalcoalescing)
Name Salary Title VT_start VT_end
Andrea 60000 Ass.Provost 1/1/1993 30/5/1993
Andrea 70000 Ass.Provost 1/6/1993 30/9/1993
Andrea 70000 Provost 1/10/1993 31/1/1994
Andrea 70000 Professor 1/2/1994 31/12/1994
Question:salaryhistoryofAndrea
“Intuitive”SQLquery:SELECTSalary,VT_start,VT_endFROMEmployeeWHEREName=“Andrea”
Ad-hocapproachesarecomplexandarenotlikelytowork
Resultobtained: Salary VT_start VT_end
60000 1/1/1993 30/5/1993
70000 1/6/1993 30/9/1993
70000 1/10/1993 31/1/1994
70000 1/2/1994 31/12/1994
Desiredresult: Salary VT_start VT_end
60000 1/1/1993 30/5/1993
70000 1/6/1993 31/12/1994
Ad-hocapproachesarecomplexandarenotlikelytowork
HowtogetthedesiredresultusingSQL92:
CREATETABLETemp(Salary,VT_start,VT_end)AS SELECTSalary,VT_start,VT_end
FROMEmployeeWHEREName=“Andrea”;
RepeatUPDATETempT1SET(T1.VT_end)=SELECTMAX(T2.VT_end)WHERE T1.Salary=T2.SalaryANDT1.VT_start<T2.VT_StartAND
T1.VT_end>=T2.VT_startANDT1.VT_end<T2.VT_endWHEREEXISTS (SELECT*
FROMTempAST2WHERE T1.Salary=T2.SalaryANDT1.VT_start<T2.VT_Start
ANDT1.VT_end>=T2.VT_startANDT1.VT_end<T2.VT_end)
Untilnotuplesupdated
Ad-hocapproachesarecomplexandarenotlikelytowork
HowtogetthedesiredresultusingSQL92(continues!):
DELETEFROMTempT1WHEREEXISTS (SELECT*
FROMTempAST2WHERET1.Salary=T2.SalaryAND((T1.VT_start>T2.VT_Start)AND(T1.VT_end<=T2.VT_end))OR((T1.VT_start>=T2.VT_Start)AND(T1.VT_end<T2.VT_end))
Ad-hocapproachesarecomplexandarenotlikelytowork
Underlyingsemanticphenomenon:
Projectionontemporalrelationsinvolvestemporalcoalescingaboutvalueequivalenttuples
Whenitoccurs(SQL):
WheneverapropersubsetoftheattributesoftherelationsischosenintheSELECTpartofthequery
Ad-hocapproachesarecomplexandarenotlikelytowork
HowtogetthedesiredresultusingaTemporalDB(ex.TSQL2)
SELECTSalaryFROMEmployeeWHEREName=“Andrea”
Ad-hocapproachesarecomplexandarenotlikelytowork
Example2.Join(andtemporalintersection)
Name Salary VT_start VT_end
Andrea 60000 1/1/1993 30/5/1993
Andrea 70000 1/6/1993 31/12/1994
Employee1
Name Title VT_start VT_end
Andrea Ass.Provost 1/1/1993 30/9/1993
Andrea Provost 1/10/1993 31/1/1994
Andrea Professor 1/2/1994 31/12/1994
Employee2
Query:“combined”historyofbothAndrea’ssalaryandtitle
Ad-hocapproachesarecomplexandarenotlikelytowork
“Intuitive”SQLquery:SELECTSalary,Title,Emp1.VT_start,Emp1.VT_end
Emp2.VT_start,Emp2.VT_endFROM Employee1,Employee2WHERE Employee1.Name=“Andrea”AND
Employee1.Name=“Andrea”
Ad-hocapproachesarecomplexandarenotlikelytowork
Resultobtained:
Salary Emp1.VT_start
Emp1.VT_end
Title Emp2.VT_start
Emp2.VT_end
60000 1/1/1993 30/5/1993 Ass.Provost 1/1/1993 30/9/1993
60000 1/1/1993 30/5/1993 Provost 1/10/1993 31/1/1994
60000 1/1/1993 30/5/1993 Professor 1/2/1994 31/12/1994
70000 1/6/1993 31/12/1994 Ass.Provost 1/1/1993 30/9/1993
70000 1/6/1993 31/12/1994 Provost 1/10/1993 31/1/1994
70000 1/6/1993 31/12/1994 Professor 1/2/1994 31/12/1994
Ad-hocapproachesarecomplexandarenotlikelytowork
Resultdesired:
Salary Title VT_start VT_end
60000 Ass.Provost 1/1/1993 30/5/1993
70000 Ass.Provost 1/6/1993 30/9/1993
70000 Provost 1/10/1993 31/1/1994
70000 Professor 1/2/1994 31/12/1994
Ad-hocapproachesarecomplexandarenotlikelytowork
HowtogetthedesiredresultusingSQL92:SELECTEmployee1.Name,Salary,Dept,Employee1.VT_start,Employee1.VT_endFROMEmployee1,Employee2WHEREEmployee1.Name=Employee2.NameANDEmployee2.VT_start<=Employee1.VT_startANDEmployee1.VT_end<Employee2.VT_endUNIONSELECTEmployee1.Name,Salary,Dept,Employee1.VT_start,Employee2.VT_endFROMEmployee1,Employee2WHEREEmployee1.Name=Employee2.NameANDEmployee1.VT_start>=Employee2.VT_startANDEmployee2.VT_end<Employee1.VT_endANDEmployye1.VT_start<Employee2.VT_endUNIONSELECTEmployee1.Name,Salary,Dept,Employee2.VT_start,Employee1.VT_endFROMEmployee1,Employee2WHEREEmployee1.Name=Employee2.NameANDEmployee2.VT_start>Employee2.VT_startANDEmployee1.VT_end<Employee2.VT_endANDEmployye2.VT_start<Employee1.VT_endUNIONSELECTEmployee1.Name,Salary,Dept,Employee2.VT_start,Employee2.VT_endFROMEmployee1,Employee2WHEREEmployee1.Name=Employee2.NameANDEmployee2.VT_start>Employee1.VT_startANDEmployee2.VT_end<Employee1.VT_end
Ad-hocapproachesarecomplexandarenotlikelytowork
Underlyingsemanticphenomenon:
Join(Cartesianproduct)ontemporalrelationsinvolvestemporalintersection
Whenitoccurs(SQL):
WhenevermorethanonerelationisusedintheFROMpartofthequery
Note:thenumberoftermsintheSQLunionis2n,wherenisthenumberofrelationsintheFROMpart
Ad-hocapproachesarecomplexandarenotlikelytowork
HowtogetthedesiredresultusingaTemporalDB(ex.TSQL2)
SELECTSalary,TitleFROM Employee1,Employee2WHERE Employee1.Name=“Andrea”AND
Employee1.Name=“Andrea”
Ad-hocapproachesarecomplexandarenotlikelytowork
And what about:- Union,difference,…,nestedqueries- Temporalpredicates- Primary\secondarykeys- Aggregatefunctions- Integrityconstraints- Multiple(user-defined!)granularities- ……- arbitrarycombinationsofalltheaboveissues
Untilnow,justtwosimpleexamplesconcerning:-SELECTasubsetofattributes(looptodocolaescing)-FROMwith>1relations(exponentialuniontodointersection)
?
Ad-hocapproachesarecomplexandarenotlikelytowork
Keymessage:- DealingwithtemporaldataisageneralprobleminDB’s- Difficultproblems(often“hidden”ones)havetobefaced
FromaSoftwareEngeneeringpointofview:Lettingapplicationssolvetheprobleminanad-hocwayis:- Bothcostandtimeexpensive- Likelytoleadtoerrorsintheapplications- Likelytomakeintegration(shareddata)betweenapplicationsimpossible
Ad-hocapproachesarecomplexandarenotlikelytowork
Temporal DB: an area of research aiming at
providing once-and-forall principled and integrated solution to the problem
Copingwithtemporalinformationinpatients’records:theneedforTemporalDatabases
(1) Needforcopingwithtemporaldata(bothVTandTT)
(2) Justadding1(or2,or4)temporalattributes(andmaybesomead-hocprocedures)doesnotwork!
(3) First,arigoroussemanticframeworkisneeded,togiveformalspecificationtotheimplementation.Properties:clearness,expressiveness,upwardcompatibiliy.Ex.BCDM
(4) Second,theimplementationmustbeproventorespectthesemantics.Coreissuehere:efficient(1-NF)
implementationshardlygrantuniquenessof representation.ExTSQL2
(5) Otherissues(myworkinthearea)
BCDM(BitemporalConceptualDataModel)
Snodgrass & Jensen, 1995
Aunifying“consensus” model,capturingthesemanticsofmostapproachesintheTDBliterature
- Basedontherelationalmodel,andtupletimestamping- Apurelysemanticmodel(efficiencyissuesarenottaken
intoaccount)
BCDM
TemporalDomains
- Timeislinearandtotallyordered- Chrononsarethebasictimeunit- Timedomainsareisomorphictosubsetsofthedomain
ofNaturalnumbers
DVT={t1,t2,…,tk} (validtime)DTT={t’1,t’2,…,t’h}{UC} (transactiontime)DTTDVT (bitemporalchronons)
BCDM
Data
Attributenames:DA={A1,A2,…,An}AttributedomainsDD={D1,D2,…,Dn}
Schemaofabitemporalrelation:R=Ai1,Ai2,…,AijT
Domainofabitemporalrelation:Di1Di2…DijDTTDVT
Tupleofarelationr(R):x=(a1,a2,…,aj|tB)
BCDM
Example.RelationEmployeewithSchema:(name,salary,T)
“Andreawasearning60Katvalidtimes10,11,12SuchatuplehasbeeninsertedintoEmployeeattime12,andiscurrentnow(saynow=13)”
(Andrea,60k|{(12,10),(12,11),(12,12),(13,10),(13,11),(13,12),……})
VT
TT
10
12
12 13
11
BCDM
Example.RelationEmployeewithSchema:(name,salary,T)
“Andreawasearning60Katvalidtimes10,11,12SuchatuplehasbeeninsertedintoEmployeeattime12,andiscurrentnow(saynow=13)”
(Andrea,60k|{(12,10),(12,11),(12,12),(13,10),(13,11),(13,12),(UC,10),(UC,11),(UC,12)})
VT
TT
10
12
12 13
11
UC
BCDM
Bitemporal relation:setofbitemporaltuples.Constraint:Valueequivalenttuplesarenotallowed.
(Bitemporal)DB:setof(bitemporal)relations
BCDM
Semantics (another viewpoint)
Name Salary T
Andrea 60K {(12,10),(12,11),(12,12),(13,10),(13,11),(13,12),(UC,10),(UC,11),(UC,12)}
John 50K {(12,12),(12,13)}
(12,10){Employee(Andrea,60K)}(12,11){Employee(Andrea,60K)}(12,12){Employee(Andrea,60K),Employee(John,50K)}(12,13){Employee(John,50K)}(13,10){Employee(Andrea,60K)}(13,11){Employee(Andrea,60K)}……..(UC,12){Employee(Andrea,60K)}
BCDM
PROPERTIES
Consistent extension (of “classical” SQL DB)AtemporalDBisasetof“classical”DBs,oneforeachbitemporalchronon
Uniqueness of representation(fromtheconstraintaboutvalueequivalenttuples)
BCDM
Semantics of UCe.g.,theDB’sclockthickstime14
Name Salary T
Andrea 60K {(12,10),(12,11),(12,12),(13,10),(13,11),(13,12),(UC,10),(UC,11),(UC,12)}
John 50K {(12,12),(12,13)}
Name Salary T
Andrea 60K {(12,10),(12,11),(12,12),(13,10),(13,11),(13,12),(14,10), (14,11), (14,12), (UC,10),(UC,11),(UC,12)}
John 50K {(12,12),(12,13)}
BCDM
deletion (e.g.,attime15)delete(Employee,(Andrea,60K))
Name Salary T
Andrea 60K {(12,10),(12,11),(12,12),(13,10),(13,11),(13,12),(14,10),(14,11),(14,12), (UC,10),(UC,11),(UC,12)}
John 50K {(12,12),(12,13)}
Name Salary T
Andrea 60K {(12,10),(12,11),(12,12),(13,10),(13,11),(13,12),(14,10),(14,11),(14,12), (UC,10),(UC,11),(UC,12)}
John 50K {(12,12),(12,13)}
BCDM
insertion (e.g.,attime16)insert(Employee,(Andrea,60K|{12,13}))insert(Employee,(Mary,70K|{16}))
Name Salary T
Andrea 60K {(12,10),(12,11),(12,12),(13,10),(13,11),(13,12),(14,10),(14,11),(14,12), (UC,10),(UC,11),(UC,12)}
John 50K {(12,12),(12,13)}
Name Salary T
Andrea 60K {(12,10),(12,11),(12,12),(13,10),(13,11),(13,12),(14,10),(14,11),(14,12),(16,12),(16,13),(UC,12),(UC,13) }
John 50K {(12,12),(12,13)}
Mary 70K {(16,16),(UC,16)}
BCDM
πD(r)={z|∃xr (z[D]=x[D]) ∧ ∀ yr (y[D]=z[D] ⇒ y[T] z[T]) ∧ ∀ tz[T] ∃yr (y[D]=z[D] ∧ ty[T])}
Algebraic Operators(Ex. Projection)
- Novalue-equivalenttuplegenerated(uniquenessofrepresentation!)
- Coalescing!
BCDM
BCDMalgebraicoperatorsareaconsistentextensionofSQL’sones(reducibilityandequivalence)
Algebraic OperatorsProperties
BCDM
Reducibility
rT ρtT(rT)ρtT
opT(rT)
opT op
op(ρtT(rT))ρtT
ρtT(opT(rT))=
BCDM
Equivalence
rτt τt(r)
opTop
op(r)τt
τt(op(r))=opT(τt(r))
BCDM
PROBLEM
Semanticallyclearbut…..inefficient(notsuitablefora“direct”implementation)
(1) Not1-NF
(2) UC(ateachthickoftheclock,allcurrenttuples
shouldbe updated!)
Copingwithtemporalinformationinpatients’records:theneedforTemporalDatabases
(1) Needforcopingwithtemporaldata(bothVTandTT)
(2) Justadding1(or2,or4)temporalattributes(andmaybesomead-hocprocedures)doesnotwork!
(3) First,arigoroussemanticframeworkisneeded,togiveformalspecificationtotheimplementation.Properties:clearness,expressiveness,upwardcompatibiliy.Ex.BCDM
(4) Second,theimplementationmustbeproventorespectthesemantics.Coreissuehere:efficient(1-NF)
implementationshardlygrantuniquenessof representation.ExTSQL2
(5) Otherissues(myworkinthearea)
Anexampleofimplementation:TSQL2(Snodgrass et al., 1995)
TemporalattributeTfourtemporalattributes(TTS,TTE,VTS,VTE)
Attributevalue:atimestamporUC
Bitemporaltuple:A1,….An|TTS,TTE,VTS,VTE
Bitemporalrelation:setofbitemporaltuples
Notice: to retain the expressiveness of BCDM, value-equivalent tuples need to be allowed!
Anexampleofimplementation:TSQL2(Snodgrassetal.,1995)
Name Salary T
Andrea 60K {(12,10),(12,11),(12,12),(13,10),(13,11),(13,12),(UC,10),(UC,11),(UC,12)}
John 50K {(12,12),(12,13)}
Name Salary TTS TTE VTS VTE
Andrea 60K 12 UC 10 12
John 50K 12 12 12 13
SEMANTICS
BCDM
TSQL2
Anexampleofimplementation:TSQL2(Snodgrassetal.,1995)
Efficientimplementation(datamodel):- 1-NF- UCmanagedefficiently- clearsemantics(mappingontoBCDM)
BUT
to get efficiency, we loose the uniqueness of representation property
Problem:nouniquenessofrepresentation
Name Salary T
Andrea 60K {(10,2),(10,3),(11,2),(11,3),(12,1),(12,2),(12,3),(12,4),(13,1),(13,2),(13,3),(13,4)}
Name Salary TTS TTE VTS VTE
Andrea 60K 10 11 2 3
Andrea 60K 12 UC 1 4
Name Salary TTS TTE VTS VTE
Andrea 60K 12 UC 1 1
Andrea 60K 10 UC 2 3
Andrea 60K 12 UC 4 4
BCDM
SEMANTICSTSQL2(a) TSQL2(b)
Example. Attime10,thefactthatAndreaearned60Kfrom2to3insertedinEmployee.Attime12,suchatupleisupdated:Andreaearned60Kfrom1to4.Attime13,thetupleis(logically)deleted.
Problem:nouniquenessofrepresentation
VT
TT
12
12 13
3
4
10 11
TSQL2implementation:“covering”rectangles
Problem:nouniquenessofrepresentation
VT
TT
12
12 13
3
4
10 11
TSQL2Representation(a)
Name Salary TTS TTE VTS VTE
Andrea 60K 10 11 2 3
Andrea 60K 12 UC 1 4
Problem:nouniquenessofrepresentation
VT
TT
12
12 13
3
4
10 11
TSQL2Representation(b)
Name Salary TTS TTE VTS VTE
Andrea 60K 12 UC 1 1
Andrea 60K 10 UC 2 3
Andrea 60K 12 UC 4 4
Problem:nouniquenessofrepresentation
VT
TT
12
12 13
3
4
10 11
OtherTSQL2Representations!!
Problem:nouniquenessofrepresentation
Name Salary TTS TTE VTS VTE
Andrea 60K 10 11 2 3
Andrea 60K 12 UC 1 4
Name Salary TTS TTE VTS VTE
Andrea 60K 12 UC 1 1
Andrea 60K 10 UC 2 3
Andrea 60K 12 UC 4 4
Potentially,anenormousproblem!
e.g.,Returnallemployeesearningmorethan50Kforatmost3consecutivetimechronons
Name TTS TTE VTS VTE
Andrea 12 UC 1 4?
Problem:nouniquenessofrepresentation
One must grant that the temporal DB implementation respects its underlying semantics, independently of the representation
DB1
DB2
op1,…,opkDB1’
DB2’op1,…,opk
Giventwo“semanticallyequivalent”temporalDBs,andgivenanysequenceofoperations,theresultsarealways“semanticequivalent”
Otherwise …..We cannot trust DB’s results!
Problem:nouniquenessofrepresentation
Solution. Step 1. Formal definition of “semantic equivalence”
Snapshot equivalence:Informally:tworelations(Databases)aresnapshotequivalentiftheyareidenticalateachbitemporalchronon
Problem:nouniquenessofrepresentation
Solution. Step 2. Definition of manipulation and algebraic operators that preserve snapshot equivalence
e.g., proofs given about TSQL2 (bitemporal) operators
rB1
rB2
opBi
opBi
opBi(rB1)
opBi(rB2)
snapshotequivalent
snapshotequivalent
Anexampleofimplementation:TSQL2(Snodgrassetal.,1995)
Last,butnotleast,
Anhigh-levelqueryandmanipulationlanguage(minimalextensiontoSQLtocopewithtime)isprovided
Anexampleofimplementation:TSQL2(Snodgrassetal.,1995)
OtherpropertiesprovedforTSQL2
(UpwardCompatibility)TSQL2isaconsistentextensionofSQL
Personalconsideration
Inmyopinion,ad-hocapproachesarenotlikelyto- Recognize- Solve- Provethesoundnessofthesolutionstheaboveproblems!
Copingwithtemporalinformationinpatients’records:theneedforTemporalDatabases
(1) Needforcopingwithtemporaldata(bothVTandTT)
(2) Justadding1(or2,or4)temporalattributes(andmaybesomead-hocprocedures)doesnotwork!
(3) First,arigoroussemanticframeworkisneeded,togiveformalspecificationtotheimplementation.Properties:clearness,expressiveness,upwardcompatibiliy.Ex.BCDM
(4) Second,theimplementationmustbeproventorespectthesemantics.Coreissuehere:efficient(1-NF)
implementationshardlygrantuniquenessof representation.ExTSQL2
(5) Otherissues(myworkinthearea)
Mypastandcurrentcontributiontothearea
- Treatment of temporal constraints in TDB(withV.Brusoni,L.Console,B.Pernici:IEEETrans.DataandKnowledgeEng.,1998)- Treatment of periodic data in TDB(IEEETrans.DataandKnowledgeEng.,2003,andfutherongoingworkwithB.Stantic,G.Governatori,A.Sattar)- Treatment of telic vs atelic data in TDB(withR.T.Snodgrass,IEEETrans.DataandKnowledgeEng.,2004)- Extension to BCDM to cope with proposal\evaluation of updates (withL.Anselma,A.Bottrighi,S.Montani,ongoingwork)- Extension to BCDM to cope with temporal indeterminacy(withR.T.Snodgrass,ongoingwork)
TreatmentoftelicvsatelicdatainTDB(jointworkwithR.T.Snodgrass)
DistinctiondatesbacktoAristotle’sCategories,usedinLinguistics,CognitiveScience,and,recently,ArtificialIntelligence
Coreissue:Atelicfacts(i.e.,factswithoutagoalorculmination)e.g., (f1)Andreaearned60Kfrom10to11
(f2)Andreaearned60Kfrom12to12canberepresented\evaluatedateachbitemporalchronon
10{earn(Andrea,60K)}11{earn(Andrea,60K)}12{earn(Andrea,60K)}
BCDM“snapshot”semanticsisOKforatelicfacts
TreatmentoftelicvsatelicdatainTDB
Coreissue:Telicfacts(i.e.,factswithagoalorculmination)e.g., (f1)Andreabuildahousefrom10to11
(f2)Andreabuildahousefrom12to12cannotberepresented\evaluatedateachbitemporalchronon
10{build_house(Andrea)}11{build_house(Andrea)}12{build_house(Andrea)}
BCDM“snapshot”semanticsdoesnotworkfortelicfacts
TreatmentoftelicvsatelicdatainTDB
(1) Analysisoftheimpactofneglectingthetelic\atelicdistinctioninTDBs
(2) Solution:(2.1) atwo-sortedsemantics- chronon-by-chrononforatelicfacts- interval-basedfortelicfacts
(2.2) threesorteddatamodel(2.3) three-sortedmanipulationandalgebraicoperators(2.4) properties(2.5) high-levelquerylanguage
Treatmentofproposal\evaluationofupdates(extensiontoBCDM)
(jointworkwithL.Anselma,A.Bottrighi,S.Montani)
NeededtocopewithupdatesconcerningGLs!
Importantinseveralotherapplications,e.g.,Wiki-basedvocabularies(Citizendium)
Notice:TTneededtostorethehistoryofupdates!
Mainissues:- Distinguishingbetweentwolevelofusers(proposersandevaluators)
- Delayingtheeffectofproposals- Copingwithalternativetuples
Overview of the presentation
• experienceintheGLcontext:theGLAREproject(sketch)
• temporalinformationinclinicalrecords temporaldatabases(TDB)
• temporal information in the guidelines reasoning about temporal constraints
• conclusions
TemporalConstraintsinClinicalGuidelines
Temporalconstraintsareanintrinsicpartofclinicalknowledge(e.g.,orderingofthetherapeuticactions)
Differentkindsoftemporalconstraints,e.g.,
- durationofactions(min/max)
- qualitativeconstraints(e.g.,before,during)
- delays(min/max)
- periodicityconstraintsonrepeatedactions
TemporalConstraintsinClinicalGuidelinesrepetitions
The therapy for multiple mieloma is made by six cycles of 5-day treatment, each one followed by a delay of 23 days (for a total time of 24 weeks). Within each cycle of 5 days, 2 inner cycles can be distinguished: the melphalan treatment, to be provided twice a day, for each of the 5 days, and the prednisone treatment, to be provided once a day, for each of the 5 days. These two treatments must be performed in parallel.
ManagingTemporalConstraint:theProblem
Temporal Constraints without Temporal Reasoning (constraint propagation)- are useless- clash against users’ intuitions/expectations
Both representation and inference are NEEDED
ManagingTemporalConstraints:theProblem
Implied constraint (temporal reasoning):(1.6)Cendsbetween30and60mafterthestartofA
(1.1)theendofAisequaltothestartofB(1.2)theendofBisequaltothestartofC(1.3)thedurationofAisbetween10and20m(1.4)thedurationofBisbetween10and20m(1.5)thedurationofCisbetween10and20m
A B C10-20 10-2010-20
Correct (consistent) assertion:(1.7)Cendsbetween30and50mafterthestartofA
Not correct (inconsistent) assertion:(1.8)Cendsmorethan70m.afterthestartofA
However: Temporal Reasoning is NEEDED in order to support such an intended semantics!
ManagingTemporalConstraints:theProblem
DESIDERATAforTemporalReasoningAlgorithms
-tractability“reasonable”responsetime
-correctnessnowronginferences
-completenessreliableanswers
DESIDERATAfortheRepresentationformalism
-expressivenesscapturemosttemporalconstraintsinGL
TRADE-OFF!
SPECIALIZEDAPPROACHES(since’80inAIliterature)
Digression:WhyCompletenessisfundamental?
Implied constraint (temporal reasoning):(1.6)Cendsbetween30and60mafterthestartofA
(1.1)theendofAisequaltothestartofB(1.2)theendofBisequaltothestartofC(1.3)thedurationofAisbetween10and20m(1.4)thedurationofBisbetween10and20m(1.5)thedurationofCisbetween10and20m
A B C10-20 10-2010-20
SupposethattemporalreasoningisNOT complete,sothat(1.6)isnotinferred.Onecanaddinconsistentinfo,e.g.,Cendsmorethan70m.afterthestartofAandthesystemacceptit! inconsistent GL!
Complete Temporal Reasoning is NEEDED in order to grant that GL is temporally consistent (executable!)
TemporalConstraintTreatment
WHEN Temporal Reasoning is useful in Guidelines?
ACQUISITION
- tocheckconsistency(notice:aninconsistentGLcannotbeexecuted!!!)
EXECUTION
- tocomparethedurationofpaths,inhypotheticalreasoning(simulation)facilities
- tocheckthatthetimeofexecutionofactionsonpatientsisconsistentwiththeconstraintsintheguideline
- toschedulenextactions
TemporalRepresentationandTemporalReasoningforClinicalGuidelines
• Differentkindsoftemporalconstraints
• NocurrentapproachintheAIliteraturecoversallofthem
• Ourproposal:anextensionofthe“consensus”STPapproach[Dechteretal.,91]
• Ourgoal:expressiveness+correct,completeandtractableinferences
GLARE’sapproach(representation)LabeledtreeofSTPs(STPs-tree)
Tree of STPs for the multiple mieloma chemotherapy guideline.The overall therapy (node N1) is composed by 6 cycles of 5 days plus a delay of 23 days . In each cycle (node N2), two therapies are executed in parallel: Alkeran (node N3: Sa and Ea are the starting and ending nodes), to be repeated twice a day, and Deltacorten (node N4: Sd and Ed are the starting and ending nodes), to be repeated once a day. Arcs between any two nodes X and Y in a STP (say N2) of the STP-tree are labeled by a pair [n,m] representing the minimal and maximal distance between X and Y.
Otherformalapproachestotemporalreasoninginclinicalguidelines
Mikshetal.- anextensionofSTP’smetriccontraints- attentiontoconstraintvisualization
Shaharetal.- temporalreasoningorientedtowards
temporalabstraction(e.g.,persistencephenomena)
Conclusions
FormalmethodsarenecessaryinordertoproperlycopewithtemporalphenomenarelatedtoGLmanagement
Temporalinformationinpatients’recordsTDBsneeded- ad-hocsolutionsarecomplex,expensive,notlikelytowork- aclearsemanticsisneeded- anefficient(1-NF)implementationrespectingthesemanticsis
needed.(semanticequivalencemustbepreserved,otherwise, results cannot be trusted!)
- anyimplementationshouldbeaconsistentextensionofSQL(otherwise, previous work is lost!)
TemporalconstraintsinGLsTemporalreasoningneeded- (temporally)inconsistentGLcannotbeexecuted!- todetectwhicharethenextcandidateactions,and
whentheyneedtobeexecuted
Conclusions
Moregenerally,Istronglybelievethatformal methods are recommended\necessary inordertoproperlycopewithmanyotherdifferentphenomenarelatedtoGLmanagement,including
- Decisionsupport(e.g.,DecisionTheory)- Verification(e.g.,model-checking,theoremproving,PetriNets)- Simulation(e.g.,PetriNets)- Formalsemantics(Temporallogics,Operationalsemantics,
Mappingtechniques)- ………!!!
Thanks for your attention!