Applications of Temporal Reasoning to Intensive Care Units

Intensive Care Units (ICUs) are hospital departments that focus on the evolution of patients. In this scenario, the temporal dimension plays an essential role in understanding the state of the patients from their temporal information. The development of methods for the acquisition, modelling, reasoning and knowledge discovery of temporal information is, therefore, useful to exploit the large amount of temporal data recorded daily in the ICU. During the past decades, some subfields of Artificial Intelligence have been devoted to the study of temporal models and techniques to solve generic problems and towards their practical applications in the medical domain. The main goal of this paper is to present our view of some aspects of practical problems of temporal reasoning in the ICU field, and to describe our practical experience in the field in the last decade. This paper provides a non-exhaustive review of some of the efforts made in the field and our particular contributions in the development of temporal reasoning methods to partially solve some of these problems. The results are a set of software tools that help physicians to better understand the patient’s temporal evolution.


INTRODUCTION
An Intensive Care Unit (ICU) is a hospital service that provides critical attention to medically recoverable patients.ICU is a data-intensive environment particularly suitable for extensive use of data analysis [1].One of the fundamental characteristics of this domain is that patients require permanently available monitoring equipment and specialist care.The temporal evolution of patients is, therefore, permanently recorded and analysed by physicians, who must tackle a wide range of patient pathological problems (cardiovascular, renal, infections, neurological, etc.).
In this scenario, intensivists have to deal with an overwhelming amount of temporal information provided not only by on-line monitoring but also from patients' records collected from different hospital departments (e.g., laboratory results, radiology, etc.).
Although the management of all this information is a complex task that these specialists must face, they are also required to intervene immediately if any patient event occurs, and to provide detailed reports describing the diagnosis and the subsequent actions (tests, treatments, or needed for a new laboratory analysis).
Computer-based systems are required in ICUs to record and manage temporal clinical data.However, in order to improve the health care quality, new tools such as those manage medical knowledge and support medical decisions, are required.Artificial Intelligence (AI) is an interdisciplinary field devoted to the study of mathematical, physical and computational aspects that make the representation of human knowledge in a computer possible [2] as well as the development of methods to solve complex tasks such as classification, planning, diagnosis or pattern matching.
From its early beginnings, the AI community has focused on the challenging problems of the medical field, such as reliable medical diagnosis, optimal therapy to a patient, etc.One illustrative milestone of these works is the MYCIN system, a diagnosis support system for infectious diseases [3].AI in general, and its application to medicine, known as Artificial Intelligence in Medicine (AIM), have also paid attention to the temporal dimension, since time is involved in most of these complex tasks in medicine, for example, the definition of the temporal models for temporal diagnosis [4], the temporal models for patient monitoring [5], or the treatment support system based on patient analogy [6].
AIM is a consolidated field and one that faces new challenges.One of the problems to deal with is that, after three decades, few systems have so far been accepted for routine use.In [7], the author identifies a main problem: AI systems are isolated from the clinical environment itself and are perceived as experimental entities.Therefore, new efforts must be made to obtain effective AI systems in medical environments.The problem consists of identifying what the user needs to interpret, internalize and apply from the wealth of information in a report [8].The creation of a computer-based system that manages knowledge requires substantial modelling activity: deciding what clinical events and patients are relevant and identifying the concepts and relationships between them.However, most of the medical data structured in hospitals are aimed at Electronic Health Record (EHR), which is not usually structured in a way that can be reused for decision making, and is often redundant [9].
In our view, most temporal information of the ICU is stored in the EHR of the patient (in the form of physical examinations, laboratory results or even the clinical scenario leading to the current state) or acquired and registered from the biosignals monitored.On one hand, the signals acquired from patients are usually represented by time series, where there is a wealth of methods to summarise, compress and find patterns [10].On the other hand, the temporal information extracted from the EHR is radically different, since it is high-level information and lacks noise or irrelevant data.Therefore, it seems convenient to apply AI techniques to bridge the gap between the raw data and the highlevel information.
In this work, we describe a spectrum of issues to exploit the temporal dimension of ICU data from the AI perspective.In particular, we address the following tasks: 1.
The management of temporal information: from the traditional modelling of temporal data for storage, to more complex representations that make reasoning about the information possible.

2.
The measurement of temporal analogy between EHR of patients to provide advanced search engines and decision support tools (case-based reasoning).

3.
The extraction of temporal medical knowledge from two different sources: the physicians (knowledge acquisition) and the temporal database itself (temporal data mining).In the following sections, we introduce each of these issues and describe our experience in the practical applications.

