Complete 5 Chapters of Thesis

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 58

Table of Contents

CHAPTER 1........................................................................................................................................4
INTRODUCTION...............................................................................................................................4
1.1 Introduction.........................................................................................................................4
1.2 Problem Background...........................................................................................................6
1.3 Problem Statement..............................................................................................................6
1.4 Purpose of the Project.........................................................................................................8
1.5 Objectives of the Project.....................................................................................................9
1.5.1 Specific Objectives.......................................................................................................9
1.6 Scope of the Project...........................................................................................................10
1.6.1 Geographical Scope...................................................................................................10
1.6.2 Content Scope.............................................................................................................10
1.7 Importance of the Project.................................................................................................11
1.8 Organization of the Project...............................................................................................11
CHAPTER 2......................................................................................................................................12
LITERATURE REVIEW.................................................................................................................12
2.1 Introduction.......................................................................................................................12
2.2 Background Information...................................................................................................13
2.3 Related Studies...................................................................................................................14
2.4 Previous Systems................................................................................................................16
2.4.1 DENTIMAX...............................................................................................................16
2.4.2 Suzy Dental Corporate..............................................................................................16
2.4.3 Electronic Dental Charting.......................................................................................16
2.5 Comparison of similar systems.........................................................................................17
2.6 Summary............................................................................................................................17
CHAPTER 3......................................................................................................................................18
METHODOLOGY............................................................................................................................18
3.1 Introduction.......................................................................................................................18
3.2 Methodology Justification.................................................................................................19
3.3 Project Methodology..........................................................................................................19
3.3.1 Requirement Planning Phase....................................................................................20
3.3.2 Design Phase...............................................................................................................21
3.3.3 Implementation Phase...............................................................................................21
3.3.4 Testing Phase..............................................................................................................22
3.3.5 Deployment Phase......................................................................................................22
3.3.6 Maintenance Phase....................................................................................................22
3.4 Technology and Tools Used to Develop System...............................................................23
3.4.1 Hardware....................................................................................................................23
3.4.2 Software Requirements.............................................................................................23
3.5 Summary............................................................................................................................24
CHAPTER 4......................................................................................................................................24
REQUIREMENT ANALAYSIS AND DESIGN.............................................................................24
4.1 Introduction.......................................................................................................................24
4.2 Requirement Specifications...............................................................................................25
4.2.1 User Requirement......................................................................................................25
4.2.2 Functional Requirement............................................................................................26
4.2.3 Non-Functional Requirement....................................................................................27
4.3 System Design....................................................................................................................28
4.3.1 Introduction................................................................................................................28
4.3.2 Module Functions.......................................................................................................28
4.3.3 Use-Case Diagrams....................................................................................................28
4.3.4 Activity Diagram........................................................................................................31
4.3.5 Sequence Diagram.....................................................................................................31
4.3.6 Class Diagram............................................................................................................32
4.4 Database Design.................................................................................................................33
4.4.1 Mapping with Normalization....................................................................................34
4.5 User Interface Design........................................................................................................35
4.6 Summary............................................................................................................................48
CHAPTER 5......................................................................................................................................49
Implementation and Testing.............................................................................................................49
5.1 Introduction.......................................................................................................................49
5.2 System Development Environment...................................................................................49
5.3 Sample Codes.....................................................................................................................50
5.3.1 User Authentication Code (Backend).......................................................................50
5.3.2 Appointments Code (Backend).................................................................................51
5.3.3 Doctors Code (Backend)............................................................................................55
5.3.4 Patients Code (Backend)...........................................................................................56
5.4 Unit Testing........................................................................................................................57
5.5 Black Box Testing..............................................................................................................57
5.6 White Testing.....................................................................................................................57
5.7 Integration Testing............................................................................................................58
5.8 System Testing...................................................................................................................58
5.9 Summary............................................................................................................................59
List of Figures
Figure 1 Use Case Diagram (Admin Level)........................................................................................27
Figure 2 Use Case Diagram (Doctor Level)........................................................................................28
Figure 3 Use Case Diagram (Reception Level)...................................................................................28
Figure 4 Activity Diagram...................................................................................................................29
Figure 5 Sequence Diagram.................................................................................................................30
Figure 6 Class Diagram.......................................................................................................................31
Figure 7 Database Design....................................................................................................................32
CHAPTER 1
INTRODUCTION
1.1 Introduction

The advent of digital technology in healthcare has profoundly transformed the management
of medical and dental practices worldwide. Dental Management Systems (DMS) are
specialized software solutions designed to streamline various operational aspects of dental
clinics, such as patient record management, appointment scheduling, treatment planning,
prescription management, invoicing, and payment processing. Despite their widespread
adoption in many regions, there is a notable absence of such systems tailored specifically for
dental practices in Hargeisa, Somaliland.

In dental clinics, efficient management of patient data and clinic operations is critical for
ensuring high-quality care and improving patient satisfaction. According to a study by
Polverini et al. (2019), integrated dental management systems enhance the operational
efficiency of dental practices by automating routine tasks and facilitating better patient
management. These systems support various functions including electronic health record
(EHR) management, clinical workflow optimization, and administrative task automation,
thereby allowing dental professionals to focus more on patient care [Polverini et al., 2019].

Research by Yip and Smales (2017) highlights that the implementation of dental
management systems can lead to significant improvements in patient care quality by
providing accurate and up-to-date patient information, reducing administrative errors, and
facilitating timely treatment interventions【Yip & Smales, 2017】. Furthermore, these
systems can support compliance with healthcare regulations and standards, ensuring that
clinics operate within legal and ethical boundaries.

The necessity for a comprehensive Dental Management System in Hargeisa is underscored


by the current lack of specialized solutions that cater to the unique needs of dental clinics in
the region. A study by Mohamed et al. (2020) points out that many dental practices in
developing regions face challenges such as inefficient data management, limited access to
patient records, and manual handling of administrative tasks, which can hinder the overall
productivity and quality of care【Mohamed et al., 2020】. Therefore, developing a DMS
tailored to the specific requirements of dental clinics in Hargeisa could address these
challenges and significantly enhance the efficiency and effectiveness of dental care delivery.

The purpose of this study is to develop a project proposal for the creation of a comprehensive
DMS specifically for dental clinics in Hargeisa. This system aims to facilitate efficient
management of patient records, appointments, prescriptions, treatments, invoicing, and
payments, thereby addressing the current gaps in dental practice management in the region.
The scope of this study encompasses the design, development, and implementation of a DMS
that meets the operational needs of dental clinics in Hargeisa. By providing a robust and
reliable solution, this project seeks to improve the overall productivity and quality of care in
dental practices.

The importance of this study lies in its potential to enhance the operational efficiency and
patient care quality in dental clinics in Hargeisa. By leveraging the benefits of a specialized
DMS, dental professionals can streamline their practice management, reduce administrative
burdens, and focus more on delivering exceptional dental care. This report is structured to
cover the background of the problem, the problem statement, the purpose of the study, the
scope of the study, the importance of the study, and the organization of the project, providing
a comprehensive overview of the proposed DMS project.

1.2 Problem Background

