**3. Design and implementation**

#### **3.1 First scenario**

Requirement planning, in the system requirement: the system can select for user data search purposes, and the system can do searching or filtering to find the right data. In data requirement: All data were from the *Diagnostic and Statistical Manual of Mental Disorders Fifth Edition*, which was created by a selection of selected psychiatrists from the American Psychiatric Association. In this study, only a limited part of the depressive disorder and diagnostic criteria in it.

Depressive disorder is the presence of sad, empty, or irritable mood, accompanied by physical and cognitive changes that impact function [10]. Based on that, we can categorize it into eight types: Someone who has disruptive mood dysregulation disorder does not experience depressed mood, but becomes more irritable and more sensitive, often has problems with his mood, has experienced symptoms for more than 12 months, is not affected by drugs, has never had medical treatment, is not coming month (for women), and does not have other psychological diagnoses. Also, the person exhibits persistent irritability and frequent episodes of extreme verbal and behavioral dyscontrol toward people or property out of proportion to the situation and is inconsistent with developmental level occurring on average three or more times per week. Someone who has major depressive disorder experiences depressed mood, does not become more irritable and more sensitive, often has problems with his mood, has experienced symptoms for more than 2 weeks, is not under the influence of drugs, has never had medical treatment, is not coming month (for women), and does not have other psychological diagnoses. Someone who has persistent depressive disorder experiences depressed mood, does not become more irritable or more sensitive, often has problems with his mood, has experienced symptoms for more than 2 years, is not under the influence of drugs, has never had medical treatment, is not coming month (for women), and does not have other psychological diagnoses. Someone who has premenstrual dysphoric disorder experiences depressed mood, becomes more irritable or more sensitive, often has problems with his mood, does not know when to start feeling the problem, is not under the influence of drugs, has never had medical treatment, is on the moon (for women), and does not have other psychological diagnoses. In all of the cycles, symptoms present in the final week before menses, start to improve within a few days after onset, and become minimal or absent in the week postmenses. Someone who has substance-/medication-induced depressive disorder experiences depressed mood, does not become more irritable or more sensitive, often has problems in his mood, has experienced symptoms for more than 1 month, is in the influence of drugs, is undergoing medical treatment, does not have moderate menstruation (for women), and does not have other psychological diagnoses. Someone who has depressive disorder due to another medical condition experiences depressed mood, does not become more irritable and more sensitive, often has problems with his mood, does not know when to start feeling the problem, is not influenced by drugs, has undergone medical treatment, is not having menstruation (for women), and does not have other psychological diagnoses. Someone who has other specified disorder and unspecified depressive disorder experiences depressed mood, becomes *An Ontology-Based Approach to Diagnosis and Classification for an Expert System in Health… DOI: http://dx.doi.org/10.5772/intechopen.88180*

more irritable or more sensitive, rarely has problems with his mood, has experienced symptoms within a period of time but not daily, is not influenced by drugs, has never had medical treatment, is not having a period (for women), and maybe having another psychological diagnosis.

**Table 1** shows the choice of whether the user experiences a depressed mood. Depressed mood includes poor appetite or overeating, insomnia or hypersomnia, low energy or fatigue, low self-esteem, difficulty in concentrating or difficulty in making decisions, despair, and anxiety.

In **Table 2**, the more the user is accessible to anger means the user is more accessible to emotion than he should. It is easier to get angry because he is more sensitive to ordinary things.

**Table 3** shows the problem in the mood is divided into three, such as, all the time which means the problem in the mood is experienced at any time; often which means the problem in the mood is experienced almost every day, but not every time; while rarely can mean the problem in the mood is only experienced occasionally and not necessarily every day, or only at certain times.

**Table 4** describes the effect of narcotics on users. If a user is a drug user when feeling symptoms of depressive disorder, then the user may be included in substance-/medication-induced depressive disorder or even not included in any depressive disorder.

Medical treatment can be seen in **Table 5**. If the user is undergoing treatment, there is a possibility that the user will enter into substance-/medication-induced depressive disorder, or if the user has undergone treatment, there is a possibility


#### **Table 1.**

3. Implementation phase

**3. Design and implementation**

**3.1 First scenario**

**50**

At this stage, the results will be translated into the appropriate programming