ICU INFORMATION SYSTEMS AND TEMPORAL REASONING
The main purpose of the ICU information systems is to manage the personal and health information of the patients.These systems traditionally deal with the management of explicit temporal information of EHR (timestamps of tests, duration of therapies , etc.) and the processing, visualization and storage of monitored biosignals (ECG, O 2 in blood, etc.) [1].Next we describe these systems and the special attention that must be paid to time in such a context.

Current Temporal Data Recording
Although temporal databases have been formally defined by some models [11,12] and query languages [13], and despite intense research on advanced temporal databases in the literature [14][15][16], their use has not been adopted by the industry.In practice, most extended EHR systems still use traditional Relational Data Base Management Systems (RDBMS) with extra columns to include temporal information for the events defined in the database.An example of this type of systems is the CH4-EHR [17] which is made up of three subsystems: the Medical Information System (CH4), the Nursing Information System (NS4) and the Administrative Information System (Admin).Each system is designed to meet the needs of a particular type of staff (physicians, nurses and administrative staff) in ICU while complementing each other and giving rise to a common EHR with a wealth of temporal clinical data.Figure 1 shows the overall architecture of the CH4-EHR System.
CH4 is a tool designed for ICU physicians, enabling them to register, search, and display information of patients from their admission to discharge from the ICU.Both administrative and health data (e.g., personal information, laboratory tests, treatments, diagnostics, scoring systems, etc.) can be managed.
Another noteworthy feature of the system in terms of standardizing clinical tests and therapies is its flexibility and adaptability for individual ICU, thus providing an easy way to incorporate new parameters such as medical tests, treatments, and new diagnoses.This system is, therefore, completely adaptable to the usual ways of working of different ICU services as well as to different clinical protocols in use.
NS4 provides an interface similar to traditional nursing sheets (see Fig. 1), which are documents that record the temporal evolution of the care and treatments received by patients.NS4 allows the nursing staff to manage the patients easily by means of report templates, facilities to search and browse patients, and a simple way to fill in data within the ICU box.
The CH4-HER system is designed to work in a distributed client-server manner over a local area network infrastructure (Fig. 1).All the subsystems are intercommunicated across the Temporal Integration Platform through mechanisms based on message queues, visual alerts, and notifications on the respective interfaces.In this way, the nursing staff is notified when a new temporal event is triggered for a patient, e.g., when the administration of new treatment starts or when it finishes.The system also provides communication mechanisms through the Integration Layer to exchange information with other department systems where patient's information is stored.For example, the communication with the Hospital Information System to obtain affiliation data, or with the laboratory in order to obtain the results of the clinical tests needs an exchange of HL7 messages.The Patient's Database has been implemented over a Postgres RDBMS improved in indexing capabilities to achieve efficient temporal queries.In parallel with the Patient's Database, the system provides a Report Database to store and query clinical documents generated by an XML based reporting engine.
The CH4-EHR System has been evaluated positively by members of the medical staff at the ICU of the University Hospital of Getafe (Madrid, Spain).Currently, the system is in a deployment phase and has been adapted to meet the requirements of this ICU, including care of patients with burns, among other particularities.

