0% found this document useful (0 votes)
80 views31 pages

Pharmacy Management System Overview

The document outlines the design and development of a Pharmacy Management System (PMS) aimed at automating and streamlining pharmacy operations to enhance efficiency and reduce errors. Built using Angular 18 for the frontend and ASP.NET Core 8.0 for the backend, the system features role-based access control, automated expiry alerts, and comprehensive order tracking. The report details the project's lifecycle, including requirements analysis, software design, implementation, and testing, confirming the system's readiness for deployment in small to medium-sized pharmacies.

Uploaded by

pandit.editz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views31 pages

Pharmacy Management System Overview

The document outlines the design and development of a Pharmacy Management System (PMS) aimed at automating and streamlining pharmacy operations to enhance efficiency and reduce errors. Built using Angular 18 for the frontend and ASP.NET Core 8.0 for the backend, the system features role-based access control, automated expiry alerts, and comprehensive order tracking. The report details the project's lifecycle, including requirements analysis, software design, implementation, and testing, confirming the system's readiness for deployment in small to medium-sized pharmacies.

Uploaded by

pandit.editz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ABSTRACT

The pharmaceutical industry is a critical component of the healthcare system, playing


a significant role in ensuring timely access to essential medications. However, the
operational processes within a pharmacy—such as inventory control, order
management, supplier coordination, and expiry tracking—are often managed
manually or through fragmented systems. These traditional approaches lead to
increased human error, inefficiencies in stock replenishment, delayed decision-
making, and, ultimately, potential risks to patient safety. The need for a robust,
integrated digital solution is more pressing than ever in the age of data-driven
healthcare.

This project report presents the design and development of a Pharmacy


Management System—a secure, scalable, and modular full-stack web application
that automates and streamlines various internal pharmacy processes. The system is
built using the Angular 18 framework on the frontend for a dynamic, responsive user
interface, and [Link] Core 8.0 Web API on the backend to manage business logic
and data operations. Microsoft SQL Server is used as the relational database,
interfaced through Entity Framework Core using a Code First approach for
seamless integration.

A significant emphasis is placed on role-based access control, implemented through


[Link] Identity, which ensures that users—categorized into Admins, Doctors, and
Suppliers—can only access functions relevant to their roles. Admins can perform full
CRUD operations on drug and supplier data, generate real-time sales reports, and
manage drug orders. Doctors are provided with drug lookup and search capabilities,
while Suppliers can view and confirm incoming orders and update order tracking
information.

One of the standout features of this system is its automated expiry alert mechanism,
which flags expired drugs and prompts the Admin to place orders to replenish stock.
Additionally, the system includes comprehensive order tracking, allowing Suppliers
to update delivery statuses, and Admins to monitor fulfillment progress. The
application also includes planned future enhancements such as payment gateway
integration for order billing and AI-based drug suggestion features on the Doctor
dashboard, which could provide intelligent recommendations based on patient profiles
or usage trends.

The Pharmacy Management System was developed following a three-tier


architecture, separating the presentation, business logic, and data access layers. This
separation not only improves maintainability and testing but also enhances security
and performance. Testing was conducted using Swagger for API validation and
NUnit for backend unit testing, ensuring that each module performs as expected and
adheres to industry standards.

This report thoroughly documents the project's lifecycle—from the initial requirement
analysis and software design (including UML, ER, and DFD diagrams) to detailed
implementation strategies, testing procedures, and final deployment considerations.
The system has been evaluated against both functional and non-functional
requirements, confirming its readiness for deployment in small to medium-sized
pharmacy establishments.
In conclusion, this project demonstrates how modern full-stack development
methodologies and tools can be effectively employed to solve real-world problems in
the healthcare domain. The Pharmacy Management System not only improves
operational efficiency and data integrity but also lays the foundation for smarter, more
automated pharmacy management systems in the future.
Chapter 1
Introduction

1.1 Overview and Motivation


In the modern era of healthcare, pharmacies play a crucial role in ensuring
that patients receive the right medications at the right time. As the population
grows and the demand for healthcare services rises, the manual handling of
pharmacy operations has become inefficient, error-prone, and time-
consuming. Pharmacies not only deal with selling drugs but also with
maintaining inventory, managing suppliers, tracking expiry dates, validating
prescriptions, and generating sales reports. A robust and well-designed
Pharmacy Management System (PMS) can streamline all these operations
under a unified digital solution.

The motivation behind developing this Pharmacy Management System is to


automate the complete workflow of pharmacy operations — from drug
inventory to prescription handling — using modern web technologies. With
the advancement of web frameworks like [Link] Core for backend
services and Angular for frontend interfaces, it has become more feasible to
create scalable, secure, and user-friendly systems. Furthermore, this project
is intended to eliminate human errors, improve efficiency, ensure drug
traceability, and provide role-based access to different stakeholders such as
Admins, Doctors, and Suppliers.

The traditional paper-based approach or standalone systems lack real-time


