Medical expert system as a chatbot for screening of anxiety disorders in children and adolescents
Original Article

Medical expert system as a chatbot for screening of anxiety disorders in children and adolescents

Venkateshwar Rao Madasu, Mohammadreza Hajiarbabi

Department of Engineering and Technology and Computer Science, Purdue University, Fort Wayne, IN, USA

Contributions: (I) Conception and design: Both authors; (II) Administrative support: None; (III) Provision of study materials or patients: Both authors; (IV) Collection and assembly of data: VR Madasu; (V) Data analysis and interpretation: VR Madasu; (VI) Manuscript writing: Both authors; (VII) Final approval of manuscript: Both authors.

Correspondence to: Mohammadreza Hajiarbabi, PhD. Department of Engineering and Technology and Computer Science, Purdue University, 2101 E. Coliseum Blvd., Fort Wayne, IN 46805, USA. Email: hajiarbm@pfw.edu.

Background: Mental health disorders, particularly anxiety among children and adolescents, pose a significant global health challenge, often exacerbated by a severe shortage of specialized medical personnel and accessible diagnostic services, especially in low and middle-income countries. Early identification of anxiety disorder symptoms through systematic screening is crucial for timely intervention and prevention of associated developmental and physical health issues. This study aims to develop and evaluate a novel, accessible, and scalable medical expert system chatbot for the preliminary identification of anxiety disorders in children and adolescents.

Methods: We implemented a self-assessment medical expert system as a chatbot, utilizing a forward-chaining inference methodology. The system integrates 41 standardized rules derived from the Screen for Child Anxiety Related Disorders (SCARED) questionnaire to identify symptoms across five specific anxiety disorder categories: panic disorder, generalized anxiety disorder, separation anxiety disorder, social anxiety disorder, and school avoidance. A key novelty of this expert system is the integration of business process model and notation (BPMN) with Artificial Intelligence Markup Language (AIML), which facilitates faster implementation and global deployment. An experimental study involving 100 participants (70 parents and 30 healthcare professionals) was conducted to assess the chatbot's performance and user acceptance.

Results: The chatbot demonstrated high user acceptance, with 85% of participants finding it intuitive and 90% expressing satisfaction with its usability. In terms of performance, the system achieved a high concordance rate in identifying anxiety disorder symptom categories when compared to the expected outcomes based on SCARED questionnaire responses. Specifically, the chatbot accurately categorized symptoms for panic disorder, generalized anxiety disorder, separation anxiety disorder, social anxiety disorder, and school avoidance, offering a reliable 24/7 self-assessment service.

Conclusions: This study successfully developed and evaluated a user-friendly and acceptable medical expert system chatbot for the preliminary identification of anxiety disorders in children and adolescents, addressing a critical gap in accessible mental healthcare. The novel BPMN-AIML integration proved effective in streamlining development and enhancing deployability. This system offers a scalable solution for early symptom identification, particularly beneficial in resource-limited settings, and lays foundational work for future expert systems in broader non-communicable diseases (NCDs).

Keywords: Anxiety disorders; Artificial Intelligence Markup Language (AIML); business process model and notation (BPMN); medical expert system


Received: 06 October 2024; Accepted: 25 September 2025; Published online: 12 January 2026.

doi: 10.21037/jmai-24-366


Highlight box

Key findings

• It showed a high concordance rate in identifying anxiety disorder symptom categories based on Screen for Child Anxiety Related Disorders criteria.

• It offers a reliable 24/7 self-assessment service.

What is known and what is new?

• Limited medical personnel and specialized diagnostic services create a global challenge in providing accessible and timely mental health screening for anxiety disorders in children and adolescents, especially in low-resource settings.

• This study presents a new medical expert system chatbot for preliminary anxiety disorder screening. It combines business process model and notation for knowledge representation and Artificial Intelligence Markup Language for conversational execution, simplifying development and facilitating faster, wider global deployment without extensive artificial intelligence (AI) programming.

What is the implication, and what should change now?

• This scalable, user-friendly system bridges critical gaps in mental healthcare accessibility, especially in underserved regions. It provides preliminary insights, potentially easing the burden on healthcare systems for initial assessments. This encourages the adoption of structured, AI-driven screening tools for early intervention and improved mental health outcomes, leading to more efficient and equitable global mental healthcare.


Introduction

Background

Mental health disorders, particularly anxiety disorders, are a significant global health concern that affects millions of children and adolescents. However, identifying anxiety disorders in this population can be challenging due to common behavioral manifestations that mimic other childhood disorders (1). The prevalence of anxiety disorders varies across the world, with estimates ranging from 2.5 to 7 percent by country. Mental health disorders, including anxiety, remain under-reported, particularly in low-income countries, where there is less attention and treatment (2).

The inclusion of mental health disorders in the category of non-communicable diseases (NCDs) by the World Health Organization has helped to raise global awareness of mental health issues (1). However, the promotion and prevention of mental disorders cannot be accomplished by health professionals alone. Developing countries face inadequate and complex healthcare policies that require the involvement of advanced multidisciplinary technologies to effectively address mental health issues (3). Although efforts have been made to increase healthcare support through the deployment of undertrained professional workers in developing countries, the results have fallen short of meeting the real-world demand for quality services. One of the major challenges in this regard is the knowledge gap, which must be addressed to effectively address mental health issues in developing countries (4).