Requirement planning, in the system requirement: the system can select for user data search purposes, and the system can do searching or filtering to find the right data. In data requirement: All data were from the *Diagnostic and Statistical Manual of Mental Disorders Fifth Edition*, which was created by a selection of selected psychiatrists from the American Psychiatric Association. In this study, only a

Depressive disorder is the presence of sad, empty, or irritable mood, accompanied by physical and cognitive changes that impact function [10]. Based on that, we can categorize it into eight types: Someone who has disruptive mood dysregulation disorder does not experience depressed mood, but becomes more irritable and more sensitive, often has problems with his mood, has experienced symptoms for more than 12 months, is not affected by drugs, has never had medical treatment, is not coming month (for women), and does not have other psychological diagnoses. Also, the person exhibits persistent irritability and frequent episodes of extreme verbal and behavioral dyscontrol toward people or property out of proportion to the situation and is inconsistent with developmental level occurring on average three or more times per week. Someone who has major depressive disorder experiences depressed mood, does not become more irritable and more sensitive, often has problems with his mood, has experienced symptoms for more than 2 weeks, is not under the influence of drugs, has never had medical treatment, is not coming month (for women), and does not have other psychological diagnoses. Someone who has persistent depressive disorder experiences depressed mood, does not become more irritable or more sensitive, often has problems with his mood, has experienced symptoms for more than 2 years, is not under the influence of drugs, has never had medical treatment, is not coming month (for women), and does not have other psychological diagnoses. Someone who has premenstrual dysphoric disorder experiences depressed mood, becomes more irritable or more sensitive, often has problems with his mood, does not know when to start feeling the problem, is not under the influence of drugs, has never had medical treatment, is on the moon (for women), and does not have other psychological diagnoses. In all of the cycles, symptoms present in the final week before menses, start to improve within a few days after onset, and become minimal or absent in the week postmenses. Someone who has substance-/medication-induced depressive disorder experiences depressed mood, does not become more irritable or more sensitive, often has problems in his mood, has experienced symptoms for more than 1 month, is in the influence of drugs, is undergoing medical treatment, does not have moderate menstruation (for women), and does not have other psychological diagnoses. Someone who has depressive disorder due to another medical condition experiences depressed mood, does not become more irritable and more sensitive, often has problems with his mood, does not know when to start feeling the problem, is not influenced by drugs, has undergone medical treatment, is not having menstruation (for women), and does not have other psychological diagnoses. Someone who has other specified disorder and unspecified depressive disorder experiences depressed mood, becomes

language and then be tested before being disseminated.

*Ontological Analyses in Science,Technology and Informatics*

limited part of the depressive disorder and diagnostic criteria in it.

*Depressed mood.*


**Table 2.** *Easy to get angry.*

#### *Ontological Analyses in Science,Technology and Informatics*


long ago for those who experience infrequently, or do not know, because they feel

*An Ontology-Based Approach to Diagnosis and Classification for an Expert System in Health…*

chological diagnosis, then maybe the user is included in other specified

 Disruptive mood dysregulation disorder No Major depressive disorder No Persistent depressive disorder (dysthymia) No Premenstrual dysphoric disorder Yes Substance/medication-induced depressive disorder No Depressive disorder due to another medical condition No Other specified depressive disorder No Unspecified depressive disorder No

**Table 8** describes that one of the main requirements in depressive disorder is not having another psychological diagnosis. Several other mental disorders have characteristics similar to depressive disorder; if the user feels that he has another psy-

**Number Disorder name In the menstruation time**

**Number Disorder name How long** Disruptive mood dysregulation disorder 12 months Major depressive disorder 2 weeks Persistent depressive disorder (dysthymia) 2 years Premenstrual dysphoric disorder Do not know Substance/medication-induced depressive disorder 1 month Depressive disorder due to another medical condition Do not know Other specified depressive disorder Not long ago Unspecified depressive disorder Not long ago

**Number Disorder name Have other diagnoses**

 Disruptive mood dysregulation disorder No Major depressive disorder No Persistent depressive disorder (dysthymia) No Premenstrual dysphoric disorder No Substance/medication-induced depressive disorder No Depressive disorder due to another medical condition No

