Next Article in Journal
Safety Risk Assessment of HMX Synthesis Using Acetic Anhydride Method
Next Article in Special Issue
A Skip-Free Collaborative Residual U-Net for Secure Multi-Center Liver and Tumor Segmentation
Previous Article in Journal
Conductive Yarn Properties and Predicting Machine Sewability
Previous Article in Special Issue
A Large-Kernel and Scale-Aware 2D CNN with Boundary Refinement for Multimodal Ischemic Stroke Lesion Segmentation
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Hybrid SHACL–Bayesian Framework for Managing Clinical Uncertainty in Postmenopausal Women with Recurrent Urinary Tract Infections

1
Faculty of Engineering, Free University of Bozen-Bolzano, 39100 Bolzano, Italy
2
Centre Universitaire d’Informatique (CUI), Université de Genève, 1227 Geneve, Switzerland
3
Department for Innovation in Biological, Agro-Food and Forest Systems, Tuscia University, 01100 Viterbo, Italy
4
Division of Infectious Diseases, Department of Diagnostics and Public Health, University of Verona, 37134 Verona, Italy
5
Independent Researcher, Ischia, 80077 Naples, Italy
6
Department of Public Health, University of Naples Federico II, 80131 Naples, Italy
7
Department of Neuroscience Reprodcutive Sciences and Dentistry, School of Medecine, University of Naples “Federico II”, 80131 Naples, Italy
8
Department of Obstetric and Gynecology, Battipaglia S. Maria Della Speranza Hospital, 84091 Battipaglia, Italy
*
Author to whom correspondence should be addressed.
Submission received: 30 November 2025 / Revised: 14 January 2026 / Accepted: 28 January 2026 / Published: 4 February 2026

Abstract

This study introduces a hybrid methodological approach for personalised clinical decision support, integrating SHACL-based deterministic constraints with Bayesian probabilistic models. The primary goal is to validate the model and demonstrate the benefits of combining encoded clinical knowledge with probabilistic uncertainties in managing complex therapeutic scenarios. The framework was applied to recurrent urinary tract infections (UTIs) in postmenopausal patients, a clinical context marked by high frequency, treatment challenges, and potential conflicts among therapeutic guidelines. Realistic simulated case studies were developed, encompassing both simple clinical profiles and complex situations, such as patients with antibiotic resistance. Each profile was modelled in RDF/Turtle, enabling semantic representation of clinical features and therapeutic rules. The system automatically calculates success and failure probabilities for different therapeutic scenarios, dynamically adapting them based on follow-up data. This allows clinicians to assess not only the initial therapy choice (Case study no. 1) but also the potential addition of supplementary interventions during treatment (Case study no. 2). Results highlight that the proposed hybrid SHACL–Bayesian framework enables tightly coupled deterministic–probabilistic reasoning, where SHACL constraints define the admissible clinical decisions and Bayesian inference operates within this validated space. Compared to deterministic or probabilistic approaches, the combined framework more effectively handles uncertainty, guideline conflicts, and temporal updates. The scientific contribution lies in showing that this integration enhances decision support for recurrent UTIs in postmenopausal patients, providing clinically consistent, transparent, and adaptive therapeutic recommendations aligned with the patient’s evolving condition.

1. Introduction

Menopause represents a critical phase in the life of a woman, characterised by profound endocrine changes that affect various aspects of health, including susceptibility to urinary tract infections (UTIs). Reduced oestrogen levels alter the vaginal and lower urinary tract flora, promoting atrophy and increasing vulnerability to infections. This risk is further exacerbated by common co-morbidities such as diabetes mellitus, chronic dehydration, and limited use of topical oestrogens—conditions that significantly increase the likelihood of recurrent UTIs [1]. UTIs currently represent a major global public health issue. Between 1990 and 2021, their incidence increased by more than 73%, while associated mortality increased by more than 200% [2]. These increases are particularly pronounced in resource-limited regions, where access to care is impeded by the spread of antimicrobial resistance and sociocultural barriers that worsen the isolation and psychological distress of postmenopausal women [1]. In this context, Genitourinary Syndrome of Menopause (GSM) is a significant predisposing factor. It encompasses urogenital symptoms related to oestrogen deprivation, which alters the vaginal and urethral epithelium, reduces blood flow, and disrupts protective flora [3]. These changes facilitate recurrent urinary infections and negatively impact quality of life. The clinical diagnosis of UTIs is based on symptoms, urine culture, and differential diagnosis [4], while acute treatment involves antibiological-guided antibiotic therapy. However, in preventing recurrences, non-antibiotic therapies (vaginal oestrogens, D-mannose, probiotics) have shown significant efficacy [4,5]. Meanwhile, increasing antimicrobial resistance poses a global threat, with multi-drug resistance rates exceeding 70% in some areas [5]. The traditional treatment of recurrent UTIs in menopause has important limitations: empirical symptomatic diagnosis, non-targeted treatments, and excessive antibiotic use. Cornelius et al. (2024) [6] and Murray et al. [7] report that only a minority of patients exhibit typical symptoms, while more than 60% receive antibiotics non-selectively, with significant clinical and systemic consequences. Additionally, distinguishing genitourinary symptoms from non-infectious conditions such as GSM or an overactive bladder is challenging [8], negatively affecting quality of life and trust in care [9]. Although international guidelines provide evidence-based recommendations for the management of UTIs in postmenopausal women, their translation into clinical practice remains complex. These documents are extensive, heterogeneous, and regularly updated, making it difficult for clinicians to quickly extract the most relevant guidance and adapt it to the specific profile of a patient. Furthermore, the static nature of the guidelines does not account for individual variability related to clinical, medical history, and probabilistic factors. Meanwhile, existing digital solutions have not yet bridged this gap, as they do not integrate evidence-based content or involve healthcare professionals in their development, limiting their reliability and clinical utility [10]. The difficulty in applying guidelines and the inadequacy of current digital platforms highlight the need for innovative tools that translate recommendations into computational clinical rules, formalised and integrated with probabilistic models, to support more targeted, personalised, and evolving clinical decisions. In particular, our work proposes the integration of clinical rules formalised through ontologies and semantic constraints (e.g., SHACL), ensuring the consistency, interpretability, and traceability of clinical data. In addition, we incorporate Bayesian probabilistic models to dynamically estimate the probability of therapeutic success and failure in UTIs, taking into account key clinical factors such as age, co-morbidities, history of recurrence, and menopausal status.
The objective of this work is not to present a fully implemented system, but rather to theoretically and through simulation validate a methodological approach that integrates deterministic constraints (SHACL) and Bayesian probabilistic models. This approach establishes the foundation for the development, in a subsequent phase, of an operational platform capable of reliably supporting clinical decision-making.

2. Related Work

2.1. Semantic and Probabilistic Models

Recent research in the field of the Semantic Web has introduced the use of ontologies, RDF, and SHACL to formalise rules, ensuring data consistency, traceability, and interoperability. These approaches have been used in the intelligent management of fiscal and administrative documents, where rules enable the validation of data extracted and mapped into RDF [11]; in the maintenance of underground cadasters for water, gas, and heating networks, where SHACL has been used to define topological and cross-database comparison rules [12]; in monitoring the academic progress of university students, with formalised SHACL constraints to verify the correct sequence of courses and deadlines [13]; and in the digitalisation of academic regulations to automatically implement study plans compliant with regulatory constraints [14]. Other studies, instead, have adopted SWRL to represent and infer causal rules; for example, in the domains of security and safety within Internet of Vehicles (IoV) systems and autonomous vehicles, where semantic rules establish links between cybersecurity vulnerabilities and physical safety risks [15].
In clinical decision support, SHACL has become a cornerstone for formalising medical guidelines and therapeutic protocols, enabling semantic validation of clinical data and integration with artificial intelligence approaches. Kober et al. [16] transformed into executable logic and implemented in two ways the ABCDE (Airway, Breathing, Circulation, Disability, Exposure) emergency assessment guideline. They used Prova rules enriched with SPARQL queries and SHACL constraints applied to FHIR-RDF clinical data. Both solutions read clinical observations, evaluate whether the situation is “critical” or “not critical,” and stop processing as soon as a critical condition emerges. Purohit et al. [17] developed vice as a hybrid framework for the completion of biomedical knowledge graphs, integrating symbolic learning, constraint validation via SHACL, and numerical learning. This combination enables the prediction of new relationships while maintaining data consistency and integrity, providing reliable support for critical healthcare processes, such as medical diagnosis and the definition of therapeutic strategies. Chudasama et al. [18] introduced TrustKG, which is a framework that organises clinical data into a Knowledge Graph for reliable and explainable analyses. Within this environment, two hybrid AI systems, vice and HealthCareAI, operate, combining logical rules and data learning. Thanks to KG, they perform two tasks: uncovering hidden medical relationships and generating counterfactual scenarios useful for understanding clinical causes and factors. The goal is to produce accurate and transparent predictive models suitable for healthcare decision-making. In addition, Vidal et al. [19] explored the integration of Knowledge Graphs with hybrid and neurosymbolic AI to improve interpretability, scalability, and contextual reasoning. Using the case of lung cancer, the researchers showed how TrustKG supports the discovery of hidden relationships (link prediction) and the analysis of alternative scenarios (counterfactual reasoning) to make transparent and reliable clinical decisions. Rohde and Vidal [20] introduced ConstrainTree, a neurosymbolic system that integrates semantic constraint validation directly into predictive models to improve their interpretability. The framework uses the results of constraint validation as additional information: it reduces the computational burden for model builders, increases quality metrics such as accuracy, precision, and recall for analysts, and, thanks to the visualisation of verified constraints, makes models more transparent and reliable for end users. In this way, ConstrainTree combines the effectiveness of predictive models with the logical consistency and confidence derived from respecting semantic constraints. In the realm of healthcare data quality, Declerck et al. [21] presented AIDAVA, a healthcare data quality framework that uses graph knowledge and SHACL rules for dynamic validations throughout the data lifecycle. AIDAVA detects and manages completeness and consistency issues during data integration. Experimentation with the MIMIC-III dataset simulated structured noise, demonstrating that the framework effectively identifies critical issues, with particular sensitivity to diagnoses and procedures with respect to integration order and missing data. Finally, Kierner et al. [22] conducted a systematic review of the combination of clinical rule-based systems and machine learning in healthcare. The researchers identified five hybrid architecture archetypes, the most common of which is where rules are directly integrated into the ML architecture (REML). Other approaches include having the ML preprocess data for the rules, having the rules preprocess data for the ML, having the rules influence the ML training, or having rules and ML operate in parallel (PERML). The main conclusion is that most systems favour predictive accuracy at the expense of explainability and trust, while parallel architectures could offer greater transparency, facilitating understanding for clinicians and patients. In parallel, Bayesian probabilistic models have assumed an increasingly central role in supporting clinical decision-making, particularly in contexts characterised by high diagnostic and therapeutic uncertainty. These approaches enable the integration of heterogeneous information—derived from clinical data, experimental evidence, and expert knowledge—to coherently estimate the probability of success for different therapeutic scenarios. The Bayesian paradigm provides a formal framework for representing uncertainty and updating beliefs in light of new evidence, making it particularly suitable for medical decision processes [23]. Subsequent studies have shown that the Bayesian approach improves the interpretation of data from clinical trials by integrating prior information and observational data to obtain more flexible and consistent inferences [24]. Papageorgiou et al. [25] developed a medical decision support system based on the representation and reasoning of healthcare knowledge using probabilistic and fuzzy approaches, implemented on the semantic web. Specifically, it applies Bayesian Belief Networks (BBNs) and Fuzzy Cognitive Maps (FCMs) to formalise clinical guidelines and represent the influence relationships between medical variables. To perform reasoning on these models, a general inference engine (EYE) with dedicated plugins was created. The system was tested on the UTIs problem, formalising treatment guidelines in BBNs and FCMs, and analysing 55 clinical cases. The results showed that the system is capable of effectively formalising medical knowledge and providing understandable recommendations on antibiotic therapies, thus supporting physicians in clinical decisions. More recently, Bayesian methods have found growing application in clinical decision support systems based on predictive models, adaptive medicine, and therapy personalisation due to their ability to manage diverse clinical variables and complex dependency relationships. In general, these approaches provide a powerful framework for representing uncertainty and optimising therapeutic decisions, while still posing methodological challenges in modelling qualitative knowledge and complex semantic constraints [26].
Despite significant advances in applying SHACL for deterministic constraint validation and Bayesian models for probabilistic reasoning, research remains limited on the explicit integration of these two paradigms into a single coherent framework for clinical decision support. Our study introduces a novel hybrid reasoning framework in which SHACL constraints and Bayesian models are tightly integrated and share the same RDF semantic representation, enabling continuous interaction between deterministic knowledge validation and probabilistic inference. Unlike existing approaches, in which rule-based validation and probabilistic reasoning are applied sequentially or in isolation, SHACL constraints in our framework actively define the admissible space of clinical decisions by enforcing structural, semantic, and guideline-level consistency. The Bayesian model then computes the success probabilities exclusively for semantically valid scenarios, quantitatively distinguishing among the options that have passed deterministic validation. The approach incorporates incremental learning capabilities: when a therapeutic failure emerges, the system performs a posterior Bayesian update to recalibrate the reliability of recommendations in real time, while maintaining consistency with SHACL constraints. This continuous synchronisation between formal deterministic knowledge and dynamic probabilistic uncertainty—where every probabilistic update remains semantically constrained—represents the distinguishing characteristic compared to approaches that treat clinical rules and probabilistic estimates as separate or sequential components. The result is a flexible decision support system that adapts to the individual patient trajectory.