Medical expert systems are computer programs designed to emulate the decision-making ability of a human expert in a specific domain, often using a knowledge base and an inference engine to solve complex problems or provide advice. In the context of mental health, these systems can assist in systematic assessment and preliminary identification of symptoms. One potential solution for addressing the challenges in identifying anxiety disorders in children and adolescents, particularly in accessible formats, is the use of such medical expert systems implemented as chatbots or conversational agents (CAs). Chatbots or CAs are artificial intelligent CAs that utilize natural language to simulate a discussion via web or mobile applications, processing user input to generate appropriate responses. However, designing and developing effective chatbots for mental health assessment requires careful consideration of tools, guidance, and skills, including the ability of machine learning algorithms to match user utterances to the right intent (5).

Rationale and knowledge gap

While advancements in artificial intelligence (AI) have led to various chatbot applications, a significant gap remains in developing clinically relevant, user-friendly, and adaptable expert systems for mental health screening that can operate independently of constant human expert oversight. Current solutions often lack the structured diagnostic reasoning provided by tools like SCARED, or require extensive knowledge engineering, limiting their scalability and deployment in resource-constrained environments, particularly in developing countries. The need for CAs in healthcare is increasing, yet their acceptance is questionable due to their perceived lack of flexibility in addressing and collecting a patient’s history and analyzing and conversing like a real medical expert (6). There is a critical need for systems that can be easily upgraded with growing data and designed and developed by non-AI experts.

Objective

This research aims to bridge these gaps by presenting a novel approach that integrates business process model and notation (BPMN) and Artificial Intelligence Markup Language (AIML) to create a robust, accessible, and easily maintainable self-assessment tool for anxiety disorders in children and adolescents. The objective is to demonstrate the effectiveness of this integration in facilitating the rapid creation and deployment of a forward-chaining-based medical expert system chatbot, thereby improving access to preliminary mental health screening globally.

Theoretical foundations and system components

In order to provide a user-friendly yet acceptable medical expert system, a chatbot must integrate various technologies. The proposed solution presented in this research utilizes a forward-chaining expert system implemented through standard BPMNs. This converted knowledge base is then utilized by the chatbot. This section aims to define and provide technical understanding of each component utilized in this research.

Expert system

An expert system is a computer program or system designed to emulate the decision-making ability of an expert in solving complex problems using known facts or rules. It consists of a knowledge base that accumulates facts and experience, which is then integrated with a rule-based system known as the inference engine. Expert systems are considered one of the simplest CAs to develop in different fields of the modern world (7).

Forward chaining

Medical diagnosis is a broad field that requires a process of elimination to narrow down a particular disease (8). This is similar to exploratory analysis where the scope of the disease category is progressively narrowed down. Forward chaining is a data-driven technique used in expert systems, wherein user input data is analyzed through knowledge exploration. The output of this process is then utilized as input for the inference engine to narrow down the results (8). Figure 1 gives a visual image of forward chaining.

Figure 1 A mental image of forward chaining.

Importance and advantages of forward chaining in medical expert systems

  • Efficient diagnostic process: forward chaining allows for an efficient diagnostic process in healthcare. It starts with the patient’s symptoms or findings and progressively applies rules and knowledge to determine potential diagnoses. By starting with the available information and iteratively applying rules, forward chaining can narrow down the possibilities and reach a diagnosis more efficiently.
  • Guided treatment planning: forward chaining is not limited to diagnosis alone. It can also be used for treatment planning and guiding therapeutic interventions. By applying rules and guidelines, forward chaining can help healthcare professionals determine the most appropriate treatment options based on the patient’s diagnosis, medical history, and other relevant factors.
  • Complex conversations: in cases where chatbots need to handle complex and multi-turn conversations, forward chaining can be employed to maintain context and flow. By analyzing previous user inputs and using the information to generate subsequent responses, the chatbot can provide more coherent and contextually relevant replies.

BPMN

BPMN is a widely adopted standard business process modeling methodology that has been utilized by industries since its inception in 2004 by Object Management Group (9). BPMN is an efficient approach to simplify business processes by identifying and analyzing bottlenecks in a process (10).

BPMN employs basic flow chart notations to evaluate the process at each step. Figure 2 gives visual understanding of the notations utilized in this research:

  • Task: used for denoting independent operation performed at the given stage.
  • Start event: execution of the given flow starts with start event. There will be only one start per given flow.
  • End event: every flow should have an end to conclude the given workflow. There can be multiple ends depending on given logic.
  • Exclusive gateway: used to control the logic flow through conditional evaluations. There will only be a single output sequence that matches at a given stage.
  • Parallel gateway: used for creating multiple flows that can execute in parallel. There will be multiple output sequences generated from single input.
  • Inclusive gateway: used for merging multiple sequence flows to give a single output.
Figure 2 Sample BPMN notations. BPMN, business process model and notation.

AIML

AIML is a language built on Extensible Markup Language (XML). It was created by the ALICE software community in the years 1995 to 2000 as part of a pattern matching rule-based chatbot (11). AIML can provide an easy, accurate, and reliable framework for the development of chatbots that serve domain knowledge through defined rule-based pattern matching algorithms (2). As of February 2023, the free community of pandorabots, which uses AIML as its knowledge content, has supported over 325,000 chatbots in multiple languages (12).

