tabibware: a software for a doctor s office · brother dr. othmane alaoui abdellaoui and my uncle...

70
SCHOOL OF SCIENCE AND ENGINEERING Tabibware: A Software For A Doctors Office EGR 4402: Capstone Design FALL 2017 Ismail Alaoui Abdellaoui Dr. Hamid Harroud Tabibware Management System

Upload: others

Post on 05-Aug-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

SCHOOL OF SCIENCE AND ENGINEERING

Tabibware: A Software For A Doctor’s Office

EGR 4402: Capstone Design

FALL 2017

Ismail Alaoui Abdellaoui

Dr. Hamid Harroud

Tabibware Management System

Page 2: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

II

Page 3: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

III

Acknowledgements

This work could not have been accomplished without the precious help and the enthusiasm of

Dr Hamid Harroud, who dedicated some of his time to listen to my concerns and to give me valuable

guidance and advices, even if most of his days were busy. Apart from this capstone project, me and Dr

Harroud have collaborated in many projects, since he was my supervisor in the applied research

course, my mentor for the undergraduate research contest, and last but not least the person in charge of

my internship's supervision.

I am also grateful to my beloved parents, who supported me in so many ways and who knew

how to create the perfect environment for me to accomplish this project.

Last but not least, I am thankful towards the two clients, who are also part of family, my

brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their

time to test and give me feedback of the different functionalities of the software system, a process

truly critical to software engineering.

Page 4: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

IV

Table of Contents

1. Abstract .............................................................................................................................................. IX

2. Résumé ................................................................................................................................................ X

3. Introduction ......................................................................................................................................... 1

4. Feasibility Analysis ............................................................................................................................... 3

4.1. Technical feasibility ...................................................................................................................... 3

4.2. Economic feasibility ...................................................................................................................... 4

4.3. Operational feasibility .................................................................................................................. 4

5. Steeple Analysis ................................................................................................................................... 6

6. Schedule and Gantt Chart: .................................................................................................................. 8

6.1. Schedule ....................................................................................................................................... 8

6.2. Gantt Chart ................................................................................................................................... 8

7. Methodology ..................................................................................................................................... 10

7.1. Agile Principles ........................................................................................................................... 10

7.2. Scrum Methodology ................................................................................................................... 11

8. Software Requirements ..................................................................................................................... 13

8.1. Use Case Diagrams ..................................................................................................................... 13

8.2. Functional Requirements: .......................................................................................................... 18

8.2.1. Functional Requirement 1: Add new patient ...................................................................... 18

8.2.2. Functional Requirement 2: Modify patient ......................................................................... 18

8.2.3. Functional Requirement 3: Delete patient .......................................................................... 18

8.2.4. Functional Requirement 4: Search patient.......................................................................... 19

8.2.5. Functional Requirement 5: View patient ............................................................................ 19

8.2.6. Functional Requirement 6: Refresh patients ...................................................................... 19

8.2.7. Functional Requirement 7: Add Consultation ..................................................................... 20

8.2.8. Functional Requirement 8: Modify Consultation ................................................................ 20

8.2.9. Functional Requirement 9: Delete Consultation ................................................................. 20

8.2.10. Functional Requirement 10: Search Consultation............................................................. 21

8.2.11. Functional Requirement 11: View Consultation ............................................................... 21

8.2.12. Functional Requirement 12: Refresh consultations .......................................................... 21

8.2.13. Functional Requirement 13: Add new reminder ............................................................... 22

8.2.14. Functional Requirement 14: Modify reminder ................................................................. 22

Page 5: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

V

8.2.15. Functional Requirement 15: Delete reminder .................................................................. 22

8.2.16. Functional Requirement 16: Search reminder .................................................................. 23

8.2.17. Functional Requirement 17: Refresh reminder ................................................................. 23

8.2.18. Functional Requirement 18: Add new money flow ........................................................... 23

8.2.19. Functional Requirement 19: Modify money flow ............................................................. 24

8.2.20. Functional Requirement 20: Delete money flow .............................................................. 24

8.2.21. Functional Requirement 21: Search money flow .............................................................. 24

8.2.22. Functional Requirement 22: Refresh money flow ............................................................ 24

8.2.23. Functional Requirement 23: Add new Word model ......................................................... 25

8.2.24. Functional Requirement 24: Modify Word model ............................................................ 25

8.2.25. Functional Requirement 25: Delete Word model ............................................................. 25

8.2.26. Functional Requirement 26: Search Word model ............................................................. 25

8.2.27. Functional Requirement 27: Refresh Word model ........................................................... 26

8.2.28. Functional Requirement 28: Visualize Word model .......................................................... 26

8.2.29. Functional Requirement 29: Display the number of patients per day the last x days ...... 26

8.2.30. Functional Requirement 30: Display the revenues per day the last x days ...................... 26

8.2.31. Functional Requirement 31: Display the percentage of patients who have diabetes ...... 27

8.2.32. Functional Requirement 32: Display the percentage of out of office consultations ........ 27

8.2.33. Functional Requirement 33: Display a ranking of the 5 most frequent jobs .................... 27

8.2.34. Functional Requirement 34: Display a ranking of the most frequent disease .................. 27

8.2.35. Functional Requirement 35: Display a ranking of the least frequent disease .................. 28

8.2.36. Functional Requirement 36: Login to the system ............................................................. 28

8.2.37. Functional Requirement 37: Lock the session ................................................................... 28

8.2.38. Functional Requirement 38: Unlock the session ............................................................... 28

8.2.39. Functional Requirement 39: Send an email ...................................................................... 29

8.3. Non-functional Requirement: .................................................................................................... 29

8.3.1. Product requirement: .......................................................................................................... 29

8.3.2. Organizational requirement: ............................................................................................... 30

8.3.3. External requirements: ........................................................................................................ 30

8.4. System requirements : ............................................................................................................... 31

8.4.1. System Requirement 1: Test the database connection ...................................................... 31

8.4.2. System Requirement 2: Backup the database .................................................................... 31

8.4.3. System Requirement 3: Restore the database .................................................................... 31

9. Design Analysis .................................................................................................................................. 33

Page 6: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

VI

9.1. Entity Relationship Diagram ....................................................................................................... 33

9.2. Sequence Diagrams .................................................................................................................... 34

9.3. Class Diagrams ............................................................................................................................ 37

10. Technologies used: .......................................................................................................................... 42

11. Development and Implementation ................................................................................................. 45

11.1. Backup function ........................................................................................................................ 45

11.2. Functions to find a patient's code in MySQL and C# ................................................................ 47

11.3. Arrow press button event handler ........................................................................................... 48

11.4. Debugging and breakpoints ..................................................................................................... 49

11.5. Creation of a trigger ................................................................................................................. 49

12. Screenshots of Tabibware ............................................................................................................... 50

13. Conclusion and Future Work ........................................................................................................... 56

14. References ....................................................................................................................................... 58

Appendix A ............................................................................................................................................ 59

Appendix B ............................................................................................................................................ 60

Page 7: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

VII

Table of Figures

Figure 1: Gantt Chart ............................................................................................................................... 9

Figure 2: Use Case Diagram related to the Doctor ................................................................................ 14

Figure 3: Use Case Diagram of the Doctor related to the database and the security .......................... 15

Figure 4: Use Case Diagram related to the Secretary ........................................................................... 17

Figure 5: ERD of the database ............................................................................................................... 34

Figure 6: Sequence Diagram for the creation of a new Patient ............................................................ 35

Figure 7: Sequence Diagram related to the creation of a new Word model ........................................ 36

Figure 8: Class Diagram related to the Patients form ........................................................................... 38

Figure 9: Class Diagram related to the Management form ................................................................... 40

Figure 10: Screenshot of the C# code related to the backup function (1) ............................................ 45

Figure 11: Screenshot of the C# code related to the backup function (2) ............................................ 46

