Ontology-Based Model to Support Ubiquitous Healthcare Systems for COPD Patients

: Over the past 30 years, information technology has gradually transformed the way health care is provisioned for patients. Chronic Obstructive Pulmonary Disease (COPD) is an incurable malady that threatens the lives of millions around the world. The huge amount of medical information in terms of complex interdependence between progression of health problems and various other factors makes the representation of data more challenging. This study investigated how formal semantic standards could be used for building an ontology knowledge repository to provide ubiquitous healthcare and medical recommendations for COPD patient to reduce preventable harm. The novel contribution of the suggested framework resides in the patient-centered monitoring approach, as we work to create dynamic adaptive protection services according to the current context of patient. This work executes a sequential modular approach consisting of patient, disease, location, devices, activities, environment and services to deliver personalized real-time medical care for COPD patients. The main beneﬁts of this project are: (1) adhering to dynamic safe boundaries for the vital signs, which may vary depending on multiple factors; (2) assessing environmental risk factors; and (3) evaluating the patient’s daily activities through scheduled events to avoid potentially dangerous situations. This solution implements an interrelated set of ontologies with a logical base of Semantic Web Rule Language (SWRL) rules derived from the medical guidelines and expert pneumologists to handle all contextual situations.


Introduction
The fight against human disease and the promotion and protection of health are essential issues to ensure the continuity of the human species. Despite the remarkable advances in the diagnosis and methods of prevention, medicine is still powerless against many diseases that kill millions of people annually [1,2]. Recent World Health Organization (WHO) reports have estimated 12.6 million deaths each year because of chronic diseases [3]. According to the Global Burden of Disease (GBD) study [4] and World health statistics 2016 [5], Chronic Obstructive Pulmonary Disease (COPD) is expected to become the third leading cause of death worldwide by 2030. COPD is a serious respiratory disorder, characterized by progressive, partially reversible airway obstruction that makes it difficult to inhale and empty air out of the lungs. Over time, the airways of COPD patients become permanently blocked and that is always accompanied by multiple morbidities and dangerous complications leading to premature death [6]. The medical references indicate that optimal management of COPD includes three main aspects: first, promote self-management to reduce exposure to risk factors that may worsen symptoms of the disease; second, optimize treatment plan; and third, predict exacerbations [7]. Thus, new healthcare systems are needed to provide constant and cyclical monitoring for COPD patients.

Data Acquisition Layer
The acquisition layer is mainly used for collecting and transmitting the static and dynamic data of COPD domain; this layer consists of the medical profile of patient, real-time physiological parameters and environmental information coming from portable or fixed monitoring nodes. This information combined constitutes all the factors related to COPD. Medical studies indicate that many risk factors lead to developing COPD:

i.
Demographic factors: i.1 Age: Aging is often associated with gradual weakness in bodily functions. A statistical analysis using clinical data from 28 countries refers that the prevalence of COPD is approaching 12% threshold with people over 40 years of age [7]. i.2 Sex: As we know, certain diseases are more common among men than among women or the inverse. Gender plays an important role in COPD, where the prevalence is doubled in men compared with women. i.3 Race: Many diseases differ in prevalence by race and ethnicity. Recent research is uncovering evidence that ethnicity may influence the development of chronic COPD [14]. i. 4 Country of residence: The World Health Organization sheet on COPD in the last year shows that most COPD deaths occur in low-and middle-income countries [14].
ii. Physiological factors: Disruption of some vital signs can cause serious complications and would indicate a worsening of the disease. Accordingly, all these physiological parameters should be evaluated and observed regularly [13]. Table 1 contains all physical parameters which must be measured.

Data Acquisition Layer
The acquisition layer is mainly used for collecting and transmitting the static and dynamic data of COPD domain; this layer consists of the medical profile of patient, real-time physiological parameters and environmental information coming from portable or fixed monitoring nodes. This information combined constitutes all the factors related to COPD. Medical studies indicate that many risk factors lead to developing COPD:

i.
Demographic factors: i.1 Age: Aging is often associated with gradual weakness in bodily functions. A statistical analysis using clinical data from 28 countries refers that the prevalence of COPD is approaching 12% threshold with people over 40 years of age [7]. i. 2 Sex: As we know, certain diseases are more common among men than among women or the inverse. Gender plays an important role in COPD, where the prevalence is doubled in men compared with women. i. 3 Race: Many diseases differ in prevalence by race and ethnicity. Recent research is uncovering evidence that ethnicity may influence the development of chronic COPD [14]. i. 4 Country of residence: The World Health Organization sheet on COPD in the last year shows that most COPD deaths occur in low-and middle-income countries [14].
ii. Physiological factors: Disruption of some vital signs can cause serious complications and would indicate a worsening of the disease. Accordingly, all these physiological parameters should be evaluated and observed regularly [13]. Table 1 contains all physical parameters which must be measured. iii. Psychological factors: An emerging finding indicates the close link between COPD and mental disorders [16]. These studies have found that anxiety, stress, and depression are significantly associated with poor response to treatment and may cause increased hospitalizations [12]. iv. Environmental factors:

iv.1
Ambient air: Ambient air has been considered as a risk factor for COPD [32] as the concentration of air components (O 2 , CO 2 , He, etc.) must be kept in proportion with patient status. iv. 2 Weather: Weather conditions are also one of the factors that can trigger COPD symptoms. According to [32], extreme temperature and humidity, atmospheric pressure, precipitation and wind chill have a direct impact on the patient's life. iv. 3 Air pollution: Short-and long-term exposure to indoor and outdoor air pollution have adverse effects and may induce the acute exacerbation of COPD. There is a long list of atmospheric pollutants, such as arsenic, carbon monoxide, nickel, chromium, etc. [33].

v.
Physical activity: Regular exercise is part of healthy living, where moderate exercise can improve COPD symptoms and help the organs better use oxygen. on the other hand, excessive exercise may harm COPD patient [34]. vi. Smoking: As it has become known, the main cause of COPD is long-term cigarette smoking, which damages the air sacs, airways, and lining of lungs [9]. In this context, we must pay attention to second-hand smoking or passive smoking, which is no less harmful than active smoking [15]. vii. Comorbidities: Comorbidities are other chronic problems that independently coexist with COPD.
There is a set of comorbidities commonly associated with COPD, including coronary heart disease, diabetes mellitus, heart failure, lung cancer, osteoporosis and muscle weakness [35]. Comorbidities of COPD can adversely affect the stage of disease and might lead to early death viii. Food: Some foods and drinks can exacerbate COPD symptoms. Therefore, it is important to avoid foods which can potentially make this condition worse [34]. ix. History: History can be considered as a risk factor of subsequent COPD exacerbations, where clinical studies [11,33] confirm that patients with previous exacerbation history are more susceptible than others.