AIML is a powerful tool for developing chat-bots, serving as the brain of the CA. It uses Natural Language Under (NLU)—standing to analyze user queries and match appropriate responses through defined rule-based pattern matching algorithms (2). AIML chatbots become more intelligent with the addition of more rules to the knowledge base, and can also support multiple knowledge bases, serving as context for user queries. The basic components of AIML are data objects that contain structure elements called categories, patterns, and templates. These data blocks, also known as units of knowledge, are essential for building the knowledge base of a chatbot. Figure 3 provides a sample representation of a unit of knowledge in AIML. AIML has proven to be a reliable and accurate framework for the development of chatbots, with the free community of pandorabots alone supporting over 325,000 chatbots in multiple languages as of February 2023 (12).

  • Category: start of unit of knowledge.
  • Pattern: user input query pattern.
  • Template: designed response to the matched user query pattern.
  • Set: used for storing variables in working memory of the chatbot.
Figure 3 AIML: unit of knowledge. AIML, Artificial Intelligence Markup Language.

Chatbots

A chatbot is an artificial intelligent CA that utilizes natural language to simulate a discussion via web or mobile applications. The chatbot processes user input and applies pattern matching heuristics to determine the user’s intent or context, generating an appropriate response to the query (13). AIML is a suitable choice for developing a chatbot’s knowledge base due to its flexibility and ease of development (13). Figure 4 gives a visual understanding of the high level architecture of a chatbot.

Figure 4 User interaction with chatbot system.

Chatbots are an excellent option for simpler scenarios as they follow predefined rules. Furthermore, the flexibility and ease of customization of the knowledge base make it possible to extend the application to multiple contexts and domains. This means that the chatbot’s knowledge base can be easily adapted to meet the requirements of different domains or contexts, making it an efficient and versatile tool.

Challenges

  • Context and conversation flow: chatbots often struggle to maintain context and handle complex conversations. Understanding the context of previous messages, managing long conversations, and handling multiple intents within a conversation can be challenging. Ensuring a smooth and coherent conversation flow is crucial for an effective chatbot.
  • Dialog management: developing chatbots that can engage in meaningful and coherent conversations is another challenge. Dialog management involves handling multi-turn conversations, maintaining context, and managing user interactions effectively. Ensuring smooth and contextually appropriate responses throughout a conversation can be complex, particularly when dealing with ambiguous queries or complex user inputs.
  • Knowledge representation: chatbots often need access to knowledge bases or structured information to provide accurate and informative responses. Representing and organizing this knowledge in a way that facilitates efficient retrieval and reasoning can be challenging. Developing appropriate knowledge representation models and integrating them into the chatbot system is a complex task.

Methods

This paper presents the utilization of BPMN and Artificial Intelligent Markup Language (AIML) as a knowledge base for forward chaining in a medical expert system. This study was a collection of anonymous data with consent. The study primarily concentrates on the practical applications of the proposed approach in real-world scenarios. The research aims to demonstrate the effectiveness of the proposed solution in providing a user-friendly yet acceptable medical expert system that can be extended to various contexts and domains.

  • Simple to create a knowledge base and Inference engine for forward chaining.
  • Reducing the dependency on knowledge engineer in developing medical expert system.
  • Quick development and deployment new knowledge base as a medical diagnosing system.

A high level architecture of implementation of this research if given in Figure 5.

Figure 5 Architecture of medical expert system. AIML, Artificial Intelligence Markup Language; BPMN, business process model and notation.

Knowledge representation using BPMN

BPMN has been widely adopted as a standard modelling system to represent complex processes as a semantic and interactive knowledge base (14). In the context of rule based chatbots the knowledge base is a collection of rules, BPMN as a modelling system supports decision choices as fundamental representations thus using visual representation of BPMN system enables a non AI expert to design any domain related facts as a simple decision making BPMN elements.

BPMN at the core is an XML representation of the process model design. Leveraging this XML capability, this research uses BPMN to create a knowledge representation and also as an inference engine to derive decisions. Knowledge representation for this research is divided into two parts:

  • Data exploration: in this section chatbot gathers the required information through curated questions to the user and storing the user response for further processing.
  • Inference engine: in this section chatbot analyses the user given answers and deduce the final answer by process of elimination.

Anxiety disorder diagnosis

Anxiety disorders are a common yet under-diagnosed group of mental health disorders, particularly in children and adolescents. The challenge in diagnosing anxiety disorders is due to its frequent occurrence along with other NCDs such as depression. To address this issue, the Screen for Child Anxiety Related Disorders (SCARED) questionnaire has been developed and pretested as a screening tool used to identify anxiety disorders symptoms in children and adolescents. The SCARED is a psychometric tool that utilizes both parent and self-reporting to identify anxiety-related symptoms in individuals (15).

While SCARED is developed as a screening tool, its robust psychometric properties and widely recognized symptom categories provide a structured basis for systematically assessing anxiety symptom profiles, which our expert system leverages for preliminary identification of potential anxiety disorders.

The study presented in this paper involves the administration of a questionnaire comprising 41 items to the participants. The collected responses will be categorized to analyze different scenarios towards the diagnosis of the 5 major contributors to anxiety disorder, namely:

  • Panic disorder or significant somatic;
  • Generalized anxiety disorder;
  • Separation anxiety;
  • Social phobic disorder;
  • Significant school avoidance.

A sample SCARED evaluation questionnaire that are used in this research are presented in Tables 1,2.

Table 1

Self evaluation of anxiety disorders using SCARED questionnaire

Question 0 not true or hardly ever true 1 somewhat true or sometimes true 2 very true or often true
When I feel frightened, it is hard for me to breathe ×
I get headaches when I am at school ×
I don’t like to be with people I don’t know well ×
I get scared if I sleep away from home

○, means no; ×, means yes for recording the responses. SCARED, Screen for Child Anxiety Related Disorders.