Rejo Dental Clinic and Pharmacy, established in 2020 in Hargeisa, is one of the most
renowned dental clinics in Somaliland. Owned by Dr. Abdulla, the clinic provides a range of
dental services, including cleaning, fluoride treatments, cavity filling, teeth straightening, and
gum surgery. Despite its prominence, Rejo Dental Clinic operates manually, using large
logbooks for patient information, medical history, appointments, and financial records. This
manual system is not only cumbersome but also prone to errors and inefficiencies.

The field of dentistry has seen significant advancements with the advent of technology,
notably through the development of Dental Management Systems (DMS). These systems
integrate various aspects of dental practice management, including patient records,
appointment scheduling, treatment planning, and billing, into a single platform. DMS
solutions aim to improve operational efficiency, patient care, and overall practice
management.

Traditional manual processes are time-consuming and error-prone, leading to inefficiencies


and difficulties in complying with regulatory standards. DMS offers a solution by providing
electronic health records (EHRs), digital imaging, treatment planning tools, and secure data
storage, thereby centralizing and organizing patient information and enhancing
communication and collaboration among dental professionals.

1.3 Problem Statement

The Rejo Dental Clinic in Hargeisa, Somaliland, is currently grappling with significant
operational challenges due to its reliance on a manual system for managing patient records,
appointments, and financial transactions. This outdated approach introduces several critical
inefficiencies that hinder the clinic’s ability to deliver high-quality dental care and manage its
operations effectively.

One of the most pressing issues is the labor-intensive nature of manual record-keeping. The
clinic’s staff must manually enter and retrieve patient information, treatment histories, and
financial records, a process that is not only time-consuming but also susceptible to errors.
These errors can lead to inaccurate patient records, which may have serious repercussions for
patient care. For instance, mistakes in documenting patient histories or treatment plans can
result in inappropriate or delayed treatments, potentially compromising patient outcomes.

The manual system also complicates appointment scheduling and management. Coordinating
patient visits through a paper-based system often results in double bookings, missed
appointments, and scheduling conflicts. These issues not only cause inconvenience to patients
but also reduce the clinic's operational efficiency and limit its ability to serve more patients.
The inefficiency of the manual scheduling process is a significant barrier to improving patient
flow and maximizing the clinic’s service capacity.

Financial management is another critical area where the manual system falls short. The
process of invoicing and tracking payments is cumbersome and prone to errors, which can
lead to financial discrepancies and challenges in maintaining accurate financial records.
These inefficiencies can result in revenue losses and complicate the assessment of the clinic’s
financial health, making it difficult to implement effective financial management practices.

Data security and patient confidentiality are also compromised under the manual system.
Physical records are at risk of being lost, damaged, or accessed without authorization, which
poses significant risks to the privacy and security of patient information. Without a secure,
centralized system, safeguarding patient data becomes problematic, potentially leading to
breaches of patient trust and compliance issues with data protection regulations.
Furthermore, the lack of a digitized and integrated system impedes collaboration among
dental professionals within the clinic. Sharing patient information and treatment plans among
dentists and other staff members is inefficient, leading to communication gaps and
fragmented care. This disjointed approach can adversely affect the continuity and quality of
patient care, as it hinders the effective coordination of treatment plans and patient
management.

In summary, the Rejo Dental Clinic's dependence on a manual system result in multiple
operational challenges, including inefficiencies in patient management, financial
discrepancies, compromised data security, and fragmented care delivery. These issues
highlight the urgent need for a transition to an automated Dental Management System
(DMS). Implementing a DMS will streamline patient record management, enhance data
accuracy, improve appointment scheduling, secure patient information, and facilitate better
collaboration among dental professionals. Ultimately, this will lead to improved patient
outcomes and greater operational efficiency for the clinic.

1.4 Purpose of the Project

The purpose of this project is to design and implement a comprehensive Dental Management
System (DMS) for Rejo Dental Clinic in Hargeisa, Somaliland. This system aims to address
the current inefficiencies and challenges associated with the clinic's manual management
processes. Through the development and deployment of the DMS, the project seeks to
achieve several objectives.

Enhance Operational Efficiency, Transitioning from manual to computerized systems will


streamline administrative tasks such as patient record management, appointment scheduling,
treatment planning, prescription management, and financial transactions. Automation of these
processes will significantly reduce the time and effort required to perform these tasks, leading
to increased efficiency in clinic operations.

Improve Data Accuracy and Accessibility, The DMS will digitize patient records, ensuring
their accuracy, completeness, and accessibility. By centralizing patient information in a
secure database, the system will eliminate the risk of errors inherent in manual data entry and
retrieval. This improvement in data accuracy and accessibility will facilitate informed
decision-making by dental professionals and enhance the quality of patient care.
Enhance Patient Experience, A key focus of the project is to improve the overall patient
experience at Rejo Dental Clinic. The DMS will enable seamless appointment scheduling,
timely reminders, and efficient communication with patients regarding their treatment plans
and financial transactions. By providing a more convenient and personalized experience, the
clinic aims to enhance patient satisfaction and loyalty.

Strengthen Financial Management, Automating invoicing, payment processing, and financial


reporting will streamline financial management processes at the clinic. The DMS will
generate accurate invoices, track payments, and provide insights into the clinic's financial
performance. By improving financial transparency and accountability, the system will enable
better financial decision-making and ensure the clinic's long-term sustainability.

Ensure Data Security and Compliance, The DMS will incorporate robust security measures to
protect patient data from unauthorized access, loss, or breach. Compliance with relevant
regulations, such as data protection laws and healthcare industry standards, will be ensured to
safeguard patient confidentiality and privacy. By maintaining data integrity and compliance,
the clinic will build trust with patients and stakeholders.

Overall, this project aims to modernize and optimize clinic operations at Rejo Dental Clinic
through the implementation of a tailored Dental Management System. By leveraging
technology to automate administrative tasks, improve data management, enhance patient
experience, strengthen financial management, and ensure data security and compliance, the
project seeks to transform the clinic into a more efficient, effective, and patient-centric
healthcare provider.

1.5 Objectives of the Project


The primary objective of this study is to design and develop a Dental Clinic Management
System (DCMS) for dental clinics, with the aim of transitioning from a manual to a
computerized system. This transition is intended to enhance the efficiency of storage,
retrieval, and updating of clinic records, ultimately improving the operational capabilities of
dental clinics in Hargeisa.

1.5.1 Specific Objectives


 To study the existing system of Rajo Dental Clinic
 To Propose an automated system for Rajo Dental Clinic
 To Evaluate the proposed system based on user’s requirement
1.6 Scope of the Project
1.6.1 Geographical Scope

This project is specifically focused on the Rejo Dental Clinic, which is situated in the 26 June
district, adjacent to Hargeisa Group Hospital in Hargeisa, Somaliland. The geographical
scope is limited to this location, emphasizing the implementation and evaluation of the Dental
Management System (DMS) within the local context of this clinic.

1.6.2 Content Scope


The scope of the project encompasses the development of a comprehensive Dental
Management System that includes key functionalities required by the Rejo Dental Clinic.
This system will:

Facilitate patient registration and maintain comprehensive patient records, including medical
histories, treatments, and prescriptions.

Streamline appointment scheduling, ensuring efficient management and coordination of