Figure 12: Screenshot of the C# code related to the backup function (3) ............................................ 46

Figure 13: Screenshot of a MySQL function to retrieve a patient's id .................................................. 47

Figure 14: Screenshot of the C# code which uses the MySQL function ................................................ 47

Figure 15: Screenshot of the C# code to handle the press button event ............................................. 48

Figure 16: Screenshot of the code related to the use of breakpoints .................................................. 49

Figure 17:MySQL trigger ........................................................................................................................ 49

Figure 18: Creation of a new patient ..................................................................................................... 50

Figure 19: New patient added to the list ............................................................................................... 50

Figure 20: Viewing a patient .................................................................................................................. 51

Figure 21: Creation of a new Consultation (1) ...................................................................................... 51

Figure 22: Creation of a new Consultation (2) ...................................................................................... 52

Figure 23: New consultation added to the list ...................................................................................... 52

Figure 24: Creation of a new Reminder ................................................................................................ 53

Figure 25: Management form ............................................................................................................... 53

Figure 26: New reminder added to the calendar .................................................................................. 54

Figure 27: Creation of a new Word model from an existing document ............................................... 54

Figure 28: Visualization of the new Word model .................................................................................. 55

Page 8: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

VIII

Table of Tables

Table 1: Schedule of the project..............................................................................................................8

Page 9: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

IX

1. Abstract

Nowadays in Morocco, we still have the feeling that the country is in need in terms of

computerized processes. Those processes, while being very present in western countries and

in developed countries in general, are still not used in an extensive way in Morocco. Papers

are still used by many Moroccan accountants, opticians, shop owners, coffee shops,

restaurants, or doctors. The transition of Morocco to an economy where computerized

processes are completely integrated would have huge benefits on the Moroccan economy.

Indeed the same finding has been shown in a research analyzing the impact of informatization

on economy. In this research, it is stated that this process has many impacts, and among them

a large impact on the gross national product (GNP). As an example, it was found that from

1975 to 1985 in Japan, the informatization process was responsible for 15% of the annual

growth of the Japanese economy [1]. Another study confirms the beneficial effect of

informatization. This study shows that the informatization level has a positive relationship

with total factor and labor productivity. Indeed, this research demonstrates that a higher level

in terms of informatization is really effective in terms of national competitiveness [2]. Apart

from these findings, it would decrease cost related to paper waste, make people work in a

more organized way, decrease the theft rate inside companies, and also make it easier for the

government to collect and verify incoming taxes. In this capstone project, I will dedicate my

time helping 2 real life doctors do a transition from a paper-based management of their office,

to a much rationalized management, through the design of a management software system.

Keywords: Desktop Application, Management System, Software, Doctor’s Office.

Page 10: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

X

2. Résumé

De nos jours au Maroc, il subsiste un besoin en terme de processus informatisés. Ces

processus, quoique utilisés de manière extensive dans les pays occidentaux et développés de

manière générale, sont toujours aussi difficilement adoptés au Maroc. En effet, le travail basé

sur le support papier est encore utilisé par beaucoup de comptables, d'opticiens, de

commerçants, de tenanciers de cafés et de restaurants, ou de médecins Marocains. La

transition de ce pays vers une économie qui intègre complètement les processus informatisés

lui apporterai un regain de croissance. En effet, une interprétation similaire a été démontrée

dans un travail de recherche qui consistait à analyser l'impact de processus d'informatisation

sur l'économie. Cette recherche dépeint la valeur ajoutée de ce processus, et en particularité

son impact sur le produit national brut (PNB). Par exemple, il est décrit que entre 1975 et

1985 au Japon, l'informatisation a été responsable de 15% de la croissance annuelle

Japonaise. Une autre étude confirme l'impact bénéfique de ce processus. Cette étude montre

une forte corrélation entre le niveau d'intégration des processus informatisés au sein d'un pays,

et sa productivité globale des facteurs, ainsi que la productivité de sa population active. En

effet, cette étude démontre qu'un niveau plus haut d'informatisation améliore la compétitivité

d'un pays a l'échelle internationale. Mis à part ces impacts, cela engendrerait une baisse des

coûts liés aux déchets des papiers ainsi que le taux de vol au sein des compagnies. Cela

pousserai aussi la population active à travailler de manière plus organisée, et rendrai la tache

beaucoup moins ardu au gouvernement de collecter et de vérifier les impôts. Dans le cadre de

ce projet, je dédierais mon temps pour aider deux médecins à faire la transition d'une gestion

basée sur le support papier à une gestion informatisée et plus rationnelle de leur cabinet, à

travers la création d'un logiciel de gestion de cabinet médical.

Mots-clés: Application de Bureau, Système de Gestion, Logiciel, Cabinet Médical

Page 11: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

1

3. Introduction

The purpose of this capstone project is to produce a desktop application for the

management of a doctor's office in Morocco and will be used by professionals because it has

been required by 2 real life clients.

This software system will allow the doctor to create, manage, track, and retrieve his

patients’ folder easily. It will also allow him to set reminders. There will be 2 kinds of

reminders. The first one is a reminder which is repeated each 3 months for some of his

patients who have diabetes. The second one concerns reminders with no frequency, for other

kind of patients. The software will also make it easier for the doctor to manage his revenues

and costs. Indeed, it will be easy for them to add, modify, or delete revenues and costs.

Furthermore, the software will allow the doctor to write prescriptions for his patients or letters

for his colleagues, through an entity dedicated to the management of Word models. Finally,

the application will show some useful statistics and reports about his patients and the activity

of his office. The software development methodology that will be used is the Agile method

and more specifically the scrum approach. Therefore, while respecting the principles of Agile

methods like the customer involvement, the incremental delivery, and its simplicity, it will

focus on managing the iterative development. There will be three phases.

The first phase will be an outline of the planning where I will establish the general

objectives for the project and the design of the software architecture. This will include the

specifications of the clients, the design of the database, as well as the technologies used.

The second phase will be based on a series of sprint cycles, where each cycle develops

an increment of the system. This will include the implementation and the testing. The constant

involvement of the clients will be respected to make sure that requirements are matched.

Page 12: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

2

The third and final phase wraps up the project, completes required documentation such

as user manuals and assesses the lessons learned from the project. Regarding the societal

implications of this software, a better management of a doctor's office ultimately leads the

doctor to focus on his core expertise, and also makes it easier for him to diagnose a disease if

he can keeps track of his patients.

Page 13: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

3

4. Feasibility Analysis

In every software engineering project, the feasibility analysis is an important step,

because it explains to which extent the project can be implemented successfully in terms of

technical and financial perspectives. This process consists of analyzing the problem and the

collection of relevant information related to the software that will be implemented like the

data that will serve as its input, the different processes required to manage this data, as well as

the expected output data from the system. This analysis can be broken down into 3 sub

categories, namely the technical feasibility, the economic feasibility, and finally the

operational feasibility:

4.1. Technical feasibility

The technical feasibility is linked to the hardware and software resources required to

accomplish the user requirements. It also details the technical skills and capabilities of the

software development team members. Since I will be the person in charge of the development

of this project, the skills I have in terms of object oriented programming (OOP), programming

languages, and database design are enough to develop such system. Indeed, during my

database course, I had to implement a desktop application that performs similar tasks. A

second step needed to perform the technical feasibility is to determine whether the technology

chosen is stable and well established, and also to assert that the technology has a large number

of users, therefore comforting the ability of the developers to fix issues whenever they arise .

Concerning this point, we will see in the part talking about the technologies used that these

are very stable, with C# used as a programming language and Microsoft Visual Studio 2017

used as a CASE tool. These technologies, while backed up by a leader company in the IT

Page 14: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

4

sector, has a large community of users, which confirms its establishment among the developer

community. Indeed, the C# community does not lack of numerous resources and tutorials.

4.2. Economic feasibility

Most commonly denoted as the cost/benefit analysis, this analysis consists of