Table 2

Parent evaluation of anxiety disorders using SCARED questionnaire

Question 0 not true or hardly ever true 1 somewhat true or sometimes true 2 very true or often true
When my child feels frightened, it is hard for him/her to breathe ×
My child gets headaches when he/she is at school ×
My child doesn’t like to be with people he/she doesn’t know well ×
My child gets scared if he/she sleeps away from home

○, means no; ×, means yes for recording the responses. SCARED, Screen for Child Anxiety Related Disorders.

Designing BPMN

The present research project has customized BPMN models to represent conversational scenarios with users and to collect data while conversing. The custom functionalities of BPMN notations that have been modified for this research project are depicted in Figure 6. The design of the knowledge representation for the diagnosis of anxiety disorder involves the creation of a BPMN model for information collection. The process flow for this model is created using BPMN activities, as illustrated in Figure 6. To create the BPMN model, a similar pattern is applied to each of the 41 questions suggested by SCARED. The response from the user for each question is stored in variables, which are used in the analysis of the diagnosis in the inference engine. The resulting BPMN model for the diagnosis of anxiety disorder is shown in Figure 7.

Figure 6 Custom functionality of BPMN notations for chatbot. BPMN, business process model and notation.
Figure 7 Snippet of knowledge representation for diagnosing anxiety disorder (parent version). *, is a wild card that takes any input; ×, means yes for recording the responses.

Inference engine

The second step in forward chaining involves analyzing the extracted data and narrowing down the possible diagnosis related to anxiety disorders. The SCARED questionnaire, comprising 41 pretested psycho-metric characteristic parent and self-reporting questions, is used to diagnose anxiety disorder symptoms in children and adolescents (15). Each question in the SCARED questionnaire is associated with a specific anxiety disorder, and each user response corresponds to a value of 0, 1, or 2. SCARED combines the responses to these questions and defines a threshold value for the summation of the response values. Table 3 provides a summary of the categorization of anxiety disorders based on SCARED (16).

Table 3

Categorization of anxiety disorder and threshold value

Questions numbers from SCARED Threshold value Probable diagnosis
1, 6, 9, 12, 15, 18, 19, 22, 24, 27, 30, 34, 38 7 Panic disorder or significant somatic symptoms
5, 7, 14, 21, 23, 28, 33, 35, 37 9 Generalized anxiety disorder
4, 8, 13, 16, 20, 25, 29, 31 5 Separation anxiety disorder
3, 10, 26, 32, 39, 40, 41 8 Social anxiety disorder
2, 11, 17, 36 3 School avoidance

SCARED, Screen for Child Anxiety Related Disorders.

This research paper presents an implementation of the SCARED inference using modified BPMN activities. The implementation involves three steps: firstly, the user response values for each disorder category are summed and stored in a variable; secondly, the stored variables are evaluated; and finally, a probable diagnosis is suggested based on the user response. The modified BPMN activities enable a visual representation of the inference engine implementation. The diagrammatic representation of the inference engine implementation in BPMN is shown in Figure 8.

Figure 8 Sample inference engine in BPMN. BPMN, business process model and notation. ×, means yes for recording the responses.

Knowledge base creation using AIML

The objective of this research is to leverage AIML as a knowledge base for BPMN knowledge representation. Converting BPMN to AIML is a critical and significant component of this research. Although both BPMN and AIML are implemented using XML, the tags and semantics employed in each domain are distinct. To convert BPMN to AIML, the XML is pre-processed to simplify it and generate a finite state model that serves as input for generating AIML scripts. The edges in the finite state model represent the connectors between user requests and chatbot responses (17). Each edge is analyzed based on the preceding and succeeding BPMN elements. The anterior elements correspond to patterns in AIML, while the posterior elements generally represent chatbot responses. However, certain complexities associated with natural conversation patterns must be addressed. Figure 9 provides an illustration of the conversion of BPMN edges into AIML knowledge units.

Figure 9 Converting BPMN to AIML. AIML, Artificial Intelligence Markup Language; BPMN, business process model and notation.

User interface

Web-based chatbots have emerged as a promising solution for deploying medical expert systems in various settings. One of the key benefits of such chatbots is that they offer users the ability to access expert advice through a mobile browser from anywhere in the world (18). Additionally, web-based chatbots provide a range of features that enable experts to upload domain-related facts and update the chatbot’s knowledge (18). Specifically, these features facilitate the incorporation of new medical findings and the customization of the chatbot’s knowledge base to meet specific user needs. Therefore, web-based chatbots represent a valuable tool for enhancing healthcare services and improving patient outcomes. The user interface of this research paper provides following features to an expert to add a knowledge base.

  • Upload the BPMN with knowledge exploration and inference engine included.
  • Reload the knowledge base to update with the latest knowledge data.
  • Chat interface to test and explore the facts related to a knowledge domain.

Figure 10 gives a visual image of the UI used in this research.

Figure 10 Chatbot UI. UI, user interface.

The study was conducted in accordance with the Declaration of Helsinki and its subsequent amendments. This study was a collection of anonymous data with consent.


Results

To evaluate the effectiveness and acceptance of the developed medical expert system as a chatbot for preliminary identification of anxiety disorders in children and adolescents, an experimental study was conducted. The study aimed to assess the system’s performance in accurately identifying anxiety symptom categories and to gauge the acceptance and usability of the chatbot interface among its target users.

Methodology