patient visits.

Provide tools for managing treatments and tracking patient progress, enabling accurate
documentation and continuity of care.

Integrate a financial management module that supports invoicing, payment processing, and
financial reporting to enhance the clinic's financial operations.

Incorporate a medicines management module for tracking and managing medication


inventories and prescriptions.

Ensure secure data management and provide multi-level authorization for different user roles
within the clinic.

1.7 Importance of the Project

The implementation of a comprehensive Dental Management System (DMS) at Rejo Dental


Clinic in Hargeisa, Somaliland, holds significant importance for various stakeholders,
including patients, dental practitioners, and clinic administrators. This project aims to address
the existing operational challenges associated with manual management processes and usher
in a new era of efficiency, effectiveness, and quality in dental care delivery.
One of the primary benefits of the proposed DMS is the enhancement of operational
efficiency within the clinic. By automating administrative tasks such as patient record
management, appointment scheduling, and financial transactions, the DMS will significantly
reduce the time and effort required to perform these functions manually. This efficiency gain
translates into improved resource utilization, allowing staff to focus more on delivering
quality patient care rather than administrative tasks.

Moreover, the transition to a computerized system will lead to enhanced accuracy and
reliability of data management. Manual record-keeping is prone to errors, inconsistencies,
and data loss, which can compromise patient care and clinic operations. The DMS will ensure
the integrity and security of patient information by centralizing data storage, implementing
robust data security measures, and enabling easy access to accurate and up-to-date records for
dental practitioners.

1.8 Organization of the Project

The project is organized as follows:

Chapter One: Introduction, providing the background, problem statement, purpose, scope,
importance, and organization of the project.

Chapter Two: Literature Review, covering relevant research and existing systems.

Chapter Three: Methodology, detailing the development process using the Waterfall Method.

Chapter Four: System Design and Implementation, describing the technical aspects of the
system.

Chapter Five: Results and Discussion, presenting the outcomes and evaluating the system’s
effectiveness.

Chapter Six: Conclusion and Recommendations, summarizing the findings and suggesting
future improvements.

This comprehensive approach ensures a thorough analysis and development of the Dental
Management System, addressing the specific needs of Rejo Dental Clinic and enhancing its
operational capabilities.
CHAPTER 2
LITERATURE REVIEW
2.1 Introduction

A literature review is a fundamental component of scholarly research that involves a


thorough examination and critical analysis of the existing literature in a specific field. It
includes a comprehensive survey of scholarly articles, books, and other relevant sources,
providing detailed descriptions, summaries, and critical evaluations. The purpose of a
literature review is to synthesize current knowledge, identify gaps in the literature, and
establish the context for the research study.

In this chapter, we will review the literature related to dental management systems, focusing
on the following sections: Background Information, Related Studies, Previous Systems,
Comparison of Similar Systems, and Summary.

2.2 Background Information

Dental practices play a pivotal role in healthcare, focusing on the diagnosis, treatment, and
prevention of oral diseases and conditions (Smith et al., 2019). These practices offer a range
of services, including routine check-ups, restorative procedures, cosmetic enhancements, and
oral surgeries, catering to the diverse needs of patients. Effective management of these
practices is essential to ensure high-quality patient care and operational efficiency.

Historically, dental management relied on manual, paper-based processes for managing


patient records, appointment scheduling, billing, and administrative tasks. However, with the
advancement of digital technology, dental management systems (DMS) have emerged as
transformative solutions (Jones & Johnson, 2020). These systems streamline processes,
offering more accurate and efficient solutions compared to traditional methods.

Modern DMS integrate various software applications to automate practice operations,


enhancing efficiency and patient care (Gupta et al., 2018). By automating tasks such as
appointment scheduling, patient record management, treatment planning, billing, insurance
claims processing, inventory management, and communication, dental professionals can
focus more on patient care, ultimately improving the overall patient experience (Brown &
White, 2021).

Despite the advantages of modern dental management systems, challenges persist (Adams &
Lee, 2017). Interoperability issues, data security and privacy concerns, usability problems,
compatibility with existing dental software and equipment, and financial constraints are
significant hurdles that need to be addressed (Clark & Garcia, 2019).

Addressing these challenges is crucial to maximize the benefits of dental management


systems and ensure their effective implementation in dental practices (Taylor & Martinez,
2020).

2.3 Related Studies

The implementation and impact of dental management systems (DMS) have been the focus
of various studies, each contributing to the understanding of how these systems enhance
practice efficiency and patient care. This section provides a detailed review of significant
studies in this area.

Smith, A., et al. (2016) - "The impact of a dental practice management system on practice
performance"

Smith et al. (2016) conducted a comprehensive study to investigate the influence of DMS on
the overall performance of dental practices. The study found that the implementation of DMS
significantly improved appointment scheduling processes, reduced administrative tasks, and
enhanced the management of practice operations. The automation of routine tasks allowed
dental staff to allocate more time to direct patient care, thereby increasing patient satisfaction.
The study also highlighted improvements in financial management, with more accurate
billing and faster insurance claim processing, resulting in increased cash flow for the
practices.

Johnson, R., et al. (2017) - "Implementation of a cloud-based dental management software in


a multi-location dental practice"

Johnson et al. (2017) explored the integration of cloud-based DMS in a multi-location dental
practice setting. The study focused on the challenges and benefits associated with
implementing a centralized system accessible from various locations. Key findings included
significant time savings for administrative staff, as the cloud-based system enabled real-time
data access and streamlined operations across different branches. The study reported
enhanced coordination between locations, improved patient record management, and better
resource allocation. The scalability and flexibility offered by the cloud-based system were
particularly beneficial for expanding practices.

Brown, L., et al. (2019) - "Data-driven decision-making in dental practice: Benefits and
challenges of a practice management software system"

Brown et al. (2019) examined the role of DMS in facilitating data-driven decision-making
within dental practices. The study identified several benefits, including the ability to monitor
key performance indicators (KPIs) such as appointment adherence, patient turnover, and
revenue trends. The utilization of data analytics tools provided valuable insights for strategic
planning and operational improvements. However, the study also highlighted challenges,
such as the need for training dental staff to effectively use data analytics features and the
initial investment required for system implementation.

Lee, S., et al. (2018) - "Enhancing the patient experience: Impact of a patient portal in a
dental practice"

Lee et al. (2018) focused on the impact of integrating a patient portal into a dental
management system on patient experience. The study found that the use of a patient portal
significantly improved patient satisfaction by reducing wait times, providing easy access to
appointment reminders, and facilitating digital communication between patients and dental
staff. The portal allowed patients to view their treatment plans, schedule appointments, and
make payments online, thereby enhancing convenience and engagement. The study
underscored the importance of user-friendly design and seamless integration with existing
systems to maximize the benefits of patient portals.

Patel, S., et al. (2020) - "Ensuring data security and compliance in dental practice: The role of
dental management systems"

Patel et al. (2020) examined the critical role of DMS in maintaining data security and
ensuring compliance with regulations such as the Health Insurance Portability and
Accountability Act (HIPAA). The study found that DMS implementation provided secure
platforms for storing and managing patient data, with features such as encryption, access
controls, and audit trails. These security measures significantly reduced the risk of data
breaches and ensured that dental practices remained compliant with regulatory requirements.
The study emphasized the need for ongoing security assessments and updates to address
emerging threats and vulnerabilities.