2.2. Challenges in Managing Recurrent UTIs and the Role of Digital Health

The management of recurrent UTIs in postmenopausal women presents a complex clinical challenge, exacerbated by diagnostic difficulties, inappropriate antibiotic use, and poor adherence to clinical guidelines. Recent studies [6,7,8,9] highlight the predominantly empirical and reactive nature of current clinical management. The atypical presentation of symptoms in most patients leads to a high rate of non-targeted antibiotic prescriptions, resulting in two major consequences: an alarming increase in antimicrobial resistance [5], particularly against third-generation cephalosporins in Escherichia coli [27], and a significant decline in quality of life. Patients often report frustration due to misdiagnoses, ineffective treatments, and a lack of clinical empathy, underscoring the urgent need for more precise and personalised approaches. Digital health has been proposed as a tool to address these gaps through evidence-based platforms that integrate triage functions, self-assessment tools, and educational support. Guille et al. [28] emphasise how digital health can transform care models by incorporating mobile apps, clinical dashboards, and retrieval-augmented generation (RAG) systems, enabling personalised prevention and symptom monitoring. They stress the importance of quality standards, institutional recognition, and insurance coverage, along with the need for clinical trials to validate the impact of these platforms, particularly in vulnerable populations. In the urogynaecological field, Arya et al. [29] propose an evidence-based digital platform for the management of recurrent UTIs in postmenopausal women, combining classification algorithms, educational videos, and automated support messages. The system demonstrated high levels of patient participation (≥85%), accuracy (≥90%), and usability (≥80/100), improving access to treatment, reducing inappropriate antibiotic use, and enhancing patient self-efficacy. Other studies have investigated the psychosocial components of menopause. Cronin et al. [30] show that anxiety, depression, and sleep disorders are often worsened by stigma and inadequate services, advocating mobile apps, online support groups, and telemedicine tools to promote self-management and reduce medication misuse. Osborne and Sillence [31] emphasise the challenges women face in accessing reliable information, noting the risks of misinformation and advocating for inclusive and culturally sensitive digital tools. Sillence et al. [32] further reveal a low involvement of healthcare professionals in the development of menopause-related apps (only 27%), with neglect of intimate health issues such as UTIs. They propose greater personalisation, integration of clinical guidelines, and peer-to-peer networking functionalities to improve the relevance and effectiveness of digital solutions.
In the advanced clinical field, Xiong et al. [33] and Zheng et al. [34] explore the potential of Retrieval-Augmented Generation (RAG) systems and their semantic variants (RAGPR) for digital triage and personalised physician recommendations. These tools enable more precise management of complex cases by optimising diagnosis, therapeutic choices, and timely referrals to specialists, although further clinical validation remains necessary. Several studies have also demonstrated the effectiveness of digital interventions in improving overall well-being. AlSwayied et al. [35] show that apps and wearable devices can increase physical activity and improve parameters such as anxiety, weight, and quality of life. Pereira et al. [36] report that digital pelvic floor health programmes achieve high adherence and lead to improvements in symptoms, mental health, and productivity. Duffecy et al. [37] confirm the efficacy of the Caria app in treating vasomotor and behavioural symptoms, demonstrating strong user engagement and positive impacts on hot flashes, sleep, and emotional well-being. In the domain of decision support systems, Cappelli and Di Marzo Serugendo [38] demonstrate the application of RAG in academic settings to support student guidance and decision-making processes. Their proposed modular conversational agent for the “SOS Rentrée” service integrates ontologies, a RAG module for retrieving and contextualising official documents, and a Pre-trained Language Model (PLM) for generating natural responses. Despite these advances, there is still a need for an approach that combines the semantic formalisation of clinical knowledge with probabilistic models capable of managing diagnostic uncertainty and supporting personalised decision-making. Integrating ontological rules with Bayesian inference could address the limitations of current digital systems, offering an innovative solution to managing UTIs in menopause.

3. Methods