determining the potential decrease of costs or increase of benefits the system will bring, and

whether or not the benefits of the system will overcome the costs induced by its development.

Concerning the costs related to the implementation of this software, there will be no monetary

costs since I will not sell this software to the 2 clients. The development of this desktop

application will only involve the time I spend on the building of the functional requirements.

Concerning the financial benefits of this system, since a costs/revenues entity will be included

in the system, it will allow the doctors to manage their cash flows in a much more rational

manner. Furthermore, it will make the clients avoid to supply themselves with paper.

Therefore, in the addition of the economic benefits of this system, there are also obvious

organizational benefits.

4.3. Operational feasibility

The operational feasibility assess to which extent the system requires a specific series

of steps in a specific order in needed to solve the user requirements. In order to do that, the

software engineering team needs to check whether there is a hierarchy within the user

requirements. After gathering the general user requirements from the clients, I could confirm

that there is a hierarchy among the functional requirements. Indeed, there are functional

requirements related to the core activity of a doctor's office, which are the requirements

related to the patients and the consultations. The prioritization of the requirements have been

Page 15: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

5

useful in the context of the incremental delivery, since each set of increment of requirements

have been tested by the client. Another part of the operational feasibility concerns the

adaptation of the end users to this new software. Concerning this issue, the visual elements

will be placed following generally accepted graphical user interface (GUI) design principles,

which are: aesthetic pleasure, clarity, comprehensibility, consistency, familiarity, and other

ones.

Page 16: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

6

5. Steeple Analysis

The steeple analysis on this software engineering project will be an insightful tool to help us

grasp the different impacts of my software from different perspectives: the societal, the

technical, the environmental, the ethical, the political, and finally, and the economic one.

Societal factor: Tabibware will only affect the client’s patients. The first client, Dr.

Alaoui is working in the neighborhood of “Agdal” in Meknès, which has been recently

built (30 last years), so the software will affect the people living in this area since he is

the only doctor in it. Concerning the second client, Dr. Benhallam, has his office in

Meknès’ downtown. Since this client worked in this area during a long period of time,

much more people will be affected, and these will be its usual patients, whether they

come from rural or urban areas.

Technical factor: this software will be built using a common and largely used

technology. This technology will be explained in more details in the corresponding

section. The use of this system will help the clients do an informatization of their

office management, which has huge benefits.

Environmental factor: this system, similarly to every new software system, will help

the environment by diminishing the rate of paper waste.

Ethical factor: the application will involve data from patients and their consultations,

and as cited in the student statement, no unethical/illegal use of the data will be done.

Political factor: the development, delivery, and the maintenance of this software are

not concerned with politics.

Legal factor: no illegal use of the patients' data shall be done.

Economic factor: since the software will be used by the doctors as well as their

secretaries, it will not have any sort of consequences on the employment rate.

Page 17: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

7

However, concerning the personal money management of the doctors, the software

will allow this management to be in a more organized way, and will allow an easy-

monitoring of the cash flows since the system will include a component which

manages revenues and costs of the office. Besides this, all costs related to the use and

storage of paper will be eliminated.

Page 18: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

8

6. Schedule and Gantt Chart:

6.1. Schedule

The following image shows the schedule of this capstone project and includes each

milestone as defined by the Capstone coordinator, Dr Yassine Laalej:

Table 1: Schedule of the project

6.2. Gantt Chart

Based on the schedule shown above, the following represents its corresponding Gantt Chart.

The length of each bar corresponds to its duration in terms of days:

Page 19: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

9

Figure 1: Gantt Chart

Page 20: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

10

7. Methodology

7.1. Agile Principles

Even if the application of a specific software engineering methodology is difficult in

the context of an undergraduate Capstone project since it requires a complete devotion to the

building and implementation of a software system, I tried my best to follow the most suitable

methodology. The one I chose is part of the agile methodology because it borrows principles

from lean manufacturing, and more specifically I chose the scrum methodology. Similarly to

the other agile methods, this one has a set of principles which are suited to the implementation

of Tabibware. First, it maintains the client's involvement. Indeed, instead of implementing the

whole system then delivering it to the customer which increases the risk of dissatisfaction, the

client is always at the heart of the creation process. The role of the client is to provide and to

prioritize system requirements and to evaluate each iterations of the system. This first

principle was easy for me to follow because the 2 clients are family relatives, making it

straightforward for me to contact them. The second principle concerns the incremental

delivery. As a matter of fact, the system in not developed as a whole, and then delivered, but

rather is developed as a succession of parts, or increments, which then need to be validated by

the clients. This principle is linked to the first one, and as cited above, it has been partly

respected, because not all increments have been tested and validated. The third principle

specifies that the development team must be empowered to make decisions, which means that

the team should be left to develop their own ways of working without any kind of restrictions.

In the context of this project, this principle was also respected since I was the only person in

charge of the development, and I had no sort of restrictions in terms of the ways I should

develop the software. The fourth principle states that the scrum methodology embraces

change, and that the team should expect several variations of the initial requirements. This

Page 21: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

11

principle has not been applied since no initial requirements have changed since the beginning

of the process. The last principle expresses the need to maintain simplicity. In terms of

programming algorithms, GUI and classes organization, I perfectly respected this principle.

Indeed, I tried my best to use simple and clear code, to name the variables with meaningful

names, to place the visual elements in a simple and harmonious way, and to place related

classes in the same folder. This principle was naturally followed because when implementing

a computer science related project, I always do my best to keep things as simple as they can.

7.2. Scrum Methodology

Concerning the scrum methodology by itself, its definition is expressed in the official

scrum guide, the document created and regularly updated by scrum's co creators, as the

following: " a framework within which people can address complex adaptive problems, while

productively and creatively delivering products of the highest possible value" [3]. It is an

agile methodology divided into 3 main parts. The first one consists of an outline planning

phase where the general objectives of the project are established and where the design of the

software architecture needs to be done. The first phase is the sprint planning meeting, and the

client's requirements are gathered into something called the product backlog. Since I started

the creation of Tabibware during summer 2016, the initial meeting was held with Dr. Alaoui

Abdellaoui. The product backlog consisted of the core activity related to a doctor's office,

which is the management of patients, their consultation, and also the creation and the

management of reminders. Then the meeting with Dr. Benhallam added new requirements to

the product backlog, and consisted of the management of Word models since he uses them

extensively to communicate with his colleagues and to write prescriptions to his patients.

After two meetings during this semester, the new requirements were added in the product

backlog like the revenues/costs management, as well as the statistics component. The second

Page 22: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

12

phase is a series of sprint cycles, where each cycle develops an increment of the system. For

this project, there have been 2 kinds of sprint cycles. The first kind was the one after the

meeting with the clients, when the increments were shown and validated. There have been 2

sprint cycles, since I could meet them only twice during this semester. The second kind of

sprint cycle was the one imposed by the weekly Capstone diaries. Indeed, each diary included

sections directly linked to questions asked during the daily scrum:

-What has been accomplished since last meeting ?

-What will be done before the next meeting?

-What challenges are in the way?

Dr. Harroud acted as the scrum master, who is responsible for the scrum process, since he had

to check the diaries on a weekly basis. The third and final phase wraps up the project,

finalizes the last elements of the project like the documentation and the user manual, and

assesses the lessons learned from the project. This phase has not been accomplished yet since

the software system is not yet entirely finished.

Page 23: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

13

8. Software Requirements

8.1. Use Case Diagrams

In software engineering, there are many ways to identify, clarify, and organize

functional requirements. The modeling way I chose to use are use case diagrams. The reason

behind this choice is that these diagrams are simple to design and also very easy to understand

from a novice perspective. There are four main components which constitute use case

diagrams.

The boundary: it defines the system we are interested in, in relation to the external

environment around it.

The actors: these are individuals who are involved with the system and who have

specific roles.

The use cases: these are specific roles played by the actors, and are included inside the

boundary of the system.