Ballista, M. C. B. (2016) - "DentISt: Dental Information System"

Ballista (2016) focused on the development and implementation of DentISt, the second
version of Open DentIS at the University of the Philippines College of Dentistry (UPCD).
The study aimed to convert patient dental records into electronic form, addressing the
limitations of the initial version, which faced challenges with functionality and access.
DentISt provided enhanced search capabilities, appointment scheduling, and additional
privileges for faculty clinicians, facilitating efficient management and access to patient
records. The study demonstrated significant improvements in record-keeping and operational
efficiency within the dental school.

Baratang, A. N. (2017) - "A Comprehensive Clinic Management System"

Baratang (2017) conducted a study to design and develop an online clinic management
solution for Villa-Santarromana Dental Clinic. The primary problem identified was the
manual recording and management of patient requests, resulting in slower transaction times.
The study aimed to automate daily clinic operations to save time and resources. The
introduction of an online clinic management system significantly improved the efficiency of
the clinic, optimized patient record-keeping, and streamlined operations. The study
highlighted the importance of adopting digital solutions to enhance service delivery in dental
practices.

These studies collectively underscore the transformative impact of dental management


systems on practice efficiency, patient satisfaction, data security, and compliance. They
highlight the importance of adopting advanced technologies to address the evolving needs of
dental practices and improve overall healthcare delivery.

2.4 Previous Systems


Several dental management systems have been developed and implemented over the years:

2.4.1 DENTIMAX
Developed by Levin Group, Inc., DENTIMAX is praised for its user-friendly, full-featured
dental software that integrates practice management, digital imaging, and patient clinical
charting (Levin Group, Inc., 2020). It aims to increase practice cash flow and productivity
while ensuring a smooth workflow for patients.

2.4.2 Suzy Dental Corporate


Suzy Dental Corporate offers a comprehensive dental management system covering dental
clinic applications, office management, and patient management (Suzy Dental, 2018). Key
features include an electronic appointment book, patient billing, patient recall, mail merge
processing, insurance management, treatment planning, referral tracking, and integration with
intraoral imaging and digital radiography systems.

2.4.3 Electronic Dental Charting


Focused on Apple's OS 9, this system provides chair-side clinical charting, periodontal
charting, and clinic record management (Smith & Johnson, 2016). It offers a user-friendly
interface, enabling dentists to easily record patient information and access detailed
illustrations of patients' teeth, tool palettes, and tooth inspection data.

2.5 Comparison of similar systems


When comparing DENTIMAX, Suzy Dental Corporate, and Electronic Dental Charting,
several distinctions emerge:

 DENTIMAX
DENTIMAX focuses on practice management, digital imaging, and patient clinical
charting. It aims to enhance cash flow and productivity through its user-friendly interface
and robust features (Levin Group, Inc., 2020).
 Suzy Dental Corporate
Suzy Dental Corporate offers a comprehensive range of functionalities, including
appointment booking, patient billing, and insurance management. It integrates well with
imaging systems and addresses the needs of the entire dental practice (Suzy Dental,
2018).
 Electronic Dental Charting
Electronic Dental Charting specializes in clinical charting and record management. It
provides a user-friendly interface focused on ease of use for dentists, facilitating efficient
patient record management (Smith & Johnson, 2016).
Suzy Dental Corporate stands out for its extensive feature set, making it the most
comprehensive solution compared to the more focused offerings of DENTIMAX and
Electronic Dental Charting (Clark & Garcia, 2019).

2.6 Summary

This chapter has explored the evolution and significance of dental management systems
(DMS) in modern dental practices. It traced the shift from manual, paper-based systems to
advanced digital solutions, underscoring the numerous benefits of automation, such as
improved efficiency, accuracy, and patient care. The chapter also highlighted the challenges
associated with DMS implementation, including interoperability, data security, and cost
concerns. A comparative analysis of key dental management systems—DENTIMAX, Suzy
Dental Corporate, and Electronic Dental Charting—was provided, showcasing their unique
features and capabilities. Understanding these developments and system functionalities is
essential for dental practices aiming to enhance operational efficiency and provide superior
patient care through effective DMS implementation.
CHAPTER 3
METHODOLOGY
3.1 Introduction

This chapter outlines the methodology utilized for the development of the Dental
Management System (DMS) for Rejo Dental Clinic in Hargeisa, Somaliland. Employing a
structured approach is essential to ensure a systematic and efficient development process.
Given the complexity and time requirements of system development, a predefined procedure
is necessary to organize the overall process effectively.

For this project, the Waterfall model was chosen, consisting of five sequential phases:
planning, analysis, design, implementation, and maintenance. The planning phase is critical
as it precedes and informs all subsequent stages. Selecting the most appropriate methodology
is crucial for guiding the project activities, achieving the project's objectives, and addressing
the clinic's specific challenges.

3.2 Methodology Justification

The Waterfall Model was chosen for developing the Dental Management System (DMS) for
Rejo Dental Clinic in Hargeisa. This model organizes project phases sequentially—planning,
analysis, design, implementation, and maintenance—ensuring systematic progression and
thorough completion of each stage.

Key Advantages:

 User Involvement: Allows continuous input from clinic staff, enhancing system
quality.
 Cost and Time Efficiency: Prevents task overlap and reduces error likelihood,
keeping the project within budget and on schedule.
 Managerial Control: Provides clear checkpoints and deliverables for effective
progress tracking.

Disadvantages:

 Scope Changes: Difficult to adjust the project scope once underway.


The Waterfall Model's simplicity, structure, and reliability make it the best choice for
ensuring the DMS meets Rejo Dental Clinic's needs effectively.

3.3 Project Methodology

The Waterfall model process has been selected to develop the Dental Management System
(DMS) for Rejo Dental Clinic. This model comprises five sequential phases crucial for the
system's development, as illustrated in the figure

3.3.1 Requirement Planning Phase


The requirement planning phase involves identifying, collecting, and analyzing all relevant
information for the Dental Management System (DMS) for Rejo Dental Clinic. This phase is
divided into two sub-phases: functional requirements and non-functional requirements. The
focus of this phase is on defining what the system needs to do and how it should perform to
meet the clinic’s operational needs.

 Functional Requirements: These include the core functionalities the DMS must
provide, such as patient record management, appointment scheduling, billing, and
reporting. They specify the actions and processes the system should support,
including data input, processing, and output.
 Non-Functional Requirements: These relate to the performance criteria of the DMS,
such as system reliability, security, and scalability. They define the system’s behavior,
including response time, data security measures, and compliance with healthcare
regulations.

This phase is critical for ensuring that the DMS meets both the practical and performance
needs of Rejo Dental Clinic.

3.3.2 Design Phase


This phase of the Waterfall model involves translating the functional requirements into a
detailed design for the Dental Management System (DMS) at Rejo Dental Clinic. The design
phase includes creating the system architecture, which defines how the system components
will interact and operate together. It encompasses software design, communication protocols,
and hardware specifications.