The experimental study involved recruiting a sample of 100 participants from a local community center and through online invitations, specifically targeting individuals with a vested interest in children’s mental health. The sample comprised 70 parents of children and adolescents (aged 6–18 years) and 30 healthcare professionals (pediatricians, school counselors, and child psychologists) with expertise in mental health.

  • Inclusion criteria for parents: having a child/adolescent aged 6–18 years, consent to participate, and ability to use a web-based interface.
  • Exclusion criteria for parents: children with diagnosed severe developmental disabilities that might impact symptom reporting accuracy, or parents unwilling to provide informed consent.
  • Inclusion criteria for healthcare professionals: licensed or certified professional regularly working with children/adolescents, experience with anxiety screening, and willingness to provide informed consent.
  • Exclusion criteria for healthcare professionals: those not actively practicing or without direct experience with child/adolescent mental health.

Participants accessed the web-based chatbot interface via a secure link. Prior to interaction, all participants provided informed consent. Parents provided consent for themselves and assent for their children (if applicable to their engagement with the tool).

Participants were instructed to interact with the system as if they were performing a preliminary assessment for anxiety symptoms in a young individual. During the interaction, the chatbot administered the 41 items of the SCARED questionnaire. Participant responses were automatically recorded by the system. A total of 100 valid questionnaires were completed.

Observations

The experimental study yielded encouraging results regarding the user acceptance, usability, and performance of the medical expert system chatbot for the preliminary identification of anxiety disorders.

Participant demographics

Of the 100 participants, 70 were parents [mean age =41.5 years, standard deviation (SD) =7.2; 65% female] and 30 were healthcare professionals (mean age =38.1 years, SD =5.8; 70% female). All participants reported prior experience with digital interfaces, and none reported significant technical difficulties during the study.

User acceptance and usability

Quantitative feedback on user acceptance was highly positive. 85% of participants (n=85) reported that the chatbot interface was intuitive and easy to use, allowing for seamless interaction and data input. A remarkable 90% of participants (n=90) expressed satisfaction with the system’s ability to guide them through the preliminary assessment process and provide clear and understandable feedback based on their responses.

Qualitative feedback, gathered through post-interaction surveys, further supported these findings. Parents frequently commented on the convenience and non-intimidating nature of the chatbot. For example, one parent noted, “It was very easy to use, and I liked that I could do it at home without feeling rushed.” Healthcare professionals praised the chatbot’s structured approach and potential for initial screening. A professional remarked, “This could be a valuable first step for families, providing a quick assessment before a full clinical evaluation.”

System performance and accuracy in symptom categorization

The accuracy of the system in identifying anxiety disorder symptom categories was evaluated by comparing the chatbot’s preliminary identification with the expected outcomes based on the established SCARED questionnaire scoring criteria. The results demonstrated a high level of concordance across all five anxiety disorder categories (Table 3).

The system successfully identified and categorized symptoms related to:

  • Panic disorder;
  • Generalized anxiety disorder;
  • Separation anxiety disorder;
  • Social phobic disorder;
  • Significant school avoidance.

For instance, the chatbot achieved a 92% concordance rate for generalized anxiety disorder and 89% for panic disorder, indicating its strong alignment with the SCARED instrument’s established criteria for symptom aggregation and thresholding. This aligns with the intended preliminary identification capabilities of the medical expert system.

Overall assessment

Overall, the experimental results indicated strong acceptance and usability of the developed medical expert system as a chatbot for the preliminary identification of anxiety disorders in children and adolescents. The system’s ability to accurately categorize anxiety symptoms based on a standardized screening tool, combined with its user-friendly interface and positive participant feedback, highlights its significant potential for practical application in real-world screening scenarios, particularly in improving accessibility to initial mental health assessments.


Discussion

This study successfully developed and evaluated a novel medical expert system implemented as a chatbot for the preliminary identification of anxiety disorders in children and adolescents. The integration of BPMN with AIML proved to be an effective approach for creating a user-friendly and scalable screening tool. The experimental results demonstrate promising user acceptance and system performance.

Key findings

The primary key findings of this study are:

  • High user acceptance and usability of the chatbot interface among both parents and healthcare professionals, with 85% finding it intuitive and 90% expressing satisfaction;
  • A high concordance rate in the chatbot’s preliminary identification of anxiety disorder symptom categories when compared to the established SCARED questionnaire scoring criteria, indicating the system’s accuracy in applying the underlying knowledge base;
  • The successful integration of BPMN and AIML provides a flexible and efficient framework for developing and deploying medical expert systems, particularly in contexts where rapid adaptation and updates to the knowledge base are required.

These findings collectively suggest that a chatbot-based medical expert system, utilizing the BPMN-AIML integration, offers a viable and accessible solution for initial anxiety screening in the target population.

Strengths and limitations

Strengths

  • Accessibility and scalability: the chatbot provides a 24/7 self-assessment service that can reach individuals in diverse geographical locations, including low- and middle-income countries, addressing a significant gap in accessible mental healthcare.
  • User-friendly interface: the conversational nature of the chatbot and its intuitive design contribute to high user acceptance and ease of use, reducing potential barriers associated with traditional screening methods.
  • Novel integration: the BPMN-AIML integration offers a unique approach to knowledge representation and execution, simplifying the development process and enabling non-AI experts to contribute to the system’s knowledge base.
  • Structured screening: the system utilizes standardized SCARED rules, providing a structured and evidence-based approach to preliminary symptom identification.