Temporal reasoning
Apart from time-stamped data, it is also possible to find other type of temporal information in an EHR, such as temporal relations between different clinical events, for instance, "2 minutes after the observation of the ST segment elevation in the ECG, the physician provided a 0.4 mg/5 min.dose of sublingual Nitro-glycerine and 30 minutes after the incidence the patient was stable".This information can be processed and new temporal information could be produced (e.g., to conclude that the sentence is temporally inconsistent).The representation of temporal information is, therefore, essential in providing the system with the capacity to perform temporal reasoning.
The role of temporal reasoning in these systems is to formalise the notion of time, providing the tools to represent the temporal aspects of knowledge, and using models to reason with them [18,19,20].The analysis of time representation is mainly centred on the expressivity, reasoning capability and its efficiency.The expressivity is determined by the temporal primitives and the temporal relations that are allowed between them.The temporal primitives are points and intervals, and both qualitative and quantitative relations are defined.
Qualitative point algebra [21] assumes the temporal points as a unique primitive, and three binary basic relations can be distinguished: before, after, and equal.When the expressivity of points is not enough for some applications, the interval algebra by Allen [22] applies, which states intervals as primitives and defines thirteen binary relations between intervals.An integrative proposal is that described by Vila [23] defining a simple method for maintaining both temporal entities (points and intervals).
Apart from qualitative temporal relations, quantitative relations that express the distance between temporal entities are also possible.The simplest quantitative relations are those that describe an absolute numerical temporal value between an arbitrary time origin and the instant when the temporal event occurs (absolute relations).A date, an hour, or any other type of conventional timestamp usually represents these relationships.Both qualitative and quantitative relations can be combined [24,25].
The previous models were proposed in the quest for maximum expressivity in the representation of temporal information.But for practical applications, it is important to be able to reason with them, and thus, it is necessary to achieve a trade-off between expressiveness and computational complexity.For example, interval algebra is a very expressive model, but the most interesting task is NP-Complete.Nevertheless, a number of tractable sub-algebrae have been defined [27].Each subalgebra loses some representation capacity but gains in computational complexity.Research has also been done in this work on the improvement of algorithms for temporal reasoning without reducing expressivity.
Different formalisms have been applied to solve interesting problems in temporal reasoning such as determining the consistency of temporal information.A first approach to the formal study of temporal reasoning is temporal logic.However, the use of the Constraint Satisfaction Problem (CSP) provides a very simple way of formalizing the temporal reasoning models and, moreover, well-known algorithms can be used for consistency checking and constraint propagation purposes.
In most real life situations, especially in medicine, the notion of time is linked to a certain degree of vagueness that can be found, for instance, when a patient describes symptoms, as in "The pain started about one hour ago".Therefore, any attempt to develop a valid application for these fields would have to provide the adequate temporal models to deal with the aforementioned imprecision.One way of reflecting this imprecision is through the use of qualitative or imprecise quantitative temporal constraints, given that in this way it is possible to establish different levels of precision [18] (for example, "John arrived before Steve" is less precise than "John arrived less than 2 minutes before Steve").

FuzzyTIME temporal reasoner
A temporal reasoner is a module that is able to represent and reason about time [28].We have designed and implemented one of these modules: FuzzyTIME [29].FuzzyTIME is a general purpose temporal reasoner providing reasoning capabilities in imprecise temporal constraints between temporal variables which can be represented by both instants and intervals.
We presented a diagnosis based model where temporal information is a fundamental element [30].The model was used to check temporal consistency of the diagnosis hypothesis in order to make an early prune of non-valid solutions.The importance of considering a temporal reasoner in this context is given by the inherent imprecision of the temporal constraints that can occur between every pair of events of any disease.However, when all the independent temporal constraints are considered as a single scenario of an illness, they must be temporally consistent.
In order to interact with this theoretical framework, a high-level temporal language has been proposed and implemented in FuzzyTIME.The key element in FuzzyTIME high-level language is the temporal relation.A wide range of qualitative and quantitative temporal relations between temporal entities is allowed in the high level language.We allow the use of qualitative point-point relations [21], qualitative interval to interval relations [22], qualitative point-interval/interval-point relations [23], first introduced by [31], and imprecise metric point-point relations [32].
For instance, FuzzyTIME language could represent the following fuzzy temporal expressions that physicians use in their common practice:

(dehydration) APPROX 1 HOUR BEFORE (pain, location, precordial)
The above expression represents the temporal evolution of a patient suffering from dehydration (formally, this manifestation is internally represented as (dehydration,presence,true)) approximately one hour before a precordial pain.
FuzzyTIME uses the Fuzzy Temporal Constraint Network (FTCN) [32] as an underlying model for low-level representation of temporal constraints.An FTCN can be seen as a fuzzy Simple Temporal Problem (STP), which has also been used to model clinical problems [33].An FTCN can be represented by means of a directed constraint graph, where nodes represent temporal variables and arcs represent binary fuzzy temporal constraints.The inference of unknown relations is carried out by applying an efficient constraint propagation algorithm.This constraint propagation process removes impossible values from the original constraints.It is thus possible to obtain a minimal network that contains the most precise temporal information and is consistent with the temporal information provided [32].
FuzzyTIME provides procedures for maintaining and querying temporal information at FTCN level, which is given as high-level temporal sentences.Of all the possible temporal relations, we have limited ourselves to the subset of convex disjunctions of basic relations.This is a key commitment between expressiveness and efficiency in the temporal reasoner.
The capability of query resolution is another relevant aspect of FuzzyTIME.It considers queries that recover information that is already present in the knowledge base, and modal queries about the possibility and necessity [34] of the compatibility of new temporal information with the information present in the knowledge base.One competitive advantage obtained with the fuzzy temporal constraints is the capability of using the Possibility Theory [35], so that the answer to a query belongs to a range of values between 0 and 1, instead of being a binary answer.
Other temporal reasoners, such as LaTeR [36], consider quantitative and qualitative temporal information using classic modal operators for query answering instead of the possibility theory approach used by FuzzyTIME.The Restrict [37] reasoner deals with different models and selects the most suitable algorithm for each problem presented.In a more recent approach to temporal reasoning, a formalism based on fuzzy sets is presented, but it only deals with qualitative temporal relations [38].A similar approach is being explored in the BabyTalk project [39] in an application for automatic report generation in the neonatal domain.Sections 4.2 and 4.4 present how FuzzyTIME can be used in other domains such as knowledge acquisition or data mining.