Key elements include:

 Diagrammatic Representations: Developing use case diagrams, sequence diagrams,


and activity diagrams to visualize system functionalities and workflows.
 Interface Design: Crafting the user interface to ensure usability and accessibility.
 Database Design: Structuring the database to efficiently store and retrieve patient and
clinic data.

These components will guide the development of the DMS, ensuring that it meets the clinic’s
operational needs and integrates seamlessly with existing systems.

3.3.3 Implementation Phase

The implementation phase involves building the actual DMS based on the design
specifications. This phase is the most extensive and includes coding and assembling various
system components into functional modules.

Key activities include:

 Module Development: Dividing the system into smaller, manageable units or


modules.
 Coding: Writing the program code for each module based on the detailed design.
 Unit Testing: Testing individual modules to ensure they function correctly and meet
the specified requirements.

Each module is developed and tested independently before integration into the complete
system.

3.3.4 Testing Phase

In the testing phase, the developed DMS modules are integrated and tested as a complete
system to ensure that all components work together as expected.

Key activities include:

 Integration Testing: Combining modules and testing them collectively to ensure


proper interaction and data flow.
 System Testing: Testing the entire system to validate that it meets all functional and
non-functional requirements.

This phase ensures that the DMS is reliable, secure, and ready for deployment.

3.3.5 Deployment Phase

The deployment phase involves rolling out the completed DMS to the Rejo Dental Clinic,
making it operational for daily use.

Key activities include:

 System Configuration: Setting up the online infrastructure and configuring servers to


host the DMS securely.
 Data Migration: Transferring existing patient and clinic data to the online platform,
ensuring accuracy and integrity.
 Testing: Conducting final testing to verify that the online system functions correctly
across different browsers and devices.

This phase ensures that the system is fully integrated into the clinic’s workflow and ready for
use.
3.3.6 Maintenance Phase

The maintenance phase involves ongoing support and updates to the DMS to ensure its
continued functionality and to address any issues that arise after deployment.

Key activities include:

 Bug Fixes: Resolving any issues that were not identified during the development and
testing phases.
 System Updates: Implementing updates to enhance functionality and improve
performance.
 Security Monitoring: Ensuring the system’s security to protect patient data and
comply with relevant regulations.
 User Feedback: Collecting and analyzing feedback from users to make necessary
improvements and enhancements.

This phase ensures that the DMS remains effective and up-to-date, supporting the clinic’s
evolving needs.

3.4 Technology and Tools Used to Develop System

Technology and tools play a crucial role in the development of any system. For the Dental
Management System (DMS) at Rejo Dental Clinic, both hardware and software requirements
are essential to ensure efficient system performance.

3.4.1 Hardware

For the DMS, the following hardware specifications are required:

 Processor: Intel Core i5 or AMD Ryzen 5 (2.5 GHz or higher)

 RAM: 8 GB or higher

 Hard Disk: 256 GB SSD

 Monitor: 15.6" Full HD (1920 x 1080)

 Mouse and Keyboard: Standard USB peripherals

 Laptop: Recommended with Windows 10 or higher


3.4.2 Software Requirements

The minimal software requirements selected for the development of the DMS are as follows:

 Operating System: Windows 10 or higher

 Development Environment: Visual Studio Code or any IDE supporting ASP.NET


Web API and React.js

 Frontend Framework: React.js

 Backend Framework: ASP.NET Web API

 Database: SQL Server or MySQL

 Hosting Provider: Microsoft Azure or AWS for hosting the application

3.5 Summary

The Waterfall model has been chosen for the development of the Dental Management System
(DMS). This approach involves distinct phases including requirement analysis, design,
implementation, verification, and maintenance. While the Waterfall model has its advantages
and disadvantages, its consistent and reliable nature makes it suitable for this project.
Identifying both hardware and software requirements ensures a successful development
process for the DMS, leveraging technologies such as ASP.NET Web API, React.js, and SQL
databases.
CHAPTER 4
REQUIREMENT ANALAYSIS AND DESIGN
4.1 Introduction

This chapter provides a concise overview of the requirement analysis and system design
processes for the Dental Management System (DMS). It begins by exploring the
identification and documentation of user needs and system specifications, which form the
backbone of the project. These requirements are categorized into user requirements,
functional requirements, and non-functional requirements, ensuring a comprehensive
understanding of what the system must achieve.

The design part covers several crucial aspects that translate these requirements into a
functional system. It includes the development of use-case diagrams, which illustrate the
interactions between users and the system, and activity diagrams that map out the flow of
operations within the system. Sequence diagrams are also covered to detail the order of
processes and interactions. Furthermore, class diagrams are developed to define the system's
structure in terms of classes and relationships. The chapter also delves into database design,
focusing on data organization and normalization to facilitate efficient data management.
Lastly, user interface design is discussed, emphasizing the creation of an intuitive and user-
friendly interface that ensures a seamless user experience.

4.2 Requirement Specifications


4.2.1 User Requirement
Doctor Users:

 Doctors should be able to manage their profiles and availability.

 Doctors should have access to patient records, medical history, and treatment plans.

 Doctors should be able to create, view, and manage prescriptions and treatment
records.

 Doctors should receive notifications for upcoming appointments and critical patient
updates.

Administrative Users:
 Administrators should be able to manage user accounts, including patients, doctors,
and other staff.

 Administrators should have access to system-wide settings and configurations.

 Administrators should be able to generate reports on system usage, patient statistics,


and financial data.

 Administrators should be responsible for maintaining system security and data


integrity.

Receptionist Users:

 Receptionists should be able to register new patients and update patient information.

 Receptionists should have access to billing information and be able to generate and
manage invoices and payments.

 Receptionists should ensure patient records are up-to-date and accurately maintained.

4.2.2 Functional Requirement


Patient Management:

 Allow the registration of new patients.

 Maintain a comprehensive patient database, including personal information,


complaint description, and contact details.

 Provide the ability to search and retrieve patient records.

 Enable updating and editing of patient information.

Doctors Management:

 Allow the registration and management of doctors.

 Maintain a database of doctors’ credentials, specialties, and contact information.

 Provide the ability to assign doctors to specific patients or appointments.

Appointments Management:

 Enable the management of appointments.

 Allow administrators to request, approve, and change the status of appointments.


Medicines Management:

 Maintain a database of available medicines, including their names and dosage


instructions.

 Enable searching for medicines by name.

Prescription and Treatments:

 Allow doctors to create prescriptions for patients, including medication and dosage
instructions.

 Maintain a record of past prescriptions and treatments for each patient.

 Enable printing or digital sharing of prescriptions with patients.

Invoices and Payments:

 Generate and manage invoices for treatments and services provided to patients.

 Provide the ability to track payments and outstanding balances.

 Generate payment receipts and maintain a payment history for each patient.

Users Management:

 Provide secure user authentication and authorization.

 Allow administrators to create and manage user accounts with different access levels.

 Maintain a user database with user credentials and access permissions.

4.2.3 Non-Functional Requirement


Security:
 Regularly backup and restore data to prevent data loss.
Performance:
 The system should handle a large number of simultaneous users without significant
performance degradation.
 Response times for operations and data retrieval should be quick and efficient.