Limitations

  • Preliminary identification: the chatbot provides preliminary identification of symptom categories and is not intended to replace a comprehensive clinical diagnosis by a qualified healthcare professional.
  • Dependence on user input: the accuracy of the preliminary identification is dependent on the user’s ability to accurately report symptoms during the chatbot interaction.
  • Language and cultural adaptability: while the BPMN-AIML framework facilitates adaptation, further development is required to ensure full language accessibility and cultural appropriateness across diverse regions.
  • Limited empirical data: while the experimental study provides initial validation, further large-scale studies with diverse populations are needed to fully assess the system’s long-term effectiveness and impact.

Comparison with similar research

Existing research on AI-based tools for mental health screening often focuses on machine learning algorithms for symptom detection or natural language processing (NLP) for analyzing therapeutic conversations. While these approaches have their merits, they can sometimes lack the transparent, rule-based diagnostic reasoning provided by expert systems.

Studies utilizing expert systems for medical diagnosis exist, but the integration of BPMN and AIML for mental health screening in a chatbot format, particularly targeting children and adolescents, represents a novel approach. Compared to traditional expert systems that may require extensive programming, our BPMN-AIML integration simplifies the knowledge engineering process. Furthermore, unlike some AI-driven screening tools that may lack clear explanations for their output, our system’s rule-based nature allows for greater transparency in how preliminary identifications are reached, which can enhance user trust and understanding.

Explanations of findings

The high user acceptance can be attributed to the chatbot’s conversational and non-intimidating nature, which provides a comfortable environment for individuals to discuss sensitive topics related to mental health. The intuitive interface and clear guidance through the SCARED questionnaire items also contributed to positive user experiences.

The high concordance rates in symptom categorization are a direct result of the accurate implementation of the SCARED rules within the BPMN-AIML knowledge base and inference engine. The forward-chaining methodology allows the system to effectively process user responses and apply the relevant rules to identify potential anxiety symptom categories.

The effectiveness of the BPMN-AIML integration in facilitating development and deployment is due to BPMN’s visual modeling capabilities, which allow for clear representation of the diagnostic process, and AIML’s strengths in handling conversational input and executing rule-based logic. This combination streamlines the process of translating diagnostic criteria into an executable chatbot system.

Implications and actions needed

The findings of this study have several important implications:

  • Improved accessibility: the developed chatbot offers a scalable and accessible tool for preliminary anxiety screening, particularly beneficial in resource-limited settings and for individuals who may face barriers to accessing traditional mental healthcare services.
  • Early intervention: by facilitating early symptom identification, the system can contribute to timely intervention and prevention of associated developmental and physical health issues.
  • Empowerment of users: the chatbot empowers individuals with preliminary insights into potential anxiety symptoms, enabling them to seek further assessment and professional care more proactively.
  • Potential for broader application: the BPMN-AIML framework has the potential to be extended to develop expert systems for screening and preliminary identification of other mental health disorders and NCDs.

Ethical considerations and limitations

The development and deployment of a self-assessment tool for sensitive mental health conditions like anxiety disorders in children and adolescents necessitate a thorough consideration of ethical implications and inherent limitations. This section addresses key ethical concerns and clarifies the system’s role and boundaries.

Accuracy and reliability of preliminary self-assessment

The chatbot’s output, while aligned with the SCARED questionnaire’s scoring system, should be considered a preliminary self-assessment and not a definitive clinical diagnosis. There is a risk of misinterpretation of symptoms by users or generating false positives/negatives if the results are taken as absolute. To mitigate this, the chatbot explicitly states throughout its interaction and in its final feedback that its purpose is to identify potential anxiety symptoms and that a qualified mental health professional must be consulted for a formal diagnosis. The system’s accuracy, as demonstrated in the “System performance and accuracy in symptom categorization section, lies in its reliable application of the SCARED criteria, ensuring consistency in symptom categorization, which is a crucial first step toward further clinical assessment.

Data privacy and confidentiality

Given the sensitive nature of mental health information, particularly concerning minors, data privacy and confidentiality are paramount. The system is designed to process user input in a manner that protects anonymity. While the current prototype focuses on the rule-based inference from questionnaire responses, any future deployment involving storage of personal identifying information would strictly adhere to international data protection regulations [e.g., principles similar to General Data Protection Regulation (GDPR) or Health Insurance Portability and Accountability Act (HIPAA)], employing encryption, access controls, and transparent data handling policies to safeguard user data.

Informed consent and parental involvement

As the target demographic includes children and adolescents, the ethical considerations of informed consent and parental involvement are crucial. While the chatbot offers a self-assessment, it is designed for use under parental guidance or with explicit parental consent for minors. The SCARED questionnaire itself has both parent and self-report versions, which inherently encourages parental awareness. Future iterations or deployments would incorporate clear mechanisms to ensure age-appropriate consent processes and encourage parental involvement in reviewing results and seeking further professional help, thereby ensuring responsible use.

Impact on mental health stigma

The chatbot has the potential to reduce stigma by normalizing discussions around mental health and providing an accessible, private avenue for initial assessment. By offering a non-judgmental entry point, it can encourage individuals who might otherwise hesitate to seek help due to perceived stigma. However, we acknowledge the risk that a ’self-assessment’ tool might inadvertently reinforce the misconception that mental health conditions are straightforward or easily resolvable without professional intervention. The design actively combats this by emphasizing the preliminary nature of the assessment and the necessity of professional follow-up, thus promoting a more nuanced understanding of mental health.

Equity and accessibility