The relationships: these are lines which symbolize the different interactions between

the actors and the use cases, or within use cases.

The following use case diagrams exhibit a clear and structured relationship between the

actors, who are the doctors or the secretaries, and the system. Even if those diagrams do not

represent all the possible interactions, most of them are represented, to give an overall view of

the possible interactions.

Page 24: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

14

Figure 2: Use Case Diagram related to the Doctor

The model above shows the use case diagram of the doctor. This diagram doesn't show all the

possible interactions, but gives a clear idea about the interactions between the doctor and the

Page 25: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

15

system. A part from the login interaction, the doctor can add and search a patient. The

deletion, modification, and view of the patient, as well as the creation of a reminder and a

consultation extend the search function because we can perform these functions after the

search of the patient. Furthermore, the function consisting of viewing a consultation extends

the one of viewing a patient because the main panel related to a specific patient includes a

grid listing all his/her consultations, and we have the possibility to view each one of them.

Similarly, the relationship between the search, the deletion, and the modification of reminders

and consultations is the same as the one concerning the patients. The interactions concerning

the management of Word models is slightly different. When the deletion and the modification

both extend the search, the visualization of a Word model includes its search, because while

the user browses the models in the list, its visualization gets updated each time there is a

different model selected.

Figure 3: Use Case Diagram of the Doctor related to the database and the security

Page 26: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

16

The figure above is the use case diagram which shows the interactions between the doctor and

the system related to the security and the maintainability of the software system. The doctor

can backup and restore the database. He can also lock his session for safety purposes. The

unlock interaction extends the latter interaction because he can't unlock the system without

locking it first.

Page 27: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

17

Figure 4: Use Case Diagram related to the Secretary

The model above is the use case diagram showing the interaction between the secretary and

the system. In terms of interactions, the secretary can do the same things as the doctor, except

interactions related to the deletion of items.

Page 28: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

18

8.2. Functional Requirements:

8.2.1. Functional Requirement 1: Add new patient

Functional Requirement The doctor or secretary shall be able to add a new patient to the database.

Input The doctor or secretary shall enter the identity of a new patient.

Output The new patient will be added to the list of patients in the patients table.

Exceptions The textboxes related to the first and last names of the patient are required. If not, a dialog box is displayed, notifying the user that these information are required.

8.2.2. Functional Requirement 2: Modify patient

Functional Requirement The doctor or secretary shall be able to modify a patient in the database.

Input The doctor or secretary shall select a patient from the patients' list.

Output The patient will be modified in the patients table.

Exceptions The textboxes related to the first name and the last name of patient are required. If not, a dialog box is displayed, notifying the user that these information are required.

8.2.3. Functional Requirement 3: Delete patient

Functional Requirement The doctor shall be able to modify a patient in the database.

Input The doctor or secretary shall select a patient from the patients' list.

Output The patient will be modified in the patients table.

Exceptions The database should be connected to the desktop application. If not, a dialog box is displayed, notifying the user that the connection has not been established.

Page 29: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

19

8.2.4. Functional Requirement 4: Search patient

Functional Requirement The doctor or secretary shall be able to search patients.

Input The doctor or secretary shall enter the patient's first name, name, age, telephone, job, and address in the textbox for the search.

Output The result of the search will be displayed in the patients' grid.

Exceptions No SQL queries or reserved MySQL keywords should be entered. If this is the case, a dialog box is displayed, inviting the user to do a search with another keyword.

8.2.5. Functional Requirement 5: View patient

Functional Requirement The doctor or secretary shall be able to view a patient's details and list of consultations.

Input The doctor or secretary shall select a patient from the patients' list.

Output A new form is will be opened, showing all the useful information about the patient.

Exceptions At least one patient should be selected in the patient's grid. If not, a dialog box is displayed, inviting the user to select one patient from the list.

8.2.6. Functional Requirement 6: Refresh patients

Functional Requirement The doctor or secretary shall be able to refresh the list of patients.

Input The doctor or secretary shall click on the refresh button in the patients form.

Output The list of patients in the form will be refreshed.

Exceptions The database should be connected to the desktop application. If not, a dialog box is displayed, notifying the user that the connection has not been established.

Page 30: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

20

8.2.7. Functional Requirement 7: Add Consultation

Functional Requirement The doctor or secretary shall be able to add a consultation in the database.

Input The doctor or secretary shall select a patient from the patients' list.

Output The patient will be modified in the patients table.

Exceptions The textboxes related to the date and fees are required. If not, a dialog box is displayed, notifying the user that these information are required.

8.2.8. Functional Requirement 8: Modify Consultation

Functional Requirement The doctor or secretary shall be able to modify a consultation in the database.

Input The doctor or secretary shall select a patient from the consultations’ list.

Output The consultation will be modified in the patients table.

Exceptions The textboxes related to the date and fees are required. If not, a dialog box is displayed, notifying the user that these information are required.

8.2.9. Functional Requirement 9: Delete Consultation

Functional Requirement The doctor shall be able to delete a consultation in the database.

Input The doctor or secretary shall select a consultation from the patients' list.

Output The consultation will be deleted from the consultations table.

Exceptions The database should be connected to the desktop application. If not, a dialog box is displayed, notifying the user that the connection has not been established.

Page 31: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

21

8.2.10. Functional Requirement 10: Search Consultation

Functional Requirement The doctor or secretary shall be able to search a consultation in the database.

Input The doctor or secretary shall enter a date, the patient's first or last name, and a fee in the textbox for the search.

Output The result of the search will be displayed in the consultations’ grid.

Exceptions No SQL queries or reserved MySQL keywords should be entered. If this is the case, a dialog box is displayed, inviting the user to do a search with another keyword.

8.2.11. Functional Requirement 11: View Consultation

Functional Requirement The doctor or secretary shall be able to view a consultation in the database.

Input The doctor or secretary shall select a consultation from the consultations’ list or the money flow list.

Output At least one patient should be selected in the consultations’ grid. If not, a dialog box is displayed, inviting the user to select one consultation from the list.

Exceptions No SQL queries or reserved MySQL keywords should be entered. If this is the case, a dialog box is displayed, inviting the user to do a search with another keyword.

8.2.12. Functional Requirement 12: Refresh consultations

Functional Requirement The doctor or secretary shall be able to refresh the list of consultations.

Input The doctor or secretary shall click on the refresh button in the consultation form.

Output The list of consultations in the form will be refreshed.

Exceptions The database should be connected to the desktop application. If not, a dialog box is displayed, notifying the user that the connection has not been established.

Page 32: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

22

8.2.13. Functional Requirement 13: Add new reminder

Functional Requirement The doctor or secretary shall be able to add a new reminder to the database.

Input The doctor or secretary shall select a patient or a group of patients from the patient’s list. Then the doctor or secretary shall add a new reminder.

Output The new reminder will be added to the list of reminders in the reminders table.

Exceptions The checkboxes related to the starting date and the frequency of the reminder are required. If not, a dialog box is displayed, notifying the user that this information is required.

8.2.14. Functional Requirement 14: Modify reminder

Functional Requirement The doctor or secretary shall be able to modify a reminder in the database.

Input The doctor or secretary shall select a patient or a group of patients from the reminders’ list. Then the doctor or secretary shall modify the starting date, the frequency, or the reason of the reminder.

Output The reminder will be modified in the list of reminders in the reminders table.

Exceptions The checkboxes related to the starting date and the frequency of the reminder are required. If not, a dialog box is displayed, notifying the user that this information is required.

8.2.15. Functional Requirement 15: Delete reminder

Functional Requirement The doctor shall be able to delete a reminder from the database.

Input The doctor shall select a reminder from the reminders’ list.

Output The selected reminder will be deleted from the list of reminders in the reminders table.

Exceptions The database should be connected to the desktop application and at least one reminder should be selected from the list of reminders. If not, a dialog box is displayed, notifying the user that this is required.