Table 1 shows the systematic and formal procedure used to address a complex clinical problem (UTIs in postmenopausal women).
In the following, we detail the steps of the hybrid SHACL–Bayesian framework for clinical decision support.
  • Step 1: Collection of clinical guidelines
    The first step of the project consists of the systematic collection of the most relevant clinical guidelines on menopause and UTIs in postmenopausal women.
    The choice to select guidelines rather than laws or health regulations is motivated by their ability to synthesise the best scientific evidence into actionable and up-datable recommendations. These guidelines provide specific indications for diagnosis, pharmacological treatments (including antibiotics, hormonal therapies, and administration methods), prevention, and risk management (such as the development of antimicrobial resistance).
    The search was conducted using rigorous selection criteria based on a set of targeted keywords: “Menopause”, “Urinary Tract Infections”, “Recurrent Urinary Tract Infections”, “Cystitis”, “GSM”, and “Pyelonephritis”. The analysis revealed that there are no dedicated guidelines specifically addressing the management of urinary tract infections caused by multi-drug-resistant microorganisms in menopausal women. Additionally, there are no comprehensive guidelines for the management of recurrent UTIs in this population that synergistically combine hormonal treatments, antibiotics, and non-hormonal strategies.
    To ensure completeness and multidisciplinary coverage, guidelines published over the last ten years from various sources were included: international and national scientific societies, government agencies, scientific literature, and documents such as “position statements”, “consensus papers”, and “review articles”. The guidelines were organised according to their main topic (menopause vs. urinary infections) and their source society, facilitating a coherent comparative analysis.
    The classification was based on four main criteria: the level of completeness and degree of multidisciplinary integration (gynaecology, obstetrics, urology, infectious diseases; the most recent update; methodological quality (e.g., adoption of the GRADE system for evidence evaluation); international recognition as a reference standard.
    Based on these criteria, we divide the guidelines into five priority levels, as reported in Table 2.
    Within the selected documents, we identified the key elements for the subsequent analysis—specifically, the main pathogens responsible for urinary tract infections, the types of antibiotic and hormonal treatments (with their respective administration methods), and the risks of developing antimicrobial resistance in cases of inadequate therapy. This stage establishes the structured knowledge base on which the following steps—automated extraction of clinical rules and ontological formalisation—are built.
    After collecting the clinical guidelines, we conducted an initial quality control phase on the acquired documents. First, we verified the completeness of each document to ensure that all essential sections, attachments, and references were included. We then checked the version history to confirm that the materials were current and consistent with the latest editions released by official sources. Next, we validated the primary sources to ensure that all documents came from recognised institutions such as health authorities, government agencies, or academic organisations. Finally, we removed duplicate entries to eliminate redundancy and prevent it from negatively affecting subsequent analytical stages.
  • Step 2: Manual filtering of paragraphs related to menopause and UTIs
    In the second step, we manually extracted from the collected documents the paragraphs containing information relevant to menopause and UTIs, with the aim of identifying material directly usable for the definition of clinical rules. The selection process involved analysing the guidelines classified according to the priority levels defined by NICE, EAU, and NAMS, while narrowing the focus exclusively to texts reporting data on pathogens, antibiotic treatments, hormonal therapies, administration methods, and risks of antimicrobial resistance.
    Once the relevant paragraphs were identified, we annotated and processed the content, highlighting in particular the pathogens most frequently involved in postmenopausal urinary tract infections and accurately reporting the therapeutic recommendations—including the type of antibiotic, hormonal therapy, and mode of administration. Special attention was given to warnings concerning the risk of antimicrobial resistance resulting from inadequate treatments.
    We then organised the selected data into structured files or tables, linking each paragraph to its source guideline and corresponding priority level. When present, qualitative indicators such as “frequently” or “occasionally” were annotated and encoded to enable their use in subsequent probabilistic analyses.
    Following the initial filtering of the content, we proceeded to a more specific validation phase aimed at verifying the medical accuracy of the extracted information by comparing it with current scientific evidence and clinical guidelines. We also ensured terminological consistency, confirming that the vocabulary used was uniform and aligned with recognised medical and scientific standards. Finally, we performed a completeness check to guarantee that no relevant elements were omitted during filtering and that all pertinent data were correctly represented and clearly interpretable.
  • Step 3: Extraction of clinical rules from Guidelines
    We extracted clinical rules from the selected paragraphs in the guidelines (Table 2). We chose these sources due to their international recognition, recent publication, and methodological quality, which make them a more reliable foundation for developing the framework. We will address guidelines from subsequent levels in future work. We performed the extraction of clinical rules using an LLM, specifically ChatGPT-5, developed by OpenAI [39]. This model represents one of the latest advances in natural language processing, and we selected it for its ability to understand complex texts, maintain clinical context, and generate structured outputs. We guided the LLM using a parametric prompt that directed the classification into a predefined taxonomy of seven types of clinical rules. Table 3 contains this classification, which covers a broad spectrum of content in the guidelines and ensures a standardised structuring of the information. We then organised the rules in a structured format to enable their subsequent formalisation in the SHACL language.
    To demonstrate how the extraction process operates, we present an example derived from paragraph 1.5.4 of the NICE 2015 guideline, updated in 2024. In this case, the input provided to ChatGPT-5 consists of the original text of the guideline:
    “1.5.4 Offer vaginal oestrogen to people with genitourinary symptoms associated with menopause (including those using systemic HRT) and review regularly as per the recommendations on reviews in this guideline. [NICE 2024]”
    The model receives a predefined structured template to ensure a standardised and machine-readable extraction. Specifically, the LLM is instructed to organise the key information. The complete prompt used to guide the LLM is as follows:
    “You are given clinical guidelines in free-text. Your task is to extract clinical rules in JSON format, following exactly this schema:
    “RuleType”: “Therapeutic/Diagnostic/Preventive/Follow-up/Other”,
    “Condition”: “Specify the patient condition or eligibility criteria”,
    “Action”: “Specify the clinical recommendation or intervention”,
    “EvidenceLevel”: “Indicate year or evidence level if available”,
    “Source”: “Specify the guideline source ”
    Do not add extra fields. Only return valid JSON.”
    Listing 1 is an example of output generated by the LLM:
    Listing 1. Example of JSON output generated by the ChatGPT-5.
    Eng 07 00071 i001
    Clinical experts in gynaecology, obstetrics, and infectious diseases systematically reviewed the structured outputs generated by the LLM. They assessed the semantic and clinical consistency between the original guideline text and the extracted information, verified terminological fidelity, checked the accuracy of clinical conditions, formulated correct recommendations, and identified and corrected potential inconsistencies or misalignments, ensuring that neither linguistic variations nor substantive discrepancies altered the clinical meaning of the extracted rules.
  • Step 4: SHACL-based Formalisation
    We subsequently subject the extracted clinical rules to a semantic formalisation process. In this phase, we aim to translate the rules into a structured, machine-readable format to ensure consistency, traceability, and semantic validation.
    We achieve this by using SHACL, a W3C standard for defining and validating constraints on RDF data. The adoption of SHACL provides a formal and machine-interpretable representation of clinical knowledge, allowing for structured verification of data coherence across multiple levels. Specifically, SHACL enables the system to automatically check whether the data comply with formal syntax (structural validation), logical relationships (semantic validation), and clinical plausibility (domain-specific validation). This approach guarantees the integrity of the information, prevents inconsistencies, and ensures traceable clinical decision support.
    To support the formalisation process, we created custom classes (Table 4) and properties (Table 5) as a minimal vocabulary to capture the fundamental concepts from the guideline paragraphs. These elements define the core entities and relationships required to represent the clinical recommendations in a semantically consistent way.
    We then formalise the clinical recommendations as SHACL shapes—constraint models specifically designed for the clinical domain. Rather than constructing a global clinical ontology, we define a set of targeted shapes that include only the properties and constraints required to verify the applicability of the rules. This modular approach maintains flexibility while ensuring semantic precision.
    We continue with therapeutic rule no. 1 from the previous example. In Listing 2, we design the SHACL shape to represent the conditions under which the system can automatically verify the applicability of the recommendation.
    Listing 2. Example of SHACL shape for therapeutic rule no. 1.
    Eng 07 00071 i002
    Through this process, the narrative recommendations extracted from clinical guidelines are transformed into verifiable computational units. Each recommendation is applied only when the input data satisfy all structural, semantic, and clinical constraints defined in the SHACL shape, thereby ensuring logical coherence, clinical validity, and fully traceable decision support.
    Structural validation ensures that the data adhere to RDF syntax and cardinality requirements, guaranteeing the formal integrity of data representation. Semantic validation checks the logical consistency of relationships between entities—for example, ensuring that a patient cannot simultaneously be classified as both pre- and postmenopausal. Clinical validation applies domain-specific medical rules, ensuring that data combinations are clinically and therapeutically meaningful. This means that during data entry or processing, the system automatically detects inconsistencies or gaps at all levels. For instance, it flags an unrecognised menopausal status (structural validation), contradictions in physiological states (semantic validation), or clinical conditions that exclude a specific therapy (clinical validation). Each clinical recommendation is applied only if the data pass all three validation levels, ensuring decision traceability and reducing errors. For example, in the case of therapeutic rule no. 1, the SHACL shape is satisfied when data is entered for a 58-year-old postmenopausal woman with genitourinary symptoms and no history of breast cancer. In this case, the system applies the recommendation. Conversely, the SHACL shape is not satisfied when the data refer to a 62-year-old postmenopausal woman with genitourinary symptoms and a positive history of breast cancer. In this case, the system blocks the application of the rule and flags the clinical conflict, preventing an inappropriate therapeutic decision. During the validation process, the validator generates a report that explicitly highlights the inconsistencies between the patient’s clinical data and the constraints defined in the shape. For example, when the system evaluates the case of a 62-year-old postmenopausal woman with a positive history of breast cancer, the report includes a violation of the sh:HasValueConstraintComponent, indicating that the property ex:historyOfBreastCancer does not meet the expected value false.
    However, SHACL rules operate in a rigid manner: if a condition is met, the rule returns a binary outcome—either yes or no—with no intermediate states. This approach does not accurately reflect clinical practice, where the effectiveness of an intervention depends on multiple factors and cannot be reduced to a binary decision. To address this limitation, we proceed by integrating the SHACL-based rules with probabilistic models capable of estimating, in a graded way, the likelihood that a given recommendation is truly useful or effective within the specific clinical context of the patient.
  • Step 5: SHACL–Bayesian probabilistic integration
    We integrate the SHACL-validated rules into a Bayesian probabilistic model, which assigns each intervention a graduated probability of success, personalised according to the patient’s characteristics (age, co-morbidities, recurrences, menopausal status). In this way, the system does not merely apply the recommendation to the specific case but also quantifies how advantageous it is compared to the available alternatives. The integration of the two levels–semantic validation with SHACL and Bayesian probabilistic evaluation–provides the basis for defining a realistic clinical decision-making workflow. We structure this workflow into two main phases: patient intake and subsequent therapy administration by the clinician. The first phase represents the entry point to the decision-making system. At this stage, the patient presents symptoms suggestive of a urinary tract infection, which triggers the intervention of a qualified healthcare professional. When the physician develops a well-founded clinical suspicion, they request a urine culture test to identify the presence and nature of the infection. Once the physician obtains the urine culture results and completes the clinical evaluation, they select the most appropriate therapeutic strategy from the set of formalised rules in the system. At this stage, the framework provides critical support by offering updated probabilistic estimates on the applicability and expected efficacy of the different rules, which are calculated by the Bayesian model.
    Probabilistic Modelling of the Decision-Making Process
    We can model the context described above with a Bayesian approach [40,41]. Let R j be the Bernoulli random variable associated with clinical rule j:
    R j = 1 if the rule is applied 0 otherwise
    The probability that rule j is applied is modelled through a Beta prior distribution:
    A j = P ( R j = 1 ) Beta ( α j , β j )
    which can be updated as new clinical data are available.
    If, for a set of patients n treated according to rule R j , k positive outcomes are recorded, then the posterior distribution for A j is given by
    A j D Beta ( α j + k , β j + n k )
    where D = ( k , n ) are the observed data. The updated expected value of the applicability probability becomes
    E [ A j D ] = α j + k α j + β j + n
    Similarly, the conditional probability of therapeutic success given that rule R j is applied, S j : = P ( Success R j = 1 ) , is modelled as S j Beta ( γ j , δ j ) .
    Given observed data consisting of k successful outcomes out of n applications, the posterior becomes
    S j D Beta ( γ j + k , δ j + n k )
    and the updated expected value is
    E [ S j D ] = γ j + k γ j + δ j + n .
    The overall probability of therapeutic success arises from the combination of the applicability and effectiveness of the activated rules. Two approaches can be adopted:
    *
    Conservative Approach: clinical success requires all the activated rules to be effective.
    P succ Con D = j J E [ A j D ] · E [ S j D ]
    *
    Optimistic Approach: clinical success occurs if at least one of the activated rules is effective.
    P succ Opt D = 1 j J 1 E [ A j D ] · E [ S j D ]
    The conservative approach highlights complex, multi-step therapeutic protocols in which each phase is essential to achieving the clinical goal. A low overall probability indicates vulnerability: the failure of even a single rule can compromise the entire treatment. In contrast, the optimistic approach measures the resilience of the protocol: even in the presence of partial failures, the system can still generate clinical benefits. This perspective is particularly relevant when therapeutic strategies are redundant or complementary, as the presence of multiple independent options increases the likelihood of achieving a positive overall outcome. In summary, comparing the two approaches allows for simultaneous assessment of the fragility of more restrictive protocols and the robustness of more flexible ones.
    The Bayesian Processing Algorithm
    To translate the Bayesian integration phase into computational operations, we developed an algorithm that describes the entire processing flow of validated clinical data. The algorithm, shown in Algorithm 1, receives the patient’s clinical data as input, preliminarily verifies their compliance with semantic constraints through SHACL validation and, upon successful validation, updates the Beta distributions associated with the clinical rules ( R 2 , R 3 e R 2 + R 3 ).
  • Step 6: Validation through case studies
    To illustrate the practical application of the proposed framework, we examine two exemplary clinical scenarios. We emphasise that all presented data are purely illustrative and invented for demonstrative purposes, as they do not derive from real patients or actual clinical data. We designed these cases specifically to demonstrate the functioning of the decision support framework and probabilistic simulations. We apply the framework to one scenario with a successful treatment outcome and one with treatment failure. This dual approach allows us to evaluate the system’s ability to generate personalised and transparent recommendations in different clinical situations (see Section 4).
Algorithm 1: Bayesian update after SHACL validation.
Eng 07 00071 i003
Figure 1 illustrates the complete methodological workflow adopted to develop the hybrid SHACL–Bayesian framework. At the top left, the workflow begins with the main process, which is divided into six key phases:
1.
Guidelines Collection, during which the most relevant and authoritative sources are selected;
2.
Content Filtering, where the relevance of the information is assessed and irrelevant elements are discarded;
3.
Rule Extraction, in which decision logic, protocols, and key clinical criteria are identified from the guidelines;
4.
SHACL-based Formalisation, where semantic and structural constraints are applied to ensure consistency and automated verifiability;
5.
Bayesian Integration, which transforms the rules into probabilistic models, allowing the quantification of uncertainties and probabilities associated with clinical scenarios;
6.
Decision Support, where the integrated rules generate formally verified and actionable clinical recommendations.
Parallel to each phase of the process, the Validation strand accompanies each step with targeted activities: Quality Control; Content Validation; Expert Review; SHACL Validation; Monte Carlo Simulation; Scenario Evaluation.
Dashed lines connect each step of the process to its corresponding validation activity, highlighting that each output is carefully verified before moving to the next phase, ensuring continuous and rigorous control. The double helix arrangement emphasises that “Main Process” and “Validation” are not sequential but integrated and concurrent. The framework is therefore developed in a continuous iterative cycle, ensuring methodological consistency, semantic accuracy, and reliability at every stage. Following Figure 1 from top to bottom reveals a continuous flow of main process → validation → integration, with each phase carefully monitored by experts and automated tools, ultimately leading to robust and verifiable clinical recommendations.

4. Results

4.1. Case Study No. 1

We consider the case study of a postmenopausal patient with a documented history of four episodes of recurrent UTIs.
(A) 
RDF Data
The patient’s clinical data are represented in a structured format suitable for modelling clinical information as an RDF graph. In the Listing 3, menopausal status, oestrogen therapy, and the number of UTIs are formalised as triples: subject–predicate–object.
Listing 3. RDF data.
Eng 07 00071 i004
(B) 
Extraction of Clinical Rules From Guidelines
We perform the automatic extraction of clinical rules from clinical guidelines using ChatGPT-5 The reference guidelines are the AUA/CUA/SUFU Guidelines (2025) https://www.auanet.org/guidelines-and-quality/guidelines/recurrent-uti (accessed on 13 December 2025) and NICE Guidelines (2024) https://www.nice.org.uk/guidance/ng123 (accessed on 13 December 2025). Table 6 presents the main categories of clinical rules derived from the AUA/CUA/SUFU (2025) and NICE (2024) guidelines and provides representative examples extracted by the LLM.
Based on the original recommendations, the LLM generated computational rules in JSON format, of which Listing 4 shows the first extracted rule. Gynaecologists, infectious disease specialists, and an obstetrician validated the rule, confirming its clinical consistency and alignment with the source guidelines.
Listing 4. Example of R1 generated by ChatGPT-5.
Eng 07 00071 i005
(C) 
SHACL-based Formalisation of Clinical Rules
We formalised the rules in SHACL, as shown in the example in Listing 5, which refers to rule R1. For the remaining three rules, see Appendix A.1.
Listing 5. SHACL-based Formalisation of R1.
Eng 07 00071 i006
To apply the recommendations rigorously and safely to the clinical case, we validated the rules on three complementary levels: (a) Structural validation verified that the RDF data were formally correct by checking Turtle syntax, data types, and property cardinality (e.g., menopausal status expressed only once and the number of UTIs episodes as an integer); (b) Semantic validation applied ontological reasoning to ensure the logical consistency of relationships among entities; (c) Clinical validation ensured that the SHACL constraints accurately reflected the eligibility conditions defined by the AUA and NICE recommendations.
The validation process produced a positive outcome: the RDF graph proved compliant, free of violations, and fully consistent with the defined constraints. The patient met all the criteria specified by the four recommendations. We confirmed a history of recurrent UTIs with four episodes (exceeding the AUA minimum threshold of two), correctly annotated the postmenopausal status, and found no contraindications to oestrogen therapy. These findings supported the application of both therapeutic and preventive recommendations (see Appendix A.2).
The successful validation allows us to proceed to the next phase—Bayesian integration.
(D) 
Probabilistic SHACL–Bayesian Integration
We designed the probabilistic model to formally represent the uncertainty that characterises clinical decision-making, both regarding the applicability of therapeutic rules and their expected effectiveness in the treatment of recurrent urinary tract infections in postmenopausal patients. In this framework, each clinical rule R j is characterised by two key probabilistic components: (a) an applicability variable A j , which quantifies the probability that rule R j is clinically relevant for a specific case; and (b) an effectiveness variable S j , which represents the probability that, once applied, rule R j leads to a positive clinical outcome by reducing the frequency or severity of infections.
Both components, A j and S j , represent the probabilities of the applicability of the rule and the success of treatment, respectively. Modelling them with Beta distributions is particularly convenient because these distributions are naturally defined in the interval [0, 1] and therefore are directly compatible with probability variables. Furthermore, the Beta distribution allows for conjugate Bayesian updating when combined with Bernoulli-distributed outcomes, which simplifies the calculation of posteriors as new follow-up data become available. Parameters ( α j , β j ) were initialised by combining (1) scientific evidence from meta-analyses, observational studies, and clinical trials; and (2) a structured expert elicitation process involving a multidisciplinary panel of gynaecologists and infectious disease specialists. Although different prior choices could influence early posterior estimates, the Bayesian updating process ensures that, as more follow-up data are incorporated, the influence of the prior diminishes and the posterior is progressively shaped by observed outcomes.
(a)
Parameterisation of Applicability
The applicability A j of a clinical rule R j represents the probability that an intervention is effectively prescribed and accepted by the patient, taking into account clinical contraindications, individual preferences, logistical factors, and safety profiles.
The expert evaluation highlighted the following aspects:
  • R 1 Cranberry: very high applicability due to its excellent safety profile;
  • R 2 Vaginal oestrogens: moderate applicability, limited by absolute contraindications and patient concerns;
  • R 3 Antibiotic prophylaxis: low applicability because of resistance risk and side effects;
  • R 4 D-mannose: high applicability, comparable to cranberry.
In terms of parameterisation, we assigned higher ( α j ) values to interventions with favourable safety and adherence profiles (e.g., cranberry and D-mannose), while increasing ( β j ) for treatments with limited applicability due to contraindications or adverse effects (e.g., antibiotic prophylaxis). This parametrisation ensures that the probabilistic model reflects clinically realistic adoption patterns. Table 7 summarises the expert assessment and prior distributions adopted to model the applicability of the clinical rules.
(b)
Parameterisation of effectiveness
We define clinical success (or positive clinical outcome) as a clinically significant reduction of at least 50% in the frequency of UTIs episodes within one year after treatment initiation, compared with the baseline frequency. The scientific literature provides multiple sources supporting this definition. Below, we summarise key studies that quantify the effectiveness of each therapeutic approach:
  • R 1 Cranberry-based products. Williams et al. [42], in a study involving 1555 participants, reported that cranberry-based products reduce the risk of culture-confirmed symptomatic UTIs in women with recurrent infections, with a risk ratio (RR) of 0.74 and a 95% confidence interval (CI) of 0.55–0.99. Among women with recurrent UTIs, the baseline annual incidence is around 60%. Applying this risk ratio reduces the post-treatment incidence to 44.4%. However, only a portion of patients achieve the 50% reduction threshold that defines clinical success.
  • R 2 Vaginal oestrogens. Tan-Kim et al. [43], in a cohort of 5600 postmenopausal women, observed a reduction of greater than 50% in UTIs frequency during the year following therapy initiation. Using a conservative estimate, about 55% of patients achieve clinical success.
  • R 3 Antibiotic prophylaxis. A meta-analysis of 11 randomised trials [44] showed an 85% reduction in UTIs risk compared with placebo (RR 0.15, 95% CI: 0.08–0.29). Nevertheless, bacterial resistance limits its effectiveness: community resistance to trimethoprim–sulfamethoxazole reaches ≥20% and may rise to 40–45% during prophylaxis, reducing efficacy by an estimated 15–20% [45]. After accounting for this factor, the actual effectiveness is approximately 70%.
  • R 4 Low-dose vaginal oestrogens (extended use). Clinicians recommend this therapy for the genitourinary syndrome of menopause, although evidence for UTIs prevention remains limited. A Cochrane review [46] reports a reduction in incidence without providing a precise estimate. The expert panel assesses the clinical success rate at around 40%.
Table 8 summarises the expert assessment and prior distributions adopted to model the effectiveness of the clinical rules under consideration.
Based on the prior parameters reported in Table 8, the point probabilities of success are calculated as
P succ ( R j ) = E [ A j ] · E [ S j ] ,
where E [ A j ] and E [ S j ] represent the expected values of the B e t a distributions for the applicability and effectiveness of each rule R j .
By combining these expectations, we estimate the overall probability that each clinical recommendation will be both applicable and effective for the target patient. This probabilistic integration allows for a quantitative comparison of therapeutic strategies, reflecting both clinical feasibility and expected outcomes.
(E) 
Analysis of Therapeutic Scenarios WE:BOLD IS NOT NECESSARY
We estimate the probability of success while explicitly considering the therapeutic scenario in which each intervention is applied.
In mono-therapy scenarios, we compute the success probability for each therapeutic rule using the proposed formula. The resulting values, shown in Table 9, represent the expected benefit when a single intervention is selected as the primary treatment.
The results show that vaginal oestrogens ( R 2 ) achieve the highest probability of success, followed by cranberry ( R 1 ), both characterised by strong applicability and excellent safety profiles. In contrast, antibiotic prophylaxis ( R 3 ) yields a substantially lower success rate due to bacterial resistance and adverse effects. Extended-use oestrogens ( R 4 ) fall in an intermediate range, indicating potential clinical benefit but less well-defined preventive efficacy against UTIs.
In real-world clinical practice, physicians often combine multiple therapeutic strategies to maximise overall effectiveness. We therefore estimate the combined probability of success in such multi-modal settings. Assuming conditional independence, we apply two alternative aggregation criteria: (a) a conservative approach, where success requires all included treatments to be simultaneously effective; and (b) an optimistic approach, where success occurs if at least one treatment proves effective.
Applying Equations (2) and (3) to the most clinically relevant combinations yields the results summarised in Table 10.
The results reported in Table 10 highlight the marked contrast between the two approaches. Under the conservative approach, the probability of success decreases sharply as the number of treatments increases, since overall efficacy requires that all interventions be simultaneously effective. Conversely, the optimistic approach yields progressively higher success probabilities as more treatments are combined, reflecting the greater robustness of the multi-modal strategy: the inclusion of multiple independent treatments increases the likelihood that at least one will prove effective. From a clinical standpoint, the optimistic approach is often more plausible—particularly in combinations such as cranberry and vaginal oestrogens—where the effectiveness of even a single intervention can result in a clinically meaningful reduction in UTIs recurrence and, consequently, an improvement in the patient’s quality of life.

4.2. Case Study No. 2

We consider a postmenopausal patient undergoing vaginal oestrogen therapy who continues to experience recurrent UTIs at follow-up despite the ongoing treatment. The proposed system enables the collection and validation of updated clinical data (response to oestrogen therapy, frequency of infection episodes, and new culture results); the real-time updating of success probabilities for potential additional therapies (cranberry, antibiotic prophylaxis, or combination treatments) using the Bayesian model to incorporate the most recent observations; and the simulation of different therapeutic scenarios (conservative vs. optimistic) to provide the clinician with quantitative estimates of the expected efficacy for each strategy.
(A) 
RDF Data
In Listing 6, we describe the patient ex:Patient_A as belonging to the class of patients. We specify her postmenopausal status, the absence of prior oestrogen treatments, and the documented initiation of vaginal therapy on 1 February 2025. We record both the number of urinary tract infections occurring before therapy (four episodes) and those appearing afterward (two episodes observed over three months). We also note the absence of a history of breast cancer, a critical factor for assessing contraindications. We link the patient to a separate instance, ex:Culture456representing the most recent urine culture, where we identify Escherichia coli resistant to trimethoprim–sulfamethoxazole and ciprofloxacin.
Listing 6. RDF Turtle representation of clinical data.
Eng 07 00071 i007
(B) 
Extraction of Clinical Rules from Guidelines
R 1 R 4 (cranberry, oestrogen therapy for UTIs prevention, antibiotic prophylaxis, and extended-use oestrogen per NICE) were previously extracted and formalised in Case 1 (see Section 4.1).
We modify the rules from case study no. 1 to reflect the situation of a postmenopausal patient who is already receiving vaginal oestrogen therapy and continues to experience recurrent UTIs. The system does not apply the rules automatically; it uses them actively as decision support tools. It evaluates each additional intervention as an “add-on” treatment and updates the success probabilities in real time.
  • R 1 —The system identifies cranberry supplementation as a beneficial add-on for the patient. It classifies the intervention as applicable in combination with ongoing oestrogen therapy and updates the efficacy estimates accordingly.
  • R 2 —The system monitors the patient’s clinical response to the current oestrogen therapy. It updates efficacy estimates dynamically based on observed UTIs episodes and patient compliance. It verifies the absence of contraindications, such as hormone-dependent cancers, and confirms that the therapy remains suitable.
  • R 3 —The system evaluates antibiotic prophylaxis as an additional treatment. It analyses bacterial resistance data from the latest urine culture and previous therapies. It then adjusts the success probabilities based on both therapeutic potential and resistance limitations.
  • R 4 —The system reviews the patient’s clinical condition to assess the consistency of extended-use oestrogen with the ongoing treatment. When appropriate, it considers this intervention as complementary and updates the overall success probabilities.
(C) 
SHACL-based Formalisation of Clinical Rules
Listing 7 shows an example of how rule R 1 (as defined in case study no. 1) is adapted to case study no. 2.
Listing 7. SHACL-based Formalisation of R1:
Eng 07 00071 i008
The SHACL validator confirms that all constraints—structural, semantic, and clinical—are satisfied for patient Patient_A. Specifically, the RDF data are structurally correct: all mandatory fields are present, the datatypes match the expected formats (integer, Boolean), and the required cardinalities are respected. The clinical semantics are consistent: the menopausal status falls within the values permitted by the guidelines, and the UTIs history meets the criteria for additional therapies. All clinical conditions for applying the recommendations are fulfilled: vaginal oestrogen therapy has already been initiated with no contraindications, antibiotic prophylaxis is applicable, and the recommendation for cranberry use is also valid. The outcome confirms that the success probabilities calculated by the Bayesian model can be applied to the case study no. 2.
(D) 
Probabilistic SHACL–Bayesian Integration
The persistence of UTIs at the time of follow-up indicates that the applied therapy has failed. In this context, the posterior distributions of A 2 and S 2 are updated based on the prior parameters reported in Table 7 and Table 8. In other words, the negative outcome of treatment R 2 provides new evidence that directly updates the posterior distributions of the applicability and effectiveness of rule R 2 .
The updated posteriors for R 2 follow the form shown in Equation (1). Since a treatment failure was observed, the parameter β 2 increases by one unit. Specifically, we obtain A 2 B e t a ( 8 , 3 ) and S 2 B e t a ( 8 , 4 ) .
For the other rules ( R 1 , R 3 , R 4 ), we apply an independent modelling approach in this first iteration. The failure of R 2 does not directly affect the applicability ( A j ) or effectiveness ( S j ) distributions of the other rules, which remain as previously updated posteriors from the day before the follow-up.
(E) 
Analysis of Therapeutic Scenarios
In this case study, for demonstration purposes, we assume that only one new patient has been observed (corresponding to the patient at follow-up). From an operational perspective, the Bayesian update can be interpreted as an incremental learning process driven by follow-up observations. Each clinical follow-up corresponds to a Bernoulli trial whose outcome reflects the observed effectiveness of the applied rule. A successful treatment contributes evidence in favour of the rule by increasing the parameter associated with successes, whereas a treatment failure contributes evidence against it by increasing the parameter associated with failures. In the illustrative example of rule R 2 , the persistence of recurrent UTIs at follow-up is interpreted as a negative outcome. Consequently, the posterior distributions of both the applicability probability A 2 and the conditional success probability S 2 are updated by incrementing the parameters corresponding to unsuccessful outcomes. This update mechanism ensures that rules associated with repeated failures are progressively down-weighted, while still preserving uncertainty when limited evidence is available. This formulation allows the decision support system to adapt over time as new patient data are collected, while maintaining the transparency and interpretability of the probabilistic reasoning process for clinical users. In this case study, the posterior distributions are updated based on a single treatment failure. In general, the model updates dynamically as new clinical data become available from multiple patients or over time.
By applying Equation (4), we obtain the therapeutic success probabilities shown in Table 11. These estimates represent the probability of clinical success if the patient were treated with only one of the rules at follow-up.
For the combined scenarios, by applying the two approaches described in the previous section (Equations (2) and (3)), we obtain the success probabilities reported in Table 12.
A comparative analysis between the initial therapy assignment and the post-follow-up scenario highlights the adaptive role of Bayesian updating in clinical decision-making. For mono-therapies (Table 11), the posterior update after observing the failure of vaginal oestrogens ( R 2 ) slightly reduces its estimated success probability from 0.509 to 0.485, whereas the probabilities of other rules remain unchanged. This modest adjustment reflects the Bayesian principle of incremental evidence accumulation, down-weighting treatments with observed suboptimal outcomes while preserving uncertainty for less observed options. For combined therapy scenarios (Table 12), a similar pattern emerges. Scenarios including R 2 show a slight reduction in overall success probabilities compared to the initial estimates (Table 10), whereas combinations not involving R 2 are unaffected. For instance, the optimistic probability for the comprehensive multi-modal approach ( R 1 + R 2 + R 3 + R 4 ) decreases from 0.872 to 0.866, and for the R 1 + R 2 scenario from 0.738 to 0.726. These changes, although subtle, demonstrate that the Bayesian framework dynamically adjusts decision priorities according to accumulated clinical evidence. Overall, this comparative remark illustrates that Bayesian updating not only quantifies success probabilities but also directly informs therapy selection and prioritisation. In practice, treatments associated with slight decreases in posterior probabilities may be reconsidered, or monitored more closely, while rules with unchanged or improved posteriors gain relative preference, thus enabling adaptive and transparent clinical decision support.

5. Discussion

The clinical case of a postmenopausal patient with four documented episodes of recurrent urinary tract infections allowed us to evaluate an integrated framework combining SHACL-based clinical rules with Bayesian probabilistic models. Structural, semantic, and clinical validation confirmed that RDF data were coherent and compliant with the AUA and NICE guideline constraints, supporting the safe application of the corresponding recommendations (AUA 2019; NICE, 2018).
Bayesian integration highlighted substantial differences between therapeutic options. Vaginal oestrogen ( R 2 ) showed the highest probability of success (0.509), followed by cranberry supplementation ( R 1 , 0.467), both characterised by favourable safety and clinical acceptability profiles. Antibiotic prophylaxis ( R 3 ) yielded markedly lower values (0.280), penalised by concerns regarding antimicrobial resistance and adverse effects, while extended-use oestrogen therapy ( R 4 ) demonstrated moderate efficacy (0.320).
For combined treatments, the optimistic approach showed that the combination of cranberry and vaginal oestrogen achieved a success probability of 73.8%, outperforming all mono-therapies and reflecting the robustness of multi-modal interventions. In contrast, the conservative approach produced very low values, indicating that requiring simultaneous efficacy in multiple interventions drastically decreases the overall probability of success.
The second clinical case demonstrated the system’s capacity to dynamically adapt to observed therapeutic failure. The Bayesian posterior update for R 2 reflected a reduction in the probability of success of vaginal oestrogen therapy (from 0.509 to 0.485), while the remaining rules retained unchanged estimates, consistent with the independence assumption. This result shows that the framework does not rely on static rules alone but incorporates new clinical evidence to recalibrate the reliability of the recommendations in real time.
The analysis of combined strategies revealed two key insights. First, the cranberry and oestrogen strategy continues to yield a highly optimistic probability (0.726), confirming the robustness of the multi-modal approach. Second, the modest reduction compared to clinical case no. 1 indicates the model’s sensitivity to the partial failure of one component. Integrating all treatments ( R 1 + R 2 + R 3 + R 4 ) generates very high probabilities under the optimistic assumption (0.866), but a marked collapse under the conservative one (0.020), underscoring the practical limitations of overly extensive strategies and the influence of interaction effects.
Comparing the two clinical cases illustrates the added value of the SHACL–Bayesian approach in adapting to heterogeneous contexts. In the first case, a patient naïve to oestrogen therapy showed a higher probability of success with mono-therapy—especially with vaginal oestrogen—and clear benefits for multi-modal combinations. In the second case, characterised by documented therapeutic failure, the system recalibrated the posterior value for R 2 , reducing its reliability and proportionally decreasing the probabilities of the combined strategies. This incremental learning capability constitutes a key element of clinical realism: the system not only integrates formal rules and semantic constraints but also dynamically updates probabilistic estimates based on observed evidence. The result is a flexible decision support system that is capable of adapting to the individual path of the patient and providing quantitative recommendations that more closely reflect real clinical practice than traditional static guideline-based tools.

6. Conclusions

This work demonstrates the application of an integrated framework that combines formalised clinical rules in SHACL with Bayesian probabilistic models to support decision-making in recurrent UTIs in postmenopausal patients. The objective is to illustrate, both conceptually and through simulation, how to estimate the applicability and effectiveness of different therapies and dynamically update these estimates based on observed clinical data, even when multiple clinical guidelines coexist.
We challenge the system by examining two main scenarios:
  • Case study no. 1—Initial therapy selection: The system estimates the applicability and effectiveness of possible therapeutic strategies based on the patient’s baseline data and the existing literature, providing the clinician with probabilistic evidence to guide the initial treatment choice;
  • Case study no. 2—Optimisation of ongoing treatment: The system acts as an adaptive tool, updating the posterior distributions using new follow-up data and supporting the clinician in deciding whether to maintain or complement the current therapy with additional interventions (add-on).
The analysis relies on an independent model, where the failure of one rule does not directly affect the therapeutic success of others. This assumption simplifies the computation and enables efficient Bayesian updating, but it does not capture potential synergies between treatments.

6.1. Limits

The study has methodological and practical limitations. First, the system is highly dependent on the quality of the initial patient data and the available literature. If clinical information is incomplete, or evidence is limited or outdated, the resulting applicability and effectiveness estimates may be inaccurate. The current model assumes independence among treatments and does not account for possible interactions, synergies, or antagonistic effects, which may lead to underestimation or overestimation of overall effectiveness in multi-modal scenarios.
Conflicts among clinical guidelines represent an additional limitation: the system encodes each guideline as a separate rule but cannot automatically resolve inconsistencies, requiring additional clinical interpretation. The generalisability of the model remains limited as validation was performed in simulated scenarios and a small number of real cases. As a result, robustness and performance guarantees for larger, heterogeneous, or more complex clinical populations cannot yet be claimed. This limitation is intentional and reflects the primary aim of this work, which is to introduce and demonstrate a hybrid decision support framework integrating SHACL-based deterministic constraints with Bayesian probabilistic modelling. Therefore, a rigorous large-scale validation, including prospective clinical studies and comparative evaluation with existing decision support systems, is identified as a key direction for future work. The continuous evolution of evidence and guidelines also requires regular updates, without which recommendations can become outdated.
The clinical acceptance of the system depends on the willingness of physicians to integrate probabilistic estimates with their own judgement and experience. Scalability and computational complexity pose additional challenges, especially when applying multiple rules or guidelines simultaneously to large patient datasets. Furthermore, the current framework does not yet utilise advanced predictive tools, such as regression-based models, which could enhance personalisation and capture complex relationships between clinical variables and treatments.
The framework has not yet formally integrated the temporal dimension. Subsequent updates of clinical records are incorporated into the Bayesian model, but without a true longitudinal representation capable of distinguishing between recent and past events. This may reduce the accuracy of probabilistic estimates during the follow-up phases.
In addition, the system requires the management of sensitive clinical data, with inherent risks related to the storage, processing, and sharing of information. Although the semantic model promotes interoperability, it increases the risk of re-identification if the data are not properly anonymised or are linked to multiple sources.
Finally, clinical responsibility remains a critical concern. A system based on codified knowledge and probabilistic models cannot replace professional judgement, and any modelling, updating, or interpretation error may have significant implications for patient safety.

6.2. Future Works

Although the current study demonstrates the novel integration of SHACL-based semantic constraints with Bayesian probabilistic reasoning, future developments could focus on extending and benchmarking the framework against state-of-the-art Bayesian models. Hierarchical Bayesian models could incorporate individual clinical variables (e.g., age, number of episodes, co-morbidities) as covariates, enhancing personalisation and enabling comparison with recent hierarchical approaches. Multivariate Bayesian models could capture dependencies between rules, identifying potential synergies or redundancies between treatments.
Although the current implementation of the system is static, with a priori and a posteriori updates applied to pre-collected data, a key direction for future work is to develop a shared, interactive framework capable of incorporating streaming clinical data from multiple patients and clinical centres, building a continuously updated knowledge base that refines estimates of both effectiveness and applicability in real time.
Through these extensions, the system can evolve from an independent and descriptive model into a fully dynamic, personalised decision support tool, capable of adapting both to individual patient trajectories and to aggregated clinical evidence. Importantly, this roadmap positions the framework to not only leverage hierarchical and multivariate Bayesian methods for more accurate and individualised predictions but also to systematically benchmark against the most recent and advanced Bayesian decision support approaches, highlighting the strengths and areas for improvement of the SHACL–Bayesian integration.

Author Contributions

Conceptualisation, M.A.C.; methodology, M.A.C. and F.C.; software, M.A.C. and F.C.; validation, M.A.C., F.C., E.C., M.P., L.N., M.G. and D.D.V.; formal analysis, M.A.C. and F.C.; investigation, M.A.C., F.C. and E.C.; data curation, M.A.C. and F.C.; writing—original draft preparation, M.A.C. and F.C.; writing—review and editing, M.A.C., F.C., E.C., M.P., L.N., M.G. and D.D.V.; supervision, M.A.C. and F.C.; project administration, M.A.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Research code is available within the Appendix A and Appendix B.

Acknowledgments

We thank the Italian Society of Gynecology and Obstetrics (SIGO). During the preparation of this study, the authors used ChatGPT-5 [39] for the extraction of rules corresponding to Step no. 3 of the methodology. This involved extracting rules in JSON format from the clinical guidelines listed in Table 2, which were studied and used for the development of this work. The tool was also used to assist with language editing and proofreading. The authors have reviewed and edited the output and take full responsibility for the content of this publication.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
ABCDEAirway, Breathing, Circulation, Disability, Exposure
ACOGAmerican College of Obstetricians and Gynaecologists
AGOIItalian Association of Gynaecologists and Obstetricians
AMSAustralasian Menopause Society
AUAAmerican Urological Association
BBNBelief Networks
BMSBritish Menopause Society
ChatGPT-5 Chat Generative Pre-Trained Transformer-5
CUACanadian Urological Association
EAUEuropean Association of Urology
EMASEuropean Menopause and Andropause Society
ESEndocrine Society
FCMFuzzy Cognitive Maps
GSMGenitourinary Syndrome of Menopause
GRADEGrading of Recommendations, Assessment, Development and Evaluation
HRTHormone Replacement Therapy
IDSAInfectious Diseases Society of America
IMSInternational Menopause Society
IoVInternet of Vehicles
ISSWSHInternational Society for the Study of Women’s Sexual Health
JSONJavaScript Object Notation
LLMLarge Language Model
NAMSNorth American Menopause Society
NICENational Institute for Health and Care Excellence
NLPNatural Language Processing
PLMPre-trained Language Model
RDFResource Description Framework
RAGRetrieval-Augmented Generation
RAGPRRetrieval-Augmented Generation-Based Physician Recommendation
SHACLShapes Constraint Language
SIGNScottish Intercollegiate Guidelines Network
SIGOSocietà Italiana di Ginecologia e Ostetricia
SIUSociété Internationale d’Urologie
SOGCSociety of Obstetricians and Gynaecologists of Canada
SUFUSociety of Urodynamics, Female Pelvic Medicine & Urogenital Reconstruction
UTIsUrinary Tract Infections
USPSTFUnited States Preventive Services Task Force
W3CWorld Wide Web Consortium

Appendix A

Appendix A.1. Shape Graphs (SHACL)

Listing A1 shows the rules extracted by the LLM from the clinical guidelines and formalised in SHACL, which are presented below.
Listing A1. Extracted and SHACL-based Formalised Rules.
Eng 07 00071 i0a1

Appendix A.2. Validation Report

Table A1 includes the (a) SHACL validation level, distinguishing between structural, semantic, and clinical checks; (b) the name of the shape or specific constraint applied to the patient node; (c) the verification status, which in this case is always valid; and (d) the evidence produced by the SHACL validator, i.e., the formal reason why the data satisfies the constraint—such as the correctness of the datatype, the presence of the required minimum value, or the compliance of the value with an allowed set.
Table A1. SHACL validation results for Patient_A organised across structural, semantic, and clinical levels.
Table A1. SHACL validation results for Patient_A organised across structural, semantic, and clinical levels.
Validation LevelShape/ConstraintStatusEvidence
StructuralSemanticShape - hasUTIHistory (datatype xsd:integer)Valid“4 has datatype xsd:integer“
StructuralSemanticShape - hasUTIHistory (minCount = 1)Valid“Checked minCount(1) for path(hasUTIHistory)”
StructuralOestrogenNICEShape - hasMenopausalStatus (minCount = 1)Valid“Checked minCount(1) for path(hasMenopausalStatus)”
StructuralOestrogenNICEShape - historyOfBreastCancer (datatype xsd:boolean)Valid“false has datatype xsd:boolean”
SemanticOestrogenAUAShape - menopausal status in Perimenopause, PostMenopauseValid“Checked PostMenopause sh:in (Perimenopause, PostMenopause)”
SemanticOestrogenNICEShape - menopausal status in Perimenopause, PostMenopauseValid“Checked PostMenopause sh:in (Perimenopause, PostMenopause)”
SemanticAntibioticShape - hasUTIHistory ≥ 1Valid“4 satisfies minInclusive(1)”
ClinicalCranberryShapeValid“Cranberry prophylaxis may be offered to women with recurrent UTIs (AUA Rec.13)”
ClinicalAntibioticShapeValid“Antibiotic prophylaxis may be considered for women with a history of UTIs (AUA Rec.12)”
ClinicalOestrogenAUAShapeValid“Oestrogen therapy applies to peri- or post-menopausal women (AUA Rec.20)”
ClinicalEstrogenNICEShapeValid“NICE oestrogen recommendation for genitourinary symptoms associated with menopause (NICE 1.5.4)”

Appendix B. Model Validation

The validation of the framework was carried out using two complementary approaches:
  • Monte Carlo simulation, used to assess the consistency between predicted probabilities and simulated empirical frequencies, thereby evaluating the numerical stability of the model;
  • Posterior predictive propagation, applied to quantify the overall uncertainty due to the variability of the Beta distributions governing applicability ( A j ) and effectiveness ( S j ).
To implement the first strategy, 10,000 Bernoulli simulations were performed for each rule R j , comparing the theoretical expected values with the corresponding observed empirical frequencies.
The results in Table A2 show a high level of consistency between predicted and simulated values (differences < 0.01 ), with predicted standard errors smaller than the empirical ones. This confirms the numerical stability of the model and its robustness against stochastic noise introduced by simulations.
Table A2. Monte Carlo simulation for individual rules.
Table A2. Monte Carlo simulation for individual rules.
RulePredicted (±se)Simulated (±se)
R 1 0.467 ± 0.0006 0.467 ± 0.0050
R 2 0.485 ± 0.0006 0.488 ± 0.0050
R 3 0.280 ± 0.0005 0.287 ± 0.0045
R 4 0.320 ± 0.0006 0.312 ± 0.0046
In combined scenarios (Table A3), predictions and simulations remain consistent even when interactions between rules are considered. The optimistic scenario shows a coherent increase in success probability (up to 0.86 ), while the conservative one decreases as expected. The overall stability indicates that probability updates in the model do not introduce bias or spurious correlations.
Table A3. Monte Carlo simulation for combined scenarios (predicted/simulated; standard error in parentheses).
Table A3. Monte Carlo simulation for combined scenarios (predicted/simulated; standard error in parentheses).
ScenarioConservativeOptimistic
Predicted (±se)Simulated (±se)Predicted (±se)Simulated (±se)
R 1 + R 2 0.227 ± 0.0004 0.227 ± 0.0042 0.725 ± 0.0004 0.729 ± 0.0044
R 2 + R 4 0.155 ± 0.0003 0.149 ± 0.0036 0.650 ± 0.0005 0.645 ± 0.0048
R 1 + R 2 + R 3 + R 4 0.020 ± 0.0001 0.020 ± 0.0014 0.866 ± 0.0003 0.860 ± 0.0035
The posterior propagation accounts for the intrinsic variability of the Beta distributions of parameters A j and S j , generating random samples from which the mean, standard deviation, Monte Carlo error, and 95% credibility intervals were computed.
The credibility intervals (Table A4) show greater precision for R 1 and R 2 , while R 3 and R 4 reflect higher uncertainty, consistent with the heterogeneity of the underlying information.
Table A4. Posterior propagation for individual rules.
Table A4. Posterior propagation for individual rules.
RuleMeansdseCI95%
R 1 0.467 0.132 0.0006 [0.218, 0.724]
R 2 0.485 0.129 0.0006 [0.238, 0.736]
R 3 0.280 0.119 0.0005 [0.085, 0.539]
R 4 0.320 0.129 0.0006 [0.103, 0.595]
In combined scenarios (Table A5), credibility intervals widen under conservative conditions and narrow under optimistic ones, where shared evidence reduces uncertainty. Overall, Monte Carlo validation and posterior propagation are consistent and complementary: the former confirms the numerical stability of the model, while the latter quantifies epistemic variability, demonstrating reliable predictive behaviour even in the presence of parameter uncertainty.
Table A5. Posterior propagation for combined scenarios (means and 95% credibility intervals).
Table A5. Posterior propagation for combined scenarios (means and 95% credibility intervals).
ScenarioConservativeOptimistic
MeanCI95%MeanCI95%
R 1 + R 2 0.227 [0.081, 0.428] 0.725 [0.511, 0.891]
R 2 + R 4 0.155 [0.041, 0.334] 0.650 [0.418, 0.847]
R 1 + R 2 + R 3 + R 4 0.020 [0.003, 0.061] 0.866 [0.725, 0.957]

References

  1. Delanerolle, G.; Phiri, P.; Elneil, S.; Talaulikar, V.; Eleje, G.U.; Kareem, R.; Shetty, A.; Saraswath, L.; Kurmi, O.; Benetti-Pinto, C.L.; et al. Menopause: A Glob. Health Wellbeing Issue That Needs Urgent Attention. Lancet Glob. Health 2025, 13, e196–e198. [Google Scholar] [CrossRef]
  2. Tang, K.; Feng, J.; Lai, H.; Zhao, Z.; Zou, Y.; Lv, Q.; Lai, W.; Qiu, X.; Lai, W. Global Burden and Trends of UTI in Premenopausal and Postmenopausal Women from 1990 to 2021 and Projections to 2044. Int. J. Women’s Health 2025, 17, 1375–1392. [Google Scholar] [CrossRef] [PubMed]
  3. Phillips, N.A.; Bachmann, G.A. The genitourinary syndrome of menopause. Menopause 2021, 28, 579–588. [Google Scholar] [CrossRef]
  4. Jung, C.; Brubaker, L. The etiology and management of recurrent urinary tract infections in postmenopausal women. Climacteric 2019, 22, 242–249. [Google Scholar] [CrossRef]
  5. Priyadarshini, A.; Kalola, P.; Patel, P.; Patadia, H.; Gangawane, A. Prevalence and antibiotic resistance patterns of urinary tract infections in menopausal women. Afr. J. Biomed. Res. 2024, 27, 1927–1933. [Google Scholar] [CrossRef]
  6. Cornelius, S.A.; Basu, U.; Zimmern, P.E.; De Nisco, N.J. Overcoming challenges in the management of recurrent urinary tract infections. Expert Rev. Anti Infect. Ther. 2024, 22, 1157–1169. [Google Scholar] [CrossRef] [PubMed]
  7. Murray, K.; Shimabukuro, J.; Khalfay, N.; Chiang, J.N.; Ackerman, A.L. Antibiotic overprescription for “urinary tract infections” is associated with poor diagnostic stewardship and low adherence to guidelines. Neurourol. Urodyn. 2025, 44, 382–389. [Google Scholar] [CrossRef] [PubMed]
  8. Bradley, M.; Irwin, A.; Hetzel Riggen, M.; Shelton, C.; Macdonald, C. Urinary tract infection symptom management in postmenopausal women: A qualitative exploration. Menopause 2025, 32, 1008–1013. [Google Scholar] [CrossRef]
  9. Sanyaolu, L.N.; Cooper, E.; Read, B.; Ahmed, H.; Lecky, D.M. Impact of menopausal status and recurrent UTIs on symptoms, severity, and daily life: Findings from an online survey of women reporting a recent UTI. Antibiotics 2023, 12, 1150. [Google Scholar] [CrossRef]
  10. Gkrozou, F.; Tsonis, O.; Godden, M.; Siafaka, V.; Paschopoulos, M. Mobile health (mHealth) apps focused on menopause: Are they any good? Post Reprod. Health 2019, 25, 191–198. [Google Scholar] [CrossRef]
  11. Di Marzo Serugendo, G.; Cappelli, M.A.; Falquet, G.; Metral, C.; Wade, A.; Ghadfi, S.; Cutting-Decelle, A.-F.; Caselli, A.; Cutting, G. Streamlining Tax and Administrative Document Management with AI-Powered Intelligent Document Management System. Information 2024, 15, 461. [Google Scholar] [CrossRef]
  12. Di Marzo Serugendo, G.; Cappelli, M.A.; Glass, P.; Caselli, A. The Semantic Approach to Recognise the Components of the Underground Cadastre; Technical Scientific Report; University of Geneva: Geneva, Switzerland, 2024; Available online: https://archive-ouverte.unige.ch/unige:175632 (accessed on 20 December 2025).
  13. Di Marzo Serugendo, G.; Caselli, A.; Cappelli, M.A.; Friha, L.; Hugentobler, A.; Cisse, K.; Mulard, P.; Missiri, N.; Martelli, A.; Huynh, B.; et al. A Semantic-Based Approach for Automating Compliance by the Design of Digital Services—A Case Study in the Academic Sector. ITM Web Conf. 2023, 51, 05004. [Google Scholar] [CrossRef]
  14. Di Marzo Serugendo, G.; Friha, L.; Burgi, P.Y.; Doebeli, J.; Wade, A.; Cappelli, M.A.; Cutting-Decelle, A.-F.; Vonlanthen, M.; Durand, N.; Hugentobler, A. Towards a Digital Service to Help the Elaboration, Implementation and Follow-Up of Study Regulations at the University of Geneva—A Hands-On Experiment. ITM Web Conf. 2022, 41, 03004. [Google Scholar] [CrossRef]
  15. Cappelli, M.A.; Di Marzo Serugendo, G.; Cutting-Decelle, A.-F.; Strohmeier, M. A Semantic-Based Approach to Analyze the Link Between Security and Safety for Internet of Vehicle (IoV) and Autonomous Vehicles (AVs). In Proceedings of the CARS 2021, 6th International Workshop on Critical Automotive Applications: Robustness & Safety, Virtual, 13 September 2021. [Google Scholar]
  16. Kober, G.; Robaldo, L.; Paschke, A. Modeling and Executing Clinical Guidelines with SHACL and RuleML: The ABCDE Approach. Stud. Health Technol. Inform. 2022, 293, 59–66. [Google Scholar] [CrossRef]
  17. Purohit, D.; Chudasama, Y.; Torrente, M.; Vidal, M.-E. VISE: Validated and Invalidated Symbolic Explanations for Knowledge Graph Integrity. In EXPLIMED—First Workshop on Explainable Artificial Intelligence for the Medical Domain, Santiago de Compostela, Spain, 19–20 October 2024; CEUR Workshop Proceedings: Aachen, Germany, 2024; Volume 3831, Available online: https://ceur-ws.org/Vol-3831/paper5.pdf (accessed on 21 December 2025).
  18. Chudasama, Y.; Huang, H.; Purohit, D.; Vidal, M.-E. Toward Interpretable Hybrid AI: Integrating Knowledge Graphs and Symbolic Reasoning in Medicine. IEEE Access 2025, 13, 39489–39509. [Google Scholar] [CrossRef]
  19. Vidal, M.-E.; Chudasama, Y.; Huang, H.; Purohit, D.; Torrente, M. Integrating Knowledge Graphs with Symbolic AI: The Path to Interpretable Hybrid AI Systems in Medicine. J. Web Semant. 2025, 84, 100856. [Google Scholar] [CrossRef]
  20. Rohde, D.; Vidal, M.-E. ConstrainTree: Enhancing Decision Trees with Semantic Constraint Validation. IEEE Access 2025, 13, 123379–123402. [Google Scholar] [CrossRef]
  21. Declerck, J.; Kılıç, Ö.D.; Emir Erol, E.; Mehryar, S.; Kalra, D.; de Zegher, I.; Celebi, R. Assessing Data Quality in Heterogeneous Health Care Integration: Simulation Study of the AIDAVA Framework. JMIR Med. Inform. 2025, 13, e75275. [Google Scholar] [CrossRef]
  22. Kierner, S.; Kucharski, J.; Kierner, Z. Taxonomy of Hybrid Architectures involving Rule-Based Reasoning and Machine Learning in Clinical Decision Systems: A Scoping Review. J. Biomed. Inform. 2023, 144, 104428. [Google Scholar] [CrossRef] [PubMed]
  23. Parmigiani, G. Modeling in Medical Decision Making: A Bayesian Approach; John Wiley & Sons: Chichester, UK, 2002. [Google Scholar]
  24. Berry, D.A. Theory and Practical Use of Bayesian Methods in Interpreting Clinical Trial Data: A Narrative Review. JAMA 2011, 306, 436–444. [Google Scholar] [CrossRef]
  25. Papageorgiou, E.I.; Huszka, C.; De Roo, J.; Douali, N.; Jaulent, M.-C.; Colaert, D. Application of probabilistic and fuzzy cognitive approaches in semantic web framework for medical decision support. Comput. Methods Programs Biomed. 2013, 112, 580–598. [Google Scholar] [CrossRef]
  26. Avula, R. Applications of Bayesian Statistics in Healthcare for Improving Predictive Modeling, Decision-Making, and Adaptive Personalized Medicine. Int. J. Appl. Health Care Anal. 2022, 7, 29–43. Available online: https://norislab.com/index.php/IJAHA/article/view/99 (accessed on 20 December 2025).
  27. Pezzani, M.D.; Arieti, F.; Rajendran, N.B.; Barana, B.; Cappelli, E.; De Rui, M.E.; Galia, L.; Hassoun-Kheir, N.; Argante, L.; Schmidt, J.; et al. Frequency of bloodstream infections caused by six key antibiotic-resistant pathogens for prioritization of research and discovery of new therapies in Europe: A systematic review. Clin. Microbiol. Infect. 2024, 30, S4–S13. [Google Scholar] [CrossRef]
  28. Guille, C.; Jahnke, H.; Shah, N.; Henrich, N. Evolving the health care service model for menopause with digital health. Women’s Health Issues 2025, 35, 230–232. [Google Scholar] [CrossRef]
  29. Arya, L.A.; Agrawal, S.; Ikpeama, N.; Harvie, H.; Hamm, R.F.; Dutcher, L. Implementing a digital platform for recurrent urinary tract infections. Urogynecology 2025, 31, 183–193. [Google Scholar] [CrossRef]
  30. Cronin, C.; Hungerford, C.; Wilson, R.L. Using Digital Health Technologies to Manage the Psychosocial Symptoms of Menopause in the Workplace: A Narrative Literature Review. Issues Ment. Health Nurs. 2021, 42, 541–548. [Google Scholar] [CrossRef]
  31. Osborne, A.K.; Sillence, E. Accessing Information on Menopause Transition and the Role of Digital Health Technologies: A Narrative Review. Women Health 2025, 65, 508–521. [Google Scholar] [CrossRef]
  32. Sillence, E.; Hardy, C.; Kemp, E. “This App Just Gets Me”: Assessing the Quality, Features and User Reviews of Menopause Smartphone Apps. J. Consum. Health Internet 2023, 27, 156–172. [Google Scholar] [CrossRef]
  33. Xiong, G.; Jin, Q.; Wang, X.; Zhang, M.; Lu, Z.; Zhang, A. Improving Retrieval-Augmented Generation in Medicine with Iterative Follow-Up Questions. Pac. Symp. Biocomput. 2025, 30, 199–214. [Google Scholar] [CrossRef] [PubMed]
  34. Zheng, Y.; Yan, Y.; Chen, S.; Cai, Y.; Ren, K.; Liu, Y.; Zhuang, J.; Zhao, M. Integrating Retrieval-Augmented Generation for Enhanced Personalized Physician Recommendations in Web-Based Medical Services: Model Development Study. Front. Public Health 2025, 13, 1501408. [Google Scholar] [CrossRef] [PubMed]
  35. AlSwayied, G.; Guo, H.; Rookes, T.; Frost, R.; Hamilton, F.L. Assessing the Acceptability and Effectiveness of Mobile-Based Physical Activity Interventions for Midlife Women During Menopause: Systematic Review of the Literature. JMIR Mhealth Uhealth 2022, 10, e40271. [Google Scholar] [CrossRef]
  36. Pereira, A.P.; Janela, D.; Areias, A.C.; Molinos, M.; Tong, X.; Bento, V.; Yanamadala, V.; Atherton, J.; Dias Correia, F.; Costa, F. Innovating Care for Postmenopausal Women Using a Digital Approach for Pelvic Floor Dysfunctions: Prospective Longitudinal Cohort Study. JMIR Mhealth Uhealth 2025, 13, e68242. [Google Scholar] [CrossRef]
  37. Duffecy, J.; Rehman, A.; Gorman, S.; Huang, Y.L.; Klumpp, H. Evaluating a Mobile Digital Therapeutic for Vasomotor and Behavioral Health Symptoms Among Women in Midlife: Randomized Controlled Trial. JMIR Mhealth Uhealth 2025, 13, e58204. [Google Scholar] [CrossRef]
  38. Cappelli, M.A.; Di Marzo Serugendo, G. Semantic-Driven Conversational Agent for “SOS Rentree” University Service; Technical Scientific Report; University of Geneva: Geneva, Switzerland, 2025; Available online: https://archive-ouverte.unige.ch/unige:187530 (accessed on 10 December 2025).
  39. OpenAI. GPT-5: Large Language Model; OpenAI: San Francisco, CA, USA, 2024; Available online: https://openai.com/chatgpt (accessed on 4 November 2024).
  40. Bolstad, W.M.; Curran, J.M. Introduction to Bayesian Statistics; John Wiley & Sons: Hoboken, NJ, USA, 2016. [Google Scholar]
  41. Koch, K.-R. Introduction to Bayesian Statistics; Springer: Berlin/Heidelberg, Germany, 2007. [Google Scholar]
  42. Williams, G.; Hahn, D.; Stephens, J.H.; Craig, J.C.; Hodson, E.M. Cranberries for preventing urinary tract infections. Cochrane Database Syst. Rev. 2023, 4, CD001321. [Google Scholar] [CrossRef]
  43. Tan-Kim, J.; Shah, N.M.; Do, D.; Menefee, S.A. Efficacy of vaginal estrogen for recurrent urinary tract infection prevention in hypoestrogenic women. Am. J. Obstet. Gynecol. 2023, 229, 143.e1–143.e9. [Google Scholar] [CrossRef] [PubMed]
  44. Jent, P.; Berger, J.; Kuhn, A.; Trautner, B.W.; Atkinson, A.; Marschall, J. Antibiotics for preventing recurrent urinary tract infection: Systematic review and meta-analysis. Open Forum Infect. Dis. 2022, 9, ofac327. [Google Scholar] [CrossRef] [PubMed]
  45. Fisher, H.; Oluboyede, Y.; Chadwick, T.; Abdel-Fattah, M.; Brennand, C.; Fader, M.; Harrison, S.; Hilton, P.; Larcombe, J.; Little, P.; et al. Continuous low-dose antibiotic prophylaxis for adults with repeated urinary tract infections (AnTIC): A randomised, open-label trial. Lancet Infect. Dis. 2018, 18, 957–968. [Google Scholar] [CrossRef]
  46. Lethaby, A.; Ayeleke, R.O.; Roberts, H. Local oestrogen for vaginal atrophy in postmenopausal women. Cochrane Database Syst. Rev. 2016, 8, CD001500. [Google Scholar] [CrossRef] [PubMed]
Figure 1. Methodological workflow of the hybrid SHACL–Bayesian framework. Each methodological phase (left helix strand) is directly associated with a validation step (right helix strand), ensuring quality, traceability, and reliability throughout the process. The intertwined structure emphasises the continuous integration between process development and validation activities.
Figure 1. Methodological workflow of the hybrid SHACL–Bayesian framework. Each methodological phase (left helix strand) is directly associated with a validation step (right helix strand), ensuring quality, traceability, and reliability throughout the process. The intertwined structure emphasises the continuous integration between process development and validation activities.
Eng 07 00071 g001
Table 1. Summary of the methodology steps.
Table 1. Summary of the methodology steps.
StepTitleDescriptionTechniques
1Collection of clinical guidelinesSystematic collection of guidelines on menopause and UTIs in postmenopausal women, organised by topic, methodological quality, and international recognition.Systematic review
2Manual filtering of paragraphs related to menopause and UTIsSelection and annotation of relevant paragraphs on pathogens, treatments, hormonal therapies, and antimicrobial resistance risks from priority guidelines (NICE, EAU, NAMS).Manual annotation, Table structuring, Semantic coding
3Extraction of clinical rules from GuidelinesDerivation of clinical rules from selected texts using a Large Language Model (LLM) guided by parametric prompts, classifying them into predefined categories.Advanced NLP, ChatGPT-5, Parametric prompting
4SHACL-based FormalisationTranslation of rules into computational constraints using SHACL shapes to ensure consistency, traceability, and semantic validation of clinical data.SHACL, Domain-specific SHACL shapes (constraint-based semantic representation)
5SHACL–Bayesian probabilistic integrationTransformation of rules into Bernoulli random variables with applicability probability θ j and conditional success probability ϕ j . Bayesian inference estimates treatment efficacy considering SHACL constraints and clinical factors (age, co-morbidities, recurrence history, menopausal status). Conflict management between integrated rules.Bayesian networks, Beta distributions, Probabilistic inference, Integration with SHACL
6Validation through case studiesApplication of the framework to two simulated scenarios: one with a positive outcome (success) and one with a negative outcome (failure). We evaluate the system’s ability to generate personalised and transparent recommendationsClinical scenario simulation, Comparative analysis, Probabilistic evaluation of results
Table 2. Classification of the clinical guidelines used in the study.
Table 2. Classification of the clinical guidelines used in the study.
LevelGuidelines
First levelNICE 2024 (National Institute for Health and Care Excellence, UK); EAU 2024 (European Association of Urology); NAMS 2020–2022 (North American Menopause Society); AMS 2024 (Australasian Menopause Society); EMAS 2024 (European Menopause and Andropause Society); AUA-CUA-SUFU 2022 (American Urological Association–Canadian Urological Association–Society of Urodynamics, Female Pelvic Medicine and Urogenital Reconstruction)
Second levelBMS 2020 (British Menopause Society); ACOG 2020 (American College of Obstetricians and Gynaecologists); IMS-EMAS 2016 (International Menopause Society–European Menopause and Andropause Society); NAMS-ISSWSH 2018 (North American Menopause Society–International Society for the Study of Women’s Sexual Health)
Third levelES 2015–2016 (Endocrine Society); IMS 2016 (International Menopause Society)
Fourth levelIDSA 2019 (Infectious Diseases Society of America); USPSTF 2019 (United States Preventive Services Task Force); UK Health 2025 (UK Health Security Agency); AUA 2018 (American Urological Association)
Fifth levelSOGC 2018–2021 (Society of Obstetricians and Gynaecologists of Canada); SIGN 2020 (Scottish Intercollegiate Guidelines Network); SIGO 2024 (Società Italiana Di Ginecologia E Ostetricia); AGOI 2021 (Italian Association of Gynaecologists and Obstetricians); SIU 2015 (Société Internationale d’Urologie); Japan Guidelines (Japanese Society for Menopause and Gynaecology)
Table 3. Types of clinical rules derived from the guidelines.
Table 3. Types of clinical rules derived from the guidelines.
Rule TypeDescriptionExample
TherapeuticRecommendations on treatments, dosages, administration routes, and therapy duration.“Use vaginal oestrogens in postmenopausal women with recurrent UTIs.”
DiagnosticCriteria for diagnosis, required tests, and timing.“Perform urine culture in cases of suspected recurrent UTI.”
PreventiveMeasures to reduce the risk of recurrence or infection (behavioural or pharmacological).“Consider non-pharmacological measures (hydration, cranberry) before antibiotic prophylaxis.”
Risk/WarningsWarnings regarding risks (e.g., antimicrobial resistance) or side effects.“Be aware of the risk of antimicrobial resistance if antibiotic therapy is prolonged.”
Clinical ManagementClinical pathways, follow-up procedures, and referral criteria for specialists.“If symptoms persist (>3 episodes/year) → refer to a urologist.”
ExclusionConditions under which a treatment or test should not be used.“Do not prescribe antibiotics for asymptomatic bacteriuria.”
EpidemiologicalData on prevalence, target population, or risk factors.“Cranberry prophylaxis is recommended for women with ≥3 UTI episodes per year.”
Note: The examples in the table are not taken from specific guidelines.
Table 4. Classes for our model.
Table 4. Classes for our model.
ClassDescription
PatientCentral entity of the clinical domain, representing the patient.
MenopausalStatusMenopausal status (Pre, Peri, Post).
SymptomRelevant symptoms (e.g., genitourinary symptoms).
UTIHistoryHistory of urinary tract infections (number and frequency of episodes).
RiskFactorClinical risk factors (e.g., co-morbidities, age, recurrences).
TherapeuticInterventionRecommended therapeutic intervention (e.g., vaginal oestrogens).
OncologicalHistoryRelevant oncological history (e.g., breast carcinoma).
Table 5. Data properties for our model.
Table 5. Data properties for our model.
Data PropertyDomainCodomain/Description
hasMenopausalStatusPatientMenopausalStatus (Pre, Peri, Post).
hasSymptomPatientSymptom (e.g., genitourinary symptoms).
hasUTIHistoryPatientUTIHistory (number of reported episodes).
hasRiskFactorPatientRiskFactor (e.g., age, co-morbidities).
hasOncologicalHistoryPatientOncologicalHistory (Boolean or detailed).
recommendedTreatmentPatientTherapeuticIntervention (e.g., vaginal oestrogens).
Table 6. Types of clinical rules derived from the AUA/CUA/SUFU (2025) and NICE (2024) guidelines, with examples extracted through the LLM.
Table 6. Types of clinical rules derived from the AUA/CUA/SUFU (2025) and NICE (2024) guidelines, with examples extracted through the LLM.
RuleTypeLLM Extraction Output
R1PreventiveAUA Statement 13: “Clinicians may offer cranberry prophylaxis for women with UTIs. (Conditional Recommendation; Evidence Level: Grade C)”
R2HormonalAUA Statement 16: “In peri- and post-menopausal women with UTIs, clinicians should recommend vaginal oestrogen therapy to reduce the risk of future UTIs if there is no contraindication to oestrogen therapy. (Moderate Recommendation; Evidence Level: Grade B)”
R3Antibiotic prophylaxisAUA Statement 12: “Following discussion of the risks, benefits, and alternatives, clinicians may prescribe antibiotic prophylaxis to decrease the risk of future UTIs in women of all ages previously diagnosed with UTIs. (Conditional Recommendation; Evidence Level: Grade B)”
R4Hormonal (NICE)NICE 1.5.4: “Offer vaginal oestrogen to people with genitourinary symptoms associated with menopause (including those using systemic HRT) and review regularly as per the recommendations on reviews in this guideline.”
Table 7. Expert evaluation and prior distributions of the applicability of clinical rules.
Table 7. Expert evaluation and prior distributions of the applicability of clinical rules.
RuleTypeExpert Evaluation A j
R 1 PreventiveExcellent safety profile, easy to administer, high patient acceptance B e t a ( 8 , 2 )
R 2 TherapeuticApplicable but subject to contraindications and cultural resistance B e t a ( 7 , 3 )
R 3 TherapeuticLimited use due to concerns about resistance and side effects B e t a ( 4 , 6 )
R 4 TherapeuticConsidered acceptable, but off-label and less established approach B e t a ( 8 , 2 )
Table 8. Expert evaluation and prior distributions of the effectiveness of clinical rules.
Table 8. Expert evaluation and prior distributions of the effectiveness of clinical rules.
RuleTypeExpert Evaluation S j
R 1 PreventiveModerate reduction, mainly as an add-on approach B e t a ( 7 , 5 )
R 2 TherapeuticClinically significant efficacy observed in real-world practice B e t a ( 8 , 3 )
R 3 TherapeuticGood efficacy in the absence of resistance, but limited long-term use B e t a ( 7 , 3 )
R 4 TherapeuticUncertain efficacy, estimated based on expert experience B e t a ( 4 , 6 )
Table 9. Success probabilities in mono-therapy scenarios.
Table 9. Success probabilities in mono-therapy scenarios.
RuleDescription P succ
R 1 Cranberry0.467
R 2 Vaginal oestrogens0.509
R 3 Antibiotic prophylaxis0.280
R 4 Extended-use oestrogens0.320
Table 10. Success probabilities in combined scenarios: conservative (Con) and optimistic (Opt) approaches.
Table 10. Success probabilities in combined scenarios: conservative (Con) and optimistic (Opt) approaches.
ScenarioDescription P succ Con P succ Opt
R 1 + R 2 Cranberry + Vaginal oestrogens0.2380.738
R 1 + R 2 + R 3 + R 4 Comprehensive multi-modal approach0.0210.872
R 1 + R 4 AUA + NICE oestrogen protocols0.1630.666
Table 11. Estimates of applicability, effectiveness, and success probability for clinical rules in mono-therapy after follow-up.
Table 11. Estimates of applicability, effectiveness, and success probability for clinical rules in mono-therapy after follow-up.
RuleDescription P succ
R 1 Cranberry0.467
R 2 Vaginal oestrogens0.485
R 3 Antibiotic prophylaxis0.280
R 4 Extended oestrogen use0.320
Table 12. Success probabilities for combined clinical scenarios after follow-up: conservative (Con) and optimistic (Opt) approaches.
Table 12. Success probabilities for combined clinical scenarios after follow-up: conservative (Con) and optimistic (Opt) approaches.
ScenarioDescription P succ Con P succ Opt
R 1 + R 2 Cranberry add-on + ongoing oestrogen therapy0.2260.726
R 1 + R 2 + R 3 + R 4 All treatments as add-on0.0200.866
R 2 + R 4 Oestrogen-based AUA + NICE combination0.1550.650
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Cappelli, M.A.; Cappelli, F.; Cappelli, E.; Pesce, M.; Niccolini, L.; Guida, M.; De Vita, D. A Hybrid SHACL–Bayesian Framework for Managing Clinical Uncertainty in Postmenopausal Women with Recurrent Urinary Tract Infections. Eng 2026, 7, 71. https://doi.org/10.3390/eng7020071

AMA Style

Cappelli MA, Cappelli F, Cappelli E, Pesce M, Niccolini L, Guida M, De Vita D. A Hybrid SHACL–Bayesian Framework for Managing Clinical Uncertainty in Postmenopausal Women with Recurrent Urinary Tract Infections. Eng. 2026; 7(2):71. https://doi.org/10.3390/eng7020071

Chicago/Turabian Style

Cappelli, Maria Assunta, Francesco Cappelli, Eva Cappelli, Maria Pesce, Ludovica Niccolini, Maurizio Guida, and Davide De Vita. 2026. "A Hybrid SHACL–Bayesian Framework for Managing Clinical Uncertainty in Postmenopausal Women with Recurrent Urinary Tract Infections" Eng 7, no. 2: 71. https://doi.org/10.3390/eng7020071

APA Style

Cappelli, M. A., Cappelli, F., Cappelli, E., Pesce, M., Niccolini, L., Guida, M., & De Vita, D. (2026). A Hybrid SHACL–Bayesian Framework for Managing Clinical Uncertainty in Postmenopausal Women with Recurrent Urinary Tract Infections. Eng, 7(2), 71. https://doi.org/10.3390/eng7020071

Article Metrics

Back to TopTop