Semantic Layer (Ontology)
The semantic formalization is often used to interpret complex information which would make information meaningful and accessible to machines [36]. Meaningful and accessible mean that it is possible to make queries based on the purpose of data. Ontology is considered one of the richest semantic structures to facilitate knowledge representation, integration, and reasoning.
Ontology was defined originally as an "explicit specification of a conceptualization" [37]. In early 1997, Borst saw ontology as a "formal specification of a shared conceptualization" [38]. Currently, these definitions are generally accepted by ontologists. In this work, we adopt the definition of Studer [39] who merged those two propositions, stating ontology is "formal, explicit specification of a shared conceptualization" [40]. A conceptualization is understood to be an abstract model to create a simplified view representation of the real-world based on objects, concepts, and entities, as well as the relationships among them within the targeted domain. Explicit means that all used concepts and constraints are clearly defined to avoid misinterpretation, which could prevent symbols from being understood according to the conceptualization we commit to [40]. In principle, we can explicitly Electronics 2018, 7, 371 6 of 29 specify a conceptualization in two ways: extensionally and intensionally. The third characteristic in the adopted definition is the formality, which would require the ontology to be machine-readable. Shared refers to the fact that an ontology is not a private knowledge, constructed for very few persons, but is consensual knowledge accepted by a group or community.

Classifications of Ontology
The classification of ontologies has been widely addressed in the literature. In this context, Roussey [41] state that "it is important to distinguish these different kinds of ontologies to clarify their content, their use and their goal". Table 2 goes over the proposed classifications in the last three decades. The first known classification was brought by Mizoguchi et al. [42] in 1995 who proposed four types of ontologies: content ontologies that allow reusing the available knowledge resources; communication ontologies, which are dedicated to supporting the sharing of knowledge in a formal manner; indexing ontologies to retrieve source cases similar to the target cases; and meta-ontologies that can be used as a knowledge schema to provide general description dealing with high-level abstractions. In a parallel extension, Uschold [43] defined three key dimensions for ontologies: formality, purpose vary and subject matter. Later, in 1997, Heijst [44] presented the types of ontologies in two different ways: the first according to the amount and type of structure of the conceptualization and the second based on the subject of the conceptualization. Guarino [45] introduced an interesting classification, where he distinguished ontologies by their level of abstraction and dependence, leading to four main types of ontologies forming the basis of his ontology. In the first category comes the top-level ontology, which describes very basic concepts that ca be common across all knowledge domains. Domain ontology is intended to increase the vocabulary of general ontology to establish a solid correlation between vocabulary and a specific real-world domain such as healthcare, business, etc. with the possibility of reinvestment such representation with different tasks in the same domain. Task ontologies specify the glossary related to a generic task or activity. Application ontology is initially designed to tackle specific tasks with more detailed explanation about domain entities. Jurisica [46] sought for classifying the existing ontologies by the nature of the issue (static, dynamic, intentional ontologies and social ontologies). Similarly, Sowa [47] differentiated between formal and terminological ontologies by the level of axiomatization. Lassila [48] classified ontologies according to the richness of their internal structures in terms of controlled vocabulary, glossary, thesauri, term hierarchies, Strict subclass hierarchies, frames, ontology with value restrictions, and ontology with logical constraints. Fensel [49] did not add that much to the standard classifications, only expanding the level of generality with a method type of ontology [50]. Following him, Obrst [51] grouped ontologies into three broad categories of upper, mid-level and domain ontologies. The definitions of upper and domain ontologies do not differ significantly from previous definitions, while Obrst considered a mid-level ontology that serves as a bridge between abstract concepts defined in the upper ontology and low-level domain-specific concepts specified in a domain ontology. Alternatively, Berdier [52] and Roussey [41] presented similar classifications, adding the expressiveness metric.
Angelika [53] developed a comprehensive framework called OntoCube for ontology classification, which holistically covers the multitude of different ontologies using three important dimensions. The formality and the subject matter dimensions were derived from Mizoguchi [42], Uschold [43] and van Heijst [44], while the third dimension was derived from the ontology spectrum of Lassila [48] and Heijst. It is not our purpose to argue upon the differences between these studies, but we adopted the classification of Angelika [53]. The OntoCube is one of the most interesting methods to classify ontology. However, to facilitate the selection, we have added three performance benchmarks in parallel with these three dimensions (see Figure 2). Machine-readable refers to the format that can be easily processed by a computer. Reusability is the use of existing classes and concepts in some form to achieve various purposes. Complexity is the amount of computing in terms of time needed and resources required to accomplish a certain task.  The proposed ontology is a formal domain heavyweight ontology (FDHO). It is formal because it is realized in OWL. It is a domain matter as it represents the terms used to describe healthcare domain and specifically COPD. It is a heavyweight ontology because, besides classes and relations, it needs rules and axioms.

Methodologies for Building Ontologies
The analysis of the methodologies for building ontologies revealed that none of these approaches are fully mature [54][55][56].
The histograms chart in Figure 3 is a summary of three surveys that address existing methodologies. Lopez [54] compared five methodologies: SENSUS, Bernaras, Uschold and King, METHONOLOGY, and Gruninger. Lopez established a set of criteria for analyzing each of these methodologies. The author believed that inheritance from knowledge engineering and specifying details of the methodology, whether in terms of the activities or proposed techniques, in addition to the strategy for building and identifying concepts are main points to be considered by the researchers while developing methodologies. Moreover, there are equally important characteristics for analysis such as the recommended life cycle, the differences between the methodology and the work proposed by the IEEE standard 1074-1995, and collaborative and distributive construction. For additional information, please refer to [54]. Analogously, Rizwan [56] conducted a broader critical study of twelve common methodologies based on six basic measures: (1) collaboration; (2) degree of reusability; (3) application dependency; (4) life cycle; (5) methodology details; and (6) interoperability. Zambrana et al. [55] had a different point of view since his comparison focused on conceptualizations, development, and validation. Zambrana raised five questions to assess the six target methodologies. (1) "Are the ontology elements as concepts, relations, properties, etc. based on corpus work? (2) Who are the intended users of the methodology? (3) Does the methodology explicitly state which methods and techniques we should use to perform the different activities? (4) Does the methodology propose to perform a conceptualization activity? (5) Is there a program associated to the methodology that facilitates the different steps to be taken?". Although some methods outperform others in some features, in general, it seems none of them comply perfectly with all the requirements. To solve this problem, the researchers sought to find standardized methodologies adaptable to different types of ontologies and in different application domains. Lopez states that one of the first attempts to unify two methodologies was described in [57] but "the new synthesized methodology was not an actual methodology, it was a conception of a potential methodology". Later, Sánchez [58] combined two of the well-referenced methodologies METHONTOLOGY [59] and Cyc 101 [60] to obtain one of the most concrete methodologies for building medical ontologies ( Figure 4). The proposed ontology is a formal domain heavyweight ontology (FDHO). It is formal because it is realized in OWL. It is a domain matter as it represents the terms used to describe healthcare domain and specifically COPD. It is a heavyweight ontology because, besides classes and relations, it needs rules and axioms.