updates, centralized access, and security, which are essential in a healthcare
environment. Hence, this project intends to overcome these limitations and
introduce features like role-based dashboards, drug expiry alerts, sales
reports, supplier tracking, and order automation in a secure and well-
managed system.

Key Problems with Traditional Systems:

 Lack of centralized management


 Difficulty in tracking inventory and expiry
 Poor prescription validation process
 Manual sales reporting
 No online order tracking or supplier communication

Motivation Highlights:

 To reduce workload and increase efficiency of pharmacy staff.

3
 To provide a real-time and secure digital solution for pharmacy
management.
 To ensure accurate sales tracking and drug ordering process.
 To implement role-based access for Admin, Doctor, and Supplier
users.
 To create a scalable solution that can be extended to include features
like online payment or drug suggestions.

1.2 Objective
The primary objective of the Pharmacy Management System is to design and
develop a full-stack web application that automates the end-to-end
management of pharmacy operations using modern programming paradigms.
The system will be divided into logical modules, with each module
addressing specific pharmacy functionalities such as drug inventory, order
processing, user authentication, and role-based dashboards.

Specific Objectives:

 To develop a secure user authentication system using [Link]


Identity with roles: Admin, Doctor, and Supplier.
 To allow Admin users to manage drugs, monitor expiry dates, and
interact with suppliers through a web-based dashboard.
 To enable Doctors to view drug availability and suggest
prescriptions.
 To provide Suppliers with an interface to view order requests and
send confirmation with tracking details.
 To maintain detailed logs of all transactions and generate date-wise
sales reports.
 To implement CRUD operations for Drugs and Suppliers with
validation.
 To alert the Admin for expired drugs and generate new orders
accordingly.
 To integrate Swagger for API testing and NUnit for unit testing.
 To design an intuitive, responsive frontend using Angular and
Tailwind CSS.

By fulfilling these objectives, the Pharmacy Management System will act as


a comprehensive solution for the digitization of pharmacy services,
enhancing operational accuracy and convenience for all stakeholders.

1.3 Summary of Similar Applications


Several pharmacy-related software solutions exist in the market, both as
standalone desktop applications and as cloud-based platforms. However,
most of these systems are either subscription-based or built using outdated
technologies that are hard to scale or integrate with modern tools. The

4
proposed system stands apart from the existing ones by offering a role-based,
modular architecture and being built on open-source technologies.

Notable Existing Systems:

1. Marg ERP for Pharmacy


o Feature-rich but complex UI
o Paid software with license cost
o Lacks modern tech stack like Angular or .NET Core 8
2. PharmAssist
o Offers inventory and sales tracking
o No doctor or supplier login
o Limited to desktop environment
3. Generic Pharmacy POS
o Basic functionality with limited reporting
o Not suitable for multi-role access

Key Differences of Our PMS:


Feature Existing Systems Proposed System
Role-based Access Limited Full (Admin, Doctor, Supplier)
Modern Tech Stack No Yes (.NET Core 8 + Angular 18)
Expiry Drug Tracking Some Yes
Drug Suggestion on Dashboard No Yes (Planned)
Sales Report by Date Range Basic Advanced
Supplier Order Management Minimal Full Integration
Open Source / Free to Use No Yes

Thus, our system is a fully customized solution that not only includes all
basic pharmacy functionalities but also adds modern features with improved
UI/UX and automation.

1.4 Organization of the Project


This report is organized into several chapters that guide the reader through
the journey of understanding the proposed Pharmacy Management System
from concept to implementation. Below is a brief overview of each chapter:

 Chapter 1 – Introduction: Describes the motivation, problem


statement, objectives, and summary of existing systems. It also
highlights how our system is different and more effective.
 Chapter 2 – Software Requirement Analysis: Discusses the
functional and non-functional requirements of the system. It also
includes feasibility analysis and technology stack selection.
 Chapter 3 – Software Design: Covers the system architecture,
database design (ER diagram), data flow diagrams, and
component/module structure of the application.

5
 Chapter 4 – Implementation and User Interface: Focuses on how
the system was implemented, including backend service architecture,
frontend UI, integration, and screenshots of role-based dashboards.
 Chapter 5 – Software Testing: Explains the testing strategies used,
such as unit testing with NUnit, manual testing of APIs using
Swagger, and UI test cases.
 Chapter 6 – Conclusion: Summarizes the achievements of the
project, challenges faced during development, and how those were
overcome.
 Chapter 7 – Summary: Recaps the overall work done and provides
a vision for future enhancements, such as integrating payment
gateways and AI-powered suggestions.
 Appendices: Include sample references, example description pages,
and supporting materials like code snippets or configuration files.

6
CHAPTER 2
Software Requirement Analysis

Software requirement analysis is the process of identifying and documenting


the needs and expectations of the end users and stakeholders. This chapter
provides a comprehensive breakdown of both functional and non-functional
requirements, feasibility analysis, and the justification of the selected tools
and technologies used for building the Pharmacy Management System
(PMS).