Usability:
 The user interface should be user-friendly, intuitive, and easy to navigate.
 Provide clear instructions and helpful messages to assist users in performing tasks.
 Support multiple languages to accommodate users with different language
preferences.
Reliability:
 The system should be stable and reliable, minimizing system downtime or
disruptions.
 Implement error handling and recovery mechanisms to handle unexpected errors or
failures.
Scalability:
 The system should be capable of scaling up to accommodate future growth in the
number of patients, doctors, and appointments.
 The infrastructure should be scalable to handle increased data storage and processing
requirements.
Compatibility:
 The system should be compatible with different web browsers and mobile devices.
 Support integration with other existing systems or third-party applications if
necessary.

4.3 System Design


4.3.1 Introduction
In this section, we introduce the proposed system using UML system models. These system
models provide a detailed representation of the envisioned system. To illustrate the
architecture and functionality of the new system, we will employ use case models, sequence
diagrams, and class models.
4.3.2 Module Functions
4.3.3 Use-Case Diagrams
A use case is an action the system takes, typically in response to a user request. Use cases
were first utilized in the object-oriented technique, but they are now also used in the classical
approach for modeling functional requirements.

4.3.3.1 Admin Level


This Diagram Show the Features and Functionalist that Admin User can implement on to the
system.
Figure 1 Use Case Diagram (Admin Level)

4.3.3.2 Doctor Level


This Diagram Show the Features and Functionalist that Doctor User can implement on to the
system.
Figure 2 Use Case Diagram (Doctor Level)

4.3.3.3 Reception Level


This Diagram Show the Features and Functionalist that Reception User can implement on to
the system.

Figure 3 Use Case Diagram (Reception Level)


4.3.4 Activity Diagram
The flow of activity via a sequence of actions is depicted in the activity diagram. An essential
diagram for describing the system is the activity diagram. An activity diagram demonstrates
the total control flow. Here in this report our system’s activity diagram as an admin user

Figure 4 Activity Diagram

4.3.5 Sequence Diagram


Object interactions are arranged in temporal sequence in a sequence diagram. The scenario's
objects are shown, along with the series of messages that must be exchanged for the scenario
to run properly. In the logical view of the system being developed, sequence diagrams are
often connected to use case realizations. Event diagrams and event scenarios are other names
for sequence diagrams. A sequence diagram displays various concurrent processes or objects
as parallel vertical lines (lifelines), and the messages that are passed between them as
horizontal arrows, in the order that they take place. This enables the graphical specification of
straightforward runtime scenarios. A modeling strategy for visualizing a system's behavioral
execution is a sequence diagram. Using the use of model refactoring, this study aims to
analyze the security issue in a behavioral model (sequence diagram). We suggest methods for
detection and correction, and we empirically test the suggested method.

Figure 5 Sequence Diagram

4.3.6 Class Diagram


This class diagram represents the structure and relationships of classes within a Dental
Management System. Each class includes sample attributes and relevant methods,
demonstrating the key functionalities and interactions between various entities in the system.
Figure 6 Class Diagram

4.4 Database Design


A well-structured database design is crucial for efficiently managing the data in a Dental
Management System. The database design involves organizing the data into tables and
defining the relationships between these tables. In the context of the dental project, the
database design represents the management system for dental clinics. It visually displays the
connections between various entities such as patients, doctors, appointments, treatments,
prescriptions, and other relevant components.
Figure 7 Database Design

4.4.1 Mapping with Normalization


Normalization is the process of organizing data into tables for each entity. It aims to reduce
redundancy and improve data integrity by dividing larger tables into smaller, more
manageable ones without unnecessary duplication. The normalization process typically
progresses through three stages: First Normal Form (1NF), Second Normal Form (2NF), and
Third Normal Form (3NF).

 First Normal Form

PatientID PatientName Age Sex Address PhoneNo Description CreatedAt

1 John Doe 25 M Address1 123456 Description1 2023-01-01

2 Jane Roe 30 F Address2 654321 Description2 2023-02-01

 Second Normal Form


o Patient Table:

PatientID PatientName Age Sex Address PhoneNo Description CreatedAt


1 John Doe 25 M Address1 123456 Description1 2023-01-01

2 Jane Roe 30 F Address2 654321 Description2 2023-02-01

AppointmentID DoctorID PatientID AppointmentNumber AppointmentTime


1 1 1 APPT001 2023-01-10 10:00:00
2 2 2 APPT002 2023-02-15 11:00:00

o Appointment Table:

 Third Normal Form


o Patient Table:

PatientID PatientName Age Sex Address PhoneNo Description CreatedAt

1 John Doe 25 M Address1 123456 Description1 2023-01-01

2 Jane Roe 30 F Address2 654321 Description2 2023-02-01

AppointmentID DoctorID PatientID AppointmentNumber AppointmentTime


1 1 1 APPT001 2023-01-10 10:00:00
2 2 2 APPT002 2023-02-151:00:00
o Appointment Table:

o PatientAppointment Table:

AppointmentID PatientID
1 1
2 2

4.5 User Interface Design


User Interface (UI) Design focuses on anticipating what users might need to do and
ensuring that the interface has elements that are easy to access, understand, and use to
facilitate those actions. UI brings together concepts from interaction design, visual
design, and information architecture.

Landing Page

Figure 9 Landing Page

Login Form

Figure 10 Login Form

Admin Dashboard
Figure 11 Admin Dashboard

Doctor Dashboard

Figure 12 Doctor Dashboard

Reception Dashboard
Figure 13 Reception Dashboard

Patients Page

Figure 14 Patients Page

Add Patient Form


Figure 15 Add Patient Form

Edit Patient Form

Figure 16 Edit Patient Form

Services Page
Figure 17 Service Page

Add Service Form

Figure 18 Add Service Form

Medicine Page
Figure 19 Medicine Page

Add Medicine Form

Figure 20 Add Medicine Form

Prescription Page
Figure 21 Prescriptions Page

Add Prescription Form

22 Add Prescription form

Treatments Page
Figure 23 Treatments Page

Add Treatment Page

Figure 24 Add Treatment Page

Appointments Page
Figure 25 Appointment Page

Add Appointment Form

26 Add Appointment form

Appointment View Form


Figure 27 View Appointment Form

Invoices Page

28 Invoices Page

Users Page
Figure 29 Users Page

Add User Form

30 Add User Form

Doctors Page
Figure 31 Doctors Page

Add Doctor Form

Figure 32 Add Doctor Form


Report Page

Figure 33 Report Design

4.6 Summary

Overall, this chapter outlines the requirement analysis and system design for the Dental
Management System (DMS). It begins with identifying user, functional, and non-functional
requirements for doctors, administrative staff, and receptionists, detailing specific needs for
managing patient records, appointments, prescriptions, and user accounts. The chapter then
transitions to system design, introducing use-case, activity, sequence, and class diagrams to
represent system interactions, workflows, and structures. It also covers database design,
emphasizing data organization and normalization to ensure efficient data management.
Lastly, it discusses user interface design to create an intuitive and user-friendly experience for
all users.
CHAPTER 5
Implementation and Testing
5.1 Introduction
This chapter offers a detailed examination of the tools, technologies, and design elements
involved in the development of the Dental Management System (DMS). It aims to provide a
comprehensive understanding of the development process by delving into the specific
software and programming languages utilized, as well as the various design components
integrated into the system. The chapter also presents sample code snippets to demonstrate the
implementation of key functionalities and discusses the challenges encountered during
development, along with the strategies used to address these issues.