Methodologies for Building Ontologies
The analysis of the methodologies for building ontologies revealed that none of these approaches are fully mature [54][55][56].
The histograms chart in Figure 3 is a summary of three surveys that address existing methodologies. Lopez [54] compared five methodologies: SENSUS, Bernaras, Uschold and King, METHONOLOGY, and Gruninger. Lopez established a set of criteria for analyzing each of these methodologies. The author believed that inheritance from knowledge engineering and specifying details of the methodology, whether in terms of the activities or proposed techniques, in addition to the strategy for building and identifying concepts are main points to be considered by the researchers while developing methodologies. Moreover, there are equally important characteristics for analysis such as the recommended life cycle, the differences between the methodology and the work proposed by the IEEE standard 1074-1995, and collaborative and distributive construction. For additional information, please refer to [54]. Analogously, Rizwan [56] conducted a broader critical study of twelve common methodologies based on six basic measures: (1) collaboration; (2) degree of reusability; (3) application dependency; (4) life cycle; (5) methodology details; and (6) interoperability. Zambrana et al. [55] had a different point of view since his comparison focused on conceptualizations, development, and validation. Zambrana raised five questions to assess the six target methodologies. (1) "Are the ontology elements as concepts, relations, properties, etc. based on corpus work? (2) Who are the intended users of the methodology? (3) Does the methodology explicitly state which methods and techniques we should use to perform the different activities? (4) Does the methodology propose to perform a conceptualization activity? (5) Is there a program associated to the methodology that facilitates the different steps to be taken?". Although some methods outperform others in some features, in general, it seems none of them comply perfectly with all the requirements. To solve this problem, the researchers sought to find standardized methodologies adaptable to different types of ontologies and in different application domains. Lopez states that one of the first attempts to unify two methodologies was described in [57] but "the new synthesized methodology was not an actual methodology, it was a conception of a potential methodology". Later, Sánchez [58] combined two of the well-referenced methodologies METHONTOLOGY [59] and Cyc 101 [60] to obtain one of the most concrete methodologies for building medical ontologies ( Figure 4).   Step 1: Determine the Domain and Scope of the Ontology The scope refers to the domain of interest which is to be described in this ontology. This step must draw the boundary or limitations that constrain the initial purpose of the conceptualization domain. Formally, ontologies developers should make good use scenarios or try to ask straightforward questions. Researchers have proposed a set of questions for mapping objectives with an ontology to determine its domain, scope, contribution, and structure.


What is the domain that the ontology will cover?
The chronic obstructive pulmonary disease is the domain of this ontology.
 What is the purpose of this ontology?
This ontology is designed for preventive management of COPD patients. The main purpose is to facilitate the systematic extraction of information from detailed observations. Our ontology is dedicated to support a personalized system for COPD patient. This ontology provides real-time monitoring and recommendations to help patients cease contact with risk factors and prevent   Step 1: Determine the Domain and Scope of the Ontology The scope refers to the domain of interest which is to be described in this ontology. This step must draw the boundary or limitations that constrain the initial purpose of the conceptualization domain. Formally, ontologies developers should make good use scenarios or try to ask straightforward questions. Researchers have proposed a set of questions for mapping objectives with an ontology to determine its domain, scope, contribution, and structure.


What is the domain that the ontology will cover?
The chronic obstructive pulmonary disease is the domain of this ontology.
 What is the purpose of this ontology?
This ontology is designed for preventive management of COPD patients. The main purpose is to facilitate the systematic extraction of information from detailed observations. Our ontology is dedicated to support a personalized system for COPD patient. This ontology provides real-time monitoring and recommendations to help patients cease contact with risk factors and prevent Step 1: Determine the Domain and Scope of the Ontology The scope refers to the domain of interest which is to be described in this ontology. This step must draw the boundary or limitations that constrain the initial purpose of the conceptualization domain. Formally, ontologies developers should make good use scenarios or try to ask straightforward questions. Researchers have proposed a set of questions for mapping objectives with an ontology to determine its domain, scope, contribution, and structure.
What is the domain that the ontology will cover?
The chronic obstructive pulmonary disease is the domain of this ontology. What is the purpose of this ontology?
This ontology is designed for preventive management of COPD patients. The main purpose is to facilitate the systematic extraction of information from detailed observations. Our ontology is dedicated to support a personalized system for COPD patient. This ontology provides real-time monitoring and recommendations to help patients cease contact with risk factors and prevent progressive respiratory impairment and allows physicians to be kept informed of the patient's condition. Who will use the ontology?
Potential users of this ontology are physicians and patients. What types of questions should the information in the ontology provide answers for?
The COPDology must provide answers to questions such as:

1.
What data should be collected to supervise the patient? 2.
How often should the patient take a measurement? 3.
Should the acquired data be transmitted to the healthcare site? 4.
How should the data be analyzed? 5.
Should an alarm be triggered according to the evaluation results? 6.
Which actions should be performed if an alarm is triggered?
Step 2: Ontology Reuse There is almost always the possibility an ontology has been modeled before from a third party that provides a useful starting point to be fully or partially reused. Reusing existing ontologies is necessary to save time and effort, to interact with the tools that use other ontologies or to exploit ontologies that have been validated through use in applications. For example, we can reuse ontology libraries (DAML and Ontolingua) or high-level ontologies such as general or domain-specific ontologies. Indeed, the ontological templates targeting remote monitoring of lung diseases is not well planned. Lasierra et al. [24] proposed an approach to provide clinical management at a personal level in home-based telemonitoring scenarios by developing an ontology-driven solution that enables a wide range of services such as core health indicators, real-time alerts, and medication reminders. Paganelli et al. [26] described an ontology-based context model and a related context management middleware providing a reusable and extensible application framework for monitoring and assisting patients at home. Mcheick et al. [61] proposed a context-aware system to derive relevant attributes and early detection of COPD exacerbations but their use of ontology was only to realize a general architecture of application.
Although there is poor ontological coverage of pulmonary diseases, there are many global references of terminologies for standardizing the storage, retrieval, and exchange of electronic health data that can be considered as a fundamental point of building our ontology, especially concerning the medical glossary. Adhering to shared knowledge principles in such kind of projects requires reusing the standard clinical and medical abbreviations and terminology. In this work, we reuse a wide range of terms provided in Systematized Nomenclature of Medicine Clinical Terms (SNOMED CT), and the Global Medical Device Nomenclature (GMDN). The terms that we used are explained in patient ontology paragraph (page 12).

Step 3: Development of a Conceptual Model
Enumerate key terms in the ontology: Enumerating important terms, such as needed nouns and verbs, is a crucial step to make statements or to explain the context. The nouns are divided into concepts, attributes or instances. Concepts are considered nouns standing on their own; attributes can describe the type of things, and instances are nouns of specific things. Then, verbs describe relations between nouns. Medical ontologies often use coding terminology standards to label values of clinic data items such as symptoms, diseases, drugs, and laboratory measurements. There are several coding systems that overlap highly but with varying degree of generality and specificity in coding terms such as Classes and class hierarchy definition: This step aims to classify the proposed concepts in a hierarchy as a form of a taxonomic architecture. This phase of ontology development starts vertically by defining classes which are selected to build COPDology. When the ontology has many elements, we must taxonomize the concepts. To achieve such a taxonomy, we can use one of the categorization methods. As we mentioned earlier, there are three different methods; we used a top-down approach to develop the class hierarchy, through representing the core concepts (main classes) and subclasses as classes in the COPDology. Classes (concepts) have a direct relation with patient needs to detect abnormal status and dangerous activity.
Class properties definition: Properties are used to describe the attributes or the relationships of the classes. There are four types of properties: (1) intrinsic, (2) extrinsic, (3) parts and (4) relationships to other individuals. Defining properties of classes is a requirement to realize the true value of ontology. Classes and their sub-classes do not provide sufficient information or rather do not have the ability to properly represent the relationship among the different elements. Practically, there are two types of properties: object properties and datatype properties. Object properties play important roles in connecting classes where the starting point class is called domain and the endpoint is called range. On the other hand, datatype properties only connect the concept to a specific value, for example, String, Integer, Boolean, etc.
Define the facet of slots: Slimani [62] defined the slot as a word that should be assigned to a class, for example, a name, a price, etc. The slot may have different kinds of facets that outline the value type, permitted values, cardinalities, and other features, which may be added as needed. In our COPDology, most of the slot values are String, Float, Integer, and Boolean.
Create instances: An instance is an individual of a class; defining an instance requires primarily choosing a class, creating an individual instance, and then filling in the slot values. Below is a small set of classes and their possible instances (Patient: John; Disease: COPD; Location: home). These Individuals are also interpreted as instances of classes. The information depicted for the individuals has been taken from medical guidelines and research papers of COPD domain.