2.1 Technical Feasibility


Technical feasibility involves evaluating the hardware, software, and
network resources required to implement the proposed system successfully.
It answers the question: "Can we build the system with the current technical
infrastructure and skillset?"

a. Hardware Feasibility

The system is designed as a web-based application, so it does not demand


high-end hardware specifications. Minimal system requirements for
development and deployment are:

 Client-side (Frontend Users):


o Device: Desktop, Laptop, or Smartphone
o RAM: 4 GB (minimum)
o Processor: Intel i3 or equivalent
o Browser: Latest version of Chrome, Edge, Firefox
 Server-side (Backend Hosting):
o RAM: 8 GB or higher
o Processor: Intel i5 or higher
o Storage: SSD preferred, minimum 100 GB
o Operating System: Windows Server 2019 / Linux (Ubuntu)

b. Software Feasibility

 Frontend: Developed using Angular 18, offering a highly


responsive UI and component-based architecture.

7
 Backend: Powered by [Link] Core 8.0 Web API, offering a
robust and scalable service layer with RESTful endpoints.
 Database: Microsoft SQL Server, used for persistent data storage
with support for relational modeling.
 Authentication: [Link] Identity is used for secure authentication
and role-based authorization.
 Testing Tools: Swagger for API testing and NUnit for unit testing.

All selected tools are either open-source or have a free community edition
available, making the project technically feasible and cost-effective.

2.2 Operational Feasibility


Operational feasibility determines whether the system will function in the
intended environment and whether users will accept and use it.

 The proposed system offers an intuitive and clean user interface,


reducing the training time for pharmacy staff.
 It improves day-to-day operations by automating manual tasks such
as inventory updates, expiry alerts, and supplier communication.
 Admins, Doctors, and Suppliers can access the system securely with
role-specific dashboards.
 Real-time inventory updates and order tracking ensure operational
efficiency.

The PMS is expected to be well-received by users due to its clarity, speed,


and ease of use.

2.3 Economic Feasibility


The project is developed as an academic and potentially deployable real-
world application with minimal cost.

Estimated Cost Analysis:


Resource Estimated Cost
Development Tools Free / Open-source
Hosting (Local / Cloud) Free (for testing)
Developer Time (Student Project) NA
Miscellaneous Minimal

Since the project does not require expensive licenses and uses community-
supported software, it is economically feasible.

8
2.4 Legal Feasibility
Legal feasibility ensures that the system complies with regulations and legal
constraints.

 No third-party proprietary software is used without permission.


 Drug-related information is hypothetical and does not involve real
patient data.
 If extended for real-world deployment, the system would need to
comply with HIPAA or Indian medical data protection laws.

Currently, as an academic project, it poses no legal concerns.

2.5 Functional Requirements


Functional requirements describe the core functions the system must
perform.

a. Authentication and Role Management

 Users must be able to register and log in securely.


 System supports 3 roles: Admin, Doctor, and Supplier.
 Each role has access to specific modules.

b. Admin Functionalities

 Add, update, delete, and view drugs.


 Add, update, delete, and view suppliers.
 Monitor drug expiry and generate new orders.
 Confirm supplier delivery and update inventory.
 Generate sales reports based on date ranges.

c. Doctor Functionalities

 View drug availability.


 Suggest medications to patients.
 Access a clean dashboard to view latest stocks.

d. Supplier Functionalities

 View incoming drug orders.


 Confirm delivery status and provide tracking details.
 Access history of previous orders.

e. Inventory Management

 Track stock quantities.

9
 Auto-remove expired drugs from availability.
 Alert admin for low or expired stock.

f. Order Management

 Admins can place orders to suppliers.


 Suppliers confirm and update status.
 Orders move from pending to completed upon delivery confirmation.

2.6 Non-Functional Requirements


Non-functional requirements define the system's quality attributes.

a. Performance

 Backend optimized for fast API response (< 1 second).


 Frontend loads under 2 seconds on modern devices.

b. Security

 Passwords hashed using [Link] Identity.


 JWT authentication for secure API communication.
 Role-based access control.

c. Usability

 Simple and responsive UI using Angular + Tailwind CSS.


 Easily navigable admin and role-specific dashboards.

d. Scalability

 Modular code architecture to add more roles or modules in the future.


 Backend supports scaling through [Link] middleware and
dependency injection.

e. Maintainability

 Clear separation of concerns using layered architecture:


o Controller
o Service
o Repository
o Database

f. Availability

 The system can be hosted on any cloud provider (e.g., Azure, AWS).
 Downtime expected to be <1% in real-world deployment.

10
2.7 Technology Stack Used
Layer Technology
Frontend Angular 18, Tailwind CSS
Backend [Link] Core 8.0 Web API
Authentication [Link] Identity + JWT
Database SQL Server
Testing Swagger (API), NUnit (Unit)
Tools Visual Studio 2022, VS Code
Version Control GitHub