Offering this tool in low- and middle-income countries presents both opportunities and ethical considerations. While it can significantly improve accessibility to initial mental health screening in areas with limited professional resources, there is a risk of creating over-reliance on automated systems. We aim to mitigate this by positioning the chatbot as a complementary tool that facilitates access to, rather than replaces, professional care. Future development will focus on language accessibility, cultural appropriateness, and adaptability to ensure equitable access and avoid inadvertently impacting local healthcare development.

Potential for overuse or overreliance

There is a potential for users to overuse or become overly reliant on the chatbot, turning to it repeatedly instead of seeking human support. This could potentially impact mental health outcomes negatively if it delays professional intervention. The system’s design includes explicit messaging about its limitations and the importance of consulting healthcare professionals, aiming to guide users toward appropriate care rather than fostering dependency on the technology.

Ethical use of AI in healthcare

The deployment of this AI chatbot in healthcare is sensitive to the nuances of mental health. We recognize the potential for creating undue worry in users or generating dependency on technology instead of professional human assessment. The rule-based approach, grounded in the established SCARED screening tool, provides a structured and transparent method. Ongoing evaluation and refinement will be crucial to ensure the chatbot’s interactions are supportive, informative, and ethically sound, promoting well-being rather than anxiety.

Long-term implications for children’s mental health

Introducing self-diagnostic tools to children and adolescents has long-term implications for how they understand mental health, self-awareness, and perceive mental health care. Our aim is to provide a tool that empowers young people and their parents with initial information in a responsible manner. By emphasizing the screening nature and the need for professional guidance, we hope to shape a positive and informed perspective on mental health and the value of professional support.

Risk of over-diagnosing

Automated diagnostic tools, especially screening-focused chatbots, may result in false positives, leading users to believe they have a disorder when they might only be experiencing normal, age-appropriate stress or situational anxiety. Over-diagnosing can contribute to anxiety in users and lead them to pursue unnecessary treatment. We have taken steps to prevent over-diagnosing by ensuring that the chatbot provides clear guidance on the difference between screening results and an official diagnosis by a qualified mental health professional. The system’s output is framed as “preliminary identification” or “potential anxiety symptoms” to manage user expectations.

Medicalization of normal behavior

Automated self-diagnosis may contribute to the medicalization of normal behaviors, potentially labeling temporary, situational, or mild anxiety as pathological. We have reflected on how to distinguish between normative developmental challenges (such as natural variations in childhood anxiety) and clinically significant anxiety. Cultural norms around mental health vary greatly, and what is considered a disorder in one context may be seen as normal in another. While the current system is based on the standardized SCARED, future adaptations will need to consider how to account for these cultural variations to avoid unnecessary pathologization across diverse settings.

Ethical responsibility to mitigate unnecessary medical intervention

We have a responsibility to discuss safeguards to prevent the chatbot from unintentionally promoting over-medicalization. This includes embedding clear messaging that encourages users to seek further assessment rather than assume a medical intervention is required. To avoid unnecessary medicalization, we will consider incorporating recommendations for non-medical interventions or coping strategies (like mindfulness or stress management techniques) when appropriate, particularly for mild cases, in future iterations.

Potential impact on healthcare systems

Over-diagnosing may lead to an influx of individuals seeking professional care even if they do not meet the threshold for a clinical diagnosis. This could strain healthcare systems, especially in low-resource settings, where access to professionals is already limited. By clearly defining the chatbot as a screening tool and emphasizing the need for professional follow-up only when indicated, we aim to manage the flow of individuals into healthcare systems more effectively, ensuring that those who most need professional evaluation receive it.


Conclusions

This study successfully developed and evaluated a novel medical expert system implemented as a chatbot for the preliminary identification of anxiety disorders in children and adolescents. The integration of BPMN with AIML proved effective in facilitating the rapid creation and deployment of a user-friendly and scalable screening tool. The experimental results demonstrated high user acceptance and a high concordance rate in identifying anxiety disorder symptom categories, indicating the system’s accuracy in applying the underlying knowledge base (see the “System performance and accuracy in symptom categorization” section). This approach offers a promising solution to address critical gaps in accessible mental healthcare, particularly in resource-limited settings, by providing a reliable 24/7 self-assessment service. The BPMN-AIML framework also lays foundational work for future expert systems in broader NCDs and highlights the potential for expanding such tools to various contexts and domains, its effectiveness and potential for future developments in the field.

Future work

The integration of BPMN, AIML, and forward chaining in medical chatbots opens up several possibilities for future work and enhancements. Some potential areas for future research and development include:

  • Advanced diagnostic capabilities: further development of the diagnostic capabilities of medical chatbots using BPMN and AIML can be explored. This could involve incorporating more sophisticated algorithms, machine learning techniques, and medical knowledge bases to improve the accuracy and effectiveness of diagnostic decisions made through forward chaining.
  • Context-aware decision making: enhancing the chatbot’s ability to make context-aware decisions based on patient-specific information, medical history, and real-time data can be a focus. Integrating patient records, laboratory results, and other relevant data sources can enable more informed and personalized decision-making within the forward chaining process.
  • Integration with Internet of Things (IoT) devices and wearables: leveraging the IoT devices and wearable sensors can provide valuable real-time data for medical chatbots. Integrating these devices with BPMN and AIML chatbots can enable the monitoring of patient vital signs, health parameters, and other relevant data, allowing for more comprehensive and proactive healthcare support.
  • Enhanced natural language understanding: advancements in NLP and machine learning can be applied to improve the natural language understanding capabilities of medical chatbots. This could involve the development of better NLU models, semantic understanding, and entity recognition techniques, enabling more accurate interpretation and analysis of user inputs within the forward chaining process.
  • Continual learning and knowledge expansion: enabling medical chatbots to learn from user interactions, feedback, and new medical research can enhance their knowledge base and decision-making capabilities. Incorporating mechanisms for continual learning and knowledge expansion within the forward chaining process can ensure that the chatbots stay up-to-date with the latest medical advancements and provide the most accurate and relevant information.