Development of COPD Ontology domain
Chronic Obstructive Pulmonary Disease ontology (COPDology) is a model of specific medical domain collected from many research papers and relevant guidelines as well as information obtained from pneumologists that were interviewed and asked about care plans of COPD. This ontology contains concepts related to the disease, environment, equipment, patient data (personal information, symptoms, risk factors and clinical tests results) and treatment. The ontology was implemented with Protégé in OWL format. COPDology consists of 680 classes, 276 object properties, 310 datatype properties, 5000 instances and a set of inference rules that guide the diagnosis and risk assessment process. The knowledge base or COPDology that we provide in this work consists of a set of interrelated ontologies describing the physical and abstract objects in the domain scope. The ontologies we created to support the necessary health surveillance of COPD patient contain primarily patient, clinical status, devices, activities, environment, services, location, and disease. Figure 5 depicts these different ontologies including their distribution and their general relationships.

Patient ontology
The patient's ontology consists of three main branches: physical factors, psychological factors and the personal information of the patient. Physical factors refer to vital signs that have a direct relation with COPD. Recognizing these elements was not an easy task; we needed hours of research and meetings with lung specialists. The results of this effort are 15 key elements, namely temperature, heart rate, FEV1, PH Level, Paco2, BUN, sodium level, hematocrit, diastolic pressure, systolic pressure, oxygen saturation, respiration rate, body height, body weight, and glucose. For psychological factors, recent studies [1, 10] have confirmed that there is a proportional relationship between the deterioration of mental and physical conditions. The most prominent psychological states are depression, stress, and anxiety. As for the profile, it is limited to some personal information such as name, age, occupation, gender, race, nationality, telephone, address, and habits. In Table 3, we present some of the used classes with their corresponding codes in SNOMED CT. Due to some technical limitations, we only browse a general representation of the main components, as shown in Figure 6.

Patient ontology
The patient's ontology consists of three main branches: physical factors, psychological factors and the personal information of the patient. Physical factors refer to vital signs that have a direct relation with COPD. Recognizing these elements was not an easy task; we needed hours of research and meetings with lung specialists. The results of this effort are 15 key elements, namely temperature, heart rate, FEV1, PH Level, Paco2, BUN, sodium level, hematocrit, diastolic pressure, systolic pressure, oxygen saturation, respiration rate, body height, body weight, and glucose. For psychological factors, recent studies [1, 10] have confirmed that there is a proportional relationship between the deterioration of mental and physical conditions. The most prominent psychological states are depression, stress, and anxiety. As for the profile, it is limited to some personal information such as name, age, occupation, gender, race, nationality, telephone, address, and habits. In Table 3, we present some of the used classes with their corresponding codes in SNOMED CT. Due to some technical limitations, we only browse a general representation of the main components, as shown in Figure 6.  Table 4 lists some of the object and data properties that describe the patient's ontology. As we can see, each of these properties has its own characteristics that specify its domain and range.

Environment Ontology
Environmental factors have enormous potential to affect our body. COPD is one of the most sensitive diseases to the surrounding environment. The environmental factors that negatively affect COPD patients include ambient air, weather, and pollution. Ambient air is a gas mixture composed of N2 and O2, with extremely small quantities of CO2, argon and some inert gases [63], such as neon, hydrogen, methane, xenon, krypton, and helium. In general, the density of these gases can be changed by changing either the pressure or the temperature [64], which may pose significant risks to the respiratory system of patients. Furthermore, according to some statistical surveys [65,66], lung disease symptoms are widely affected by weather conditions such as extreme temperatures, humidity, pressure, and precipitation. For more comprehensiveness and precision in observation, we have added climate and type of weather. Figure 7 is a simple review of the most prominent elements in this ontology.  Table 4 lists some of the object and data properties that describe the patient's ontology. As we can see, each of these properties has its own characteristics that specify its domain and range.

Environment Ontology
Environmental factors have enormous potential to affect our body. COPD is one of the most sensitive diseases to the surrounding environment. The environmental factors that negatively affect COPD patients include ambient air, weather, and pollution. Ambient air is a gas mixture composed of N 2 and O 2 , with extremely small quantities of CO 2 , argon and some inert gases [63], such as neon, hydrogen, methane, xenon, krypton, and helium. In general, the density of these gases can be changed by changing either the pressure or the temperature [64], which may pose significant risks to the respiratory system of patients. Furthermore, according to some statistical surveys [65,66], lung disease symptoms are widely affected by weather conditions such as extreme temperatures, humidity, pressure, and precipitation. For more comprehensiveness and precision in observation, we have added climate and type of weather. Figure 7 is a simple review of the most prominent elements in this ontology.

Devices ontology
This ontology includes computing hardware devices such as Personal Digital Assistants (PDAs) and sensors. Basically, this ontology covers the mobile device used to collect and send data as well as all fixed and portable biomedical equipment used by the patients to monitor their vital signs in addition to environmental sensors to detect any change in the environment. Figure 8 shows the types of devices found in this ontology. Biomedical parameters are sensed by body thermometer, pulse oximeter, blood pressure monitor, weighing scale, body composition analyzer, peak flow, basic ECG, a respiration rate monitor, and accelerometer. The environmental information can be obtained by the thermometer, hygrometer, air quality sensors, barometer, and GPS.

Activity Ontology
Identifying the current activity of the patient adds more accuracy to the medical applications. In this context, it is important to know what physical activity a person is doing. It would also be useful to identify possible movements and places to be visited as well as the means used during such activities. Figure 9 provides a part of concepts and relations used to realize activity's ontology.

Devices ontology
This ontology includes computing hardware devices such as Personal Digital Assistants (PDAs) and sensors. Basically, this ontology covers the mobile device used to collect and send data as well as all fixed and portable biomedical equipment used by the patients to monitor their vital signs in addition to environmental sensors to detect any change in the environment. Figure 8 shows the types of devices found in this ontology. Biomedical parameters are sensed by body thermometer, pulse oximeter, blood pressure monitor, weighing scale, body composition analyzer, peak flow, basic ECG, a respiration rate monitor, and accelerometer. The environmental information can be obtained by the thermometer, hygrometer, air quality sensors, barometer, and GPS. 14 of 28

Devices ontology
This ontology includes computing hardware devices such as Personal Digital Assistants (PDAs) and sensors. Basically, this ontology covers the mobile device used to collect and send data as well as all fixed and portable biomedical equipment used by the patients to monitor their vital signs in addition to environmental sensors to detect any change in the environment. Figure 8 shows the types of devices found in this ontology. Biomedical parameters are sensed by body thermometer, pulse oximeter, blood pressure monitor, weighing scale, body composition analyzer, peak flow, basic ECG, a respiration rate monitor, and accelerometer. The environmental information can be obtained by the thermometer, hygrometer, air quality sensors, barometer, and GPS.