2.8 System Models


This section includes diagrams and models representing system behavior and
structure. These will be placed in Chapter 3 in detail, but an overview is
given here:

 Use Case Diagrams: Represent the interaction between users and the
system.
 ER Diagram: Visualizes the database schema (Drugs, Orders, Users,
Roles, etc.).
 DFD (Data Flow Diagram): Shows how data flows between
modules.
 Class Diagram: Represents backend classes and relationships.

2.9 Summary
This chapter described the software, hardware, and operational requirements
for the successful implementation of the Pharmacy Management System. It
also examined its technical, legal, and economic feasibility. All core and
auxiliary features were outlined in terms of functional and non-functional
needs. Based on this analysis, the project is viable for implementation and
scalable for future needs.

11
Chapter 3
Software Design

Software Design is a critical phase in software engineering that serves as the


blueprint for the system. It translates user requirements into a set of software
components and defines how they interact. The goal is to develop a scalable,
maintainable, and efficient system architecture.

This chapter explains the structural and behavioral design of the Pharmacy
Management System (PMS), including architecture, module decomposition,
database schema, user interface design, and design diagrams.

3.1 System Architecture


The Pharmacy Management System follows a 3-tier architecture which
separates concerns into distinct layers:

3.1.1 Presentation Layer (Frontend)

 Developed using Angular 18.


 Implements dynamic user interfaces for each role (Admin, Doctor,
Supplier).
 Tailwind CSS is used for responsive and clean design.
 Communicates with backend through RESTful APIs.

3.1.2 Business Logic Layer (Service Layer)

 Developed using [Link] Core 8.0 Web API.


 Contains service classes that encapsulate core business logic.
 Ensures role-based access and orchestrates database operations
through repositories.

3.1.3 Data Access Layer (Repository Layer)

 Uses Entity Framework Core with Code First approach.


 Interacts with SQL Server for CRUD operations.
 Uses repository and unit-of-work patterns for maintainability.

3.2 Module Decomposition


The system is divided into functional modules as follows:

12
a. Authentication Module

 Registration, Login
 Role-based access (Admin, Doctor, Supplier)
 JWT Token generation and validation

b. Admin Module

 Manage Drugs (Add, Edit, Delete, View)


 Manage Suppliers (Add, Edit, Delete, View)
 Create Orders for Expired/Out-of-Stock Drugs
 Track Order Status
 Generate Sales Reports

c. Doctor Module

 View Available Drugs


 Search Drugs
 Suggest Medicines
 Dashboard with drug summary

d. Supplier Module

 View Assigned Orders


 Confirm and Update Delivery Status
 Add Tracking Information

e. Inventory Management

 Auto-update inventory after confirmed delivery


 Alert admin on expiry and low stock

3.3 Database Design


The system uses a relational database with the following major tables:

Table Name Description


Users Stores user information and roles
Roles Stores role types (Admin, Doctor, Supplier)
Drugs Stores drug details
Suppliers Stores supplier information
Orders Stores order information made by Admin
OrderItems Drugs associated with each order
Deliveries Status updates from suppliers
SalesReports Generated sales records
3.3.1 Entity Relationship Diagram (ERD)

13
3.3.1 Pharmacy ER Diagram

3.4 Class Design

3.5 Use Case Diagrams


3.5.1 Admin Use Case

3.5.2 Doctor Use Case

3.5.3 Supplier Use Case

3.5.3 Pharmacy Supplier Use Case Diagram

3.6 Component Diagram


This diagram shows how each part of the system is related to others at the
component level.

 Angular Frontend ↔ Web API Controllers


 Services ↔ Repositories ↔ Database
 Authentication via [Link] Identity

14
3.7 Sequence Diagrams

3.8 User Interface Design


The user interface is designed using Angular 18 and Tailwind CSS, with
individual dashboards for each role.

3.9 Security Design


 Authentication: [Link] Identity + JWT Tokens
 Authorization: Role-based using [Link] middleware
 Password Storage: Hashed using secure algorithm
 Sensitive Data: Secured API endpoints, HTTPS enforced

3.10 Summary
This chapter presented the structural and behavioral design of the Pharmacy
Management System. It explained the architecture, component
responsibilities, module breakdown, database schema, and visual
representations using diagrams. Each part of the system is thoughtfully
structured for maintainability, scalability, and security, ensuring the
application is production-ready and user-friendly.

Chapter 4
Implementation And User Interface

The implementation phase of the Pharmacy Management System transforms


the planned design into a fully functional software product. This chapter
provides a thorough explanation of how each component of the system was
developed, along with the technologies and tools used. It also presents the

15
user interface (UI) structure for the Admin, Doctor, and Supplier roles and
explains how UI/UX considerations enhance user interaction.

4.1 Technology Stack


The project utilizes a modern technology stack for full-stack web application
development:

Layer Technology
Frontend Angular 18, Tailwind CSS
Backend [Link] Core 8.0 Web API
Database SQL Server
ORM Entity Framework Core (Code First)
Authentication [Link] Core Identity + JWT Tokens
Testing Swagger, NUnit
Version Control Git, GitHub
Tools & Editors Visual Studio, Visual Studio Code

4.2 Implementation Strategy


The system was implemented using the three-layered architecture:

 Presentation Layer: Angular components and Tailwind CSS for


dynamic UI rendering.
 Business Logic Layer: [Link] Core services and controllers to
handle business rules.
 Data Access Layer: Repositories using Entity Framework Core for
database interaction.

4.3 Backend Implementation ([Link] Core


8.0)
4.3.1 Entity Models

Here is an example of the Drug entity:

public class Drug {


public int Id { get; set; }
public string Name { get; set; }
public string Manufacturer { get; set; }
public int Quantity { get; set; }
public DateTime ExpiryDate { get; set; }
}
4.3.2 DbContext
public class ApplicationDbContext :
IdentityDbContext<ApplicationUser> {
public DbSet<Drug> Drugs { get; set; }
public DbSet<Supplier> Suppliers { get; set; }
public DbSet<Order> Orders { get; set; }

16
public
ApplicationDbContext(DbContextOptions<ApplicationDbContext>
options)
: base(options) { }
}
4.3.3 Controllers

Example: [Link]

[Authorize(Roles = "Admin")]
[Route("api/[controller]")]
[ApiController]
public class AdminController : ControllerBase {
private readonly IAdminService _adminService;

public AdminController(IAdminService adminService) {


_adminService = adminService;
}

[HttpPost("AddDrug")]
public async Task<IActionResult> AddDrug(DrugDto dto) {
var result = await _adminService.AddDrugAsync(dto);
return Ok(new { success = true, data = result,
message = "Drug added successfully." });
}
}

4.4 Frontend Implementation (Angular 18 +


Tailwind CSS)
4.5 Admin Dashboard UI

4.6 Doctor Dashboard UI

4.8 Authentication UI (Login & Register)

4.9 Role-Based Routing and Guards


Angular route configuration ensures that only authorized roles can access
specific routes using a RoleGuard.

ts
CopyEdit
{

17
path: 'admin',
component: AdminDashboardComponent,
canActivate: [RoleGuard],
data: { expectedRole: 'Admin' }
}

4.10 API Integration


All frontend actions are connected with the backend through HTTP services:

ts
CopyEdit
addDrug(data: any): Observable<any> {
return [Link](`${[Link]}/Admin/AddDrug`,
data);
}

4.11 UI/UX Design Considerations


 Clean, minimal, responsive UI using Tailwind CSS.
 Form validation with user feedback.
 Confirmation dialogs on delete/update.
 Loading spinners and success/error toasts for async operations.

4.12 Summary
This chapter detailed the implementation strategy, backend and frontend
structure, and user interface for each module of the Pharmacy Management
System. Through Angular for the frontend and [Link] Core for the
backend, a responsive and secure application was achieved. Each role has its
own dedicated user interface that allows streamlined functionality with clear
navigation, responsiveness, and role-based accessibility.

18
Chapter 5
Software Testing

Software testing is a critical phase in the Software Development Life Cycle


(SDLC) used to verify that the developed system functions correctly, meets
the specified requirements, and is free of defects. This chapter explains the
testing methodologies adopted, types of testing performed, tools used, and
detailed test cases for the Pharmacy Management System. It also covers both
manual and automated testing strategies to ensure system reliability,
performance, and user satisfaction.

5.1 Purpose of Testing


The purpose of testing the Pharmacy Management System is to:

 Identify bugs and defects in the application.


 Validate functional and non-functional requirements.
 Ensure robustness, reliability, and usability.
 Confirm role-based access control and data integrity.
 Verify that CRUD operations, authentication, and workflows behave
as expected.

5.2 Testing Types Performed


The following types of testing were conducted:

Testing Type Description


Unit Testing Testing individual functions or modules in isolation.
Integration Testing Ensures that different modules or services work together.

19
Testing Type Description
System Testing Validates the entire system against the requirements.
User Acceptance Testing
Confirms the system meets end-user expectations.
(UAT)
Validates all user requirements and business logic
Functional Testing
implementation.
Ensures role-based access and data privacy using JWT
Security Testing
authentication.
Confirms that new changes do not break existing
Regression Testing
functionalities.

5.3 Tools Used


Tool Purpose
Swagger API testing and validation
Postman Manual testing of RESTful APIs
NUnit Unit testing framework for .NET
Browser Developer Tools UI testing and debugging in Angular
JWT Debugger For testing and decoding JSON Web Tokens

5.4 Unit Testing (Using NUnit)


Unit tests were written to test backend logic in isolation. NUnit was used to
test service layer methods.

Example: Testing AdminService - AddDrugAsync

