RT Journal Article SR Electronic T1 A Formal Model for the Representation of Binary Temporal Relations in Healthcare Applications and an Efficient Algorithm for Logic-Based Temporal Subsumption Testing and Pattern Matching JF medRxiv FD Cold Spring Harbor Laboratory Press SP 2023.11.17.23298715 DO 10.1101/2023.11.17.23298715 A1 Sujansky, Walter A1 Campbell, Keith E. YR 2023 UL http://medrxiv.org/content/early/2023/11/18/2023.11.17.23298715.abstract AB Objectives Important temporal relationships exist among pairs of medically relevant events stored in electronic health records (EHRs), such as “the infection began within two weeks after surgery”. Queries for specific temporal patterns also appear in decision-support rules and data-analysis programs. The accurate matching of such patterns to the patient data in EHRs is critical to the effective performance of decision-support systems, statistical analysis programs, data-abstraction processes, digital phenotyping for machine-learning, and other applications. The correct classification of temporally-qualified concepts in biomedical terminologies and ontologies, such as SNOMED-CT, is also important to ensure the accuracy and completeness of these knowledge-based resources.Methods In this paper, we describe an expressive model to formally represent temporal relationships between pairs of events, including “Before”, “During”, “Within n days after”, and “Within n hours before or m hours after, but not during”. We also describe a novel logic-based algorithm to deduce whether one such relationship temporally matches (i.e., is subsumed by) another such relationship, which enables the querying of structured time-stamped patient data, the querying of semi-structured narrative patient data, and the classification of logically defined medical concepts. Our model assumes an interval-based notion of time and our algorithm implements a logic-based definition of subsumption.Results We formally prove the correctness of the algorithm based on the properties of temporal intervals and the axioms of propositional logic. We also prove that the algorithm has computational complexity of constant-time (i.e., O(1)) with respect to the size of the database being queried or the knowledge base being classified.Conclusion The novel model and algorithm described here for temporal representation and reasoning are sound and have the potential to facilitate temporal subsumption testing and pattern matching in a number of medical application domains. Empirical testing is needed to establish the full scope of useful applicability.Competing Interest StatementThe authors have declared no competing interest.Funding StatementThis work was funded by the Systemic Harmonization and Interoperability Enhancement for Lab Data (SHIELD) Program, Center for Devices and Radiologic Health, U.S. Food and Drug Administration (FDA Contract 2103911).Author DeclarationsI confirm all relevant ethical guidelines have been followed, and any necessary IRB and/or ethics committee approvals have been obtained.YesI confirm that all necessary patient/participant consent has been obtained and the appropriate institutional forms have been archived, and that any patient/participant/sample identifiers included were not known to anyone (e.g., hospital staff, patients or participants themselves) outside the research group so cannot be used to identify individuals.YesI understand that all clinical trials and any other prospective interventional studies must be registered with an ICMJE-approved registry, such as ClinicalTrials.gov. I confirm that any such study reported in the manuscript has been registered and the trial registration ID is provided (note: if posting a prospective study registered retrospectively, please provide a statement in the trial ID field explaining why the study was not registered in advance).YesI have followed all appropriate research reporting guidelines, such as any relevant EQUATOR Network research reporting checklist(s) and other pertinent material, if applicable.YesNo data was produced in the present work to date