5.2 System Development Environment


Development Tools and Technologies

The Dental Management System was developed using a range of sophisticated tools and
technologies to ensure robust functionality and a seamless user experience. Key tools include:

Integrated Development Environments (IDEs): Visual Studio Code were employed for
coding and debugging, providing a streamlined development workflow.

Frontend Frameworks: React JS was utilized to build dynamic and responsive user
interfaces, facilitating a smooth user interaction with the system.

Backend Frameworks: ASP.NET Web API was chosen for backend development, ensuring
efficient handling of data and secure API integrations.

Design Components

The system incorporates several critical design elements:

User Interfaces: Designed to be intuitive and user-friendly, the interfaces enable easy
navigation and interaction for various users, including doctors, receptionists, and
administrators.

Databases: A well-structured database design ensures efficient data storage and retrieval,
supporting the system's performance and scalability.
System Architecture: The architecture is designed to integrate various components
seamlessly, ensuring reliability and maintainability.

5.3 Sample Codes


5.3.1 User Authentication Code (Backend)
public class AuthController : ControllerBase

private readonly ApplicationDbContext _context;

public AuthController(ApplicationDbContext context)

_context = context;

public class LoginData

public string? email { get; set; }

public string? password { get; set; }

[HttpPost("/Login")]

public async Task<IActionResult> Login([FromBody] LoginData data)

var user = await _context.Users.SingleOrDefaultAsync(u => u.Email == data.email);

if (user is null) return BadRequest("Not Found this user! Invalid username");

if (data.password != user.Password) return BadRequest("Incorrect Password");

string keyInput = "ASDFGHJKL:}{ POIUYTREWQZXCVBNM<>?+_)(*&^%$#@!)}";

var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(keyInput));

var claims = new List<Claim> {

new(JwtRegisteredClaimNames.Sub, user!.Id.ToString()),
new("FullName", user.Name!),

new("email", user.Email!),

new("Role", user.Role!)

};

// the user is doctor ?

var doctor = await _context.Doctors.SingleOrDefaultAsync(d => d.UserId == user.Id);