csharp
CopyEdit
[Test]
public async Task
AddDrugAsync_ShouldReturnTrue_WhenValidDataProvided()
{
var drug = new DrugDto { Name = "Paracetamol",
Manufacturer = "XYZ", Quantity = 100, ExpiryDate =
[Link](12) };
var result = await _adminService.AddDrugAsync(drug);
[Link](result);
}

Benefits:

 Ensures individual methods perform as intended.


 Catches bugs early in the development lifecycle.

5.5 API Testing (Swagger & Postman)


5.5.1 Swagger Testing

 All endpoints were documented and tested using Swagger UI.


 Allowed real-time testing and validation of input/output for all roles.

20
5.5.2 Postman Testing

 Used for advanced tests including authentication headers and


dynamic values.
 Example: Testing token-based access for Doctor role to access
/Doctor

5.6 Frontend Testing (Manual Testing)


All Angular UI components were manually tested for:

Component Test Scenario Expected Result


Redirects to role-based
Login Page Login with valid credentials
dashboard
Add Drug Add drug with empty fields Shows validation error
Show Drugs Update/Delete button visibility Actions visible to Admin only
Supplier Confirm order and enter tracking
Saves and updates UI
Dashboard info
Doctor Dashboard View drug cards All drugs displayed

5.7 Functional Testing (End-to-End)


Functional testing ensured that all system flows worked as expected.

Test Case 1: Login and Dashboard Redirection


Test ID TC_01
Description Valid login redirects to dashboard
Input Email, Password
Expected Redirect to /admin-dashboard
Status ✅ Passed
Test Case 2: Add New Drug
Test ID TC_02
Description Admin adds new drug
Input Name, Quantity, Expiry
Expected Drug appears in list
Status ✅ Passed
Test Case 3: Unauthorized Access by Doctor
Test ID TC_03
Description Doctor tries to access admin
Expected Access Denied (403)
Status ✅ Passed

5.8 Role-Based Access Testing

21
Testing to ensure that users can only access routes/components for their
roles.

Role Access Page Access Allowed?


Admin Add Supplier ✅ Yes
Supplier Doctor Dashboard ❌ No (403)
Doctor View Drugs ✅ Yes
Doctor Add Drug ❌ No

Implemented with Angular RoleGuard and backend role-checking using


[Authorize(Roles = "X")].

5.9 Regression Testing


After every new feature (like order tracking or sales report), complete
regression testing was performed on:

 Login and session management


 Dashboard routes and permissions
 CRUD operations
 UI rendering and responsive layout
 Token expiration and logout

5.10 Bug Tracking and Fixes


During testing, the following common issues were found and resolved:

Bug Description Fix Implemented


Incorrect role routing after login Added role-based navigation in AuthService
Drug expiry logic not working correctly Added [Link] in backend check
Supplier unable to update order status Updated endpoint permissions
UI not responsive on mobile Added Tailwind media queries

5.11 Summary
In this chapter, we described the testing methodology applied to the
Pharmacy Management System. A combination of unit, integration,
functional, and role-based access testing ensured the application met
functional and non-functional requirements. Tools like NUnit, Swagger, and
Postman enhanced accuracy and consistency in the testing process. All
discovered issues were promptly resolved, leading to a stable and high-
quality application.

22
Chapter 6
Conclusion
The successful development and implementation of the Pharmacy
Management System mark a significant achievement in enhancing the
operational efficiency and digital transformation of pharmacy workflows.
This chapter encapsulates the overall experience, system achievements,
technological advancements, learning outcomes, and the potential impact of
the project. The solution addresses critical pain points such as inventory
management, order processing, drug expiry handling, and role-based access,
while offering a scalable foundation for future enhancements.

6.1 Project Recap


The Pharmacy Management System was conceptualized, designed, and
developed to automate and streamline various operations within a pharmacy.

23
The system was built using [Link] Core 8.0 Web API for the backend
and Angular 18 for the frontend, with Entity Framework Core for database
access and SQL Server as the relational database.

Key Features Developed:

 Secure JWT-based authentication with role-based access (Admin,


Doctor, Supplier)
 Full CRUD functionality for Drugs, Suppliers, and Orders
 Order placement, confirmation, and tracking system
 Automated handling of drug expiry dates
 Sales report generation for Admin within a selected date range
 Responsive and clean Angular-based dashboards for each role
 Validation, feedback, and consistent UI built with Tailwind CSS

6.2 System Achievements


The system effectively meets the project objectives as outlined in the initial
phase:

Objective Status
Role-based access and navigation ✅ Achieved
Secure user authentication using JWT ✅ Achieved
Inventory management with drug expiry tracking ✅ Achieved
Supplier management and order workflow ✅ Achieved
Sales report with date filtering ✅ Achieved
Mobile-friendly UI using Tailwind ✅ Achieved
Unit and functional testing ✅ Achieved

6.3 Benefits of the System


1. Efficiency and Automation

 Manual paper-based processes were replaced with fast and accurate


digital systems.
 Automated notifications and status updates reduce operational
overhead.