TEMPORAL CASE-BASED REASONING
The capacity to decide whether elements (treatments, patients, EHR) are similar is a useful tool in medicine.Computer systems can easily obtain an exact match between data.However, the calculus of a certain similarity between complex objects is not trivial.The Case-based Reasoning (CBR) is a topic of AI focused on how to obtain this similarity and how to use it to solve problems.CBR tackles new problems by referring to analogous problems that have already been solved [40].Therefore, CBR seems to be an effective approach in medical domains, since cases refer to patient episodes within the EHR.
The two most important concepts in CBR systems are the cases and the similarity functions.Cases describe the knowledge acquired after solving specific problems.They can be considered as the atomic elements of the knowledge bases in a CBR system.The general idea is that a case is essentially composed of the 3-tuple problem, solution, and outcome.The cases are stored in a knowledge base, called Case Library (CL).The similarity functions allow the system to quantify how similar two cases are.[42].

CBR-cycle proposed by Aamodt and Plaza
The CBR has been understood as a methodology for the development of knowledgebased systems [41] since Aamodt and Plaza proposed the CBR cycle methodology in 1994 [42].They suggested that CBR is a cyclic 4-step process, composed of the Retrieve, Reuse, Revise and Retain steps (see Fig. 3).In the Retrieve step, the system, given an input case, looks for similar cases in the CL.The Reuse method tries to obtain a solution for the incoming case from a combination of the solutions of the retrieved cases.In the Revise step, the system checks if the solution is valid for the incoming case.Finally, there is a feedback step, called Retain step, the system checks if this new problem solved is considered relevant for the system.
We highlight three major advantages of using CBR.First, the explicit experience is easy to add to CBR systems, since they can insert, replace and eliminate cases at the explicit knowledge base.Second, the continuous integration of cases during the use of the CBR system allows an incremental acquisition of knowledge.Finally, another advantage of the CBR is its integration with medical information systems since the EHR itself serves as the basis of cases.
In the clinical domain, CBR systems have been effectively used for decision support in the treatment of patients on dialysis [43], study on therapy failure [44], or cancer diagnosis from mammograms [45].

Temporal CBR
The CBR methodology and components presented above are general descriptions that must be clarified when the temporal dimension is considered.We now focus on case definition and temporal similarity.Temporal cases are traditionally represented by a set of temporal features, defining time series and temporal event sequences.On the one hand, time series define collections of ordered data points measuring a single parameter, usually sampled from a continuous signal.For instance, in the medical domain, an electrocardiogram and a digital phonocardiogram are represented by time series.The time series retrieval problem is widely studied in the literature [46], proving the advantages of transformation and dimensionality reduction such as Fourier transform, discrete wavelet transform or dynamic time warping [47,48,49].Other approaches deal with the temporal abstraction problem, i.e., obtaining a higher-level temporal description from a time series [50].Some results of the temporal abstraction applied in the medical domain provide an effective way for the intelligent analysis of clinical data [51] or the improvement of time series management in medical CBR systems [52].
On the other hand, event sequences deal with a collection of temporal elements describing the evolution of a fact.Unlike time series, the elements of an event sequence are not compulsorily spaced in uniform time intervals; they could describe measures from different information sources and this information may be quantitative or qualitative.In the particular situation where event sequences are not homogeneous (i.e., combination of qualitative and quantitative information), it is difficult for systems to retrieve similar cases.Given the temporal nature of events, we identify two different scenarios: sequences of time points (hereinafter termed event sequences) and those made up of intervals (hereinafter termed interval sequences).For instance, the set of tests carried out on a patient could be considered as an event sequence, whilst the therapeutic administration (usually intravenous in the ICU) describes an interval sequence.Since these scenarios have a direct match on the EHR, we focus on the problem of retrieving heterogeneous sequences.
In measuring the similarity between temporal cases, CBR is traditionally based on the definition of similarity functions.It is common to adopt the binary and normalized similarity function S; i.e., S: Case × Case → [0, 1].Due to the different temporal cases (sequences of heterogeneous events or sequences of intervals), different strategies must be adopted to develop temporal similarity functions.
Attending to heterogeneous event sequences, recent proposals have focused on direct matching between sequences often by applying the classical distance concepts (e.g., Euclidean or Minkowsky distances) [53,54], but ignoring the implicit temporal relations between all elements of the sequences and the uncertainty produced in any similarity process.In this sense, temporal constraint networks (see Section 2.3.) have been used in many AI systems to model time [30], providing a powerful reasoning capacity for both time points and intervals.Since each event of the sequence is represented in the time space with a time point, the similarity could be also calculated by time point constraint networks.We proposed a non-classical approach to measure temporal similarity of cases which are heterogeneous temporal event sequences [55].The temporal similarity is measured by describing a unique temporal scenario of possible temporal relations (from 2 or more input cases), and by measuring the uncertainty produced.
Cases can be also described by sequences of interval events and temporal similarity must also be calculated.Since an interval is composed of two time point events (starting and ending points), an initial approach consists of the decomposition of intervals, i.e., transforming the sequence of intervals into an event sequence and then using the temporal similarity methods described before.Although the time point decomposition is a well known approach to simplify the complexity of managing intervals, from the conceptual perspective the use of the interval concept implies not only a starting and ending point but also the presence of the temporal event that provides additional information between the two points.
Other approaches consider the sequence as an atomic element of the sequence.The authors analyse the problem of comparing clinical scenarios composed of both time point events and intervals, using temporal constraint networks to represent the scenario [56].
The similarity measure we proposed in [57] provides a direct mechanism for comparing interval sequences by translating each sequence to a temporal constraint network, providing explicit temporal information about interval distances.Figure 4 depicts an example of interval sequences and the translation in their temporal constraint networks.