Page 33: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

23

8.2.16. Functional Requirement 16: Search reminder

Functional Requirement The doctor or secretary shall be able to search for a reminder in the database.

Input The doctor or secretary shall enter a date, a frequency or a reason in the textbox for the search.

Output The result of the search will be displayed in the consultations’ grid.

Exceptions No SQL queries or reserved MySQL keywords should be entered. If this is the case, a dialog box is displayed, inviting the user to do a search with another keyword.

8.2.17. Functional Requirement 17: Refresh reminder

Functional Requirement The doctor or secretary shall be able to refresh the list of reminders.

Input The doctor or secretary shall click on the refresh button in the reminder form.

Output The list of reminders in the form will be refreshed.

Exceptions The database should be connected to the desktop application. If not, a dialog box is displayed, notifying the user that the connection has not been established.

8.2.18. Functional Requirement 18: Add new money flow

Functional Requirement The doctor shall be able to add a new money flow to the database.

Input The doctor shall enter the nature of the flow (cost or revenue), the amount, its name, and the date of the flow.

Output The new money flow will be added to the list of money flow in the money flow table.

Exceptions The checkboxes related to the nature of the flow (cost or revenue) and the textbox related to amount of money are required. If not, a dialog box is displayed, notifying the user that this information is required.

Page 34: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

24

8.2.19. Functional Requirement 19: Modify money flow

Functional Requirement The doctor or shall be able to modify a money flow in the database.

Input The doctor or secretary shall select a money flow from the money flow list. Then the doctor shall modify everything related to the money flow.

Output The money flow will be modified in the list of money flows in the money flow table.

Exceptions The checkboxes related to the nature of the flow (cost or revenue) and the textbox related to amount of money are required. If not, a dialog box is displayed, notifying the user that this information is required.

8.2.20. Functional Requirement 20: Delete money flow

Functional Requirement The doctor shall be able to delete a money flow from the database.

Input The doctor shall select a money flow from the money flow list.

Output The selected money flow will be deleted from the list of money flows in the money flows table.

Exceptions The database should be connected to the desktop application and at least one money flow should be selected from the list of reminders. If not, a dialog box is displayed, notifying the user that this is required.

8.2.21. Functional Requirement 21: Search money flow

Functional Requirement The doctor shall be able to search for a money flow in the database.

Input The doctor shall enter a date, an amount, a name or a type of money flow in the textbox for the search.

Output The result of the search will be displayed in the money flow grid.

Exceptions No SQL queries or reserved MySQL keywords should be entered. If this is the case, a dialog box is displayed, inviting the user to do a search with another keyword.

8.2.22. Functional Requirement 22: Refresh money flow

Functional Requirement The doctor shall be able to refresh the list of money flows.

Input The doctor shall click on the refresh button in the money flow form.

Output The list of money flows in the form will be refreshed.

Page 35: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

25

Exceptions The database should be connected to the desktop application. If not, a dialog box is displayed, notifying the user that the connection has not been established.

8.2.23. Functional Requirement 23: Add new Word model

Functional Requirement The doctor or the secretary shall be able to add a new Word model to the database.

Input The doctor shall open a new Word document.

Output The new Word model will be added to the list of Word model in the Word models table.

Exceptions No other word documents should be opened during this process. If the system detects another opened document, a dialog box is displayed, notifying the user that the creation of a new Word model should be done after closing the word document. The name of the new document should also be a valid one without unauthorized characters. If it is the case, a dialog box show up, indicating that the name of the file contains an invalid character.

8.2.24. Functional Requirement 24: Modify Word model

Functional Requirement The doctor shall be able to modify a Word model in the database.

Input The doctor or secretary shall select a Word model from the Word model list and open it in Microsoft Word. Then the doctor shall modify everything related to the Word model and close it.

Output The Word model will be modified in the list of Word models in the Word model table.

Exceptions No other word documents should be opened during this process. If the system detects another opened document, a dialog box is displayed, notifying the user that the creation of a new Word model should be done after closing the word document.

8.2.25. Functional Requirement 25: Delete Word model

Functional Requirement The doctor shall be able to delete a Word model from the database.

Input The doctor shall select a Word model from the money flow list.

Output The selected Word model will be deleted from the list of Word model in the Word model table.

Exceptions The database should be connected to the desktop application and at least one Word model should be selected from the list of Word models. If not, a dialog box is displayed, notifying the user that this is required.

8.2.26. Functional Requirement 26: Search Word model

Functional Requirement The doctor shall be able to search for a Word model in the database.

Page 36: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

26

Input The doctor shall enter a date, an amount, a name or a type of Word model in the textbox for the search.

Output The result of the search will be displayed in the Word model grid.

Exceptions No SQL queries or reserved MySQL keywords should be entered. If this is the case, a dialog box is displayed, inviting the user to do a search with another keyword.

8.2.27. Functional Requirement 27: Refresh Word model

Functional Requirement The doctor shall be able to refresh the list of Word models.

Input The doctor shall click on the refresh button in the Word model form.

Output The list of Word models in the form will be refreshed.

Exceptions The database should be connected to the desktop application. If not, a dialog box is displayed, notifying the user that the connection has not been established.

8.2.28. Functional Requirement 28: Visualize Word model

Functional Requirement The doctor or secretary shall be able to visualize the Word models.

Input The doctor shall click on a model in the list of Word models.

Output The selected Word model shows up in the system.

Exceptions The database should be connected to the desktop application and at least one Word model should be selected from the list of Word models. If not, a dialog box is displayed, notifying the user that the connection has not been established, or that at least one model should be selected.

8.2.29. Functional Requirement 29: Display the number of patients per day the last x days

Functional Requirement The doctor shall be able to visualize the number of patients per day the last x days in the form of a bar chart.

Input After knowing what is the current day, the system shall provide to the chart the number of patients per day the x last days.

Output The bar chart of these information is displayed.

Exceptions The database should be connected to the desktop application. If not, a dialog box is displayed, notifying the user that the connection has not been established.

8.2.30. Functional Requirement 30: Display the revenues per day the last x days

Functional Requirement The doctor shall be able to visualize the revenues per day the last x days in the form of a line chart.

Input After knowing what is the current day, the system shall provide to the chart the revenues per day the x last days.

Output The line chart of these information is displayed.

Page 37: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

27

Exceptions The database should be connected to the desktop application. If not, a dialog box is displayed, notifying the user that the connection has not been established.

8.2.31. Functional Requirement 31: Display the percentage of patients who have diabetes

Functional Requirement The doctor shall be able to visualize the percentage of patients who have diabetes in the form of a pie chart.

Input After counting the number of patients who have diabetes, the system provides the information to the chart.

Output The pie chart of these information is displayed.

Exceptions The database should be connected to the desktop application. If not, a dialog box is displayed, notifying the user that the connection has not been established.

8.2.32. Functional Requirement 32: Display the percentage of out of office consultations

Functional Requirement The doctor shall be able to visualize the percentage of out of office consultations in the form of a pie chart.

Input After counting the number of out of office consultations, the system provides the information to the chart.

Output The pie chart of these information is displayed.

Exceptions The database should be connected to the desktop application. If not, a dialog box is displayed, notifying the user that the connection has not been established.

8.2.33. Functional Requirement 33: Display a ranking of the 5 most frequent jobs

Functional Requirement The doctor shall be able to visualize the ranking of the 5 most frequent jobs within his patients in the form of a grid.

Input After counting the number of patients for each single job, the system provides the information to the grid.

Output The ranking is displayed in the form of a grid.

Exceptions The database should be connected to the desktop application. If not, a dialog box is displayed, notifying the user that the connection has not been established.

8.2.34. Functional Requirement 34: Display a ranking of the most frequent disease

Functional Requirement The doctor shall be able to visualize the most frequent disease.

Input After counting the number of patients for each single disease, the system provides the information in text format.

Output The most frequent disease is displayed in the form of a label.