7 Other specified depressive disorder Could have 8 Unspecified depressive disorder Could have

they have enough old but only certain moments.

*DOI: http://dx.doi.org/10.5772/intechopen.88180*

**Table 6.**

**Table 7.** *How long.*

**Table 8.**

**53**

*Have other psychological diagnosis.*

*In the menstruation time.*

#### **Table 3.** *Mood problem.*


#### **Table 4.** *The influence of drugs.*


#### **Table 5.** *Medical treatment.*

that the user will enter into depressive disorder due to another medical condition, or even depressive disorder.

**Table 6** is only for women, and if it meets the criteria, there is a possibility that the user includes premenstrual dysphoric disorder, but it may not be included in any depressive disorder.

**Table 7** has shown the length of time for how long a person experiences symptoms of depressive disorder, starting from 2 weeks, 1 month, 12 months, 2 years, not

#### *An Ontology-Based Approach to Diagnosis and Classification for an Expert System in Health… DOI: http://dx.doi.org/10.5772/intechopen.88180*

long ago for those who experience infrequently, or do not know, because they feel they have enough old but only certain moments.

**Table 8** describes that one of the main requirements in depressive disorder is not having another psychological diagnosis. Several other mental disorders have characteristics similar to depressive disorder; if the user feels that he has another psychological diagnosis, then maybe the user is included in other specified


#### **Table 6.** *In the menstruation time.*


#### **Table 7.**

*How long.*


#### **Table 8.** *Have other psychological diagnosis.*

that the user will enter into depressive disorder due to another medical condition, or

**Number Disorder name In medical treatment**

5 Substance/medication-induced depressive disorder Is undergoing 6 Depressive disorder due to another medical condition Ever undergoing

 Disruptive mood dysregulation disorder No Major depressive disorder No Persistent depressive disorder (dysthymia) No Premenstrual dysphoric disorder No

7 Other specified depressive disorder No 8 Unspecified depressive disorder No

**Number Disorder name Mood problem**

**Number Disorder name In the influence of drugs**

 Disruptive mood dysregulation disorder No Major depressive disorder No Persistent depressive disorder (dysthymia) No Premenstrual dysphoric disorder No Substance/medication-induced depressive disorder Yes Depressive disorder due to another medical condition No Other specified depressive disorder No Unspecified depressive disorder No

 Disruptive mood dysregulation disorder Often Major depressive disorder All the time Persistent depressive disorder (dysthymia) All the time Premenstrual dysphoric disorder Often Substance/medication-induced depressive disorder Often Depressive disorder due to another medical condition Often Other specified depressive disorder Rarely Unspecified depressive disorder Rarely

*Ontological Analyses in Science,Technology and Informatics*

**Table 6** is only for women, and if it meets the criteria, there is a possibility that the user includes premenstrual dysphoric disorder, but it may not be included in

**Table 7** has shown the length of time for how long a person experiences symptoms of depressive disorder, starting from 2 weeks, 1 month, 12 months, 2 years, not

even depressive disorder.

**Table 3.** *Mood problem.*

**Table 4.**

**Table 5.** *Medical treatment.*

**52**

*The influence of drugs.*

any depressive disorder.


i. VIP

j. Panda

l. Cap

m. Penguin

n. BMW

o. Guci Mas

a. Bakcang

b. Porridge

d. Gyudon

e. Egg-crust

f. Lemper

h. Rice

i. Baked rice

j. Fried rice

k. Gudeg rice

l. Corn rice

m. Yellow rice

n. Liwet rice

o. Team rice

p. Uduk rice

q. Sushi

**55**

g. Lontong/ketupat

p. Flower Stamp

stores according to the seller's knowledge:

*DOI: http://dx.doi.org/10.5772/intechopen.88180*

c. Black glutinous porridge

The following are processed rice commonly made by consumers in the rice

*An Ontology-Based Approach to Diagnosis and Classification for an Expert System in Health…*

k. Three guava

#### **Table 9.**

*Brief description of rice types.*

depressive disorder or unspecified depressive disorder or even not including depressive disorder.

## **3.2 Second scenario**