2. Role-based Segmentation

 Each stakeholder (Admin, Doctor, Supplier) has access only to their


required features, ensuring both data privacy and workflow clarity.

3. Real-Time Inventory Insight

 Admins can view, manage, and update inventory records.


 Doctors can quickly see drug availability.

24
 Suppliers can view pending orders and track delivery.

4. Scalability

 Designed using a layered architecture (Controller, Service,


Repository) for scalability and easy maintenance.
 Future modules such as payment gateway integration, drug
suggestions, and AI-based analytics can be added with minimal
disruption.

6.4 Technical Learnings


The development of this project provided significant technical knowledge
and practical experience:

Backend ([Link] Core):

 [Link] Core Identity for authentication and role management


 Repository and Service patterns for decoupled architecture
 Attribute-based routing and middleware configuration
 Working with Entity Framework Core (Code-First Approach)
 Writing unit tests using NUnit

Frontend (Angular 18):

 Angular standalone component structure


 Role-based navigation and route protection using Guards
 Working with HTTPClient for API interaction
 Form validation and event handling
 Tailwind CSS for responsive design

Tools and Ecosystem:

 Swagger for API documentation and testing


 Postman for manual API testing
 JWT for secure token-based authentication
 Git and GitHub for version control and collaboration

6.5 Challenges Faced


Throughout the development cycle, the team encountered various challenges:

Challenge Resolution
Managing dynamic role-based Implemented conditional navigation in the frontend
redirection after login
Integrated expiry date validation at backend and
Handling drug expiry logic
frontend

25
Challenge Resolution
Complex order confirmation and Defined status enums and order flow management via
tracking workflow supplier interface
Used Tailwind’s utility classes and mobile-first design
Responsive UI for multiple roles
approach
Route protection for Implemented Angular RoleGuard and backend
unauthorized access [Authorize(Roles="X")]

6.6 Social and Academic Impact


This project is not just a technical implementation; it has a broader academic
and social relevance:

 Academic Impact: Demonstrates the practical application of


Software Engineering, OOP, API development, and Frontend
engineering.
 Healthcare Impact: Enhances operational efficiency in pharmacies,
ensuring timely medication delivery and reducing the chances of
expired drug issuance.
 Innovation: Lays the groundwork for further integration of smart
pharmacy features like AI-based restocking, barcode-based
inventory, and online patient prescriptions.

6.7 Key Takeaways


 Understanding the importance of layered architecture and modular
design.
 Gained hands-on experience in handling real-world problems like
authentication, data validation, and multi-role systems.
 Acquired skills in team collaboration, version control, testing, and
debugging.
 Learned to balance functionality, performance, and user experience in
a full-stack application.

6.8 Future Scope


Though the system fulfills its initial goals, several enhancements can be
implemented in future:

1. Payment Gateway Integration


Enabling online payments for drug purchases.
2. Patient Module
Allowing patients to request prescriptions or order medicines online.
3. AI-Driven Drug Suggestion System
Recommending substitutes or trending medications based on
analytics.

26
4. Notification System
SMS/email alerts for low stock or order delivery status.
5. Barcode Scanning
For efficient drug management and expiry verification.
6. Multilingual Support
To make the platform accessible to users across different regions.

6.9 Final Thoughts


The Pharmacy Management System project was an enriching experience that
blended real-world challenges with technical learning. It not only honed our
programming and problem-solving skills but also gave us an understanding
of building practical and impactful software. With proper enhancements and
real-world deployment, this system has the potential to revolutionize small
and mid-sized pharmacies by digitalizing their operations.

Chapter 7
Summary And Future Scope

The journey of designing and developing the Pharmacy Management


System has been an extensive, insightful, and educational experience. This
final chapter offers a comprehensive summary of the project—from ideation
to implementation—highlighting the milestones achieved, the technologies
leveraged, the problems addressed, and the value delivered. It encapsulates
the work completed in each preceding chapter and reflects on the cumulative
outcome of the entire project cycle.

7.1 Introduction
The Pharmacy Management System was developed with a clear goal: to
digitize and streamline the essential functions of a pharmacy using modern

27
web technologies. In this system, three primary stakeholders—Admin,
Doctor, and Supplier—interact through role-specific dashboards, each
tailored to their responsibilities within the pharmaceutical workflow.

This summary offers a holistic view of the processes followed, challenges


tackled, features implemented, and lessons learned throughout the lifecycle
of this software project.

7.2 Problem Statement Recap


Before this system, most small- to mid-level pharmacies operated using
either traditional pen-and-paper methods or loosely integrated tools like
spreadsheets. These methods were:

 Inefficient for tracking real-time stock levels.


 Prone to errors, especially when monitoring drug expiry.
 Unable to scale with increasing orders or supplier networks.
 Lacking centralized access control for different roles.

The system aimed to resolve these issues by developing a secure, full-stack


web application with clean, role-based access control, automated inventory
management, and real-time order workflows.

7.3 Summary of System Development