Page 38: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

28

Exceptions The database should be connected to the desktop application. If not, a dialog box is displayed, notifying the user that the connection has not been established.

8.2.35. Functional Requirement 35: Display a ranking of the least frequent disease

Functional Requirement The doctor shall be able to visualize the least frequent disease.

Input After counting the number of patients for each single disease, the system provides the information in text format.

Output The least frequent disease is displayed in the form of a label.

Exceptions The database should be connected to the desktop application. If not, a dialog box is displayed, notifying the user that the connection has not been established.

8.2.36. Functional Requirement 36: Login to the system

Functional Requirement The doctor or the secretary shall be able to login to the system.

Input The doctor or secretary shall enter the username and password.

Output The management form is displayed.

Exceptions The database should be connected to the desktop application. The user should provide both the username and the password and they should be valid. If not, a dialog box is displayed, notifying the user that the connection has not been established or that the username and/or password are required, or that they are not valid.

8.2.37. Functional Requirement 37: Lock the session

Functional Requirement The doctor or the secretary shall be able to lock their session.

Input The doctor or secretary shall click on the lock button.

Output The locked form is displayed.

Exceptions The database should be connected to the desktop application. If not, a dialog box is displayed, notifying the user that the connection has not been established.

8.2.38. Functional Requirement 38: Unlock the session

Functional Requirement The doctor or the secretary shall be able to unlock their session.

Input The doctor or secretary shall enter a password and a valid one.

Output The management form is displayed.

Page 39: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

29

Exceptions The database should be connected to the desktop application. The user should provide the password and it should be valid. If not, a dialog box is displayed, notifying the user that the connection has not been established, or that the password is required, or that it is not valid.

8.2.39. Functional Requirement 39: Send an email

Functional Requirement The doctor or the secretary shall be able to send an email via Gmail or Yahoo.

Input The doctor or secretary shall check if they want to send the mail through Gmail or Yahoo and they should provide their address, password, the address of the recipient, the object, and the message.

Output A message dialog is displayed, stating whether the mail has been sent or not.

Exceptions An internet connection is required. The user should also indicate whether it is a Gmail or Yahoo account, as well as the address, the username, and the address of the recipient. If not, a dialog box is displayed, notifying the user that these fields are required or that an Internet connection is required.

8.3. Non-functional Requirement:

8.3.1. Product requirement:

Usability requirement: The Metro framework makes the desktop application very user

friendly thanks to its pleasing controls. By respecting the standards and best practices

of graphical user interfaces and user experience, it is very fast and it is very easy and

intuitive to use the different features of the application thanks to their disposition. The

menus are clear and the buttons are placed in a consistent way across all the

components of the software.

Efficiency requirement:

Performance requirement: The launching of the application, the navigation

and the communication with the database shall all be quick. The opening of

Tabibware is very fast and Winforms makes the transition between forms very

Page 40: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

30

fluid and quick. The different interactions between the software and the

database are also fast and never exceed 1 second.

Space requirement: The software application shall not exceed 70 Mb.

Reliability requirement: The system shall have a low probability of unavailability and

a low rate of failure. Thanks to the “try-catch” blocks, the system can handle

exceptions with a smooth way without crashing. Thanks to some useful debugging

tools in Visual Studio like breakpoints, it was easy to debug faulty code and fix

anomalies.

Portability requirement: The system shall wok on Windows 7 and Windows 10.

Thanks to the .Net framework which is a Microsoft product, the application can work

in these 2 operating systems.

8.3.2. Organizational requirement:

Delivery requirement: The system shall be delivered by the end of December 2017.

Implementation requirement: The system shall be developed with C# programming language.

8.3.3. External requirements:

Ethical requirement: The system shall not make unethical/illegal use of patients’ data or data

related to the different revenues and costs of the office.

Privacy requirement: The system shall keep the patient's data and consultations private.

Page 41: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

31

8.4. System requirements :

A good maintainable software system also includes important features not necessarily

required by the client, but nevertheless ones which ensure a long term use of the system.

These are related to the backup and the restore of the database system, as well as the testing of

the connection between the system and the database. Indeed, a maintainable system needs to

include features that act as prevention to critical and unforeseen events which may induce

data loss like power offs, hard drive formatting, or even computer virus infection.

8.4.1. System Requirement 1: Test the database connection

Functional Requirement The doctor or the secretary shall be able to test the connection to the database.

Input The doctor or secretary shall click on the database connection button.

Output A message dialog is displayed, stating whether the connection with the database has been established or not.

Exceptions The database should be connected to the desktop application. If not, a dialog box is displayed, notifying the user that the connection has not been established.

8.4.2. System Requirement 2: Backup the database

Functional Requirement The doctor shall be able to backup the database.

Input The doctor shall click on the database backup button and provide a valid name of the backup SQL file.

Output A message dialog is displayed, stating whether the backup has been successful or not.

Exceptions The database should be connected to the desktop application, the file “mysqldump.exe” should be in a specific folder in the application startup folder, and the name of the file needs to be a valid one. If not, a dialog box is displayed, notifying the user that the connection has not been established or that the executable file is missing or that the name of the file should be changed.

8.4.3. System Requirement 3: Restore the database

Functional Requirement The doctor shall be able to restore the database.

Input The doctor shall click on the database restore button and provide a valid name of the SQL file.

Output A message dialog is displayed, stating whether the restore has been successful or not.

Exceptions The database should be connected to the desktop application, the file “mysql.exe” should be in a specific folder in the application startup folder, and the name of the file needs to be a valid one. If not, a dialog box is displayed, notifying the user that the connection

Page 42: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

32

has not been established or that the executable file is missing or that the name of the file should be changed.

Page 43: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

33

9. Design Analysis

9.1. Entity Relationship Diagram

The design of this system has been done through multiple tools. One of them is the

entity relationship diagram (ERD). ERDs are models that view systems as entities and

relationships, and they have 2 main advantages. The first one is a straightforward relation

representation and the other one is their easiness of conversion to other data models.

Concerning the first advantage, it means that once the ERD is designed, the next step which is

the building of the relational database becomes easy. The second advantage simply explains

that an ERD can easily be converted to a network model or a hierarchical data model. The

figure below shows the ERD of my database. It consists of 11 tables that interact between

each other. First, there is a relationship between the table "consultation" and the tables

"interrogatoire", "examen", "constante", and "therapeutique" because a consultation is made

of all of these information. Since I thought it was a poor design choice to create a table with a

large number of columns, it would be more wise to divide the consultation into these different

tables, and to establish a relation between them. Indeed, each of these columns have as

foreign key "cons_id", referencing to the primary key of the "consultation" table. Then there

is a "1 to many" relationship between the "consultation" table and the "patient" table, because

a patient can have multiple consultations. Similarly, there is a "1 to many" relationship

between the patient and the reminder tables because 1 patient can have different kinds of

reminders. There is a "1 to 1" relationship relation between the "doctor" table and the

"account" table, since the doctor has only 1 account. The "1 to many" relationship between

the doctor and the "word_models" tables is justified by the fact that the doctor can have

several Word documents. Finally, the "user" table is used for the login process. It also

includes the credentials of the secretary.

Page 44: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

34

Figure 5: ERD of the database

9.2. Sequence Diagrams

Sequence diagrams are good tools to visualize and validate runtime scenarios. These models

represent the flow of messages, events and actions between the objects or components of a

system. They are used primarily to design, document, and validate the architecture,

interfaces, and logic of the system by describing the sequence of actions that need to be

Page 45: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

35

performed to complete a task or a scenario. They are also easy to read from a novice

perspective.

Figure 6: Sequence Diagram for the creation of a new Patient

The figure above shows the sequence diagram of the doctor adding a new patient. In order to

access the main Tabibware management page, the doctor has to go through the login process.

Then the user needs to click on the patients' page, which lists all the patients and is

responsible for their management. On this page, there is a "créer" button which fires up a