In order to create a system, a thorough analysis of system requirements is needed to make a great system. The analysis was carried out on interview data that had been conducted so far to produce a proper application which ran smoothly according to the initial needs. In this scenario, interviews were conducted to obtain the data needed. From the results of interviews conducted with the three speakers, one of the resource persons summarized the knowledge of the three experts, including himself, to make a rule in determining the type of rice that matches the processed food, along with the brand according to the specified criteria. Criteria are determined based on information from experts regarding the type of rice according to processing. **Table 9** shows the types of rice found in Indonesia based on the interviews.

The following are brands of rice that sell these types:


*An Ontology-Based Approach to Diagnosis and Classification for an Expert System in Health… DOI: http://dx.doi.org/10.5772/intechopen.88180*


The following are processed rice commonly made by consumers in the rice stores according to the seller's knowledge:

a. Bakcang

depressive disorder or unspecified depressive disorder or even not including

10 Instant rice Rice that quickly turns into rice

**Number Rice type Description**

*Ontological Analyses in Science,Technology and Informatics*

1 White rice White rice is commonly consumed 2 Dark Brown Rice Similar to white rice but slightly brownish

5 White glutinous rice Glutinous rice that is thick and white

7 Parboiled rice Rice that is soaked in warm water first 8 Mixed rice A mixture of several types of rice

11 Japanese rice Rice for Japanese cuisine (more springy)

3 Brown rice Has a reddish outer layer 4 Black rice Rice that is rather blackish

6 Black glutinous rice Blackish sticky rice

9 Basmati rice Middle Eastern rice

In order to create a system, a thorough analysis of system requirements is needed to make a great system. The analysis was carried out on interview data that had been conducted so far to produce a proper application which ran smoothly according to the initial needs. In this scenario, interviews were conducted to obtain the data needed. From the results of interviews conducted with the three speakers, one of the resource persons summarized the knowledge of the three experts, including himself, to make a rule in determining the type of rice that matches the processed food, along with the brand according to the specified criteria. Criteria are determined based on information from experts regarding the type of rice according to processing. **Table 9** shows the types of rice found in Indonesia based on the

The following are brands of rice that sell these types:

depressive disorder.

*Brief description of rice types.*

**Table 9.**

**3.2 Second scenario**

interviews.

a. Myrice

b. Parakeet

c. Basket

d. Louhan

g. King rice

h. Swallow

**54**

e. Goldrice Red

f. Goldrice Green


**Table 10** shows the criteria for rice used:

The following is a table of matches between the types, criteria, and brands of rice with processed rice; the original table sent by the guest speaker is in the Appendix.

**4. Results**

**Figure 1.** *Flowchart.*

**57**

**Figure 1** describes a flowchart design used in the process of making this system

*An Ontology-Based Approach to Diagnosis and Classification for an Expert System in Health…*

or application. First, the collected data will be analyzed and will be used as a reference in making classes and subclasses on ontology, and the process of creating classes and subclasses will involve the use of Protégé tools. Then the next step is to determine the property. At this stage, we will determine the property object and data property, which will be needed as attributes and relations of each data. The first property object is created based on the class and subclass that were created

After that create a data property; this time the creation will be affected by property objects, and this data property will be useful to name the class and the data to be included in this ontology because each data will have its name used for identifying it. Then classify all data entered into ontology. Each incoming data must have at least one relationship with other data so that it can be used based on the relationship they have. All data will be given a relationship with each other; after that the data is ready and stored in the form of an OWL file, which will be used later in the application. Next is creating a SPARQL query that will be used to retrieve data from the OWL file. To be able to make the query, PREFIX must first be specified, which is the name of the place of the data [11]. Furthermore, the WHERE is determined, to give a limit on the data to be taken, by determining the conditions or conditions that must be met to retrieve the data. Inside the WHERE, there is a FILTER, which is useful for classifying data retrieval as needed. The next step is to do the making of an application, starting from the design of how the application will look up to the functions in the application. Besides that, it also makes a connection

between the OWL file containing the ontology data and the application.

found in Protégé tools. This feature was introduced to the user, starting from version 4.3 [12]. The Protégé software adapts the Java programming language which can be customized according to user needs [13]. Usually, ontology research

Ontology graphics, or commonly referred to as OntoGraf, is one of the features

before, and each class will have its data property.

*DOI: http://dx.doi.org/10.5772/intechopen.88180*