Activity Ontology
Identifying the current activity of the patient adds more accuracy to the medical applications. In this context, it is important to know what physical activity a person is doing. It would also be useful to identify possible movements and places to be visited as well as the means used during such activities. Figure 9 provides a part of concepts and relations used to realize activity's ontology.

Activity Ontology
Identifying the current activity of the patient adds more accuracy to the medical applications. In this context, it is important to know what physical activity a person is doing. It would also be Electronics 2018, 7, 371 15 of 29 useful to identify possible movements and places to be visited as well as the means used during such activities. Figure 9 provides a part of concepts and relations used to realize activity's ontology. 15 of 28 Figure 9. Part of activity ontology.

Location Ontology
Location is considered the backbones of all these sub-ontologies. Location awareness described in Figure 10 serves to determine the physical parameters to be measured, where relevant contextual information varies between indoor and outdoor space.

Disease ontology
To present personalized care suited to patient status, we need to understand the nature of the disease. This sub-ontology primarily aims to provide efficient administration of treatment. A disease ontology comprises type of illness, stage, treatment, risk factors, conditions and physical characteristics of the disease (see Figure 11).

Clinical status ontology
The ontology of clinical status contains the medical history of patients including physical exam findings, diagnostic test results, family diseases and medications that a patient has taken in the past or is currently taking. This ontology improves the performance of healthcare systems where it provides the ability for treatment to be monitored and achieve high-quality care. Figure 12 shows some fragments of this ontology.

Location Ontology
Location is considered the backbones of all these sub-ontologies. Location awareness described in Figure 10 serves to determine the physical parameters to be measured, where relevant contextual information varies between indoor and outdoor space.

Location Ontology
Location is considered the backbones of all these sub-ontologies. Location awareness described in Figure 10 serves to determine the physical parameters to be measured, where relevant contextual information varies between indoor and outdoor space.

Disease ontology
To present personalized care suited to patient status, we need to understand the nature of the disease. This sub-ontology primarily aims to provide efficient administration of treatment. A disease ontology comprises type of illness, stage, treatment, risk factors, conditions and physical characteristics of the disease (see Figure 11).

Clinical status ontology
The ontology of clinical status contains the medical history of patients including physical exam findings, diagnostic test results, family diseases and medications that a patient has taken in the past or is currently taking. This ontology improves the performance of healthcare systems where it provides the ability for treatment to be monitored and achieve high-quality care. Figure 12 shows some fragments of this ontology.

Disease ontology
To present personalized care suited to patient status, we need to understand the nature of the disease. This sub-ontology primarily aims to provide efficient administration of treatment. A disease ontology comprises type of illness, stage, treatment, risk factors, conditions and physical characteristics of the disease (see Figure 11).

Location Ontology
Location is considered the backbones of all these sub-ontologies. Location awareness described in Figure 10 serves to determine the physical parameters to be measured, where relevant contextual information varies between indoor and outdoor space.

Disease ontology
To present personalized care suited to patient status, we need to understand the nature of the disease. This sub-ontology primarily aims to provide efficient administration of treatment. A disease ontology comprises type of illness, stage, treatment, risk factors, conditions and physical characteristics of the disease (see Figure 11).

Clinical status ontology
The ontology of clinical status contains the medical history of patients including physical exam findings, diagnostic test results, family diseases and medications that a patient has taken in the past or is currently taking. This ontology improves the performance of healthcare systems where it provides the ability for treatment to be monitored and achieve high-quality care. Figure 12 shows some fragments of this ontology.

Clinical status ontology
The ontology of clinical status contains the medical history of patients including physical exam findings, diagnostic test results, family diseases and medications that a patient has taken in the past or is currently taking. This ontology improves the performance of healthcare systems where it provides the ability for treatment to be monitored and achieve high-quality care. Figure 12 shows some fragments of this ontology. 16

Service ontology
Essentially, this ontology-based model is designed to provide services and interact with patients to control precarious or suspicious situations. Hence, a service is considered a major component of the proposed ontology. These medical services are divided into three basic services: monitoring, triggering alarms and recommendation ( Figure 13). Step 4: Implementation The development of ontologies in the medical world is a complex task that requires considerable effort and collaboration between health care professionals and ontology engineers. Clinical decision support necessarily needs methods that verify the correct representation of activities in terms of effects and ontological responses. For knowledge representation, the tools and techniques are essential to support design work. The implementation and the validation of the logical and structural aspects of ontology can be automatically realized with specialized tools. Protégé is one of the bestknown open source editors to develop ontologies [67]. Protégé has been distributed originally for biomedical informatics research at the Stanford University School of Medicine. This tool is specifically dedicated to the OWL but it is a highly extensible editor, capable of handling a wide variety of formats [67]. Our ontology was formalized using OWL DL because it is highly expressive and thus we can apply all standard automatic reasoning techniques. Protégé contains built-in reasoners such as FaCT++, Pellet, HermiT, ELK, jcel, Ontop, Mastro and RACER used for describing logic. Choosing a good reasoner is also an essential step towards delivering an effective ontological framework. Abburu [68] conducted a comparison between some of the popular reasoners developed in the last few years. This survey describes these reasoners with their important features such as completeness, expressivity, native profile, incremental classification, rule support, platforms, justifications, ABOX reasoning, OWL API, protégé support, Jena support, etc. Abburu [68] explains four types of reasoners that may support rules: RACER, Peller, Hermit, and ELK. Racer does not support Jena and is commercial. Hermit does not present explanations for the inconsistency that exists in the ontologies and cannot work with Jena API. ELK is a reasoner for OWL 2 EL ontologies, which is not the case of this project. Based on the previous assessment, we used Pellet in our ontology.

Service ontology
Essentially, this ontology-based model is designed to provide services and interact with patients to control precarious or suspicious situations. Hence, a service is considered a major component of the proposed ontology. These medical services are divided into three basic services: monitoring, triggering alarms and recommendation ( Figure 13).