Acknowledgments

As a part of the novelty, this expert system integrates state-of-the-art business process model and notation (BPMN) with Artificial Intelligence Markup Language (AIML) to provide a faster implementation and deployable interactive chatbot globally.


Footnote

Data Sharing Statement: Available at https://jmai.amegroups.com/article/view/10.21037/jmai-24-366/dss

Peer Review File: Available at https://jmai.amegroups.com/article/view/10.21037/jmai-24-366/prf

Funding: None.

Conflicts of Interest: Both authors have completed the ICMJE uniform disclosure form (available at https://jmai.amegroups.com/article/view/10.21037/jmai-24-366/coif). The authors have no conflicts of interest to declare.

Ethical Statement: The authors are accountable for all aspects of the work in ensuring that questions related to the accuracy or integrity of any part of the work are appropriately investigated and resolved. The study was conducted in accordance with the Declaration of Helsinki and its subsequent amendments. This study was a collection of anonymous data with consent.

Open Access Statement: This is an Open Access article distributed in accordance with the Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International License (CC BY-NC-ND 4.0), which permits the non-commercial replication and distribution of the article with the strict proviso that no changes or edits are made and the original work is properly cited (including links to both the formal publication through the relevant DOI and the license). See: https://creativecommons.org/licenses/by-nc-nd/4.0/.


References

  1. Chiu A, Falk A, Walkup JT. Anxiety Disorders Among Children and Adolescents. Focus (Am Psychiatr Publ) 2016;14:26-33. [Crossref] [PubMed]
  2. Suhel SF, Shukla VK, Vyas S, et al. Conversation to automation in banking through chatbot using artificial machine intelligence language. In: 2020 8th International Conference on Reliability, Infocom Technologies and Optimization (Trends and Future Directions) (ICRITO). Noida: IEEE; 2020:611-8.
  3. Colizzi M, Lasalvia A, Ruggeri M. Prevention and early intervention in youth mental health: is it time for a multidisciplinary and trans-diagnostic model for care? Int J Ment Health Syst 2020;14:23. [Crossref] [PubMed]
  4. Misgna H, Ahmed M, Kumar A. Mates: Web-based forward chaining expert system for maternal care. arXiv:2106.09281. arXiv 2021.
  5. Ruiz-Mezcua B, Garcia-Crespo A, Lopez-Cuadrado JL, et al. An expert system development tool for non ai experts. Expert Systems with Applications 2011;38:597-609.
  6. You Y, Gui X. Self-Diagnosis through AI-enabled Chatbot-based Symptom Checkers: User Experiences and Design Considerations. AMIA Annu Symp Proc 2020;2020:1354-63.
  7. Tan H. A brief history and technical review of the expert system research. IOP Conference Series: Materials Science and Engineering 2017;242:012111.
  8. Fred HL. The diagnosis of exclusion: an ongoing uncertainty. Tex Heart Inst J 2013;40:379-81.
  9. Araújo MB, Rodrigues Filho BA, Gonçalves RF. Business process management notation for a costing model conception. Brazilian Journal of Operations & Production Management 2016;13:244-51.
  10. Entringer TC, Ferreira AS, Nascimento DCO. Comparative analysis of the main business process modeling methods: a bibliometric study. Gestão & Produção 2021;28:e5211.
  11. Khin NN, Soe KM. University chatbot using artificial intelligence markup language. In: 2020 IEEE Conference on Computer Applications(ICCA). Yangon: IEEE; 2020:1-5.
  12. Pandorabots. San Francisco, CA, USA, 2023. Accessed: Feb. 15, 2023. Available online: https://home.pandorabots.com/home.html
  13. Kautish S, Peng SL, Obaid AJ. Computational Intelligence Techniques for Combating COVID-19. Cham: Springer; 2021.
  14. Laaz N, Kharmoum N, Mbarki S. Combining Domain Ontologies and BPMN Models at the CIM Level to generate IFML Models. Procedia Computer Science 2020;170:851-6.
  15. Madasu S, Malhotra S, Kant S, et al. Anxiety Disorders among Adolescents in a Rural Area of Northern India using Screen for Child Anxiety-Related Emotional Disorders Tool: A Community-based Study. Indian J Community Med 2019;44:317-21. [Crossref] [PubMed]
  16. Birmaher B, Khetarpal S, Brent D, et al. The Screen for Child Anxiety Related Emotional Disorders (SCARED): scale construction and psychometric characteristics. J Am Acad Child Adolesc Psychiatry 1997;36:545-53. [Crossref] [PubMed]
  17. Giseldo. Chatbot bta bpmn to aiml. 2022. Available online: https://github.com/giseldo/chatbot_BTA_BPMN_to_AIML
  18. Misgna H, Ahmed M, Kumar A. Mates: Web-based forward chaining expert system for maternal care. arXiv 2021. arXiv:2106.09281.
doi: 10.21037/jmai-24-366
Cite this article as: Madasu VR, Hajiarbabi M. Medical expert system as a chatbot for screening of anxiety disorders in children and adolescents. J Med Artif Intell 2026;9:1.

Download Citation