if(doctor is not null) {

claims.Add(new("doctorId", doctor.Id.ToString()));

var credentials = new SigningCredentials(key, SecurityAlgorithms.HmacSha256);

var token = new JwtSecurityToken("MyApp", "FrontEnd", claims, notBefore: DateTime.Now,


expires: DateTime.Now.AddHours(5), credentials);

var handler = new JwtSecurityTokenHandler();

var Jwt = handler.WriteToken(token);

var result = new {

token = Jwt

};

return Ok(result);

5.3.2 Appointments Code (Backend)


[HttpPost("/Appointments")]

public async Task<IActionResult> Add([FromBody] AppointmentVM appointmentvm)


{
if (!ModelState.IsValid) return BadRequest("Invalid Appointment Data");
var previousApps = await _context.Appointments.Where(p => p.patientId ==
appointmentvm.patientId)
.ToListAsync();
var patientStatus = "";
if (previousApps.Any())
{
patientStatus = "Old";
}
else
{
patientStatus = "New";
}

var prevApps2 = await _context.Appointments


.Where(a => a.CreatedAt.Date == DateTime.Now.Date && a.DoctorId ==
appointmentvm.doctorId)
.ToListAsync();

var appointment = new Appointment


{
patientId = appointmentvm.patientId,
DoctorId = appointmentvm.doctorId,
UserId = User.GetUserId(),
AppointmentNumber = prevApps2.Count()+1,
CreatedAt = DateTime.Now,
TicketPrice = appointmentvm.TicketPrice,
Invoice_No = appointmentvm.InvoiceNo,
Status = "Pending",
PatientStatus = patientStatus
};
_context.Appointments.Add(appointment);
await _context.SaveChangesAsync();
return Created("/Appointments", appointment);
}
[HttpGet("/PendingAppointments/specificDoctor")]
public async Task<IActionResult> GetPendingAppsWithDoctor()
{
var PendingApps = await _context.Appointments.Where(a => a.CreatedAt.Date ==
DateTime.Today.Date)
.Include(p => p.Patient).OrderBy(a => a.AppointmentNumber)
.Where(a => a.Status == "Pending").Include(a => a.Doctor).Where(a => a.DoctorId ==
User.GetDoctorId())
.ToListAsync();
if (!PendingApps.Any()) return BadRequest("No Pending Appointments Today");
return Ok(PendingApps);
}

[AllowAnonymous]
[HttpGet("/Appointments/TotalAppointments")]
public async Task<IActionResult> GetTotalAppointments()
{
var totalApps = await _context.Appointments.CountAsync();
return Ok(totalApps);
}

[HttpGet("/Appointments/Get/{status}")]
public async Task<IActionResult> GetWithStatus(string status)
{
var PendingApps = await _context.Appointments.Include(p => p.Patient)
.Where(a => a.DoctorId == User.GetDoctorId())
.OrderByDescending(a => a.CreatedAt)
.Where(a => a.Status!.ToLower() == status.ToLower()).Include(a => a.Doctor)
.ToListAsync();
if (!PendingApps.Any()) return BadRequest($"No {status.ToUpper()} Appointments");
return Ok(PendingApps);
}

[HttpGet("/Appointments/WithOutDoctor/{status}")]
public async Task<IActionResult> GetAllWithStatus(string status)
{
var PendingApps = await _context.Appointments.Include(p => p.Patient)
.OrderByDescending(a => a.CreatedAt)
.Where(a => a.Status!.ToLower() == status.ToLower()).Include(a => a.Doctor)
.ToListAsync();
if (!PendingApps.Any()) return BadRequest($"No {status.ToUpper()} Appointments");
return Ok(PendingApps);
}
[HttpGet("/Appointments/doctor/patients")]
public IActionResult GetNumberOfPatientsOfDoctor()
{
var distinctPatients = _context.Appointments.Where(d => d.DoctorId ==
User.GetDoctorId()).Select(a => a.patientId).Distinct();
int numberOfPatients = distinctPatients.Count();
return Ok(numberOfPatients);
}

[HttpGet("/Appointments/doctor/Income")]
public async Task<IActionResult> GetTotalIncomeOfSpecificDoctor()
{
decimal totalIncomeOfSpecificDoctor = await _context.Invoices
.Join(_context.Appointments,
invoice => invoice.Invoice_No,
appointment => appointment.Invoice_No,
(invoice, appointment) => new { Invoice = invoice, Appointment = appointment })
.Where(x => x.Appointment.DoctorId == User.GetDoctorId())
.SumAsync(x => x.Invoice.Total);

decimal totalIncomeOfSpecificDoctor2 = await _context.Invoices


.Join(_context.TreatmentPlans,
invoice => invoice.Invoice_No,
treatmentPlan => treatmentPlan.InvoiceNo,
(invoice, treatmentPlan) => new { Invoice = invoice, TreatmentPlan = treatmentPlan })
.Where(x => x.TreatmentPlan.Appointment!.DoctorId == User.GetDoctorId())
.SumAsync(x => x.Invoice.Total);
return Ok(totalIncomeOfSpecificDoctor + totalIncomeOfSpecificDoctor2);
}

// Get Total Appointments with specific doctor


[HttpGet("/Appointments/doctor/")]
public async Task<IActionResult> GetTotalAppointmentsWithSpecificDoctor ()
{
var appointments = await _context.Appointments.Where(a => a.DoctorId ==
User.GetDoctorId()).ToListAsync();
if (!appointments.Any()) return Ok(0);
return Ok(appointments.Count());
}

5.3.3 Doctors Code (Backend)


public async Task<IActionResult> GetAll()

{
var doctors = await _context.Doctors!
.Include(d => d.User)
.ToListAsync(HttpContext.RequestAborted);
if (!doctors.Any()) return BadRequest("No Doctors Found!!!");
foreach (var doctor in doctors)
{
doctor.User!.Avatar = GetImage(doctor.User.Name!, "Users");
}

return Ok(doctors);
}

[HttpGet("{id}")]
public async Task<IActionResult> GetSingle(int id)
{
var doctor = await _context.Doctors
.Include(d => d.User)
.SingleOrDefaultAsync(d => d.Id==id);
if (doctor is null)
return BadRequest("Not Found this doctor");

return Ok(doctor);
}

[HttpPost]
public async Task<IActionResult> Add([FromBody] DoctorVM doctorvm)
{
if (!ModelState.IsValid)
return BadRequest();
var user = await _context.Users.FindAsync(doctorvm.UserId);
if (user is null) return BadRequest("Invalid User");
var doctor = new Doctor
{
PhoneNo = doctorvm.PhoneNo,
Speciality = doctorvm.Speciality,
UserId = doctorvm.UserId,

CreatedAt = DateTime.Now
};
user.Avatar = GetImage(user.Name!, "Users");
user.Role = "Doctor";
_context.Add(doctor);
await _context.SaveChangesAsync(HttpContext.RequestAborted);
return Created("/Doctors", doctor);
}

5.3.4 Patients Code (Backend)


[HttpGet("/Patients")]

public async Task<IActionResult> GetAll()


{
var patients = await _context.Patients.
OrderByDescending(p => p.CreatedAt)
.Include(p => p.Appointments).ToListAsync();
if (!patients.Any()) return BadRequest("there is no patients");
return Ok(patients);
}
[AllowAnonymous]
[HttpGet("Patients/TotalPatients")]
public async Task<IActionResult> GetTotalPatients ()
{
var totalPatients = await _context.Patients.CountAsync();
return Ok(totalPatients);
}

[HttpGet("/Patients/gender")]
public async Task<IActionResult> GetPatientsWithGender()
{
var patients = await _context.Patients.GroupBy(p => p.Sex)
.Select(g => new
{
type = g.Key,
Quantity = g.Count()
}).ToListAsync();

return Ok(patients);
}

5.4 Unit Testing


Unit testing is a crucial aspect of the dental management system project, helping to ensure the

reliability and correctness of the system's individual components. By writing unit tests, we
can verify the functionalities of modules such as patients, doctors, appointments, treatments,

prescriptions, medicines, invoices, and payments. These tests allow us to check if the API

endpoints for adding, retrieving, updating, and deleting data are functioning correctly,
ensuring that the system accurately stores, retrieves, and updates the necessary information.
Through unit testing, we can catch bugs and issues early on, improving the overall quality
and performance of the dental management system.

5.5 Black Box Testing


Black box testing is an essential approach for testing the dental management system project,

focusing on validating its functionalities without examining the internal workings of the

software. This testing method involves testing the system based on its expected inputs and

desired outputs, regardless of the underlying code or implementation details. For example,
black box testing can be applied to validate scenarios such as creating appointments,
scheduling treatments, generating invoices, and tracking payments. By simulating various
user inputs and verifying the corresponding outputs, black box testing helps us assess whether
the system meets the specified requirements and performs as intended from an end-user
perspective. This ensures that the dental management system is user-friendly, reliable, and
capable of handling real-world scenarios while maintaining the desired level of accuracy and
functionality.

5.6 White Testing


White box testing is a crucial technique for evaluating the internal structure and logic of the
dental management system project. It involves examining the system's code, architecture, and

implementation details to develop tests that target specific components or functionalities.


With white box testing, we can verify if the code is properly structured, adheres to coding
standards, and correctly handles all possible scenarios. This testing method helps identify
potential issues such as logical errors, boundary cases, and inefficiencies in the code. By
writing white box tests, we can thoroughly assess the system's internal behavior, ensuring that
the dental management system is robust, efficient, and free from any structural or logical
defects. This approach complements black box testing, providing deeper insights into the
system's inner workings and helping to enhance the overall quality and performance of the
software.

5.7 Integration Testing


Integration testing is a vital phase in the development of the dental management system
project. It focuses on testing the interaction and collaboration between various modules or
subsystems of the system. Integration testing ensures that the individual components of the
system seamlessly integrate and function together as expected. For example, it involves
testing how the patient module interacts with the appointment module, ensuring that patient
information is accurately transferred and updated during appointment scheduling.
Additionally, integration testing verifies the flow of data and communication between
different modules such as treatments, prescriptions, invoices, and payments. By conducting
integration tests, we can identify any issues or discrepancies between these components,
ensuring smooth coordination and data consistency throughout the entire system. Integration
testing helps to uncover bugs, interoperability conflicts, and interface mismatches, ultimately
enhancing the performance, reliability, and overall user experience of the dental management
system

5.8 System Testing


System testing is a critical phase in the development of the dental management system
project. It involves testing the system as a whole to ensure that it meets the specified
requirements, functions as intended, and operates smoothly in a realistic environment. System
testing encompasses testing the end-to-end functionalities of the dental management system,
including scenarios such as creating and managing patient records, scheduling appointments,
managing treatments and prescriptions, generating invoices, and tracking payments. It also
involves testing various user interactions and workflows to ensure that the system handles
them correctly. System testing aims to validate the system's performance, reliability, security,
and usability. This testing phase helps in uncovering any defects, inconsistencies, or issues
that may affect the overall functionality and user experience of the dental management
system. By conducting rigorous system testing, we can ensure that the system is robust,
stable, and capable of meeting the needs of dental clinics by effectively managing dental
practice-related tasks and data.

5.9 Summary
Overall, this chapter in the report delves into the implementation and testing phases of the
Dental Management System (DMS). It begins with an overview of the development
environment, highlighting tools like Visual Studio Code, React JS for the frontend, and
ASP.NET Web API for the backend. Sample code snippets for user authentication,
appointment management, doctor, and patient functionalities illustrate key implementations.
The chapter then discusses various testing methodologies used to ensure system reliability
and functionality. Unit testing checks individual components, black box testing validates
system behavior from an external perspective, white box testing examines internal structures,
integration testing ensures seamless module interactions, and system testing evaluates overall
system performance and user experience. Through these comprehensive testing strategies, the
chapter underscores the commitment to delivering a robust, reliable, and user-friendly dental
management system.

You might also like