Service ontology
Essentially, this ontology-based model is designed to provide services and interact with patients to control precarious or suspicious situations. Hence, a service is considered a major component of the proposed ontology. These medical services are divided into three basic services: monitoring, triggering alarms and recommendation ( Figure 13). Step 4: Implementation The development of ontologies in the medical world is a complex task that requires considerable effort and collaboration between health care professionals and ontology engineers. Clinical decision support necessarily needs methods that verify the correct representation of activities in terms of effects and ontological responses. For knowledge representation, the tools and techniques are essential to support design work. The implementation and the validation of the logical and structural aspects of ontology can be automatically realized with specialized tools. Protégé is one of the bestknown open source editors to develop ontologies [67]. Protégé has been distributed originally for biomedical informatics research at the Stanford University School of Medicine. This tool is specifically dedicated to the OWL but it is a highly extensible editor, capable of handling a wide variety of formats [67]. Our ontology was formalized using OWL DL because it is highly expressive and thus we can apply all standard automatic reasoning techniques. Protégé contains built-in reasoners such as FaCT++, Pellet, HermiT, ELK, jcel, Ontop, Mastro and RACER used for describing logic. Choosing a good reasoner is also an essential step towards delivering an effective ontological framework. Abburu [68] conducted a comparison between some of the popular reasoners developed in the last few years. This survey describes these reasoners with their important features such as completeness, expressivity, native profile, incremental classification, rule support, platforms, justifications, ABOX reasoning, OWL API, protégé support, Jena support, etc. Abburu [68] explains four types of reasoners that may support rules: RACER, Peller, Hermit, and ELK. Racer does not support Jena and is commercial. Hermit does not present explanations for the inconsistency that exists in the ontologies and cannot work with Jena API. ELK is a reasoner for OWL 2 EL ontologies, which is not the case of this project. Based on the previous assessment, we used Pellet in our ontology. Step 4: Implementation The development of ontologies in the medical world is a complex task that requires considerable effort and collaboration between health care professionals and ontology engineers. Clinical decision support necessarily needs methods that verify the correct representation of activities in terms of effects and ontological responses. For knowledge representation, the tools and techniques are essential to support design work. The implementation and the validation of the logical and structural aspects of ontology can be automatically realized with specialized tools. Protégé is one of the best-known open source editors to develop ontologies [67]. Protégé has been distributed originally for biomedical informatics research at the Stanford University School of Medicine. This tool is specifically dedicated to the OWL but it is a highly extensible editor, capable of handling a wide variety of formats [67]. Our ontology was formalized using OWL DL because it is highly expressive and thus we can apply all standard automatic reasoning techniques. Protégé contains built-in reasoners such as FaCT++, Pellet, HermiT, ELK, jcel, Ontop, Mastro and RACER used for describing logic. Choosing a good reasoner is also an essential step towards delivering an effective ontological framework. Abburu [68] conducted a comparison between some of the popular reasoners developed in the last few years. This survey describes these reasoners with their important features such as completeness, expressivity, native profile, incremental classification, rule support, platforms, justifications, ABOX reasoning, OWL API, protégé support, Jena support, etc. Abburu [68] explains four types of reasoners that may support rules: RACER, Peller, Hermit, and ELK. Racer does not support Jena and is commercial. Hermit does not present explanations for the inconsistency that exists in the ontologies and cannot work with Jena API. ELK is a reasoner for OWL 2 EL ontologies, which is not the case of this project. Based on the previous assessment, we used Pellet in our ontology.
Step 5: Evaluation of COPDology There are many ontology evaluation methods such as those proposed by Jonathan [69], Pérez et al. [70] and Lovrenčić et al. [71]. These studies present robust approaches for ontology evaluation based on criteria and measures or metrics. The authors defined the evaluation criteria as general qualities for making a technical judgment of the content [69]. These criteria include consistency, classification, completeness, conciseness, expandability, and sensitiveness. In contrast, the authors found that ontology evaluation measures are primarily oriented towards the structural aspects.

Ontology Evaluation Criteria
Criteria evaluation was performed on our ontology, with the following results: Consistency: This refers to evaluating the logical consistency of an ontology by checking invariants [70]. Running the automatic consistency reasoner check proves that COPDology is consistent and coherent; there is no inferred conflicting knowledge from other definitions, axioms, and formal definitions, and no contradictory knowledge can be inferred from all definitions and axioms.
Classification: It is one of the most important reasoning services provided by all OWL reasoners. Ontology classification means computing all entailed class subsumptions between named classes [72]. Unfortunately, when an ontology evolves or even slightly modified, the reasoners repeat the whole reasoning process. For large and complex ontologies, this might take a considerable amount of time [73]. For some purposes, the reasoner should be executed often, and then time response becomes a critical issue. Wang et al. [74] suggested reducing disjoint statements that may cause performance problems, as this may restrict the reasoner too much. In this project, our result was reasonable, where the total classification time in Pellet was 26,849 ms which is near real-time and therefore the reasoner could be working transparently without slowing down the response.
Completeness: An ontology is called complete if all the stated information is explicitly defined or can be inferred from other definitions and axioms [71]. In terms of design features and providing sufficient information to answer the competency questions, COPDology is complete, but since some information related to lung diseases is difficult to obtain due to lack of studies, this application ontology is not complete, as it does not provide comprehensive medical service of all aspects of a patient's life.
Conciseness: This attribute determines whether an ontology has redundant terms. In this work, we reduced the size of the representation as much as possible to avoid having any unnecessary concepts, whether explicit redundancies or implicit redundancies (inferred). Therefore, COPDology is concise.
Expandability: It is an indicator that ontology is smoothly expandable without significant modifications in the case of adding new knowledge to existing structures [71]. Development of COPDology showed that hierarchy of core concepts does not have to be considerably altered. The division of the representation field in several parts promotes the expansion of the ontology. Practically, modification or creation of new classes and axioms does not influence other parts, which means that this ontology was built with expansion capabilities.
Sensitiveness: An ontology is considered sensitive if minimal changes in definition affect directly a set of coherent concepts and well-defined relations [71]. As explained above, alteration of a set of concepts or adding new definitions does not influence other axioms and classes, therefore COPDology is not sensitive.

Ontology Evaluation Measures
This type of evaluation focuses on the complexity and formality of structure by respecting three basic levels: vocabulary level, taxonomy level, and nontaxonomic level [75][76][77]. The purpose of the evaluation is to estimate the internal maturity level of the ontologies. In this context, Zhang [78,79] proposed a set of metrics to measure the ontology complexity on both class and ontology levels through combinations of dimensional characteristics.
Ontology-level evaluation Srinivasulu et al. [80] suggested four ontology-level metrics to describe the complexes of an ontology on holistic intention: size of vocabulary, edge node ratio, tree impurity and entropy of graph.

1.
Size of vocabulary (SOV): This metric includes the total number of created classes, instances and properties in the ontology; the SOV is defined as: where C n| represents the number of named classes, while |P| and |I n | are the number of properties and instances, respectively [79].

2.
Edge node ratio (ENR): ENR represents the connectivity density which increases proportionally with the increment of the number of edges between nodes (classes and individuals). ENR is measured as follows: where the number of edges |E| is divided by the number of nodes |N| .

Tree impurity (TIP):
This indicator is mainly used to discover how far an ontology inheritance hierarchy digresses from a tree; the TIP is measured as in Equation (3): where R and C represent the suite of relations and concepts in the inheritance hierarchy, respectively.

Entropy of ontology graph (EOG):
This norm is an indicator of the graph complexity [80]. It is calculated directly by the application of the logarithm function to a probability distribution over the ontology graph: where p(i) represents the probability mass function for a concept to have i relations. Arithmetically, p(i) can be calculated for each vertex (concepts) in the ontology graph by dividing the degree of the vertex (i.e., properties) connected to that concept over the sum of all degrees of V vertices: Typically, designers compare their ontology against a "gold standard" which is considered to serve as a reference. The metrics values presented in Figure 14 belong to some well-constructed ontologies [81][82][83]. The SOV of COPDology exceeds 5000 of components constituted from huge sets of concepts, parameters, patient medical records, etc. Therefore, it would be very useful for semantic developers, specifically those interested in the biomedical domain, to reuse this ontology rather than try to build a new ontology for COPD from scratch. On the other hand, the ontologies with large vocabularies would require a considerable amount of time and effort to build and maintain [84]. The edge node ratio (ENR) value is somehow higher than normal, which means that our ontology is complex and needs further modularization to minimize the effort required for understanding and management. The TIP is a rational indicator of how well an ontology is organized through inheritance relationships. A TIP = 0 indicates the inheritance hierarchy graph is structured as a tree. The higher is the TIP, the greater does the ontology inheritance hierarchy drift away from the rooted tree, thus the greater is its complexity. The total value of our COPDology TIP reaches 4, which means that this inheritance hierarchy deviated relatively from the traditional shape of the tree. The last metric in this level is the entropy of ontology graph (EOG), where 0 corresponds to the least value of EOG when classes have the same distribution of relations, which can only be obtained if all nodes of the ontology sub-graphs have equal number of edges. The practical interpretation of small EOG is indicative of less complex ontology in terms of relation distribution [85]. The EOG of COPDology is almost 1.5, thus it has relatively good structure.