Figure 4.
Interval sequence similarity using temporal constraint networks.
In one of our recent works, the similarity function is a linear combination of functions that compares the interval events (nodes) and their relations (arcs) [57].The temporal information of the interval events describes the duration of the intervals, while arcs represent both quantitative and qualitative relations.The similarity between interval relations is based on the quantitative information of beginning and ending points, while the qualitative information is compared using the Freksa reticle proposed in [58].
The practical impact of time on the CBR systems has not been studied in depth [52], despite the importance of the temporal dimension.From a theoretical perspective, a CBR system was proposed for the temporal abstraction of dializer biosignals in the form of time series [59].With respect to the methodolical aspects of the development of temporal CBR systems, a temporal framework was proposed in [60], featuring two levels to manage time from time series: (a) the case level, or the set of events that occur during a short period of time, and (b) the history level, or a set of related cases (e.g., the patient's life-long history).

T-CARE system
The Temporal CAse REtrieval System (T-CARE) is a CBR system that retrieves similar cases of patients for medical decision supported by searches in a case library for patients with temporal evolution [40].T-CARE undertakes the following tasks: (1) acquisition of temporal cases from the EHR of a HIS define and storage in the Temporal Case Library (TCL), and (2) retrieval of similar temporal cases from the TCL.T-CARE system provides two main tools: the temporal case acquisition tool and the temporal case retrieval tool.The temporal case acquisition tool helps the physicians to build the TCL from the patient's information recorded in the EHR, in a semi-automatic process.The temporal case retrieval tool provides a graphical interface to describe the evolution of a new patient and calls the case retrieval engine to find the most similar case, using the temporal similarity measures described in [53,54,58].Figure 5 shows the main elements of the T-CARE architecture.

Figure 5. T-CARE system architecture
The T-CARE system was evaluated in a Burn Unit as a tool for medical decision support.Patients in the Burns Unit of the ICU are critical long-term patients.Clinical trials showed that demographic data and the temporal evolution of certain indicators during the first 5 days are essential for assigning a patient survival profile.Some of these were age, gender, depth of burn injuries, the 5 days evolution of diuresis, level of bicarbonate, skin ph, and acidosis level.The data studied were selected from the EHR of 375 patients in a Burns Unit between 1992 and 2002, by physicians using a temporal case acquisition tool.T-CARE was a useful complement in supporting physicians to evaluate severity based on the temporal evolution of the first 5 days of the stay.The aim of this experiment was to configure T-CARE in order to ascertain the patient's survival based on the evolution of the patient and the demographic data of individual cases.The experiment was carried out considering 52 input cases from the initial set (selected randomly), while 323 temporal cases made up the TCL where survival was known.Once the TCL was defined, the system required the calibration of the similarity measure.The attribute weights of the global similarity measure were assigned based on the relevance of each parameter with respect to patient survival.The results of the experiments showed the advantages of different similarity measures described.Table 1 summarizes the results of the experiments and compares T-CARE with classical CBR, considering the temporal information as a numerical attribute and other temporal CBR approaches using event sequence similarity measures.

MEDICAL KNOWLEDGE
Knowledge Management (KM) and Knowledge Management Systems (KMS) have been demonstrated to provide an effective stimulus for organizations to structure, mobilize and reuse knowledge stored in a knowledge base (KB), resulting in improved performance [62].Thus, it seems reasonable to consider that, after a careful adaptation of KM and KMS, this strategy could be valid in clinical environments.In this section, we describe two approaches of knowledge base to the population: knowledge acquisition and knowledge discovery.

Knowledge Acquisition in Medicine
Knowledge modelling and acquisition should not be regarded as a process of mapping expert knowledge for computational representation, but as a model-building process [63].In medical domains, we identify two key issues: (1) standardising medical knowledge and (2) constructing computable models using a Knowledge Acquisition Tool (KAT) adapted to the medical domain.
The problem of medical knowledge standardisation has been widely discussed in the literature.On one hand, medical coding systems and thesauruses have been developed in attempt to solve problems of redundancy and ambiguity concerning medical terms, focusing on causes of death and forms of illness.Some of the most widely used coding and terminological systems are ICD, UMLS, HL7, LOINC, CTV-3, and SNOMED CT [64][65][66][67][68][69].On the other hand, ontologies are mechanisms for concept sharing and reusing, that entail a deeply detailed description of terms and axioms needed for a formal knowledge representation of the domain.Healthcare ontologies extend medical thesauruses by describing explicit formal relations and constraints, so adding semantics to the vocabulary.There is a wealth and wide variety of ontology proposals in the literature related to the clinical domain such as GALLEN, OPENEHR, GO, OBO and ON9 [70][71][72][73][74].
Knowledge acquisition is also a well known problem in the literature.One of the most cited generic-domain KMS is Protégé [75], a suite of tools and a methodology for building ontologies and generic KATs that should be adapted to a specific domain, such as in [76].One significant example is KAVE [77], a KAT for decision support system for artificial ventilation.Other systems proposed are based on deep qualitative models, such as KARDIO for electrocardiogram interpretation and QuMAS, a qualitative model acquisition system for automatic learning [78].With regard to the integration of KMSs into clinical information processes, some success has been achieved with QMR, a medical consultation system in various knowledge-based variants for decision support such as INTERNIST-1 (for general internal medicine) and CADECEUS AI [79].
At this point, we identify three factors considered essential for building KM and KMS integrated into the medical domain: (1) the need to represent specific knowledge depending on the medical field (e.g., atemporal or temporal aspects), (2) the need to implement effective knowledge acquisition tools adapted to the medical service in order to build the KB, and (3) the need to share a common medical terminology.
In order to effectively build a medical KB using the aforementioned models, KATs are required to help physicians to extract and formalise their tacit knowledge using these formal structures.Significant advances have been achieved in this field through the years, and clinical decisions based on knowledge have been found to be effective [80,81].

Temporal Knowledge Acquisition in Medicine: CATEKAT2
We presented the Temporal Behavioural Model (TBM), a temporal and causal model of diseases [30].The TBM describes the underlying structure stored in the KB.This model is structured as a causal network in which each disease (etiological diagnosis) is connected to the abnormal manifestations (signs and symptoms) and to other diseases caused (pathophysiological diagnoses).The time dimension is an important factor to consider in the ICU domain.Therefore, each disease description is extended to include temporal knowledge as a set of temporal constraints among elements in disease symptoms.
In addition to the causal and temporal knowledge, contextual knowledge is also required in medical domains.Disease finding could be different when, for example, some drugs are prescribed to the patient, or some risk factors are present.Temporal contexts are specified by at least one contextual concept, which may have associated temporal knowledge (i.e., those contextual concepts describing drugs prescriptions) or may not (e.g., those contextual concepts describing risk factors associated to patients).For instance, a temporal context can be described by the presence of dehydratation before an Acute Myocardial Infarction, which can induce a bradycardia after Mixed Shock Syndrome.
CATEKAT2 is the CAusal and TEmporal Knowledge Acquisition Tool presented in [30] that allows experts to interact in the construction of the KB.To this end, the tool provides a wizard strategy, which is needed because of the complexity of the TBM, where the physicians could contribute step by step in the construction of the KB.Experts can insert causal relations between concepts as well as temporal constraint to particularize each disease.The consistency of the temporal constraint network described is checked using FuzzyTIME (see Section 2.3).
In the KA process, users other than physicians, such as knowledge engineers, might contribute to the development of the TBM.Therefore, CATEKAT2 was conceived as a multi-user KA Tool accessible via a web-based interface (see Figure 6), allowing cooperative work through role management, notice board, and e-mail.CATEKAT2 not only allows editing, but also browsing, querying, and managing the KB.Ontologies provide CATEKAT2 with a simple way to manage structure and maintain medical terminology.CATEKAT2 uses its own ontology based on some parts of standard coding systems.The domain ontology was carried out by following the methodology proposed in [82].In this process, physicians and KEs build an ICU ontology with Protégé3 Editor and, once the ontology reaches a stable version, it is loaded onto the CATEKAT2 ontology server.The ontology server is implemented on the Protégé framework, developing a web service to edit and query the ontology.The server is deployed using the Apache Axis toolkit plus the Tomcat web container to define web-service compliant interfaces.CATEKAT tool also provides a web interface to edit part of the ontology.

CATEKAT2 interface
In addition to KB management, CATEKAT2 may also be used for medical training.Each model using CATEKAT describes a particular etiological diagnosis discussed by the medical team to obtain a set of signs and symptoms, its possible pathophysiological diagnoses and the causal and temporal relation between all these elements.For instance, CATEKAT2 can be used to show students and junior physicians a concise description of the most common pathologies and their temporal evolution in the ICU.
The knowledge acquisition tool development entails studying the domain in full depth.The medical domain, in particular ICUs, is hard to classify and its terminology is hard to interpret.In some cases, the definition of terms may cause possible wrong interpretations.Hence, the knowledge acquisition lies in an ontology.This allows a consistent use of medical terms.Thus, using ontologies, KB acquisition could be viewed as a process of enlarging the domain ontology with specific knowledge of a particular domain.In some other cases, terms are equivalent but not considered in the ontology.We suggest the use of dictionaries of synonyms and thesauruses.
Another point that we dealt with was the incompleteness of the knowledge acquisition.For example, the physician could describe some related clinical signs, however, without specifying how these signs should be interpreted when they are observed in the patient.The missing information must be acquired from some other experts.
WOMKA [83] is an adapted version of CATEKAT particularly for paediatric medical needs and to implement part of the Evidence-Based Medicine methodology [84].This KAT is currently in use at the Paediatric Service of the Virgen de la Vega Clinical Hospital (Murcia, Spain).

Temporal Knowledge Discovery and Data Mining
Knowledge Discovery (KD) can be defined as the process of extracting non trivial, unknown, and potentially useful information implicit in the data [85].This process incorporates techniques from databases, statistics and machine learning with two main purposes: pattern discovery and prediction.
In the medical domain, the collection of the vast amount of data provided by the EHR makes it possible to apply Data Mining (DM) techniques aimed at discovering new relationships between all the recorded data (pathologies, symptoms, treatments, etc.).This is particularly true for the ICU where continuous monitoring of patients generates an enormous amount of heterogeneous data, including biological signals sampled periodically, data from clinical history, events and episodes that reflect states and trends.In this domain, DM techniques have been found to be powerful in applications such as patient clustering for identification of colorectal cancer risk groups [86] or temporal decision trees for predicting mortality in the ICU [87].
Temporal Data Mining (TDM) can be defined as the activity of searching for interesting correlations or patterns in large sets of temporal data accumulated for other purposes [88].It is capable of mining activity, inferring associations of contextual and temporal proximity, some of which may also indicate a cause-effect association.Such important knowledge may also be overlooked when the temporal component is ignored or treated as a simple numeric attribute [49].The underlying idea in this research is the generation of potential knowledge that can suggest new ideas to physicians about the behaviour of these variables.

Temporal Data Mining in Medicine
Most TDM techniques are based on conventional data mining techniques that have been slightly modified in order to be applied to temporal data.However, the rich semantics of temporal information can be exploited to devise TDM algorithms that provide more informative outputs.Based on this idea, a number of methods for discovering more expressive temporal patterns have been proposed [89].
The frequent pattern mining problem was introduced by Agrawal [90] who discovered frequent association rules in databases of item sets.Different variations of the algorithm for discovering association rules with temporal information have been proposed, such as temporal association rules [91] and cyclic rules [92].The simplest temporal pattern is a sequence [93,94] and consists of a set of events that are ordered in time.Episodes presented in [95] are defined only by means of a partial order between all the elements of a pattern, thus generating richer patterns.Recent works in this field are focused on the efficient discovery of frequent patterns [96], the discovery of fuzzy patterns [97], and finding patterns with more properties [98].
Association rules, episodes and sequences are the basic temporal patterns.We presented the TSET max algorithm for the discovery of sequential patterns in transaction databases [99].The strategy is an a priori, look-ahead technique using a setenumeration tree to store the detected sequences.This algorithm implements a model based on Dempster-Shafer Theory to generalize frequent sequences into temporal episodes, in order to compactly describe all the possible temporal orders in which frequent events may appear.
The next step is to mine temporal relations which are more complex relations than the simple chaining of events.However, the more temporal relations used, the more complex the process.Thus, recently proposed models limited the number of temporal relations used.We selected the Fuzzy Temporal Constraint Networks (FTCN) formalism to represent both the input and the output of the mining process [100].This model allowed us to build more expressive temporal patterns, including basic temporal relations of all kinds between both time points and intervals.Computational complexity is bounded to practical limits if small patterns are considered.It is inspired by a-priorilike methods, and applies temporal constraint propagation to pruning non-frequent patterns and temporally inconsistent patterns.
Both algorithms have a clear use in medicine.On one hand, the sequential patterns in medicine allow us to explore the patients' evolution.For instance, we obtained patterns from the data of the first days of stay of patients in an Intensive Care Burn Unit (problem also introduced in Section 3.2).On the other hand, the second model is more complex but it allows us to establish more complete patterns from the temporal point of view.For example, we could obtain an exhaustive temporal description of the relations between events and therapies in an Acute Myocardial Infarction.

CONCLUSIONS
Intensive Care Units are hospital services which monitor and care for severely ill patients.The patient-evolution study is critical and, therefore, the temporal dimension plays an essential role in this medical domain.
Far from being a survey in the temporal reasoning topic, the current work should be understood as a position paper.The main goal, therefore, is to give our view of some aspects of practical problems of temporal reasoning in the ICU field, providing our practical experience in the field in the last decade.
In this work, we provide a short review of some of the most relevant aspects for managing the temporal information in ICUs from the AI perspective.In particular, we consider (1) the traditional management of time in medical information systems, (2) the representation of time for reasoning purposes, (3) mechanisms to implement temporal similarity, (4) the acquisition of temporal medical knowledge, and (5) temporal knowledge discovery.We also elaborate on each of the aforementioned aspects by the description of our practical work in this field in the last decade.
The proposed analysis is a vertical view of the relation between the ICU information process and time, in both explicit and implicit representation.Firstly, the brief analysis of the representation currently used in medical information systems highlights the shortcomings in traditional systems in exploiting temporal information.Since these systems are confined to storing the timestamps of some events of the EHR, the temporal querying or reasoning is difficult to develop.These features are fundamental in the development of AI applications, since in most cases, they need a high level of knowledge to be captured and represented.
Secondly, the mechanisms described in the rest of the paper provide the infrastructure to implement intelligent software applications for different purposes.Temporal reasoning engines [e.g., 29,32,33] could be used for temporal inconsistency detection in a diagnosis application on an EHR.Once the clinical hypothesis and data are time consistent, advanced temporal querying could be implemented, thanks to the temporal similarity functions in a CBR system, such as the T-CARE system [61] or the multi-level temporal abstraction CBR system described in [52].
Certain healthcare quality improvement can probably be achieved via the Evidence-Based Medicine (EBM).EBM integrates individual clinical expertise with the best available external clinical evidence (clinically relevant research) [84].For instance, CATEKAT2 [83] is a tool that enables physicians to define the evolution of the temporal behaviour of heart pathologies, and to make this knowledge available to the medical team.Thus, knowledge management tools could be used to support EBM in order to objectivise and share knowledge and experiences.
Finally, knowledge discovery techniques based on raw or pre-processed data could provide additional information on medical research when the analysis of the temporal information is complex.TDM is almost uniquely based on statistical methods and has been rarely used in medical research.However, physicians must consider the temporal patterns obtained, such as sequential patterns and scenario patterns, as alternative hypotheses that must be validated using the well established clinical methods.
Some other considerations must be taken into account when the aforementioned approaches are developed.Although AI models are well known from the theoretical point of view, their practical development in each medical scenario must be individually analysed.The interference produced by the extension of the ICU information systems to the existing clinical work must be reduced.
Our work for the next few years will focus on home-patient healthcare models combined with biomedical monitoring for risk detection.