Full text
Treball de Fi de Grau Grau en Enginyeria en Tecnologies Industrials (GETI) Implementation of a Minority Disease Diagnostic Assistant Graphic User Interface using the Human Phenotype Ontology REPORT September 9, 2024 Autor: Marta Navarro Mata Director: Alexandre Perera Lluna Convocatòria: Setembre 2024 Escola Tècnica Superior d’Enginyeria Industrial de Barcelona
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 1 ABSTRACT The aim of this Final Degree Project (TFG) is to develop a website for the diagnosis of rare diseases. This tool is intended for non-specialized healthcare professionals, such as general practitioners and pediatricians. The goal is that by simply inputting the patient’s symptoms, a quick and intuitive diagnosis can be obtained, thus facilitating the referral of the patient to the appropriate specialist for further diagnosis and treatment. The project primarily focuses on creating a user interface that offers a good user experience (UX). It should not only be visually appealing but also easy to use and fast. The tool is meant to serve as a complement to the medical professional, ensuring it does not take more time than the clinician would normally spend making a prediction without the web assistant. The symptoms grouping and their connection to rare diseases has been carried out using HPO (Human Phenotype Ontology). The HPO is a system for organizing and classifying medical information related to human phenotypes, helping link symptoms to the genetic conditions that cause them. Finally, to perform the prediction, an API developed by b2slab-CREB member Rafael León has been used. This API, currently optimized for diagnosing rare kidney diseases, has the potential to be extrapolated to other rare diseases. This tool, called the Minority Disease Diagnostic Assistant (Midia), has the potential to significantly improve the early diagnosis of rare diseases, which are often difficult to detect by non-specialist professionals. It enables quicker and more accurate identification, optimizing the referral process to the appropriate specialists. This reduces diagnostic delays, leading to a faster start of specific treatments, which is key to avoiding complications and increasing treatment effectiveness. In this way, it contributes to more efficient and personalized medical care.
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 3 RESUM L’objectiu d’aquest Treball de Fi de Grau (TFG) és desenvolupar una pàgina web per al diagnòstic de malalties minoritàries. Aquesta eina està pensada per al personal sanitari no especialitzat, com ara metges de medicina general i pediatres. L’objectiu és que, simplement introduint la simptomatologia del pacient, es pugui obtenir un diagnòstic ràpid i intuïtiu, facilitant així la derivació del pacient a l’especialista adequat per seguir el diagnòstic i tractament. El projecte se centra principalment en la creació d’una interfície d’usuari que ofereixi una bona experiència d’usuari (UX). Aquesta no només ha de ser visualment agradable, sinó també fàcil d’usar i ràpida. L’eina ha de servir com a complement per al professional mèdic, de manera que no li suposi més temps del que trigaria a fer la predicció sense l’assistent web. L’agrupació de símptomes i la seva relació amb les malalties minoritàries s’ha dut a terme utilitzant HPO (Human Phenotype Ontology), que en català es tradueix com a Ontologia del Fenotip Humà. L’HPO és un sistema d’organització i classificació d’informació mèdica relacionat amb els fenotips humans, i facilita l’enllaç entre els símptomes i les condicions genètiques que els causen. Finalment, per poder realitzar la predicció, s’ha fet ús d’una crida a l’API desenvolupada pel membre del b2slab-CREB, Rafael León. Aquesta API, actualment optimitzada per al diagnòstic de malalties minoritàries del ronyó, té el potencial d’extrapolar-se a altres malalties minoritàries. Aquesta eina, anomenada Minority Disease Diagnostic Assistant (Midia), en català Assistent al Diagnòstic de Malalties Minoritàries, té el potencial de millorar significativament el diagnòstic precoç de malalties rares, sovint difícils de detectar per a professionals no especialitzats, facilitant una identificació més ràpida i precisa, i optimitzant el procés de derivació als especialistes adequats. Això permet reduir la demora en el diagnòstic, afavorint un inici més ràpid dels tractaments específics, un aspecte clau per evitar complicacions i augmentar l’eficàcia dels tractaments. D’aquesta manera, contribueix a una atenció mèdica més eficient i personalitzada.
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 5 RESUMEN El objetivo de este Trabajo de Fin de Grado (TFG) es desarrollar una página web para el diagnóstico de enfermedades minoritarias. Esta herramienta está pensada para el personal sanitario no especializado, como médicos de medicina general y pediatras. El objetivo es que, simplemente introduciendo la sintomatología del paciente, se pueda obtener un diagnóstico rápido e intuitivo, facilitando así la derivación del paciente al especialista adecuado para continuar con el diagnóstico y tratamiento. El proyecto se centra principalmente en la creación de una interfaz de usuario que ofrezca una buena experiencia de usuario (UX). Esta no solo debe ser visualmente agradable, sino también fácil de usar y rápida. La herramienta debe servir como un complemento para el profesional médico, de manera que no le suponga más tiempo del que tardaría en hacer la predicción sin el asistente web. La agrupación de síntomas y su relación con las enfermedades minoritarias se ha llevado a cabo utilizando HPO (Human Phenotype Ontology), que en español se traduce como Ontología del Fenotipo Humano. El HPO es un sistema de organización y clasificación de información médica relacionada con los fenotipos humanos, y facilita el enlace entre los síntomas y las condiciones genéticas que los causan. Finalmente, para poder realizar la predicción, se ha hecho uso de una llamada al API desarrollada por el miembro del b2slab-CREB, Rafael León. Este API, actualmente optimizada para el diagnóstico de enfermedades minoritarias del riñón, tiene el potencial de extrapolarse a otras enfermedades minoritarias. Esta herramienta, denominada Minority Disease Diagnostic Assistant (Midia), en español Asistente para el Diagnóstico de Enfermedades Minoritarias, tiene el potencial de mejorar significativamente el diagnóstico precoz de enfermedades raras, a menudo difíciles de detectar para profesionales no especializados, facilitando una identificación más rápida y precisa, y optimizando el proceso de derivación a los especialistas adecuados. Esto permite reducir la demora en el diagnóstico, favoreciendo un inicio más rápido de los tratamientos específicos, un aspecto clave para evitar complicaciones y aumentar la eficacia de los tratamientos. De esta manera, contribuye a una atención médica más eficiente y personalizada.
pg. 6 Report
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 7 Contents 1 GLOSSARY 13 2 INTRODUCTION 15 2.1 Motivation ......................................... 15 2.2 Scope ............................................ 15 2.3 Prerequisites ........................................ 15 2.3.1 Research and Medical prerequisites ...................... 15 2.3.2 Technical prerequisites .............................. 16 2.3.3 UX/UI prerequisites ............................... 16 2.3.4 Management prerequisites ........................... 16 2.4 Objectives ......................................... 16 3 THEORICAL BACKGROUND 19 3.1 Minority Diseases ..................................... 19 3.1.1 Orphanet ..................................... 21 3.2 The Human Phenotype Ontology ............................ 22 3.3 The Phenomizer ...................................... 24 3.4 Front End Frameworks .................................. 26 4 METHODOLOGY 29 4.1 Minority Disease Diagnostic Assistant Form Definition ............... 29 4.2 Github Repository Creation ............................... 30 4.3 API Prediction Integration ................................ 31 5 GRAPHIC USER INTERFACE DESIGN 35 5.1 UX/UI Analysis ...................................... 35 5.2 User Persona ........................................ 36 5.3 GUI User flow ....................................... 37 5.4 GUI Wireframe/prototype ................................ 37 5.5 Website Color Palette ................................... 40 6 FRONT END IMPLEMENTATION 43 6.1 Front end and Framework ................................ 43 6.2 Components ........................................ 43 6.2.1 Header ....................................... 43 6.2.2 Stepper ....................................... 44 6.2.3 Patient Gender Radiobutton ........................... 45 6.2.4 Age Selector .................................... 45 6.2.5 Card ........................................ 46 6.2.6 Symptom Table .................................. 46 6.2.7 Prediction Table .................................. 47 6.2.8 Dark mode ..................................... 48 6.3 Project Structure ...................................... 48 6.3.1 Default Layout .................................. 49 6.3.2 Index page ..................................... 49 6.3.3 Symptomatology page .............................. 49 6.3.4 Prediction page .................................. 50
pg. 14 Report
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 15 2 INTRODUCTION This section is intended to define why this project whas created, the scope of it, the prerequisites that have been needed to devolop it and the objectives to achive. 2.1 Motivation The motivation behind this project is the need to address the challenges surrounding rare diseases. There are approximately 7000 known rare diseases, affecting around 8% of the global population. However, unlike more common conditions, rare diseases often receive less attention and resources, leading to delayed diagnoses and limited awareness. As Dr. Christopher Austin, director of NCATS (National Center for Advancing Translational Sciences), stated, "Although they are individually rare, they are cumulatively common," highlighting the significant global impact of these conditions [1]. This lack of recognition is a critical problem, as it directly affects the quality of care patients with this conditions receive. Currently, there is no widely available, user-friendly tool specifically designed to help general doctors diagnose rare diseases. Existing platforms like The Phenomizer [2], while powerful for research purposes, are not optimized for daily use by busy physicians due to their complexity. Similarly, other tools tend to focus on specific categories of diseases, making them less practical for a broad, global application in diagnosing rare diseases. This project aims to fill that gap by creating a global, accessible, and easy-to-use platform tailored to the needs of healthcare professionals. 2.2 Scope The scope of this thesis is to develop a web-based diagnostic tool for rare diseases. Designed to support non-specialist healthcare providers such as general doctors and pediatricians. The tool will integrate with an API that uses the Human Phenotype Ontology (HPO) [3] to assist in predicting potential diagnoses based on patient symptoms. This will facilitate early detection of minority diseases, helping healthcare professionals make diagnostics and referring their patient to the correct specialist to continue with the treatment. A key focus of the project is the development of a Graphical User Interface (GUI) that offers an intuitive and efficient User Experience (UX) for users across all technological levels. The interface will be designed to allow fast and accurate input of symptoms, minimizing the time required for diagnosis, and making the platform a practical tool in clinical environments. 2.3 Prerequisites The Prerequisites, all those elements necessary to carry out the project, have been classified in four different gropups, based on their context. 2.3.1 Research and Medical prerequisites This group of prerequisites, covers all the medical and research knowledge the author had to acquire for creating a robust diagnostics assistant. Understanding what rare diseases are, what is the Human Phenotype Ontology (HPO) and how does it work. Also, awareness of Medical standards and compilance, such as HIPAA [4] or GDPR [5] compliance for handling sensitive patient data, ensuring the platform respects patient privacy and confidentiality.
pg. 16 Report To reduce complexity in the initial phase, the software will not include fields linking patient personal information. Consequently, this means that databases and security measures related to sensitive information will not be necessary at this stage. This approach allows for a more manageable development process while focusing on the core functionality of the diagnostic tool. 2.3.2 Technical prerequisites First of all, it was necessary to choose the adequate front-end framework, and achieving programming skills to be able to develop the GUI. Also, the integration of the GUI with an external API, responsible for the prediction process. In addition, obtaining and cleaning the symptoms and disease correlation datasets was vital to ensure that the data could be integrated into the GUI and formatted correctly for API submission. Another important technical aspect was ensuring the security of the project’s code. This involved creating an online repository (GitHub, in this case) [6] for secure version control and code storage. Familiarity with GitHub and correct version control practices have been essential for the successful development of the project. 2.3.3 UX/UI prerequisites A solid understanding of UX/UI design principles was necessary to create an intuitive and accessible platform for healthcare professionals. Additionally, accessibility considerations, such as color contrast and age-related usability, were important to ensure that the platform can be used by individuals with varying vision capabilities and technological backgrounds. Responsive design skills were also crucial, given that the platform must work across different devices. To support the design process, the author needed basic knowledge of design tools. Creating sketches and mockups before implementation was essential to ensure usability and providing development guidelines for oneself. Figma [7] was selected as the design tool for this purpose, given its free version and the author’s familiarity with it. 2.3.4 Management prerequisites In a typical work environment, a project of this scope would be carried out by a team of at least three or four individuals using an Agile methodology, most likely Scrum. The team would typically include a Product Manager, a Product Designer, at least one Frontend Developer, and optionally a Quality Assurance Engineer. If the API were not externally provided, a Backend Developer would also be necessary. Since the project was undertaken by a single author, management skills were required to handle all the tasks across these different disciplines. The author had to effectively plan, organize, and execute the various stages of development independently. 2.4 Objectives The primary objective of this project is to develop a web-based diagnostic tool graphic interface for rare diseases that is both accessible and user-friendly for healthcare professionals. The specific objectives are as follows:
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 17 •Develop a User-Friendly Interface: Create an intuitive Graphical User Interface (GUI) that simplifies the process of inputting patient symptoms. The interface should enhance the User Experience (UX) to ensure ease of use across varying levels of technological proficiency. •Integrate with a Predictive API: Seamlessly integrate the GUI with an external API that leverages the Human Phenotype Ontology (HPO) to facilitate accurate and timely predictions of potential diagnoses based on the symptoms entered by the doctor making the diagnosis. •Early disease detection: Design the tool to support the early detection of rare diseases by providing in a short time, and in an efficient way, accurate possible diagnosis. This will aid healthcare professionals in identifying potential rare conditions more effectively and referring patients to appropriate specialists. •GUI Accessibility and Efficiency: Ensure that the platform is accessible to users with different needs and technological backgrounds. Implement responsive design principles to ensure that the tool functions optimally across various devices and screen sizes. •Adhere to Privacy Standards: Although patient personal information will not be collected in the initial phase, the development process must respect privacy and comply with relevant standards. This approach will lay the groundwork for future enhancements that may involve sensitive data. •Implement Secure Development Practices: Integrate version control systems like GitHub to manage code securely and track changes. Follow best practices in code security to safeguard the project’s integrity throughout its development. By achieving these objectives, the project aims to provide a practical and efficient tool for diagnosing rare diseases, thereby addressing a significant gap in the current healthcare diagnostic landscape.
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 19 3 THEORICAL BACKGROUND This section provides an overview of the key concepts and resources that form the scientific foundation of this project. 3.1 Minority Diseases As defined in an article by Vall d’Hebron Hospital, minority or rare diseases (hereafter referred to as RDs) are conditions known to affect between 5% and 7% of the population. These diseases present a significant challenge due to their many variations, as they can affect any part of the body and manifest a wide range of symptoms, which vary not only between different diseases but also within the same disease. It is estimated that around 30 million people in the EU, 3 million in Spain, and about 350,000 in Catalonia suffer from an RD. [8] Although there is general knowledge of what a RD is, there is no universal agreement on its definition. For example, in the US, a rare disease is defined as a condition that affects fewer than 200.000 people, whereas in Europe, it refers to diseases affecting fewer than 1 in 2,000 people. Some definitions are based on point prevalence, while others depend on a prevalence threshold. To fully understand these definitions, it’s important to grasp the concept of prevalence. [9] Prevalence, as defined in [10], is the proportion of a population that has a specific characteristic in a given time period. In this case, the characteristic is the rare disease. To calculate prevalence, a random sample of the population is selected, if it is representative, then the prevalence is determined by dividing the number of individuals in the sample with the characteristic by the total number of people in the sample. Prevalence =number of people of the sample with the characteristic total of people of the sample (1) Prevalence is typically reported as a percentage or as the number of cases per 10,000 or 100,000 people, depending on how common the characteristic is. There are three ways to measure prevalence: •Point prevalence: proportion of a population that has that particular disease at a specific point in time. •Period prevalence: proportion of a population that has the particular disease at any point during a given period of time. •Lifetime prevalence: is the proportion of a population who, at some point in their life, has ever had the particular disease. Prevalence itself is neither inherently positive nor negative, its meaning depends on the context. A high prevalence could indicate prolonged survival without a cure, an increase in new cases, or both. On the contrary, a low prevalence might signify high mortality, rapid recovery, and/or a low incidence of new cases. It is crucial to distinguish between prevalence and incidence. Prevalence, as previously mentioned, refers to the total number of cases of a disease within a population at a particular time,
pg. 20 Report regardless of when the disease first appeared. Incidence, however, measures the number of new cases that develop in a population over a specified period. For example, Alport syndrome is a genetic RD that damages the tiny blood vessels in the kidneys, often leading to hearing loss and eye problems. Approximately 80% of cases are inherited. [11] Although its exact prevalence is unknown, it is estimated that in the US, 1 in every 5.000 people (0.02%) has the condition, while in Europe, estimates range from 1 in 100,000 to 1 in 11,000 (0.001% to 0.009%). The global estimate is approximately 1 in 50,000 (0.002%). [12] Measuring the prevalence of RDs is particularly challenging due to the sheer number of different diseases (between 6,000 and 7,000) and their low incidence rates. Also, to obtain a representative estimate, the sample size of the population of study must be very large. Figure 1: Summary of disease prevalence from Orphanet (image from [13]). An important challenge for RDs is the small number of affected individuals, the heterogeneity of symptoms within a same RDs, variations depending on the geographical area and environmental and social conditions. Due to their rarity, few doctors are trained to identify them, leading to frequent misdiagnoses. As a result, patients often face years of frustrating and costly diagnostic journeys, which could be shortened by genome sequencing at an earlier stage. This is where Precision Medicine plays a crucial role, as the availability of more data improves the ability to diagnose, treat, and prevent diseases more effectively. [13] According to a study on RD diagnosis [14], the average diagnosis time for an European patient with an RD is nearly five years. This diagnostic journey typically involves consultations with several healthcare professionals, numerous tests, misdiagnoses, or inappropriate treatments, including surgeries, which is why it is often referred to as a "diagnostic odyssey". One of the conclusions of the mentioned research is that raising awareness of RDs among primary care professionals could improve referral to Centers of Expertise, thereby reducing diagnostic times and improving patient outcomes.
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 21 3.1.1 Orphanet Orphanet [15], mentioned before, is a vital resource that improves knowledge, diagnosis, care, and treatment for rare diseases, aiming to provide high-quality, accessible information for anyone. It also maintains the Orphanet rare disease nomenclature (ORPHAcode), which helps with the visibility of rare diseases in health and research systems. Founded by the French National Institute for Health and Medical Research (INSERM) in France in 1997, Orphanet expanded into a European initiative in 2000 and now operates as a consortium across 40 countries globally. Orphanet has an extense catalogue on RDs, encompassing diseases, malformation syndromes, morphological, and biological anomalies, as well as particular clinical situations considered as ‘rare in Europe’. Structured to provide a hierarchical representation classified by medical domain, annotated with medical classifications, age of onset, inheritance, genes, and a directory of health and research resources. Among its many rare disease-related resources, Orphanet offers the Orphadata platform, which provides high-quality datasets on rare diseases and orphan drugs for research purposes. Another important tool is the Orphanet Rare Disease Ontology (ORDO), a structured vocabulary derived from the Orphanet database that captures complex relationships between diseases, genes, and other critical features relevant to rare disease research. Since 2005, Orphanet has been adding epidemiological indicators via a systematic data collection procedure. The data that is being added is point prevalence, annual incidence, birth prevalence, lifetime prevalence, case report, or family report. All data is being annotated with a geographical area and a relevant particular population. In Figure 2can be appreciated how this epidemiological information is being added. [9]. Figure 2: Representation of epidemiological data in the Orphanet database (image from [9]). As rare diseases gain recognition as a global public health priority, Orphanet continues its mission of providing evidence-based estimates of RD prevalence, helping to improve public health strategies and medical care for affected populations worldwide.
pg. 22 Report 3.2 The Human Phenotype Ontology To understand what is the Human Phenotype Ontology it’s important to first define the terms "Phenotype" and "Ontology". The term Phenotype refers to all observable traits of an organism. The word is derived from the Ancient Greek words phainein (meaning "to show" or "to appear") and typos (meaning "type" or "form"). As it is an observable characteristic, it can refer to anything from a common trait, such as height or hair color, to presence or absence of a disease. A person’s phenotype is influenced by both genetic factors (genotype) and environmental conditions, and it can change over time [16,17,18]. There are many definitions for Ontology, in this context can be defined as a formal description of knowledge within a specific domain and the relationships between its concepts. These concepts are structured into classes (which represent the key concepts or categories within the domain), subclasses (more specific concepts within a class), attributes (properties or characteristics of classes), and relations as well as restrictions, rules and axioms (how the classes or instances are connected to one another). Ontologies not only provide a shared, reusable knowledge structure but also enable the discovery of new knowledge within the domain by formalizing these connections [19,20]. The Human Phenotype Ontology is a comprehensive resource that systematically defines and organizes human phenotypic traits. Launched in 2008, it was developed as part of the Monarch Initiative in collaboration with the Open Biomedical Ontologies Foundry. The HPO’s primary goal was to provide a standardized, logical framework to describe and computationally analyze phenotypic abnormalities associated with human diseases. Since its inception, the HPO has expanded significantly and is now recognized as a global standard for phenotype data exchange [21]. Each HPO term represents a specific phenotypic abnormality. These terms are organized into a hierarchical structure using relationships, where a term can have multiple parent terms. This flexible structure allows for the exploration of various aspects of phenotypic abnormalities. While HPO does not define individual disease entities, it describes the phenotypic abnormalities associated with them. Most HPO terms refer to organ abnormalities, with separate ontologies provided for aspects like inheritance patterns, onset, and clinical course. The HPO structure is typically represented as a directed acyclic graph (DAG), as shown in Figure 3. In the graph each term represents a specific subtype of a more general parent term. Since terms can have multiple parent terms, they can reflect various semantic relationships within the ontology. The connections between terms denote subclass relationships, where child terms are more specific instances of their parent terms. For example, the clinical feature abnormality of the atrial septum is a child of both abnormality of the cardiac septa and abnormality of the cardiac atria [22]. Moreover, the HPO integrates clinical features with major medical classification systems like ORDO (Orphanet Rare Disease Ontology), OMIM (Online Mendelian Inheritance in Man), and Mondo. This integration facilitates the connection between phenotype data and disease classifications. HPO terms are regularly used to annotate entries in these classification schemes, making the ontology a critical tool for both research and clinical diagnostics [23].
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 23 Figure 3: Acylic Graph of an HPO (image from [22]). The Human Phenotype Ontology provides a downloadable official file with all the Ontology terms up to date [25]. This file, is the one that has been used as the base symptom input in the Minority Disease Diagnostic Assistant (Midia). All the symtopms are listed in the same way, for example, in the case of Abnormal ventriculoarterial connection, there is information about its id (HPO), its definition, synonims and other useful information. •"id": "HP:0011563", •"name": "Abnormal ventriculoarterial connection", •"def": "An abnormality of the circulatory connection between the ventricles and the pulmonary artery and aorta." [PMID:15227248, PMID:18805185, PMID:24750982]", •"comment": "The cardiac malformations with abnormal ventriculo-arterial connections in situs solitus and atrio-ventricular concordance include the tetralogy of Fallot as well as different forms of double-outlet right ventricle and transposition of the great arteries.", •"synonym": [ Abnormal ventriculo-arterial connection, Abnormal ventriculoarterial connexion], •"xref": "UMLS:C4023296", •"isa": "HP:0011545 Abnormal connection of the cardiac segments", •"propertyvalue": "terms:creator https://orcid.org/0000-0002-0736-9199", •"creationdate": "2012-04-08T07:32:38Z" The HPO stands out from other medical terminologies in serveral key factors. The HPO has a broader coverage of phenotypes than any other clinical terminology, for example, the United Medical Language System (UMLS) covers only the 35% of the terms covered by the HPO.
pg. 30 Report seamlessly integrated into the typical workflow of a general practitioner. The interview, detailed in Appendix subsection 12.1, provided key insights for developing the Midia. Given the 12 minute time constraints in primary care consultations, there is a clear need for a diagnostic tool that efficiently organizes and analyzes symptoms. This tool must be quick, intuitive, and user-friendly. The interview confirmed that such a tool would be particularly beneficial for general practitioners, who are less familiar with rare conditions compared to specialists. Current tools are either too specific or not user-friendly, revealing a gap for a versatile solution that aids in differential diagnoses and recommends next steps, ultimately streamlining the diagnostic process. The project’s potential is extensive, with many possible features that could be integrated into the software. However, a practical approach is to start with a Minimum Viable Product (MVP) [35], a concept introduced by Eric Ries in his book The Lean Startup (2011). An MVP is a basic version of a product with just enough features to satisfy early adopters and gather feedback, allowing for quick validation and iteration. For the initial MVP, the goal is to develop a form with essential fields required for making a prediction and integrate it with the prediction API provided by Rafa León from the b2slab- CREB. With the project scope defined and key questions addressed, the next step is to design the form, focusing on its inputs and outputs. The data needed for diagnosis can be categorized into two types: patient information and symptomatology. Patient information includes traits such as age, gender, weight, and ethnicity, while symptomatology encompasses the symptoms reported by the patient or its guardian. The form must be efficient both in data entry and prediction speed. Consequently, only information critical to making a prediction should be included. Essential fields for diagnosis are sex and age, which must be incorporated into the form, the other mentioned entries will not be added on a first MVP. Symptomatology should include a comprehensive list of symptoms, with the doctor selecting the relevant ones. To ensure optimal performance, the form will include validation checks to prevent missing mandatory information, which are sex, age, and at least one symptom. 4.2 Github Repository Creation In the early stages of the project, the author conducted tests with various frameworks, experimented with different programming languages, and created simple prototypes by following tutorials to gain proficiency in front-end development, all on the local storage of her computer. Once the programming language and front-end framework were selected, and the foundational project files were prepared to start developing the Midia, the need to store the project online became evident for several reasons: •Data security: If the computer were to crash or become corrupted, a locally stored project could become irretrievable. Storing it online provided a secure backup, minimizing the risk of data loss.
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 31 •Version control: An online repository offers a version history, it allows the tracking of changes and access to previous versions. Mistakes can easily be reverted by rolling back to a stable version. Also helps with issue traking, as you can know from which commit an error has been introduced. •Remote accessibility: Storing the project in an online repository makes it accessible from any location, facilitating work on the code from different places and devices. •Future exploration potential: This project is a start point for the GUI of s MMDA. By keeping the project in the cloud, it can be easily converted into an open-source project, providing a foundation for further investigations and contributions by other students or researchers. For this purpose, GitHub [6] has been selected as the host of the repository (storage location) for the Minority Disease Diagnostic Assistant. GitHub is a web-based platform that uses Git [36], an open source version control software, which helps with the management of source code for software projects. This provider was selected for this purpose as it has a free plan that matches the project needs and it is the most popular code hosting platform, with a vast community of developers using it. So extensive resources, tutorials, and community support where available. The steps followed to create a GitHub repository [37] where: 1. Creation of a GitHub account and downloading Git. 2. Connecting the used code editor, Visual Studio Code (VSC) to the GitHub account. 3. Creation from GitHub of a new repository. With its name, description and privacy setting (it was selected public). 4. From the terminal, the local project was pushed to the online repository. During the initial stages of the online repository, there was a problem with the commits. When importing the framework file, it generated over 3,000 commits simultaneously, causing GitHub to block the repository. After the blockage, a new one was created and installaed GitKtaken [38] (a software that assists with the commit and push management). This led to better version control and management. The Minority Disease Diagnostic Assistant project is stored in the following Github repository https://github.com/martuki8/Midia3. 4.3 API Prediction Integration To implement the prediction feature, Rafa León, a member of the b2slab-CREB, provided an API developed as part of a research project. The API is hosted at http://147.83.75.14:6789/getdiseases. It operates by receiving HPO IDs, which are sent to the API, separated by semicolons (";"). When valid IDs are provided, the API responds with a status code of 200, indicating success, and returns an array of predictions. The prediction process is optimised for rare kidney diseases and leverages p-values calculated using the Monte Carlo method.
pg. 32 Report Before implementing API fetching in the Midia project, the API was tested to ensure it functioned correctly and to understand its behaviour. For this purpose, an API testing software was used. After evaluating several options, Yaak [39], a free and open-source API testing tool, was chosen for its suitability. In Figure 8an example of the API call and its response. Figure 8: Example of the API request using Yaak. The response is an array of arrays, where each sub-array represents a disease and contains the following information: 0. p-value: The disease probability. 1. Score: Used to break ties in p-value by selecting the higher score. 2. Mondo ID: The identifier for the disease in the Mondo database. 3. Disease Name: The name of the disease. 4. Disease Description: A description of the disease. 5. Affected Genes: The genes that are affected by the disease. 6. Average Depth of HPOs: The average depth of the HPOs associated with the disease. 7. Number of HPOs per Branch: The count of HPOs per "branch" in the HPO database. 8. Statistical Use: Reserved for statistical purposes. Once the API was tested, its implementation was carried out following the official Nuxt documentation guidelines [40,41]. Before starting the API integration, the necessary preliminary steps were already defined and implemented. These included capturing patient data (such as sex and age) and building the symptomatology table (providing all available HPO options), along with their validations. The integration process for correctly sending and receiving the data consisted of the following steps:
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 33 1. Create events for the first step and store them in local storage. These events are sent in the final step when the submit button is clicked, along with the symptomatology information. 2. Create events for the second step, which returns an array of strings (the HPO codes of the selected symptoms). 3. Build the request body to match the format expected by the API. The HPO codes must be separated by semicolons (";") with additional semicolons at the beginning and end of the string. 4. Clear all relevant data from local storage related to the events containing the request information when the index page is revisited. This is to prevent caching and other types of errors. 5. Send the POST request to the API with the prepared request body when the submit button is clicked, before proceeding to step three (Prediction). 6. Retrieve the API response once the request is processed. 7. Adjust the received data to so it can be applied inside the PredictionTable. 8. Display the prediction results. Figure 9illustrates the defined process of fetching data from the API and applying the response. Figure 9: Block diagram of the API implementation.
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 35 5 GRAPHIC USER INTERFACE DESIGN This section explores the various stages of the Graphic User Interface (GUI) Design process for the Midia, highlighting the principles of user-centered design and accessibility. The interface is tailored to meet the needs of healthcare professionals who may not be familiar with advanced diagnostic tools, ensuring that the software remains intuitive and approachable in a clinical setting, resulting in a GUI that not only serves its purpose but also improves the diagnostic workflow for general practitioners and pediatricians. 5.1 UX/UI Analysis UX/UI design, User Experience (UX) and User Interface (UI) design, refers to two complementary aspects of creating digital products, particularly websites and apps [43]. User Experience (UX) focuses on the overall experience a user has when interacting with a product. It is about understanding the needs, motivations, and behaviors of users to create a product that is easy, enjoyable, and efficient to use. UX design considers the entire user journey, from navigation and flow to usability and satisfaction. The goal is to enhance the product’s efficiency and provide a seamless, meaningful experience for the user. Some of the tasks related to UX design are: Research (understanding the needs of the users, already developed in section 4), User personas, information architecture (the structure and organization of the content so it is easy to navigate), User flow design (how users will move through the product to achieve their goals), creation of wireframes and prototypes, and continous testing to improve the product efficiency, effectiveness, and satisfaction. User Interface (UI) design, on the other hand, focuses on the visual and interactive elements of the product. This includes buttons, icons, layouts, typography, and colors. UI design is concerned with the look and feel of the product, ensuring that it is aesthetically pleasing and that all interface elements are consistent and user-friendly. It aligns visual design with UX goals to create an interface that is not only visually appealing but also easy to navigate. As mentioned, UI focuses on the look and feel of the interface and how users interact with it. The key elements of UI design include: the Visual design (Creating the aesthetic elements like colors, typography, icons, images, and branding), the layout (it will be treated in the same section as the prototype, 5.4), interactive elements (all the components that users will interact with, developed in the subsection 6.2), consistency and responsiveness. A key focus for both disciplines is Usability, it refers to the ease in which users can effectively and efficiently interact with a product. It includes factors such as the layout of the website, the ease of finding information, the speed of the website, and how confusing the website is. A well-designed website is both visually appealing and easy to use [44,45]. When considering usability, several critical factors come into play, including: •Availability and Accessibility, ensuring that the interface is accessible and usable by everyone, including those with disabilities. This involves making buttons and icons large and visible, ensuring text is readable with appropriate color contrast, and providing simple and consistent navigation. All elements should be easily reachable and usable. •Clarity and Learnability, the interface has to be easy to understand and use, regardless
pg. 36 Report of the user’s technological proficiency. The interface should be intuitive, allowing users to quickly learn how to interact with it. •Simplicity, using straightforward and consistent structures that users are familiar with. The design should be self-explanatory, minimizing the need for extensive instructions and making the user experience as seamless as possible. •Providing immediate Feedback is one of the most important usability principles. It ensures users are informed about the results of their actions and the current state of the system. Effective feedback includes notifying users of errors, explaining what went wrong, and guiding them on how to correct it. This helps users understand their interactions with the website. Once the principles of UX and UI design have been thoroughly studied and understood, the next step is to apply these concepts to the project. Implementing these principles will guide the creation of an intuitive and user-friendly interface for the Minority Disease Diagnostic Assistant (Midia). Integrating best practices in user experience and interface design, can ensure that the software not only meets the functional requirements but also provides a seamless, engaging experience for healthcare professionals. 5.2 User Persona User personas are detailed profiles representing specific segments of a product or company’s target audience. They are based on in-depth analyses of ideal users, encompassing their behavior patterns, goals, skills, attitudes, challenges, and background information. By crafting these fictional yet data-driven characters, it can give valuable insights into the needs and preferences of different user groups [46]. User personas are used in UX design to identify key themes and patterns, guide product decisions, and enhance user empathy. For the Midia project, defining user personas is crucial for tailoring the interface, prioritizing features for the MVP, and ensuring overall usability. Previously, user personas included demographic data, but the modern approach omits this information to prevent biases. Instead, the focus is on portraying personas as real, relatable individuals, emphasizing their human experiences and needs. The Midia user persona definition would be: •Who: General doctors, pediatricians, and other non-specialized clinicians who may lack extensive expertise in rare diseases. •Goals: They seek a quick and easy method to consider rare diseases they are not familiar with. •Purpose: To shorten the patient diagnostic journey, assist in selecting appropriate tests, and facilitate referrals to the correct specialists. •Approach: The solution should be intuitive and user-friendly, catering to a wide range of professionals with varying levels of tech familiarity. It should be accessible via a website to ensure it can be used from any device.
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 37 5.3 GUI User flow AUser Flow is a diagram that outlines the steps a user takes to complete a specific task or achieve a goal within a product or application. It details the sequence of interactions, decisions, and actions a user encounters from start to finish. This tool is essential for creating user-centric designs, as it helps ensure the process is intuitive and efficient [47]. For this project, the target users are general doctors and pediatricians who may have limited knowledge about minority diseases. In this section, a User Flow for the Midia web-based software will be defined to better understand how these users will interact with the system. Before creating a User Flow, it is essential to understand its components [48]. The Start and End points of the flow, which indicate where the user begins and concludes their task, are represented by circles. These circles are typically distinguished by a different color from other elements. Rectangles denote pages or display screens that the user interacts with. Circles can also represent actions, while diamonds symbolize decisions or branching points where the user must choose between different options. Lines and arrows are used to connect these elements, illustrating the sequence and direction of the user’s journey through the flow. Figure 10: User Flow diagram for the Midia. In figure 10 the diagram of the Midia user flow is shown. The process begins when a patient contacts a doctor, likely at a primary care facility, and describes their symptoms. If these symptoms do not align with common diseases, the doctor will initiate the Midia web-based software. This action marks the starting point of the user flow. The user, in this case, the doctor, will first input the patient’s demographic information, such as sex and age, and then proceed by clicking the “Next” button. The next step involves entering the patient’s symptoms. The user will input each symptom individually and submit the information when they feel it is complete. Subsequently, the user will be directed to the prediction page, where the software will display diagnostic predictions. The flow concludes with the presentation of the prediction results. 5.4 GUI Wireframe/prototype Before starting the development of the Midia project, it’s important to create a wireframe or a basic prototype. This will clarify the website’s structure and the arrangement of its components
pg. 38 Report before coding begins. Having a clear visual guide helps streamline the coding phase, making it quicker and more efficient. During the initial phases of the project, two basic wireframes were created, see in figure 11. The first wireframe option consolidated all inputs on a single page to minimize the number of clicks. The second option divided the inputs into distinct steps based on their context: the first step for entering patient personal data, the second for symptomatology, and the third for displaying the prediction. Figure 11: Initial Midia Wireframes. These wireframes were presented to a group of five individuals, including four non-medical users and one doctor. The feedback favored the step-by-step option, as it allowed users to focus on one type of information at a time and avoided the need to scroll. Therefore, this step-by-step approach was chosen for development. Once the layout approach was decided, a more detailed visual prototype was created. This prototype made it easier to envision the software’s appearance and usability, providing a clearer representation of how the final product would look and function. The general layout will include a header featuring the Midia logo, positioned on the left side to clearly identify the website as the official one. Additionally, a Home link will be included in the header, allowing users to easily return to the initial step. A Stepper component will be present throughout all steps, indicating the total number of steps in the process and highlighting the current step. The first step, shown in Figure 12, serves as both the home page and the initial stage of the process. It will include a brief guide for those users that are new or less technological, indicating that all fields must be completed before proceeding. In this initial MVP the form there will only have two fields to complete, the sex as a radiobutton, and the age selector with a dropdown compomnent.
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 39 Figure 12: Midia Prototype Step 1. Figure 13: Midia Prototype Step 2. After the patient data is entered and the call-to-action button is clicked, the user will proceed to the second step, as shown in Figure 13. This step will display a table listing all the symptoms. To enhance user experience, a search bar will be included to help doctors quickly find specific symptoms. After the doctor enters all the symptoms and clicks the button, the user will proceed to the third and final step, as shown in 14. This step will display a list of matching diseases. If the doctor wishes to start a new prediction, they can simply click the "Home" link in the header to return
pg. 46 Report added, also they were ordered in the natural succession, so it is easyer and logical for the user. •To initialize with null so that the placeholder is displayed. •The placeholder text was updated to reflect the intended action, displaying Select the patient age to guide the user clearly. •For the API implementation, an HPO was added as a value of each option, so that the information could be sent. SelectorAge.vue component code available in Appendix 12.3.4. 6.2.5 Card Figure 22: Card Nuxt UI component. During the early stages of the project, the Nuxt UI Card component [64], Figure 22, was identified as a useful tool to visually maintain user focus and organize information. The component was initially used as provided by the library, and later adjusted on different pages to fit the specific content needs. The component code is available in the Appendix 12.3.5. 6.2.6 Symptom Table The Nuxt UI Table component [65] was used to display the symptoms data. To enhance functionality, a search bar, row selection, and pagination were added, as the original dataset contained nearly 20.000 rows, leading to performance issues. The following modifications were made to optimize and implement the table, saved as the component SymptomTable.vue: •The JSON file hp-with-fp.json, containing all the HPO data, was imported. •The table structure was defined with two columns: ’Symptom Name’ and ’HPO ID’. Sorting logic was implemented to order the Symptoms column in ascending ASCII order. Additionally, color and dimension adjustments were made to improve the table’s appearance. In Figure 23, the library representation of the component used (with multiple row selectors) can be seen. •Reactive arrays where created to introduce the JSON symptoms.
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 47 •A mandatory selection logic was implemented, ensuring that at least one row is selected, guaranteeing that the data sent to the API contains at least one symptom. •A lifecycle hook was added to store the selected symptom’s HPO in local storage. •Pagination logic was implemented. Since the rows are loaded from a JSON file, handling pagination required significant modifications to the base component. •The search bar was integrated using the Nuxt UI component, as it worked fine with realtime search functionality across all columns, requiring no further modifications. In Figure 24 the component with the search bar can be seen. Symptoms code available in the Appendix 12.3.6. Figure 23: Nuxt UI table with selector component. Figure 24: Nuxt UI table with search bar component. 6.2.7 Prediction Table To display the prediction results, the Nuxt UI table [65] was also used, but with a different approach. The goal was to present the results in a simple and intuitive way. Therefore, the predicted diseases were ordered from most likely to least likely, with their probabilities distinguished using a badge-style status indicator. During the table implementation, the author realized that simply ordering the diseases was insufficient, as it did not convey the probability information to the user. Although the API provided the probability of each disease using p-values, this statistical measure was not userfriendly for doctors who might not be familiar with it. Therefore, the simplest way to present
pg. 48 Report the probability was by ranking the diseases according to their likelihood. To achieve this, the classification shown in Table 3was established. Status p-value Range Explanation High p≤0.001 High probability that the disease is the predicted one. Medium 0.001 < p ≤0.05 Significant probability that the disease could be the predicted one. Low p > 0.05 Very low probability that the disease is the predicted one. Table 3: Classification of predicted disease likelihood based on p-value ranges. For creating the PredictionTable.vue, code in Appendix 12.3.7, the following modifications where applied: •The data displayed in the table is based on values returned by the API. Each data item is defined as a string to accommodate the format provided by the API. •The information from the API is structured as an array of predictions, where each prediction corresponds to a row in the table. •Columns were defined to display the ’Probability’, ’Disease’ and ’Mondo Id’. •Statuses for the probability were mapped to p-values and assigned corresponding colors. These statuses are displayed within badges to visually differentiate the likelihood of each prediction. •Pagination was also implemented to display ten predictions per page, allowing for easier navigation through the results. Additionally, a feature not included in the initial design phase was implemented. It was the "expand" feature, where the genes affected, the disease information and the Orphanet code where provided, which provides doctors with more comprehensive data when needed. 6.2.8 Dark mode Dark mode was not included in the initial Minimum Viable Product (MVP) scope, but during implementation, its feasibility was explored. Nuxt UI offers a Dark Mode component as part of their Theming features [66], which integrates easily into projects and allows for easy customization, code in the Appendix 12.3.8. The adjustments made to incorporate dark mode primarily involved modifying the color schemes across pages to ensure adequate contrast and readability. For contrast checking, a website contrast checker was used [67]. 6.3 Project Structure The Midia project is organized with a Nuxt.js framework as the foundation. The project structure includes the following key directories and files: •’components’ Folder: Contains Vue components and icons used throughout the project. •’assets’ Folder: Stores static files such as the HPO JSON data.
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 49 •’layouts’ Folder: Includes the default layout template applied across the website. •’pages’ Folder: Houses the application’s pages, including index.vue,prediction.vue, and symptomatology.vue. •‘tailwind.config.js‘: Defines the color palette and shades used in the website’s styling. This section will explain the development of the layout and pages in detail. 6.3.1 Default Layout This file defines the general layout of the website, including elements that remain consistent throughout the web application. It ensures that common parts are defined in one place and applied across the entire site. In this layout file, the header, breadcrumb navigation, and the content area for each page are specified. This setup allows for a uniform appearance and structure across all pages. Code for the layout file available in Appendix: 12.3.9. 6.3.2 Index page This component serves as the form interface for selecting patient gender and age. It functions as both the first step in the prediction process and the home page of the application. It includes: •Displays the components RadioButtonGender.vue and SelectorAge.vue within the Card.vue component. •Validates that both the gender and age fields are selected before allowing form submission. •Clears relevant data (the HPO selected in any of the steps) from localStorage upon component mounting to prevent errors if a new prediction is made. •Saves the HPO data, related to the sex and age, to localStorage and navigates to the following page upon submission. Code for the Index page available in Appendix: 12.3.10 6.3.3 Symptomatology page This component presents a form for selecting symptoms described by the patient. It serves as a step in the process where symptoms are added before proceeding to the next stage. The component includes the following features: •Displays the SymptomTable component within a Card component for layout purposes. •A reactive variable isSymptomTableValid is used to track whether the symptom selection table has been correctly filled, at list one row (symptom) must be selected. This code, which can be found in Appendix 12.3.11, is simpler compared to the index.vue page. This simplification is due to the fact that all the logic for displaying and managing the symptoms in the table is encapsulated within the SymptomTable component. Consequently, this page
pg. 50 Report focuses primarily on integrating and presenting the component, without having to handle the underlying details of symptom management. 6.3.4 Prediction page This component (available in Appendix 12.3.12) is the final step in the prediction process, where the patient’s data is submitted to an external API, and the results are displayed. It includes: •Retrieves and prepares data from ’localStorage’. •Makes a POST request to the API endpoint using the request body defined in the previous steps. This API call submits the patient’s data and fetches the prediction results. •Transforms the response data into a structured format. If the response is valid and contains at least eight elements, it maps the data into a more readable object format with properties ’pvalue’, ’score’, ’mondo’, ’diseaseName’, ’diseaseDef’, ’genes’, ’hpoProf’, and ’hpoNumBranch’, so it can be used in the PredictionTable.vue component. •Displays the PredictionTable component within a Card component for layout purposes.
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 51 7 THE MINORITY DISEASE DIAGNOSTIC ASSISTANT GUI In the preceding sections, the project foundations have been established, including the objectives, theoretical background, methodology, and development process of the software. This section focuses on the Minority Disease Diagnostic Assistant (Midia) Graphic User Interface (GUI). Where a detailed overview of the Midia GUI, showcasing its design and functionality through screenshots, will be presented. A video example of how the web-based software works can be found in the Appendix 12.4. 7.1 Home page and first step: Figure 25: Home page and first step of the Midia light and dark mode. As shown in Figure 25, the home page represents the first step of the prediction process, as indicated by the stepper. This page consists of a header, which is available across all project pages, a stepper component, and a card that contains the patient data fields to be filled in. The first section provides a brief explanation aimed at users who may be less familiar with technology. In the middle section, there are two mandatory fields: the patient’s sex and age. If either field is left incomplete, an error message will be displayed, indicating which field is missing. The user will not be able to proceed to the next step until both fields are correctly filled out. The final section contains only the button to advance to the next step. 7.2 Second step: Once the patient’s data has been entered and the "Continue" button clicked, the user is directed to the second step (see Figure 26), where symptoms must be provided. At least one symptom must be entered for the process to continue; otherwise, the prediction cannot be generated. Symptoms can be found using the search bar, which scans the entire table by disease name and HPO id (Human Phenotype Ontology), or by navigating through the table using pagination. There is no limit to the number of symptoms that can be selected. Selection is made by clicking the checkbox in the first column of the table. After all the symptoms described by the patient have been entered, the doctor can proceed to the final step: the prediction.
pg. 52 Report Figure 26: Second step of the Midia light and dark mode. 7.3 Third and last step: Figure 27: Third step of the Midia light and dark mode. Between the second and third steps, the entered information is sent to the API responsible for generating the prediction. In the third step, titled "Prediction" (see Figure 27), the predicted diseases, calculated based on the provided data, are displayed in a table ranked from most to least probable. The probability is displayed in the first column with a colored badge for easy identification. The second column contains the disease name, while the last column shows the Mondo ID. If the doctor requires more information, each row can be expanded to reveal additional details, such
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 53 as the affected genes and a description of the disease. If the user wishes to make another prediction, they can click the "Home" link in the header to return to the first step.
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 55 8 PLANNING For the project development, an ambitious roadmap was initially defined, but adjustments were made and timelines extended as the project progressed to accommodate its complexity. The project plan was divided into three key phases. The first phase focused on understanding the problem, gathering medical knowledge about rare diseases, and exploring current technological solutions in this field. UX/UI principles and GUI design were also investigated, and the project’s scope and structure were clearly defined during this stage. The second phase involved selecting the appropriate programming language and framework for the Midia development. This phase also included a learning curve in front-end development to ensure the tool would be functional, responsive, and user-friendly. The final phase was dedicated to the Midia implementation, where the design concepts were brought to life through coding and system integration. A visual representation of the roadmap followed throughout the project is shown in Figure 28. Figure 28: Project roadmap representation.
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 63 CONCLUSIONS The development of the Minority Disease Diagnostic Assistant (Midia) marks a significant advancement in improving the diagnostic process for rare diseases, particularly for general practitioners and pediatricians with limited expertise in this area. By incorporating user-centered design principles, intuitive UI/UX elements, and predictive analytics, the Midia serves as a practical tool to help healthcare professionals identify potential rare diseases more quickly and accurately. Its core objective is to shorten the patient’s diagnostic journey, reducing delays in treatment. The Midia is more than just a diagnostic tool; it is a comprehensive resource aimed at enhancing medical decision-making, streamlining workflows, and ultimately improving patient outcomes. Future enhancements could further increase its effectiveness: •Expanding the prediction range of diseases: The current API primarily focuses on kidneyrelated rare diseases, so broadening the coverage would make the tool more versatile. •Providing clinical recommendations: Alongside predictions, the tool could offer guidance on next steps, such as specific tests or specialist referrals, to help primary doctors confirm diagnoses. •Introducing a database and login system: This would allow patient data to be stored securely, enabling continuous follow-up through the software and enhancing long-term patient management. •Adding a forum for global collaboration: A forum would allow doctors to share unique cases and seek advice from peers who may have encountered similar conditions, fostering a collaborative network for rare disease diagnosis. From a personal perspective, this project has been an invaluable learning experience. It has allowed the author of the thesis to deepen her understanding of rare diseases and the critical challenges healthcare professionals face in diagnosing them. Practical skills in software development have been developed, user interface design, and API integration, which will be useful in future projects. Moreover, collaborating with a healthcare professional and understanding their workflows has broadened her perspective on the intersection between technology and medicine. The project has reinforced the importance of creating user-centric solutions that can have a meaningful impact in real-life scenarios.
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 65 ACKNOWLEDGEMENTS I would like to express my sincere gratitude to several people who have been essential to the success of this final year project. First and foremost, I want to thank my supervisor, Alexandre Perera, for his guidance and constant support. He has always been available to offer me all the necessary assistance and facilities, guiding me in developing a project with significant social impact and the potential to contribute meaningfully to the field of rare diseases. I am also deeply grateful to Joana Gelabert, a PhD student at b2slab-CREB, for her ongoing support throughout the project. Her assistance has been vital, both technically and morally, especially during the project’s more challenging phases. My gratitude extends to Rafa León, also a member of b2slab-CREB, for providing me with the API and for his willingness to offer advice on the project and its integration with the API. I would like to thank Dr. Francesc Ripoll for agreeing to the interview and providing me with valuable insights into the daily realities of a physician and the approach to rare diseases in primary care. I also want to thank Miguel, my reference for front-end programming, who advised and assisted me during moments when I faced challenges with the code. Finally, I am deeply grateful to my mother and my partner for their understanding, support, and encouragement throughout my degree journey.
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 67 Bibliography [1] Eric Bock,"Rare Diseases Are a Public Health Issue", https://nihrecord.nih.gov/2021/04/16/rare-diseases-are-public-health-issue NIH Record, April 16,2021 [2] Sebastian Köhler,"The Phenomizer",https://compbio.charite.de/phenomizer/ 2017 [3] Sebastian Köhler, Nicole A. Vasilevsky, Mark Engelstad, [et al.],"The Human Phenotype Ontology",https://academic.oup.com/nar/article/45/D1/D865/2574174?login=false Nucleic Acids Research, Volume 45, Issue D1, Pages D865–D876January 2017 [4] Unknown author,"HIPAA",https://www.cancer.gov/publications/dictionaries/cancerterms/def/hipaa NCI Dictionary of Cancer Terms, 1996 [5] REGULATION (EU) 2016/679 OF THE EUROPEAN PARLIAMENT AND OF THE COUNCIL,"GDPR",https://gdpr-info.eu/ European Parliment, April, 2016 [6] GitHub, Inc.,"Git Hub",https://github.com/ February, 2008 [7] Figma, Inc.,"Figma",https://www.figma.com/ February, 2016 [8] Vall d’Hebron,"Rare diseases",https://hospital.vallhebron.com/en/healthcare/diseases/rarediseases Hospital Vall d’HebronJanuary, 2024 [9] Stéphanie Nguengang Wakap, Deborah M. Lambert, Annie Olry, [et al.],"Estimating cumulative point prevalence of rare diseases: analysis of the Orphanet database", https://www.nature.com/articles/s41431-019-0508-0 European Journal of Human Genectics, 28, pages165–173, February, 2020 [10] The National Institute of Mental Health (NIMH),"What is Prevalence?", https://www.nimh.nih.gov/health/statistics/what-is-prevalence [11] University of Pennsylvania,"What is Alport Syndrome?", https://www.pennmedicine.org/for-patients-and-visitors/patientinformation/conditions-treated-a-to-z/alport-syndrome Penn Medicine, Philadelphia, PA, 2024 [12] Alport Syndrome News,"How common is Alport syndrome?", https://alportsyndromenews.com/prevalence-of-alport-syndrome/ [13] Brian Hon Yin Chung, Jeffrey Fong Ting Chau & Gane Ka-Shu Wong, "Rare versus common diseases: a false dichotomy in precision medicine", https://www.nature.com/articles/s41525-021-00176-x?fromPaywallRec=false npj Genom. Med. 6, 19, February, 2021
pg. 68 Report [14] Fatoumata Faye, Claudia Crocione, Roberta Anido de Peña, [et al.],"Time to diagnosis and determinants of diagnostic delays of people living with a rare disease: results of a Rare Barometer retrospective patient survey",https://www.pennmedicine.org/for-patients-and- visitors/patient-information/conditions-treated-a-to-z/alport-syndrome Eur J Hum Genet, May, 2024 [15] Orphanet,"Orphanet",https://www.orpha.net/ [16] National Human Genome Research Institute,"PHENOTYPE", https://www.genome.gov/genetics-glossary/Phenotype NIH, August 23, 2024 [17] Kara Rogers,"Phenotype genetics",https://www.britannica.com/science/phenotype Encyclopaedia Britannica, July 13, 2023 [18] Wikipedia,"Phenotype",https://en.wikipedia.org/wiki/Phenotype [19] Natalya F. Noy and Deborah L. McGuinness,"Ontology Development 101: A Guide to Creating Your First Ontology", https://protege.stanford.edu/publications/ontology_development/ontology101.pdf, Stanford University, Stanford, CA, 94305, 2000 [20] Ontotext,"What Are Ontologies?",https://www.ontotext.com/knowledgehub/fundamentals/whatare-ontologies/ [21] Human Phenotype Onthology,"Human Phenotype Onthology",https://hpo.jax.org/ [22] Sebastian Köhler, Marcel H. Schulz, Peter Krawitz, [et al.],"Clinical Diagnostics in Human Genetics with Semantic Similarity Searches in Ontologies", https://www.sciencedirect.com/science/article/pii/S0002929709003991 The American Journal of Human Genetics, Volume 85, Issue 4, Pages 457-464, 2009 [23] Peter N. Robinson, Sebastian Köhler, Sebastian Bauer, [et al.],"The Human Phenotype Ontology: A Tool for Annotating and Analyzing Human Hereditary Disease", https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2668030/ Am J Hum Genet. November, 2008 [24] Sebastian Köhler, Leigh Carmody, Nicole Vasilevsky, [et al.],"Expansion of the Human Phenotype Ontology (HPO) knowledge base and resources", https://academic.oup.com/nar/article/47/D1/D1018/5198478?login=false Nucleic Acids Research, Volume 47, Issue D1, Pages D1018–D1027, January, 2019 [25] Human Phenotype Ontology,"Download Ontology",https://hpo.jax.org/data/ontology [26] Sebastian Kohler, Michael Gargano, Nicolas Matentzoglu, [et al.],"The Human Phenotype Ontology in 2021",https://academic.oup.com/nar/article/49/D1/D1207/6017351 Nucleic Acids Research, 2021, Vol. 49, Database issue D1207–D1217 January, 2021 [27] Rafael Timbó,"Front End Frameworks: What They Are, and Best Options",
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 69 https://www.revelo.com/blog/front-end-frameworks Revelo, April, 2024 [28] Jaye H.,"How HTML, CSS, and JavaScript work",https://scrimba.com/articles/html-css- javascript/ Scrimba, October, 2022 [29] Mozilla Corporation,"HTML: HyperText Markup Language", https://developer.mozilla.org/en-US/docs/Web/HTML [30] Mozilla Corporation,"CSS",https://developer.mozilla.org/es/docs/Web/CSS [31] Mozilla Corporation,"JavaScript",https://developer.mozilla.org/en- US/docs/Web/JavaScript [32] Hiren Dhaduk,"Best Frontend Frameworks for Web Development", https://www.simform.com/blog/best-frontend-frameworks/s Simform, November, 2022 [33] React,"React",https://react.dev/ [34] Angular,"Angular",https://angular.dev/ [35] ProductPlan,"Minimum Viable Product (MVP)",https://www.productplan.com/glossary/minimumviable-product/ [36] Git,"Git",https://git-scm.com/ [37] GitHub Docs,"Quickstart for repositories",https://docs.github.com/en/repositories/creating- and-managing-repositories/quickstart-for-repositories [38] GitKraken,"GitKraken",https://www.gitkraken.com/ [39] Yaak,"Yaak",https://yaak.app/ [40] Nuxt,"Data fetching",https://nuxt.com/docs/getting-started/data-fetching [41] Nuxt,"useFetch",https://nuxt.com/docs/api/composables/use-fetch [42] Padam Singh, PhD,"P Value, Statistical Significance and Clinical Significance", https://www.jcpcarchives.org/full/p-value-statistical-significance-and-clinical- significance-121.php J Clin Prev Cardiol. 2013;2(4):202-4, 2013 [43] Tristina Oppliger,"What is UX / UI Design?",https://flatironschool.com/blog/what-is- ux-ui-design/ Flatiron School, June, 2021 [44] Mansurul Haque,"15 Most Important Usability Principles for User Interface Design",https://medium.com/@mdmansurulhaques/15-important-usability-principles-for- user-interface-design-ea819cedeb36
pg. 70 Report Medium, February, 2023 [45] Jakob Nielsen,"10 Usability Heuristics for User Interface Design", https://www.nngroup.com/articles/ten-usability-heuristics/ Nielsen Norman Group, January, 2024 [46] Maze,"User Personas: Your Guide to Building Personas for UX", https://maze.co/guides/user-personas/ [47] Product Plan,"User Flow",https://www.productplan.com/glossary/user-flow/ [48] Cambren Browne,"How To Create A User Flow: A Step-By-Step Guide", https://careerfoundry.com/en/blog/ux-design/how-to-create-a-user-flow/ CareerFoundry, December, 2022 [49] UX Tools,"How I make UI color palettes",https://www.youtube.com/watch?v=yYwEnLYT55c December, 2022 [50] Dean Issacharoff,"Color Theory Fundamentals Every Web Designer Should Know", https://elementor.com/blog/color-theory-web-design/ Elementor blog, January, 2022 [51] Coolors,"Coolors",https://coolors.co/36151e-593f62-7b6d8d-8499b1-a5c4d4 [52] Figma,"Foundation: Color Generator",https://www.figma.com/community/plugin/1024452006068794933/foundationcolor-generator [53] Vue,"Vue",https://vuejs.org/ [54] Alfonso Barros,"Angular / React / Vue pros and cons.", https://medium.com/@afonsobarros/angular-react-vue-pros-and-cons-75e161311e86 Medium, April, 2018 [55] Nuxt,"Nuxt",https://nuxt.com/ [56] Taildwind CSS,"TaildWind CSS",https://tailwindcss.com/ [57] Nuxt,"Get Started > Introduction",https://nuxt.com/docs/getting-started/introduction [58] TaildWind CSS,"Get started with Tailwind CSS",https://tailwindcss.com/docs/installation [59] Nuxt,"Nuxt UI Library",https://ui.nuxt.com/ [60] Nuxt,"Header",https://ui.nuxt.com/pro/components/header [61] Breadcrumb,"Breadcrumb",https://ui.nuxt.com/components/breadcrumb [62] Nuxt,"RadioGroup",https://ui.nuxt.com/components/radio-group
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 71 [63] Nuxt,"SelectMenu",https://ui.nuxt.com/components/select-menu [64] Nuxt,"Card",https://ui.nuxt.com/components/card [65] Nuxt,"Table",https://ui.nuxt.com/components/table [66] Nuxt,"Theming",https://ui.nuxt.com/getting-started/theming [67] Coolors,"Color contrast checker",https://coolors.co/contrast-checker/112a46-acc8e5
pg. 78 Report 12.3 Code 12.3.1 Header Component - BaseHeader.vue <template> <header class="border-b border-blue-800 border-opacity-10 flex justify-between py-4 px-4"> <AppLogo class="scale-50 w-3"> </AppLogo> <div class="flex items-center "> <NuxtLink class="mr-4 font-semibold text-blue-700 dark:text-blue-200" to="/">Home</NuxtLink> </div> <div class="flex items-center gap-3"> <NuxtLink to="https://github.com/martuki8/Midia3" class="flex items-center text-blue-700 dark:text-blue-200"> <GitHubIcon></GitHubIcon> </NuxtLink> <ColourSwitch class="flex items-center"></ColourSwitch> </div> </header> </template> 12.3.2 Website Main Stepper - BreadCrumb.vue <script setup lang="ts"> const route = useRoute(); const links = [{ label:’Patient data’, to: ’/’ }, { label:’Symptomatology’, to: ’/symptomatology’ }, { label:’Prediction’, to: ’/prediction’ }] function isActive(link) { return route.path === link.to } </script> <template> <ul class="flex items-center justify-center gap-5"> <li v-for="(link, index) in links" :key="link.to"> <UAvatar :alt="(index + 1).toString()" :ui="{ background: isActive(link) ? ’bg-primary-500 dark:bg-primary-400’ : undefined, placeholder: isActive(link) ? ’text-white dark:text-gray-900’ : !!link.to ? ’group-hover:text-gray-700 dark:group-hover:text-gray-200’ : ’’ }" size="xs" />
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 79 <span class="font-semibold ml-2" :class="isActive(link) ? ’text-primary-500’ : ’text-gray-500’"> {{ link.label }} </span> </li> </ul> </template> 12.3.3 Gender radio buttons - RadioButtonGender.vue <script setup lang="ts"> const options = [{ value: "HP:0012954", label:’Female’ }, { value: "HP:0012955", label:’Male’ }] const selected = defineModel("HP:0012954")//female </script> <template> <URadioGroup v-model="selected" legend="Select the patient gender" color="blue" :options="options" /> </template> 12.3.4 Age selector - SelectorAge.vue <script setup lang="ts"> const model = defineModel() const people = [{ id: 1, name: ’Neonatal period: Birth to 28 days.’, value: "HP:0003623" }, { id: 2, name: ’Infancy: 1 month to 1 year.’, value: "HP:0003593" }, { id: 3, name: ’Toddlerhood: 1 to 3 years.’, value: "HP:0011463" }, { id: 4, name: ’Preschool age: 3 to 5 years.’, value: "HP:0011463" }, { id: 5,
pg. 80 Report name: ’School age: 6 to 12 years.’, value: "HP:0003621" }, { id: 6, name: ’Adolescence: 13 to 18 years.’, value: "HP:0003621" }, { id: 7, name: ’Young adulthood: 19 to 39 years.’, value: "HP:0011462" }, { id: 8, name: ’Middle adulthood: 40 to 64 years.’, value: "HP:0003596" }, { id: 9, name: ’Late adulthood: 65 years and older.’, value: "HP:0003584" } ] const selected = ref<number | null>(null); // Inicialitza amb null perque el placeholder es mostri </script> <template> <USelectMenu v-model="model" :options="people" placeholder="Select the patient age" value-attribute="value" option-attribute="name" /> </template> 12.3.5 Card - Card.vue <template> <UCard> <template #header> <Placeholder class="h-8" /> </template> <Placeholder class="h-32" /> <template #footer> <Placeholder class="h-8" /> </template> </UCard> </template> 12.3.6 Symptomathology Table - SymptomTable.vue
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 81 <script setup lang="ts"> import { ref, computed, onMounted } from ’vue’ import hpWithFpJson from ’~/assets/hp_with_fp.json’ const model = defineModel() const sort = ref({ column: ’name’, direction: ’asc’ }) const columns = [{ key: ’name’, label:’Symptom’ }, { key: ’id’, label:’HPO’ }] const symptoms = ref<Array<{ id: string, name: string }>>([]) const selected = ref<Array<{ id: string, name: string }>>([]) const q = ref(’’) // Pagination state const page = ref(1) const itemsPerPage = ref(6) watch(selected, (newValue) => { model.value = newValue.length !== 0 }) onBeforeRouteLeave(() => { localStorage.setItem("Midia-symptoms", JSON.stringify(selected.value)) }) // Load data and initialize symptoms onMounted(() => { symptoms.value = hpWithFpJson.map(item => ({ id: item.id, name: item.name })) }) const filteredRows = computed(() => { let rows = symptoms.value if (q.value) { rows = rows.filter(symp => { return Object.values(symp).some(value => { return String(value).toLowerCase().includes(q.value.toLowerCase()) }) }) } return rows
pg. 82 Report }) const paginatedFilteredRows = computed(() => { let rows = filteredRows.value // Sorting logic if (sort.value.column) { rows.sort((a, b) => { const aValue = a[sort.value.column] const bValue = b[sort.value.column] if (aValue < bValue) return sort.value.direction === ’asc’ ?-1:1 if (aValue > bValue) return sort.value.direction === ’asc’ ? 1 : -1 return 0 }) } // Pagination logic const start = (page.value - 1) * itemsPerPage.value const end = start + itemsPerPage.value return rows.slice(start, end) }) function select(row) { const index = selected.value.findIndex(item => item.id === row.id) if (index === -1) { selected.value.push(row) }else { selected.value.splice(index, 1) } } </script> <template> <div> <div class="flex px-3 py-3.5 border-b border-gray-200 dark:border-gray-700"> <UInput v-model="q" placeholder="Write a symptom..." class="w-96" /> </div> <UTable v-model="selected" :columns="columns" :rows="paginatedFilteredRows" :sort="sort" /> <div class="flex justify-end px-3 py-3.5 border-t border-gray-200 dark:border-gray-700"> <UPagination :model-value="page" :page-count="itemsPerPage" :total="filteredRows.length" @update:model-value="newPage => page = newPage" /> </div> </div> </template> 12.3.7 Prediction Table - PredictionTable.vue <script setup lang="ts"> interface PredictionResponse { pvalue: string score: string
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 83 mondo: string diseaseName: string diseaseDef: string genes: string hpoProf: string hpoNumBranch: string } const props = defineProps<{ data: PredictionResponse[] }>() // columns const columns = [{ key: ’pvalue’, label:’Probability’ }, { key: ’diseaseName’, label:’Disease’, }, { key: ’mondo’, label:’MONDO Id’ }] // Probability statuses const probStatus = [{ key: ’high’, label:’High’, value: true }, { key: ’medium’, label:’Medium’, value: false }, { key: ’low’, label:’Low’, value: false }] // Pagination state const page = ref(1) const itemsPerPage = ref(10) const paginatedFilteredRows = computed(() => { if (!props.data || !props.data.length) return [] let rows = props.data // Pagination logic const start = (page.value - 1) * itemsPerPage.value const end = start + itemsPerPage.value return rows.slice(start, end) }) // Probability color class mapping function getProbabilityClasses(prob?: string) { if (!prob) return { background: ’bg-blue-300’,
pg. 84 Report text: ’text-blue-900’ } switch (prob.toLowerCase()) { case "high": return { background: ’bg-green-300’, text: ’text-green-900’ } case "medium": return { background: ’bg-yellow-300’, text: ’text-yellow-900’ } case "low": return { background: ’bg-red-300’, text: ’text-red-900’ } default: return { background: ’bg-blue-300’, text: ’text-blue-900’ } } } // response pvalue status mapping function getPvalueLabel(pvalue: string) { if (!pvalue) return try { const pvalueNumber = parseFloat(pvalue) if (pvalueNumber > 0.05) { return "Low" } else if (0.001 < pvalueNumber && pvalueNumber <= 0.05) { return "Medium" } else if (pvalueNumber <= 0.001) { return "High" } }catch (e) { console.error(e) return } } </script> <template> <div> <UTable :columns="columns" :rows="paginatedFilteredRows"> <template #pvalue-data="{ row }"> <div class="flex w-full justify-center">
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 85 <span class="inline-block rounded-full px-3 py-1 text-sm font-semibold text-center" :class="[getProbabilityClasses(getPvalueLabel(row.pvalue)).background, getProbabilityClasses(getPvalueLabel(row.pvalue)).text]"> {{ getPvalueLabel(row.pvalue) }} </span> </div> </template> <template #expand="{ row }"> <div class="p-4 gap-3 flex flex-col text-sm"> <div class="flex gap-2"> <span v-for="(gene, index) in row.genes.split(’ ’)" :key="‘${row.pvalue}-${gene}-${index}‘" class="inline-block rounded-full px-3 py-1 text-sm font-semibold text-center bg-blue-300 text-blue-900"> {{ gene }} </span> </div> <p> {{ row.diseaseDef }}</p> </div> </template> </UTable> <div class="flex justify-end px-3 py-3.5 border-t border-gray-200 dark:border-gray-700"> <UPagination :model-value="page" :page-count="itemsPerPage" :total="data?.length || 0" @update:model-value="newPage => page = newPage" /> </div> </div> </template> 12.3.8 Dark mode - ThemingButton.vue <script setup lang="ts"> const colorMode = useColorMode() const isDark = computed({ get() { return colorMode.value === ’dark’ }, set() { colorMode.preference = colorMode.value === ’dark’ ?’light’ :’dark’ } }) </script> <template> <ClientOnly> <UButton :icon="isDark ? ’i-heroicons-moon-20-solid’ : ’i-heroicons-sun-20-solid’" color="gray" variant="ghost" aria-label="Theme" @click="isDark = !isDark" /> <template #fallback> <div class="w-8 h-8" />
pg. 86 Report </template> </ClientOnly> </template> 12.3.9 Layout - default.vue <template> <BaseHeader></BaseHeader> <div> <!--contenedor--> <BreadCrumb class="flex justify-center py-10 px-4"> </BreadCrumb> <main class="flex flex-col w-full h-full items-center px-6"> <!--responsive--> <slot> <!--contenido de todas las pg--> </slot> </main> </div> </template> 12.3.10 Page 1 - Patient Data - index.vue <script setup lang="ts"> import { z } from ’zod’ import type { FormError, FormSubmitEvent } from ’#ui/types’ const router = useRouter() const state = reactive({ gender: "HP:0012954",//Female hpo by default SelectorAge: undefined }) const validate = (state: any): FormError[] => { const errors = [] if (!state.SelectorAge) errors.push({ path: ’SelectorAge’, message: ’Required’ }) return errors } onMounted(() => { localStorage.removeItem("Midia-gender") localStorage.removeItem("Midia-age") localStorage.removeItem("Midia-symptoms") }) async function onSubmit(event: FormSubmitEvent<any>) { localStorage.setItem("Midia-gender", event.data.gender) localStorage.setItem("Midia-age", event.data.SelectorAge) router.push("/symptomatology") } </script>
Implementation of a Minority Disease Diagnostic Assistant GUI pg. 87 <template> <UForm :validate="validate" :state="state" class="space-y-4" @submit="onSubmit"> <div> <UContainer> <UCard class="w-[800px]"> <template #header> <div class="flex justify-between text-blue-800 dark:text-blue-200"> To start the prediction process select the patient sex and age. Then click the ’Continue button’. </div> </template> <div class="m-2 flex justify-center"> <RadioButtonGender class="px-10 flex justify-center" v-model="state.gender" /> </div> <UFormGroup name="SelectorAge" :ui="{ error: ’mt-2 red’ }"> <SelectorAge class="pt-6 flex justify-center" v-model="state.SelectorAge"></SelectorAge> </UFormGroup> <template #footer> <div class="flex justify-center"> <UButton color="blue" class="flex justify-center py-2 px-4" type="submit"> Continue </UButton> </div> </template> </UCard> </UContainer> </div> </UForm> </template> 12.3.11 Page 2 - Symptomatology Data - symptomatology.vue <script lang="ts" setup> const isSymptomTableValid = ref(false) </script> <template>