of 28
less complex ontology in terms of relation distribution [85]. The EOG of COPDology is almost 1.5, thus it has relatively good structure.

Class level evaluation
Zakaria [76] combined eight metric functions to measure complexness at class-level. These metrics are the number of classes, number of inheritances, number of properties, number of root classes, average population, class richness, relationship richness, and inheritance richness.

Number of classes (NOC):
The NOC metric is simply a count of the defined classes in the ontology [85].

Number of instances (NOI):
The NAO criterion is a census of the instances created in the ontology.

Number of properties (NOP):
As its name implies, NOP is the number of properties found in an ontology [84]

Number of root classes (NORC):
This metric corresponds to the number of non-rooted classes or the concepts that do not have super-classes in their upper layer. Let us consider C the classes in ontology:

Average Population (AP):
This variable measures the mean distribution of instances across all classes. Theoretically, AP is defined as follow: According to the rules set [80], this metric has been proposed as an indication of whether there is sufficient information in the ontology.

Class level evaluation
Zakaria [76] combined eight metric functions to measure complexness at class-level. These metrics are the number of classes, number of inheritances, number of properties, number of root classes, average population, class richness, relationship richness, and inheritance richness.

Number of classes (NOC):
The NOC metric is simply a count of the defined classes in the ontology [85].

Number of instances (NOI):
The NAO criterion is a census of the instances created in the ontology.

3.
Number of properties (NOP): As its name implies, NOP is the number of properties found in an ontology [84].

Number of root classes (NORC):
This metric corresponds to the number of non-rooted classes or the concepts that do not have super-classes in their upper layer. Let us consider C the classes in ontology:

Average Population (AP):
This variable measures the mean distribution of instances across all classes. Theoretically, AP is defined as follow: According to the rules set [80], this metric has been proposed as an indication of whether there is sufficient information in the ontology.

Class Richness (CR):
This value is the ratio between the number of non-empty classes that have instances C and the total number of classes. CR percentage give us an idea of how many instances are related to classes defined in the graph.

Relationship Richness (RR):
This metric represents the number of relationships divided by the sum of the number of subclasses and the number of relationships [80]: where |P| is considered the overall count of relationships and |SC| is the tally of subclasses or the number of inheritance relationships.

8.
Inheritance richness (IR): The IR describes the distribution of knowledge overall levels of the ontology's inheritance tree. The inheritance richness of the schema (IRs) is known as the average number of subclasses per class. Formally, this value is calculated from the equation: Table 5 summarizes the class-level evaluation of our COPDology. NOC and NOI were quite high at 180 and 4000 respectively. The number of properties in the NOP indicates a strong reasoning system [85]. As mentioned above, the NORC is the number of root classes in the COPDology. The higher is the NORC value, more diverse is the ontology [84]. COPDology has a high NORC value, existing of 12 root classes is a proof that this ontology has a large structure. The high AP value (AP = 6.5) is a good indication that COPDology has sufficient information to query data from the built framework. Since AP and CR are correlated, it is obvious that our ontology achieved only 0.80 for the CR metric. Therefore, this indicates that the majority of the ontology classes have instances. Usually, an ontology that contains many descriptive relationships or non-typical relationships such as class-subclass is richer than taxonomies that have a category-subcategory hierarchy. In this work, the COPDology is very rich in COPD content where its RR arrived at the threshold of 0.4. The inheritance richness has been proposed to distinguish a horizontal ontology from a vertical ontology. COPDology has high IR which might reflect vertical nature and a very detailed type of knowledge. In this section, we have present twelve metrics to examine the maturity of COPDology. Clearly, such interpretation proves that our ontology is mature and valid to be reused and extended.

Processing and Reasoning Layer
The proposed system aims to detect adverse potential events that influence COPD patient. Many types of contextual information cannot be easily inferred [86]. Ontologies are made to represent real-world knowledge using OWL, while the complex problem situations need additional description techniques. Our ontologies are extended with medically defined rules. These reasoning rules were formulated in the Semantic Web Rule Language (SWRL) to express all required statements. SWRL is an expert-level solution or an adaptation for rule-based systems in the semantic web domain. SWRL rules are given formal style where the antecedent of a conditional and concluding its consequent is a validating form of a statement. The combination of OWL and SWRL for automatic reasoning has been used in the medical domain by several projects [87][88][89]. In this project, the COPD rules are specialized for each patient according to the existing guidelines followed in Canada and the expert pneumologists. The assessment requires focusing on patient history, physical examination, food, medication, mental status, environmental conditions, and current activity. Practically, these rules detect if an adverse event occurs, and may predict the potential risk when the measurements coming from the connected objects exceed the safety concern thresholds. In this section, we intend to outline a framework for reasoning process, which we consider as the method of making some implicit information explicitly available. We perceive the process of reasoning as an interrelated sequence of steps, dubbed the "a cyclical detection process" (Figure 15).

of 28
In this section, we intend to outline a framework for reasoning process, which we consider as the method of making some implicit information explicitly available. We perceive the process of reasoning as an interrelated sequence of steps, dubbed the "a cyclical detection process" (Figure 15).

Patient Chart Label
In the medical dictionary, there are several types of patients. The health profile of the patient is a simple format that allows physicians to keep track of health information history of patients as an indicator of their functional status. In this work, evaluation of a patient's profile is important for molding the degree of susceptibility to various external irritants of COPD. This assessment is translated by the machine as patient chart labels which have been classified medically as low, moderate, severe or high severity. In practice, the classification of severity of COPD is based on responses to some typical questions and the medical profile that comprise five miscellaneous domains which contain the degree of respiratory symptoms such as dyspnea on exertion, types of medications, therapeutic supplements and previous hospitalization. Miravitlles et al. [90] stated that the possible COPD severity score ranges between 0 and 35, where higher scores would correlate with the more severe health status of COPD. Figure 16 shows a small part of the patient profile severity calculator process using SWRL rule to count the respiratory symptoms score.

Patient Chart Label
In the medical dictionary, there are several types of patients. The health profile of the patient is a simple format that allows physicians to keep track of health information history of patients as an indicator of their functional status. In this work, evaluation of a patient's profile is important for molding the degree of susceptibility to various external irritants of COPD. This assessment is translated by the machine as patient chart labels which have been classified medically as low, moderate, severe or high severity. In practice, the classification of severity of COPD is based on responses to some typical questions and the medical profile that comprise five miscellaneous domains which contain the degree of respiratory symptoms such as dyspnea on exertion, types of medications, therapeutic supplements and previous hospitalization. Miravitlles et al. [90] stated that the possible COPD severity score ranges between 0 and 35, where higher scores would correlate with the more severe health status of COPD. Figure 16 shows a small part of the patient profile severity calculator process using SWRL rule to count the respiratory symptoms score. moderate, severe or high severity. In practice, the classification of severity of COPD is based on responses to some typical questions and the medical profile that comprise five miscellaneous domains which contain the degree of respiratory symptoms such as dyspnea on exertion, types of medications, therapeutic supplements and previous hospitalization. Miravitlles et al. [90] stated that the possible COPD severity score ranges between 0 and 35, where higher scores would correlate with the more severe health status of COPD. Figure 16 shows a small part of the patient profile severity calculator process using SWRL rule to count the respiratory symptoms score.