form with empty text boxes, responsible for the creation of a new patient. Once the form filled

up, the doctor pushes the "ajouter" button. Once clicked and the 2 required information (the

first name and the last name) provided, the system established a connection with the

database, and then executes an insert query on the patient table. After the successful

operation, the user returns back to the patients' page.

Page 46: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

36

Figure 7: Sequence Diagram related to the creation of a new Word model

The figure above shows the sequence diagram that happens when the doctor wants to create a

new Word document model, which is approximately the same sequence of actions than the

one related to the creation of a patient. After the login process, the doctor needs to click on the

Word page, which lists the Word documents models, and is responsible for their

management. Then the doctor needs to click on the "créer" button. After that, a new form

appears responsible for the creation of a new Word model. Then the doctor has 2 choices : the

first one allows the creation of a Word model from scratch. In order to do that, the user has to

enter the name of the document as well as its description. Once filled up, he clicks on "ajouter

le modèle et ouvrir Microsoft Word" button. Then Microsoft Word is opened by the software

system, which allows the editing and the writing into the document. After closing the

document, an insert query is executed, and once completed, the system gets the doctor back to

the Word page. The second choice is to click on the "parcourir" button. After doing that, an

open dialog window fires up, inviting the doctor to select an already existing ".docx" file.

Page 47: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

37

Once chosen and the window disappeared, the doctor clicks on the "ajouter le modèle

seléctionné" button. Follows the insert query and the action described in the first case.

9.3. Class Diagrams

Since every form in my software system is a class which extends the MetroForm class, a class

diagram has been used to represent the relationship between those classes. A WinForm class

has 2 major parts: the first part represents the business logic, responsible for the creation of

methods and the actions to be performed when an event happens ( Click, KeyPress... ), and

the second part represents the design of the form, where controls like buttons, labels, and

textboxes can be dragged and dropped. The following images show 2 class diagrams of the

system:

Page 48: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

38

Figure 8: Class Diagram related to the Patients form

The figure above is a class diagram which is focused only on the entity related to the patients.

The "Patients" form contains a set of attributes and methods required for the good functioning

of the entity. Concerning the attributes, these are all used to pass information to other forms.

Page 49: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

39

Indeed, when the user wants to modify/view a patient, create a consultation or a reminder,

some information about the patient are taken from the grid in the "Patients" form, and stored

in those variables. Most of the methods used for the navigation of the user between forms.

The methods "ShowCreatePatient(object)", "ShowViewPatient(object)",

"ShowCreateReminder(object)", "ShowModifyPatient(object)",

"ShowCreateConsultation(object)", and "ShowManagement(object)" allow to display

respectively the forms "CreatePatient", "ViewPatient", "CreateReminder", "ModifyPatient",

"CreateConsultation", and "Management". Other methods like "SearchPatient()",

"DeletePatient()", or "RefreshPatient()" are associated to their buttons. While the first 2 ones

perform SQL queries on the database, the third one simply refreshes the list of Patients, in

case a search has been performed or a patient has been deleted. Then each form linked to the

"Patients" form has the attributes necessary for the methods to work.

Page 50: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

40

Figure 9: Class Diagram related to the Management form

The figure above shows the central part of the software system, which is the "Management"

form, and its relationship to all other main parts of the software. The only attributes needed in

this form are the ones used for the refreshing, each second, of the timer displayed. Concerning

the methods, most of them are used to display the other main forms of the application : the

"Patients", "Consultations", "WordModels", "Reminders", and "MoneyFlow" forms. The

Page 51: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

41

other methods which are "LockAccount(object)", "Quit()", "ShowEmail(object)",

"TestDBConnection(object)", "BackupDB(object)", "RestoreDB(object)" are used for the

usability, the security, and the maintainability of Tabibware.

Page 52: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

42

10. Technologies used:

Programming language : In order to design the business logic of this system, C# was the

programming language used. C# is a type-safe object oriented (OO) language that allows the

development of a large variety of applications that run on the .Net Framework. Indeed, C# can

be used to create Windows client framework, XML Web services, distributed components,

web applications and many other types of systems. C# has a simple and elegant syntax which

eases the development phase. This language also provides powerful features not provided by

other OO languages like Java. These features can be nullable value data types, delegates,

lambda expressions, or direct memory access [4].

Database Management System (DBMS): The DBMS used to store the data is MySQL

server. It is an open source relational database management system. It delivers a fast, multi-

threaded, multi-user structured query language (SQL) database server. It allows an easy

creation of tables as well as their management. Useful features like functions and stored

procedures are also fast to implement. Another great advantage of this DBMS is that among

its installation files are ".dll" files that enable the link between the integrated development

environment (IDE) I used and the database itself [5]. Apart from that, SQLite was also used

and enabled the clients to test the software system. Indeed, since the clients neither have a

MySQL client nor the appropriate database installed in their computer, SQLite was really

useful because I just had to send the software as an executable file, and since SQLite was

incorporated in Tabibware, all operations could have been done.

CASE Tool : The tool used for the development of this system is Visual Studio 2017. It is a

very simple, yet powerful IDE that allows the development, the debugging, the testing, and

the code refactoring of software systems. Another useful feature of the IDE is its code editor,

because it supports IntelliSense, a code completion tool, which allows rapid development.

Page 53: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

43

Visual Studio also supports 36 different programming languages, and that makes it a versatile

IDE [6].

Class Library : In order to build the visual elements, Windows Forms (WinForms) was used.

It is a graphical user interface library (GUI) class library built on the top of Microsoft .NET

Framework, and enables the creation of Smart clients, which are graphically rich applications

that are easy to deploy and update, that can work independently from an Internet access, and

that can access resources from the local computer in a more safe way than traditional

Windows-based applications. It allows the design of interactive and event-driven applications,

which makes it very suitable for our software system. Some libraries built on the top of

WinForms were used and will be presented in the sections below [7].

Visual appearance : In order to make the software system more visually appealing, a GUI

library built on the top of WinForms was used. It is called MetroFramework, and provides a

set of controls that are designed the same way Metro user interface of Windows 8 is designed.

These are controls like buttons, labels, checkboxes, or tiles and appear to be flat, simple, and

well-designed [8]. The installation of this library is also very easy, since it can be done

through Visual Studio's NuGet package manager Console [9].

Word models management : One of the main components of my software system is the

management of Word documents. Open XML software development kit (SDK) was used

[10]. It is a library built on the top of the .NET Framework, and allows the management of

Microsoft Office documents. I mainly used it for its high-fidelity conversion of DOCX to

HTML/CSS documents in order to visualize the Word documents inside the software [11].

Reminders management : Another major component of the desktop application was the

management of reminders. Since this functionality requires a calendar component that allows

the visualization of reminders, a library called Calendar.NET was used. It allows a

Page 54: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

44

straightforward implementation of reminders as well as their frequency through the inclusion

of events [12].

Page 55: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

45

11. Development and Implementation

11.1. Backup function

Figure 10: Screenshot of the C# code related to the backup function (1)

This figure shows the "backup_click()" function, called when the doctor clicks on the "Faire

un backup de la DB" button. This function basically fires up a save dialog window, showing

in the textbox reserved for the file name the current date and time. This window also restricts

the file to be saved to have only a ".sql" extension. After that, if the doctor clicks on the "OK"

button and that the name is not empty, another function "db_backup(string)" which returns a

boolean is called. If the value returned is "true", a message pops up, informing the doctor that

the database backup has been done successfully, otherwise it displays another message,

informing the doctor that the backup could not have been done, and invites him to try this

action later.

Page 56: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

46

Figure 11: Screenshot of the C# code related to the backup function (2)

Figure 12: Screenshot of the C# code related to the backup function (3)

This method called "db_backup(string filename)" is the one called inside the "backup_click()"

function. It creates a string variable called "batfile" and makes it empty. Then it creates