The system development was carried out in distinct yet connected stages,
each contributing critically to the final product.

7.3.1 Chapter 1 – Introduction

 Introduced the motivation for building a Pharmacy Management


System.
 Outlined the objectives, including drug inventory management,
supplier ordering, and role-based UI.
 Compared similar systems and discussed how this project would
provide improvements in user experience, scalability, and feature set.

7.3.2 Chapter 2 – Software Requirement Analysis

 Discussed functional and non-functional requirements of the system


in depth.
 Conducted feasibility studies (technical, operational, economic).
 Defined use cases, system requirements, and constraints.

7.3.3 Chapter 3 – Software Design

28
 Described the software architecture and layered structure (Controller,
Service, Repository).
 Detailed UML diagrams like Use Case, Activity, and Class
Diagrams.
 Provided the database schema, entity relationships, and ER diagrams.
 Explained routing and component structures for the Angular
frontend.

7.3.4 Chapter 4 – Implementation and User Interface

 Covered the actual coding and feature implementation using .NET


Core Web API and Angular.
 Integrated role-based JWT authentication and implemented
dashboards for Admin, Doctor, and Supplier.
 Detailed the UI flow and left space for screenshots to be added for
visual demonstration.
 Explained order confirmation, tracking features, and expiry handling
in both frontend and backend.

7.3.5 Chapter 5 – Software Testing


 Explained the software testing life cycle, including unit testing (with
NUnit), integration testing, and user acceptance testing.
 Shared test cases and expected vs actual outputs.
 Emphasized backend validation, API testing with Swagger/Postman,
and frontend behavior.

7.3.6 Chapter 6 – Conclusion

 Summarized project achievements and technical learnings.


 Reflected on system benefits, challenges faced, and the broader
impact.
 Discussed possible future enhancements such as payment gateways,
AI-based suggestions, and a patient module.

7.4 Key Functionalities Delivered


The Pharmacy Management System includes a comprehensive suite of
features:

Feature Description
Role-based JWT authentication and protected routes for Admin,
Login & Registration
Doctor, Supplier
Drug Inventory
Add, update, delete, and view drugs with expiry tracking
Management
Supplier Management Manage supplier data and initiate drug orders
Order Workflow Place, confirm, and track drug orders with statuses

29
Feature Description
Generate date-based reports including total sales and order
Sales Reporting
summaries
Responsive UI Clean, minimal interface using Tailwind CSS
Role-Based Dashboards Custom dashboards tailored to user roles

7.5 Tools & Technologies Used


Layer Tools / Technologies
Backend [Link] Core 8.0, Entity Framework Core, SQL Server
Frontend Angular 18, Tailwind CSS, TypeScript, HTML, RxJS
API Testing Swagger, Postman
Authentication [Link] Identity, JWT (JSON Web Tokens)
Development Visual Studio, VS Code, Git/GitHub
Testing NUnit, Swagger, Angular DevTools
Project Mgmt Manual Gantt chart tracking, Trello (optional)

7.6 Learning Outcomes


This project provided exposure to the complete software development
lifecycle (SDLC), from requirements gathering to deployment-ready code.
Key learnings include:

 Practical understanding of full-stack development


 Implementation of RESTful APIs
 Security through token-based authentication
 Working with Entity Framework Core and complex database
relationships
 Building responsive user interfaces
 Using unit testing frameworks and debugging tools effectively
 Applying clean architecture and coding standards

7.7 Real-World Applications


The Pharmacy Management System is applicable in various real-world
contexts:

 Retail Pharmacies: Managing daily sales, supplier coordination, and


drug restocking.
 Clinics/Hospitals: Providing internal medication tracking and
expiration alerts.
 Wholesalers/Distributors: Coordinating with multiple suppliers and
tracking bulk orders.

Its modular and scalable structure ensures that it can be adapted to different
organization sizes and needs.

30
7.8 Suggestions for Future Development
The system lays the foundation for further innovation. Suggested
improvements include:

 Payment Gateway Integration: To allow customers and clinics to


pay directly online.
 Patient Dashboard: For browsing available drugs, checking
prescriptions, or scheduling refills.
 Mobile App Version: To expand accessibility on smartphones.
 Multilingual Support: For reaching a broader audience across
regions.
 Barcode Scanning and Stock Alerts: For more efficient inventory
updates and expiry tracking.
 AI Integration: For smart reorder suggestions based on past usage
and sales patterns.

7.9 Final Words


The Pharmacy Management System demonstrates how digital transformation
can optimize the pharmaceutical domain. This project not only fulfilled
academic goals but also delivered a viable product that solves real-world
problems. It exemplifies best practices in software engineering, clean UI/UX,
and practical backend logic.

By leveraging cutting-edge technologies and a well-planned architecture, this


system achieves its intended purpose while remaining open to innovation and
future scalability. The knowledge, confidence, and experience gained
through this project will be instrumental in all future software endeavors.

31

You might also like