Patient Location Detector
Accurate identification of location gives patients a chance to get tailored healthcare services because the precaution process differs depending on whether the patient is indoors or outdoors. For example, based on patient location tracking, we can determine the environmental factors to be measured and the sensors to be operated. This automatic control system is often tied to the general geographical position such as a home, office or frequently visited places. The Global Positioning System (GPS) detects longitude, latitude, and altitude but is more effective in outdoor environments. Technological progress has enabled highly-precise position detection in both indoors and outdoors using wireless networks such as radio-frequency identification (RFID) that could improve the location detection system within buildings. Practically, SWRL can be used to deal with such complex contexts. Let us consider a scenario where this system is trying to find if a patient is located at home. Our solution is based on the expansion of the location's ontology by adding an indoor localization support using semantic RFID-tag infrastructure. Indoor positioning system can determine the presence of patient at home when the RFID-tag enters the detection coverage range administered by an RFID reader. The location module may track the mobility of patients within the home by referring to the reader's current location if needed. Doing this requires intervention from SWRL rules. In such a case, the rule used to identify the patient's location could be expressed as shown in Figure 17.

Patient Location Detector
Accurate identification of location gives patients a chance to get tailored healthcare services because the precaution process differs depending on whether the patient is indoors or outdoors. For example, based on patient location tracking, we can determine the environmental factors to be measured and the sensors to be operated. This automatic control system is often tied to the general geographical position such as a home, office or frequently visited places. The Global Positioning System (GPS) detects longitude, latitude, and altitude but is more effective in outdoor environments. Technological progress has enabled highly-precise position detection in both indoors and outdoors using wireless networks such as radio-frequency identification (RFID) that could improve the location detection system within buildings. Practically, SWRL can be used to deal with such complex contexts. Let us consider a scenario where this system is trying to find if a patient is located at home. Our solution is based on the expansion of the location's ontology by adding an indoor localization support using semantic RFID-tag infrastructure. Indoor positioning system can determine the presence of patient at home when the RFID-tag enters the detection coverage range administered by an RFID reader. The location module may track the mobility of patients within the home by referring to the reader's current location if needed. Doing this requires intervention from SWRL rules. In such a case, the rule used to identify the patient's location could be expressed as shown in Figure 17.

Patient Activity Detector
We believe that this unit can play the most important role of the real monitoring system, which differentiates this system from its counterparts. This module is designed to identify activities with direct and indirect physical effects. Researchers in the field of human health [91] and lung diseases

Patient Activity Detector
We believe that this unit can play the most important role of the real monitoring system, which differentiates this system from its counterparts. This module is designed to identify activities with direct and indirect physical effects. Researchers in the field of human health [91] and lung diseases [92] confirm that vital signs influenced by certain factors especially physical activity, which includes routine everyday life such as work, sports, transportation, eat, rest, etc., since each of these biological parameters has its normal range according to the type of activity performed. Physical activities were classified as light, moderate and vigorous based on the intensity of physical effort measured in metabolic equivalents [93]. Another feature of this system is the assessment of scheduled activities where the knowledge base will determine the seriousness of daily planned events. Activity recognition is a thorny task that needs to combine many techniques. In this work, we applied a hybrid approach to recognize activities of patients more precisely using machine learning with spatial and temporal ontology structures supported with SWRL ( Figure 18).
Unfortunately, we cannot fully describe the process, thus merely explain the outline. For further details please refer to [61].

Risk Factors Detector
The management of risk should be based on three major interrelated entities: (1) the subject of risk, which symbolizes the target to be monitored (patient and environment); (2) conditions that comprise medical profile, location and time; and (3) the event that includes activity and the change of status, either in the physiological parameters of patient or in the environment.
An example of risk recognition reasoning based on SWRL rule is presented in the flowchart below ( Figure 19). This example illustrates a further explanation of risk management solutions which is based on risk components that we mentioned above (the subject of risk, conditions, and event). Patient "A" from Profile Category 1 has abnormal respiratory rates. In addition, the patient is detected as running outdoors. According to the proposed method, the patient is classified as a subject of risk and his health profile category and location are classified as a condition, while the "Running" activity is linked with event risk class. Then, the risk situation is recognized, in this case, the rule refers that there is no serious risk where the breathing rates during jogging increase from a typical resting rate.

Risk Factors Detector
The management of risk should be based on three major interrelated entities: (1) the subject of risk, which symbolizes the target to be monitored (patient and environment); (2) conditions that comprise medical profile, location and time; and (3) the event that includes activity and the change of status, either in the physiological parameters of patient or in the environment.
An example of risk recognition reasoning based on SWRL rule is presented in the flowchart below ( Figure 19). This example illustrates a further explanation of risk management solutions which is based on risk components that we mentioned above (the subject of risk, conditions, and event). Patient "A" from Profile Category 1 has abnormal respiratory rates. In addition, the patient is detected as running outdoors. According to the proposed method, the patient is classified as a subject of risk and his health profile category and location are classified as a condition, while the "Running" activity is linked with event risk class. Then, the risk situation is recognized, in this case, the rule refers that there is no serious risk where the breathing rates during jogging increase from a typical resting rate.
Patient "A" from Profile Category 1 has abnormal respiratory rates. In addition, the patient is detected as running outdoors. According to the proposed method, the patient is classified as a subject of risk and his health profile category and location are classified as a condition, while the "Running" activity is linked with event risk class. Then, the risk situation is recognized, in this case, the rule refers that there is no serious risk where the breathing rates during jogging increase from a typical resting rate.

Medical Services
Medical services should be the real essence of this work. This system aims to provide two main types of services: safety services and the assessment of treatment. For safety services, usually, each situation has its own risk level, therefore, not all risks should be treated in the same way. The risk can be divided into different types of risks that should be associated with the appropriate action and recommendation. Table 6 shows the risk and their degrees in addition to their corresponding services. Table 6. Services and recommendations.

Degree
Example Service Recommendation

Low
Room temperature is one degree lower than the ideal indoor temperature

Notification message
The ambient temperature is out of range

Mild
Patient intends to make a mountain trip to a high altitude (6000 feet above sea level)

Warning message
You need an oxygen mask and winter clothing.

Moderate
Air quality index rises above 151 Alert doctor -

Severe
Fever; increase in wheezes, an increase in coughing, increase in heart rate ≥ 20% Call the emergency services -

Conclusions
In this work, we developed a decision support system to create safe environments for COPD patients based on ontological formal description of a health-related domain that uses SWRL rules. The proposed ontology contains all relevant concepts related to chronic obstructive pulmonary disease, including personal information of patient, localization, activity, symptoms, risk factors, laboratory examination results, and treatment plan. SWRL rules are constructed from the medical guidelines, research and independent expert opinions to estimate the risk of COPD exacerbation. Based on these findings, an extension of this work is needed to describe the proposed system that can be used by physicians and patients to manage the life of people suffering from chronic disease. Furthermore, we will strive toward practical uses of such systems, as it can help to improve COPD patients' ability to engage in self-management. In this respect, it should also be noted that the model can be expanded by applying this approach to other chronic diseases.