another string which uses the filename used in the first function, and appends to it the folder

"Maker". Then we check if this directory already exists, if not, we create it. Then we create a

"batfile" and write in it the command used to do the backup, which uses "mysqldump.exe".

After the writing, we close and dispose the "StreamWriter", so that it is not locked anymore.

After that we create a new process that will execute the batfile in hidden mode, and we wait

Page 57: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

47

until the exit of the process. Then we check if the "sql" file exists, if not, we return false.

Otherwise, we delete both the "batfile" and the "sql" file and the method returns true.

11.2. Functions to find a patient's code in MySQL and C#

Figure 13: Screenshot of a MySQL function to retrieve a patient's id

This screenshot shows a very handy MySQL function which finds a patient's id. The

arguments are the first name and the last name and it returns an integer. It first checks whether

the SQL query returns a null value. If it is the case, the database returns a message saying that

the patient with the given first name and last name does not exist. Otherwise, it returns the

corresponding patient's id.

Figure 14: Screenshot of the C# code which uses the MySQL function

This figure shows the function "find_patient_code(string,string)", which uses the MySQL

function shown above. It first opens the connection with the database, then creates a

Page 58: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

48

MySqlCommand using the connection and the query string. Finally it executes the command,

converts it to an integer, and returns it.

11.3. Arrow press button event handler

Figure 15: Screenshot of the C# code to handle the press button event

This figure shows an event handler. This event handler is triggered when the user presses the

up or down arrow of the keyboard, and is used to make the system more user friendly. If the

grid listing the word documents is active, once the user browses the models through the up

and down arrows, the visualization keeps being update, switching between models. The try

catch block is used because the user might presses one of the arrows while the grid is empty,

and this scenario will change a text's informing the user there is no model to display.

Page 59: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

49

11.4. Debugging and breakpoints

Figure 16: Screenshot of the code related to the use of breakpoints

This screenshot shows a useful feature of visual studio used for debugging. At line 38, a

breakpoint has been inserted. This breakpoint is active when running the application in

debugging mode. Once this line of code reached, Visual Studio stops executing the code, and

then I can manually execute the code line by line using the button "F11", and keep track of the

variables values in the window located in the bottom left of the window. This feature is life-

saving because it allows rapid debugging.

11.5. Creation of a trigger

Figure 17:MySQL trigger

Page 60: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

50

12. Screenshots of Tabibware

Figure 18: Creation of a new patient

Figure 19: New patient added to the list

Page 61: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

51

Figure 20: Viewing a patient

Figure 21: Creation of a new Consultation (1)

Page 62: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

52

Figure 22: Creation of a new Consultation (2)

Figure 23: New consultation added to the list

Page 63: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

53

Figure 24: Creation of a new Reminder

Figure 25: Management form

Page 64: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

54

Figure 26: New reminder added to the calendar

Figure 27: Creation of a new Word model from an existing document

Page 65: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

55

Figure 28: Visualization of the new Word model

Page 66: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

56

13. Conclusion and Future Work

This capstone project was an interesting project to work on. First it taught me from a

technical perspective the proper way of building desktop applications. C# language was really

fun to work with because while being intuitive, it is also a really powerful language that is

capable of low level operations. Even if it was not the first time I worked with MySQL

DBMS, I can testify that this DBMS is really user friendly, and allows handy features like

functions, stored procedures, or triggers that allow fewer lines of codes in C#. Apart from

that, this project was also by far the biggest and most complex one, because after checking the

number of code lines through a Visual Studio tool which calculates some metrics related to

the project, I discovered that I wrote more than 15,000 lines of code, which is something I am

really proud of. From a purely software engineering perspective, this project was also the

opportunity for me to talk to real clients, and to gather functional requirements from our

discussions. Concerning the challenges encountered, it was mainly related to time

management, since the Capstone project was not the only project I had to go through this

semester, and I had to dedicate some of my time to the other 4 courses I took.

Concerning the future work, there are many ways to improve this software system.

Even if this system will be delivered to 2 doctors, I wanted to create something that would

extract the essence of a doctor's office management, thus making this software work for all

doctors. Since the software I developed is a heavy client, a way to improve the system is to

make it lightweight, through a 3-tier architecture. A second way to improve the software is to

improve its installer. The system has currently an installer, but require some adjustments and

improvements. These would be related to the configuration of the database server, and the

automatic configuration of the database, the tables, as well as the clients and their respective

privileges.

Page 67: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

57

To wrap up, this project was truly rewarding from many perspectives, and it created

for me the opportunity to deliver the software created as a professional solution.

Page 68: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

58

14. References

-[1] H. Oniki, "Informatization in Japan and Its Impacts on Economic Growth", Institute of Social

Economic Research, Osaka University, pp. 4-6, 1994 [Online]. Available: http://www.osaka-

gu.ac.jp/php/fumihom/Kenkyu/Kyodo/oniki/noframe/download1/1994c.PDF. [Accessed: 01- Dec-

2017]

-[2] S. Cho and Y. Chung, "The Impact of Informatization Level on Productivity", The First

International Conference on Electronic Business, Hong Kong, no. 19-21, pp. 2-3, 2001 [Online].

Available: http://iceb.nccu.edu.tw/proceedings/2001/pdf/362.PDF. [Accessed: 03- Dec- 2017]

-[3] "Scrum Guide | Scrum Guides", Scrumguides.org, 2017. [Online]. Available:

http://www.scrumguides.org/scrum-guide.html. [Accessed: 01- Dec- 2017]

-[4] "Introduction to the C# Language and the .NET Framework", Docs.microsoft.com, 2017. [Online].

Available: https://docs.microsoft.com/en-us/dotnet/csharp/getting-started/introduction-to-the-csharp-

language-and-the-net-framework. [Accessed: 08- Nov- 2017]

-[5] "MySQL :: MySQL 5.7 Reference Manual :: 1 General Information", Dev.mysql.com, 2017.

[Online]. Available: https://dev.mysql.com/doc/refman/5.7/en/introduction.html. [Accessed: 09- Nov-

2017]

-[6] "Visual Studio IDE overview", Docs.microsoft.com, 2017. [Online]. Available:

https://docs.microsoft.com/en-us/visualstudio/ide/visual-studio-ide. [Accessed: 04- Nov- 2017]

-[7] "Windows Forms Overview", Docs.microsoft.com, 2017. [Online]. Available:

https://docs.microsoft.com/en-us/dotnet/framework/winforms/windows-forms-overview. [Accessed:

14- Nov- 2017]

-[8] D. Magno, "dennismagno/metroframework-modern-ui", GitHub, 2017. [Online]. Available:

https://github.com/dennismagno/metroframework-modern-ui. [Accessed: 16- Nov- 2017]

-[9] "NuGet Package Manager Console Guide", Docs.microsoft.com, 2017. [Online]. Available:

https://docs.microsoft.com/en-us/nuget/tools/package-manager-console. [Accessed: 03- Nov- 2017]

-[10] "Download Open XML SDK 2.5 for Microsoft Office from Official Microsoft Download

Center", Microsoft.com, 2017. [Online]. Available: https://www.microsoft.com/en-

us/download/details.aspx?id=30425. [Accessed: 18- Nov- 2017]

-[11] "OfficeDev/Open-Xml-PowerTools", GitHub, 2017. [Online]. Available:

https://github.com/OfficeDev/Open-Xml-PowerTools. [Accessed: 17- Oct- 2017]

-[12] A. Bryan, "Calendar.NET - CodeProject", Codeproject.com, 2017. [Online]. Available:

https://www.codeproject.com/Articles/378900/Calendar-NET. [Accessed: 17- Oct- 2017]

Page 69: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

59

Appendix A

Page 70: Tabibware: A Software For A Doctor s Office · brother Dr. Othmane Alaoui Abdellaoui and my uncle Dr. Abdelahad Benhallam, who committed their time to test and give me feedback of

60

Appendix B