Online Doctor Appointment System Design
Online Doctor Appointment System Design
Prescripto
By
Executive Summary
The Online Doctor Appointment Project is a web-based application that enables patients to book doctor
appointments online. The system aims to simplify the appointment scheduling process, reduce wait times,
and improve overall patient experience.
Here's a summary of key points for Prescripto, an Online Doctor Appointment System:
Key Points
1. Objective: Simplify appointment scheduling, reduce wait times, and improve patient
experience.
2. Features: Patient registration, doctor search, appointment scheduling, reminders, and
notifications.
3. Benefits: Convenience, reduced wait times, improved patient experience, increased
efficiency, and enhanced accessibility.
4. Technologies: React, [Link], [Link], MongoDB, and other relevant
technologies.
5. Importance: Addresses the need for efficient appointment scheduling, improves
patient satisfaction, and streamlines healthcare services.
Table of Contents
1. Design Considerations......................................................................................................5
2. Requirements Traceability Matrix..................................................................................5
3. Design Models...................................................................................................................6
3.1 Architectural Design...............................................................................................11
3.2 Data Design..............................................................................................................16
3.2.1 Data Dictionary................................................................................................18
3.3 User Interface Design..............................................................................................23
3.3.1 Screen Images...................................................................................................24
3.3.2 Screen Objects and Actions.............................................................................25
Use Case 1: View Profile Information.................................................................................30
Screen Objects..................................................................................................................30
1.4. Behavioral Model.....................................................................................................31
4. Design Decisions.................................................................................................................33
5. Summary..........................................................................................................................34
References.................................................................................................................................1
List of Tables
Tables of Figures
Figure 1 Class Diagram 7
Figure 2 Sequence Diagram 9
Figure 3 State Transition Diagram 10
Figure 4 UML Class Relation Diagram 12
Figure 5 UML Component Diagram 13
Figure 6 Interaction Diagram 31
Figure 3 State Transition Diagram 32
4
System Design
Explain the product perspective in which software will operate including dependencies and
interaction with other system. List the design constraints (like performance requirements)
impacting design.
Product Perspective
The Online Doctor Appointment System is a web-based application that enables patients to book doctor
appointments online. The system operates in the healthcare industry, providing a platform for patients to
interact with doctors and healthcare providers.
Dependencies
1. User Authentication System: The system relies on an external user authentication system to
verify patient identities.
2. Payment Gateway: The system integrates with a payment gateway to process appointment
fees and payments.
Design Constraints
1. Security Requirements: The system ensuring the confidentiality, integrity, and availability of
patient data.
2. Usability Requirements: The system should have an user interface, with clear navigation and
minimal cognitive load.
3. Scalability Requirements: The system should be able to scale horizontally, with the ability to
add or remove servers as needed to handle changes in traffic.
5
1. Design Considerations
Here are some Assumptions and Dependencies, Limitations, and Risks for the Online Doctor
Appointment System:
Assumptions
1. Availability: Doctors and healthcare providers have existing schedules and availability that can
be integrated into the system.
2. Doctor Availability: Doctors maintain their availability schedules accurately in the system.
3. Secure Authentication: User login and authentication mechanisms are secure.
4. System Maintenance: Regular updates and maintenance are assumed to ensure smooth
functioning.
Dependencies
1. Internet Connections: Reliable internet connectivity and server to ensure system availability.
Limitations
1. Technical Limitation: The system may not be compatible with older browsers or devices.
2. Functional Limitation: The system may not support advanced features like video
conferencing or real time chat.
3. Scalability Limitation: The system may experience performance issues with a large number
of users.
Risks
1. Security Risk: Patient data may be compromised due to security measures.
2. Technical Risk: System downtime or performance issues may occur due to technical failures.
3. Functional Risk: The system may not meet the needs of patients on healthcare providers.
4. Regulatory Risk: The system may not comply with relevant healthcare regulations.
3. Design Models
Provide the descriptions of the following models used to describe the system design. Also
ensure visibility of all diagrams.
The applicable models for the project using object-oriented development approach may
include:
1. Class Diagram
7
Figure 1 Class Diagram
Description:
This model represents the static structure of the system, including classes, attributes, and
relationships. For an online doctor appointment system, classes might include:
User (Abstract Class):
8
o The User class defines common properties and behaviors shared by all users
of the system, such as patients, doctors, and admins. It includes authentication
features like login and logout, and user profile management.
Patient:
o They can book and cancel appointments, view prescriptions, and join a
waiting list if no slots are available.
Doctor:
o The Doctor class includes attributes related to a medical professional, such as
specialization, and availability. Doctors can manage their schedule, view
upcoming appointments, and issue prescriptions.
Admin:
o The Admin class represents the administrative users who oversee platform
operations. They can verify doctors, manage patients, generate system-wide
reports.
Appointment:
o This class handles appointment data between a patient and a doctor. It
includes scheduling details, status, and links to the payment made for the
consultation.
Payment:
o Handles payment information linked to an appointment. This includes the
amount, method, and status.
Calendar:
o Represents each doctor’s availability schedule. It includes available time slots,
blocked dates, and functions to update availability.
Update:
o Represents system-generated notifications such as appointment reminders,
prescription availability, or changes in schedules.
9
Figure 2 Sequence Diagram
Description:
A sequence diagram for online doctor appointment might show the steps involved in
scheduling an appointment, such as:
Patient: They can book and cancel appointments, view prescriptions, and join a
waiting list if no slots are available and search for a doctor by specialization.
Doctor: The Doctor attributes related to a medical professional, such as
specialization and availability. Doctors can manage their schedule, view upcoming
appointments, and issue prescriptions.
Appointment: This can handles appointment data between a patient and a doctor. It
includes scheduling details, status, and links to the payment made for the
consultation.
User: They can define common properties and behaviors shared by all users of the
system, such as patients, doctors, and admins. It includes authentication features like
login and logout, and user profile management.
3. State Transition Diagram (for the projects which include event handling and backend
processes)
10
Figure 3 State Transition Diagram
Description:
Here is a detailed description of the state transition diagram for an online doctor appointment
system:
11
States:
Events:
12
Figure 4 UML Class Relation Diagram
Description:
The UML class relationship diagram illustrates the relationships between classes.
Class Relationships
User is the parent class for Doctor, Patient, and Admin (Generalization/Inheritance).
A Doctor can have multiple Appointments (One-To-Many).
An Appointment is associated with one Doctor and one Patien.
A Payment is associated with one Appointment.
An Admin can manage multiple Users and Appointments (One-To-Many).
Multiplicity
13
A Payment is associated with 1 (one) Appointment.
The UML component diagram illustrates the high-level architecture of the online doctor
appointment system, highlighting the interactions between various components.
Components
1. Frontend UI: The user interface component, responsible for user interactions,
displaying information, and sending requests to services.
2. Authentication Service: Handles user authentication, registration, and authorization.
3. Appointment Service: Manages appointment scheduling, cancellations, and updates.
4. Doctor Service: Handles doctor information, availability, and schedules.
5. Payment Service: Processes payments for appointments.
6. Admin Service: Provides administrative functionality, such as user management and
system monitoring.
14
7. Notification: Sends notifications to users, doctors, and admins regarding
appointments, payments, and system updates.
Interfaces
Frontend UI: Consumes interfaces from services (e.g., Appointment Service, Doctor
Service) and provides interface for user interactions.
Services: (Authentication, Appointment, Doctor, Payment, and Admin) provide
interfaces for other components to interact with them.
Notification: Consumes interfaces from services to send notifications.
Interactions
Here's a detailed mapping of the online doctor appointment system using the Multi-Tiered architecture
pattern:
Client-Side Technologies:
HTML/CSS for UI
JavaScript for dynamic UI interactions
15
ReactJS UI component management
Server-Side Technologies:
Database Schema:
Patients Collection
Doctors Collection
Appointments Collection
Payments Collection
Database Technologies:
16
3.2 Data Design
Here’s an explanation of how the information domain of the online doctor appointment system is
transformed into data structures:
The information domain of the system consists of patients, doctors appointment, payments, and
notifications. These entities are transformed into data structures as follows:
Patient
o Patient ID (unique identifier
o Name
o Email
o Password
o Contact information
o Medical history
Doctors
o Doctor ID (unique identifier)
o Name
o Specialty
o Availability
o Contact information
Appointments
o Appointment ID (unique identifier)
o Patient ID
o Doctor ID
o Date and time
o Status (scheduled, confirmed, cancelled)
Payments
o Payment ID (unique identifier)
o Appointment ID
o Payment method
o Payment date
o Amount
Notifications
17
o Notification ID (unique identifier)
o Appointment ID
o Notification type (reminder, confirmation, cancellation)
Data Structures
The system uses a relational database management system (RDBMS) to store and manage data. The
following data structures are used:
Tables
Patients
o Patient ID (primary key)
o Name
o Email
o Password
o Contact information
o Medical history
Doctors
o Doctor ID (primary key)
o Name
o Specialty
o Availability
o Contact information
Appointments
o Appointment ID (primary key)
o Patient ID (foreign key)
o Doctor ID (foreign key)
o Date and time
o Status
Payment
o Payment ID (primary key)
o Appointment ID (foreign key)
o Payment method
o Payment date
o Amount
18
Notifications
o Notification ID (primary key)
o Appointment ID (foreign key)
o Notification type
o Notification date and time
Relationship
Dataset/Database Design
The database design follows the principles of normalization to minimize data redundancy and
improve data integrity.
Normalization Rule
1. First Normal Form (1NF): Each table cell contains a single value.
2. Second Normal Form (2NF): Each non-key attribute depends on the entire primary key.
3. Third Normal Form (3NF): If a table is in 2NF, and a non-key attribute depends on another
non-key attribute, then it should be moved to a separate table.
Database Schema
The database schema is designed to support the data structures and relationship described above.
Data Storage
The system stores data in a relational database management system (RDBMS) such as MySQL.
Data Processing
The system processes data using SQL queries and stored procedures.
Data Organization
The system organizes data into tables, with each table representing a specific entity or relationship.
19
● Prepare an alphabetical list of all system entities or significant data. For each entry,
include the data type and provide a brief description of its purpose within the
system.
Here is an alphabetical list of system entities or major data for the online doctor appointment
1. Appointment
1. Type: Object
2. Description: Represents a scheduled appointment between a patient and a doctor.
2. Appointment Date
1. Type: Date
2. Description: The date of the scheduled appointment.
3. Appointment Time
1. Type: Time
2. Description: The time of the scheduled appointment.
4. Doctor
1. Type: Object
2. Description: Represents a doctor with their profile information.
5. Doctor Name
1. Type: String
2. Description: The name of the doctor.
6. Doctor Specialty
1. Type: String
2. Description: The medical specialty of the doctor.
7. Patient
1. Type: Object
2. Description: Represents a patient with their profile information.
8. Payment Method
1. Type: String
2. Description: The payment method used by the patient.
9. Speciality
1. Type: String
2. Description: A medical specialty (e.g., cardiology, pediatrics).
20
o The first column will contain the terminology (e.g., object name, attribute,
method, or method parameter).
o The second column will provide the description, including data types, roles, or any
other relevant information.
Terminology Description
User Represent the user entity which can be patient, doctor or admin.
Profile View Detailed view of doctor profiles with rating and availability.
● Functionality, and for each parameter, specify the data type and its role within the
function.
Here's a list of functions for the online doctor appointment system, along with their parameters,
descriptions, and data types:
register Patient
o patient Name (String): The patient’s name
o Email (String): The patient’s email address.
o Password (String): The patient’s password.
o Phone Number (String): The patient’s phone number.
o Description: Registers a new patient in the system.
21
login Patient
o Email (String): The patient’s email address.
o Password (String): The patient’s password.
o Description: Authenticates a patient and logs them into the system.
viewDoctorProfile
o Doctor ID (Integer): The unique ID of the doctor.
o Description: Retrieves and displays a doctor’s profile information.
schedule Appointment
o Patient ID (Integer): The unique ID of the patient.
o Doctor ID (Integer): The unique ID of the doctor.
o Appointment Date (Date): The date of the appointment.
o Appointment Time (Time): The time of the appointment.
o Description: Schedules an appointment between a patient and a doctor
cancel Appointment
o Appointment ID (Integer): The unique ID of the appointment.
o Description: Cancels a scheduled appointment.
viewAppointmentSchedule
o Doctor ID (Integer): The unique ID of the doctor.
o Date (Date): The date for which to view the appointment schedule.
o Description: Retrieves and displays a doctor’s appointment schedule for a specific date.
make Payment
o Appointment method (Integer): The unique ID of the appointment.
o Payment Method (String): The payment method used.
o Payment Amount (Float): The amount paid.
o Description: Processes a payment for a scheduled appointment.
Here's a list of objects, attributes, descriptions, methods, and method parameters for the online doctor
appointment system using the Object-Oriented (OO) approach:
User Role
1. Patient: A patient can register, log in, schedule appointments, view appointment
history, and make payments.
2. Doctor: A doctor can register, log in, manage availability, confirm/cancel
appointments, and view appointment schedules.
Patient Workflow
1. Registration: The patient registers by providing personal details, contact information
and medical history.
2. Login: The patient logs in using their credentials.
3. Schedule Appointment: The patient selects a doctor, date, and time for appointment.
4. Appointment Confirmation: The patient receives a confirmation notification for the
scheduled appointment.
5. Appointment History: The patient can view their appointment history, including
upcoming and past appointments.
6. Payment: The patient makes a payment for an appointment using a secure payment
gateway.
24
7. Notification: The patient receives notifications for appointment reminders,
confirmations, and cancellations.
Doctor Workflow
1. Registration: The doctor registers by providing personal details, contact information,
and availability schedule.
2. Login: The doctor logs in using their credentials.
3. Manage Availability: The doctor updates their availability schedule.
4. Confirm/Cancel Appointments: The doctor confirms or cancels appointments.
5. View Appointment Schedule: The doctor views their upcoming and past
appointment.
6. Notification: The doctor receives notifications for appointment confirmations,
cancellations, and reminders.
Feedback Information
The system provides feedback to users through:
1. Notifications: Automatic notifications for appointment confirmations, cancellations,
and reminders.
2. Email: Email notifications for appointment confirmations and cancellations.
3. Dashboard: A user dashboard displaying upcoming appointments, appointment
history, and payment status.
Expected Features
1. Secure Registration: Patients and doctors can register securely.
2. Appointment Scheduling: Patients can schedule appointments with doctors.
3. Appointment Confirmation: Patients receive confirmation notifications for schedule
appointments.
4. Payment Processing: Patients can make payments for appointments.
5. Notification System: Patients and doctors receive notifications for appointment
reminders, confirmations, and cancellations.
6. User Dashboard: Patients and doctors have access to a user dashboard displaying
relevant information.
25
3.3.1 Screen Images
Actions
1. Select Specialty: Patient selects a medical specialty from the dropdown menu or search bar.
2. Book Appointment: Patient clicks on a doctor's profile to book an appointment.
3. Search: Patient uses the search bar in the header banner to search for doctors or medical
specialties.
26
Use Case 1: Filtering Doctors by Specialization
Screen Objects:
1. Specialization Buttons (e.g., "General physician", "Gynecologist", etc.)
2. Doctor Cards (Name, Image, Availability, Specialty)
Actions:
1. Click on Specialization Button: Filters the visible doctor cards to show only those
matching the selected specialization.
2. View Filtered Results: The display updates in real-time, hiding all unrelated doctors
and showing only the relevant ones.
27
Use Case 2: Viewing Doctor Details or Booking an Appointment
Screen Objects:
1. Doctor Cards (Clickable area)
2. Doctor Name and Image (potentially part of the clickable area)
Actions:
1. Click on Doctor Card: Navigates to a detail view page for that doctor (not visible in
the screenshot, but likely part of the app).
Action
1. User clicks on the “About” link in the top navigation bar.
2. Displayed as a static image to add trust and visual appeal (no action required).
3. User reads static text content detailing company mission and vision.
28
4. User scrolls and reads each card or column for platform benefits.
Actions
1. User can tap/click to initiate a phone call (on mobile).
2. User clicks to open their email client with pre-filled email address.
29
Actions:
1. View Appointment Details: Users can view key information like the doctor’s
specialization, location, and appointment date/time.
2. Pay for Appointment: Clicking the “Pay Online” button likely redirects to a payment
gateway or initiates a payment process.
3. Cancel Appointment: Clicking the “Cancel appointment” button would likely trigger a
confirmation dialog and, upon confirmation, remove the appointment from the list or
update its status.
Actions:
1. Navigate Through Pages: Clicking on the navbar items takes the user to different
sections of the site (e.g., list of doctors, about page).
2. Access User Profile/Settings: Clicking on the user icon may open a dropdown with
options like “My Profile,” “Logout,” or “Settings.”
3. Contact Support: Information in the footer (phone number and email) allows the user
to reach out to support or for inquiries.
30
Use Case 1: View Profile Information
Screen Objects
1. Profile Image
2. Name
3. Email, Phone, Address
4. Gender, Birthday
Actions
Screen Objects
1. “Edit Button”
Actions
31
4. Cancel Edit.
Description:
A sequence diagram for online doctor appointment might show the steps involved in
scheduling an appointment, such as:
Patient: They can book and cancel appointments, view prescriptions, and join a
waiting list if no slots are available and search for a doctor by specialization.
Doctor: The Doctor attributes related to a medical professional, such as
specialization and availability. Doctors can manage their schedule, view upcoming
appointments, and issue prescriptions.
Appointment: This can handles appointment data between a patient and a doctor. It
includes scheduling details, status, and links to the payment made for the
consultation.
User: They can define common properties and behaviors shared by all users of the
system, such as patients, doctors, and admins. It includes authentication features like
login and logout, and user profile management.
State Diagrams:
32
Figure 7 State Transition Diagram
Description:
33
Here is a detailed description of the state transition diagram for an online doctor appointment
system:
States:
Events:
4. Design Decisions
Highlight the design choices while designing your system (e.g. choosing the Object oriented
design pattern, choosing between the algorithmic approaches and normalization level of the
database). Clearly specify which approach you have used and why you have made a specific
design choice.
Here’s how we can explain the design choice while developing online doctor appointment
System.
Design Choice
34
1. Frontend Framework
o ReactJS: We chose ReactJS as the front-end framework for building the user
interface of the online doctor appointment system. ReactJS provides a component-
based architecture, making it easy to manage and reuse UI components.
2. Backend Framework
o [Link] with [Link]: We used [Link] with [Link] as the back-end
framework for handling server-side logic, API routing, and database interactions.
[Link] provides an event-driven, non-blocking I/O model, while [Link] offers a
flexible and modular framework for building web applications.
3. Database Management System
o MongoDB: We selected MongoDB as the No SQL database management system for
storing and managing data. MongoDB provides flexible schema design, high
scalability, and ease of use.
4. Authentication and Authorization
o JSON Web Tokens (JWT): We implemented JSON Web Tokens (JWT) for
authentication and authorization. JWT provides a secure and secure way to
authenticate users and protect API routes.
5. API Design
o REST full API: We designed a REST full API for interacting with the back-end
server. The API follows standard HTTP methods (GET, POST, PUT, and DELETE)
and provides clear, descriptive endpoints for accessing and manipulating data.
6. Error Handling and Logging
o Try-Catch Blocks: We used try-catch blocks to handle runtime errors and
exceptions.
7. Code Organization and Modularity
o Modular Code Structure: We organized the code into separate modules and folders,
following a consistent naming convention. This structure makes it easy to locate
specific code files, maintain the code base, and reuse components.
5. Summary
Summary of the key design ideas discussed, design refinement and decisions taken in the
chapter. It may also reiterate chapter’s importance in addressing the projects objectives
Here's a summary of the key design ideas discussed, design refinement, and decisions taken:
36
References
Books
Pressman, R. S. (2014). Software engineering: A practitioner's approach (8th d.). McGraw-
Hill Education.
Sommerville, I. (2015). Software engineering (10th Ed.). Pearson Education Limited.
YouTube Tutorials
Apna College. (n.d.). Complete MERN stack development tutorial. YouTube.
[Link]
Code With Harry. (n.d.). [Link] tutorials for beginners. YouTube.
[Link]
WsCube Tech. (n.d.). MERN stack full course. YouTube.
[Link]
36