Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

CPP Final Report Group 7

Download as pdf or txt
Download as pdf or txt
You are on page 1of 48

Department of Information Technology

VISION

To develop highly competent IT Engineer with enhancement of knowledge,


skills and professional attitude to suit the changing scenario and to serve the
techno-social needs.
MISSION

M1: To implement the quality educational program in information technology


from fundamental engineering to recent technology as per emerging trends.

M2: To bench mark the global standards of quality education in the


information technology.

M3: To take continuous efforts to meet the technological challenges in


collaboration with industries.

M4: To take continuous efforts to inculcate the sense of social responsibilities


in students.
Institute of Technology Polytechnic

VISION

To give emphasis and focus on development competent technical


personalities in the institute through scientific and technical education to
accept need based challenges with a sense of social responsibilities.

MISSION

M1: To implement the educational program in Institute from fundamental


engineering to recent technology as per emerging trends.

M2: To bench mark the global standards of quality education in the Institute.

M3: To take continuous efforts to meet the technological challenges in


collaboration with industries.

M4: To take continuous efforts to inculcate the sense of social


responsibilities in students.
MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION – MUMBAI

A
Capstone Project Report On

“MEDICINE PRESCRIPTION
SYSTEM”

Submitted by
Samruddhi Shekatkar
Kartiki Malode
Manas Bhole
Neel Patel

Guided by
Prof.P.M.TAKATE
Lecturer in Information Technology

Academic Year 2023-2024

MET’S INSTITUTE OF TECHNOLOGY - POLYTECHNIC


BHUJBAL KNOWLEDGE CITY,ADGAON,NASHIK
A
Capstone Project Report
On

“MEDICINE PRESCRIPTION
SYSTEM”

Submitted by
Samruddhi Shekatkar
Kartiki Malode
Manas Bhole
Neel Patel

Guided by
Prof.P.M.Takate
Lecturer in Information Technology

Academic Year
2023-2024

MET’S INSTITUTE OF TECHNOLOGY - POLYTECHNIC

BHUJBAL KNOWLEDGE CITY, ADGAON, NASHIK


MET’s Institute of Technology, Polytechnic
Bhujbal Knowledge City,
Adgaon, Nashik-422 003
Tel. : ( 0253)2303515, 2303267, 2303268 Telefax : ( 0253 )2303305,
Toll-free: 1800 22 0234 Email:principal_iot@bkc.met.edu

CERTIFICATE
This is to Certify that this report,
“MEDICINE PRESCRIPTION SYSTEM”

Submitted by
Samruddhi Shekatkar
Kartiki Malode
Manas Bhole
Neel Patel

The students of Third year Information Technology Department


In 2023-2024
As a part of project work as prescribed by
The Maharashtra State Board of Technical Education, Mumbai
I have guided him for the project work. I found project work satisfactorily
progressive.
The project work has been assessed by me. I am satisfied with the standard
envisaged for the level of the course.
The project work may be produced to the External Examiner.

Prof.P.M.Takate Prof.S.B.Patil
Project Guide Head,
Lecturer in IT Department Dept. of IT

Prof. P.M.Takate Dr. R. S. Narkhede


(Language Editor) (External Examiner) Principal
ACKNOWLEDGEMENT

We take this opportunity to express our deepest sense of gratitude and


sincere thanks to those who have helped us in completing this task.
We are heartily thankful to Global Source Technology, Datta Mandir,
Nashik for providing us Industrial sponsorship, valuable guidance and first hand
exposure to the industrial project and physical exposure to the industrial
atmosphere. We have successfully completed this project by putting in
maximum of our effort, time and patience; alone we could not have completed
this project without your organization support. We would like to thanks
Mr. Tejas Shrigondekar, Director of Global Source Technology for their
valuable feedback, guidance that helped us to improve the project in many ways.
We express our sincere thanks to our Project Guide Prof.P.M.Takate,
Lecturer in Information Technology Department, who has given us excellent
guidance, continuous encouragement for the completion of this work.
We are thankful to Prof. S.B.Patil, Head of Department, Information
Technology for his kind assistance and constant inspiration. It will always help
us in our future.
We are very thankful to Hon. Principal, Dr. R. S. Narkhede, for
encouraging us to undertake this project. We are thankful to Prof.
P.M.Takate, for taken keen interest in making the project and report absolutely
flawless.
Credit also goes to our friends, staff members of InformationTechnology
Department and the staff of Institute’s Library, for their help and timely
assistance.

Sincerely,
Samruddhi Shekatkar
Kartiki Malode
Manas Bhole
Neel Patel
INDEX

Chapter. Name of Topic Page No.


No.

Certificate

Acknowledgement

List of Figures

Abstract

01 Introduction

1.1 Introduction 12

1.2 Problem Statement 13

1.3 Aims and Objectives 13

1.4 Scope and Motivation 13

1.5 Application and Feasibility 13

02 Literature Survey 16

03 Scope Of Project 19
04 Methodology 20

4.1 HTML 20

4.2 Py 22

4.3 MySQL 22

4.4 Methodology in Existing System 22

05 Details of Design, Working &


Process

5.1 Database Design 23

5.2 Project Design 24

5.3 Code 29

06 Result 42

6.1 Website Screenshots 43

6.2 Website Module Screenshots 43

6.3 Website 43

07 System Requirement 44
9.1 Software Requirement 44

9.2 Hardware Requirement 44

08 Conclusion, Limitation, and 45


Future Scope

7.1 Conclusion 45

7.2 Limitations 45

7.3 Future Scope 45

09 Appendix 47

10 References and Bibliography

10.1 References 48

10.2 Bibliography 48
List of Figures

Sr.No Name of Diagram/Figure p.g.No

5.2.1 System Architecture 13

2 Data Flow Diagram (DFD Zero Level) 14

3 Data Flow Diagram (DFD Context Level) 14

4 Data Flow Diagram (First Level) 14

6 Class Diagram 16

7 Activity Diagram 17

8 Sequence Diagram 18

9 Component Diagram 19

11 Use-Case Diagram 20
ABSTRACT

The Smart Doctor Prescription Analyzer is a cutting-edge healthcare technology


project designed to streamline the process of extracting essential information from
handwritten medical prescriptions. This innovative system empowers users to upload
prescription photos, after which it employs advanced image processing and natural
language understanding techniques to decipher the handwriting of healthcare
professionals. The primary objective is to extract the names of prescribed medications
and their corresponding usage information as provided by the doctor. Once the text is
extracted, it employs machine learning and language processing models to classify and
extract medication names and their intended purposes. The extracted information is
then presented to the user in an easily comprehensible format.
The Smart Doctor Prescription Analyzer not only enhances the efficiency of
prescription management for patients but also aids healthcare providers in ensuring
accurate medication administration. It mitigates the risk of errors due to
misinterpretation of handwritten prescriptions, ultimately leading to improved patient
safety and healthcare outcomes.

Keyword: Web Application, Python, Machine learning, prescription, Doctor, Patient

fdf
CHAPTER 1. INTRODUCTION

1.1 Introduction:

The Smart Doctor Prescription Analyzer represents a groundbreaking advancement in


healthcare technology, aiming to revolutionize the cumbersome process of deciphering
handwritten medical prescriptions. This cutting-edge system empowers users to effortlessly upload
photos of their prescriptions, harnessing advanced image processing and natural language
understanding techniques to decode the often challenging handwriting of healthcare professionals.
Its primary goal is to extract vital information such as medication names and their prescribed usage,
as specified by the prescribing doctor. Once the text is successfully extracted, the system leverages
machine learning and language processing models to categorize and extract medication names and
their intended purposes, presenting the information to users in a user-friendly format. Beyond
improving prescription management for patients, the Smart Doctor Prescription Analyzer plays a
crucial role in assisting healthcare providers in ensuring precise medication administration, thereby
mitigating the risks associated with misinterpreting handwritten prescriptions and ultimately
enhancing patient safety and healthcare outcomes.

This project is a prime example of the immense potential of artificial intelligence and image
processing technologies in the healthcare domain, effectively bridging the gap between traditional
paper-based prescription handling and the demands of modern digital healthcare systems. By
automating the extraction of medication details from handwritten prescriptions, it not only
streamlines medication management but also contributes to the overall enhancement of the
healthcare ecosystem

1.2 Problem Statement:

The need of developing a Machine Learning-based Doctor Receipt Analyzer system using OCR
technology stems from the desire to address significant challenges in the current healthcare
administration landscape. Manual processing of doctor receipts is time-consuming and prone to
errors. The motivation is to enhance the efficiency of healthcare administration by automating the
extraction of crucial information from receipts, reducing the burden on healthcare professionals.

fdf
1.3 Aims and Objective:

• Automate Prescription Deciphering: Develop a system that can automatically process


handwritten medical prescriptions, utilizing advanced image processing and natural language
understanding techniques to extract the essential information, including medication names and
their corresponding usage instructions.
• Enhance Medication Management: Create a user-friendly platform that enables patients to
upload prescription photos, making it easier for them to understand and manage their
prescribed medications.
• Ensure Accuracy: Employ machine learning and language processing models to classify and
extract medication names and their intended purposes from the deciphered text, minimizing
the risk of errors due to misinterpretation of the handwritten prescriptions.
• Improve Patient Safety: Reduce the potential for medication-related errors by providing
healthcare providers and patients with accurate and easily comprehensible prescription
information, ultimately enhancing patient safety and healthcare outcomes.
• Bridge the Gap: Demonstrate the potential of artificial intelligence and image processing
technologies in healthcare by bridging the gap between traditional paper-based prescription
handling and modern digital healthcare systems, contributing to the overall efficiency and
effectiveness of the healthcare ecosystem

1.4 Scope and Motivation:


The scope of the Machine Learning-based Doctor Receipt Analyzer system using OCR
technology is expansive and transformative within the realm of healthcare administration. By
automating the extraction of crucial information from doctor receipts, the system aims to
revolutionize the traditionally labor-intensive and error-prone process of manual data entry. Its
adaptability to diverse receipt formats, including handwritten and printed text, ensures a broad
applicability across different healthcare providers. The system's potential to enhance accuracy,
particularly in deciphering complex formats, addresses a persistent challenge in data interpretation.
Beyond mere automation, its integration into existing healthcare workflows streamlines processes,
expediting billing procedures and reducing administrative burdens on healthcare professionals.
The system's scope extends to contributing to more effective financial management within
healthcare institutions, introducing advanced technologies like OCR and machine learning to
advance the industry's technological landscape. Moreover, by freeing up valuable time for
healthcare professionals, the system fosters an environment conducive to improved patient care,
fdf
aligning with the broader goal of enhancing overall healthcare efficiency and quality.

1.4 Application and Feasibility:

Operational Feasibility:
1. A venture attainability study is an extensive report that inspects in detail the five edges of
investigation of a given undertaking. It additionally contemplates its four Ps, its dangers and
POVs, and its limitations (schedule, expenses, and standards of value).
2. The objective is to decide if the venture ought to proceed, be upgraded, or else deserted through
and through The five casings of investigation are: The edge of definition; the edge of relevant
dangers; the edge of possibility; the parametric casing; the edge of predominant and possibility
methodologies.
3. The four Ps are generally characterized as Plan, Processes, People, and Power. The dangers
are viewed as outer to the undertaking (e.g., climate conditions) and are partitioned in eight
classes.
4. (Plan) budgetary and authoritative (e.g., government structure for a private venture);
(Processes) ecological and mechanical; (People) showcasing and sociocultural; and (Power)
lawful and political. POVs are Points of Vulnerability: they vary from dangers as in they are
inside to the extend and can be controlled or else wiped out.

Technically Feasibility:

1. This appraisal depends on a blueprint structure of framework prerequisites, to decide if the


organization has the specialized aptitude to deal with consummation of the venture.

2. The specialized achievability evaluation is centered around increasing a comprehension of the


present specialized assets of the association and their pertinence to the normal needs of the
proposed framework.

3. It is an assessment of the equipment and programming and how it addresses the issue of the
proposed framework

fdf
Economically Feasibility:
1. Operational practicality is the proportion of how well a proposed framework tackles the issues,
and makes the most of the open doors distinguished during extension definition and how it fulfills
the prerequisites recognized in the necessities examination period of framework improvement.
2. To guarantee achievement, wanted operational results must be granted during plan and
advancement. These incorporate such structure subordinate parameters as dependability, viability,
supportability, ease of use, producibility, superfluity, maintainability, moderateness and others.

These parameters are required to be considered at the beginning times of structure whenever wanted
operational practices are to be figured it out. A framework plan and improvement requires proper and
opportune use of designing and the executives endeavors to meet the recently referenced parameters

Schedule Feasibility:

Schedule Feasibility is defined as the probability of a project to be completed within


its scheduled time limits, by a planned due date. If a project has a high probability to be completed
on-time, then its schedule feasibility is appraised as high.

fdf
CHAPTER 2. LITERATURE SURVEY

2.1 Literature Survey


1. Yongjian Ren; Yuliang Shi, A Drug Recommendation Model Based on Message Propagation
and DDI Gating Mechanism, IEEE Journal of Biomedical and Health Informatics ( Volume:
26, Issue: 7, July 2022): Drug recommendation task based on the deep learning model has been
widely studied and applied in the health care field in recent years. However, the accuracy of
drug recommendation models still needs to be improved. In addition, the existing
recommendation models either give only one recommendation (however, there may be a
variety of drug combination options in practice) or can not provide the confidence level of the
recommended result. To fill these gaps, a Drug Recommendation model based on Message
Propagation neural network (denoted as DRMP) is proposed in this paper. Then, the Drug-
Drug Interaction (DDI) knowledge is introduced into the proposed model to reduce the DDI
rate in recommended drugs. Finally, the proposed model is extended to Bayesian Neural
Network (BNN) to realize multiple recommendations and give the confidence of each
recommendation result, so as to provide richer information to help doctors make decisions.
Experimental results on public data sets show that the proposed model is superior to the best
existing models.[1].
2. Rika Fitriani; Faiza Renaldi; Irma Santikarama; Wu Zhou, Recommendation On Drugs
Prescription For Diabetic Patient Using Case based Reasoning, 2022 International Conference
on Science and Technology (ICOSTECH): As medical workers, we are often required to be
maximal in treating patients. The knowledge possessed by medical personnel, in this case,
doctors, must be demanded to the maximum so that there are no errors in providing treatment
to patients. Therefore we need a system to minimize the mistakes, namely a recommendation
system. So this study builds a drug recommendation system for patients who have diabetes.
One method applied in a recommendation is Case Base Reasoning (CBR). The CBR method
calculates based on the similarity of the old case to the new issue. In calculating the similarity
of the problems using the Nearest Neighbors algorithm. Although there have been many
studies on drug recommendations, no studies have added risk factor variables. Risk factors can
influence results more accurately. The results of this study are in the form of a prescription
drug recommendation system for diabetic patients based on the type of diabetes they suffer
from. They are testing the accuracy of this system using the Confusion Matrix with an accuracy
fdf
of 80.60\%. Suggestions for further research are to add several types of similarity. It is
necessary to research different kinds of diseases. It is expected to produce an integrated system
that can provide drug recommendations for various conditions. [2].
3. Md. Deloar Hossain; Md. Shafiul Azam, Drugs Rating Generation and Recommendation from
Sentiment Analysis of Drug Reviews using Machine Learning, 2020 Emerging Technology in
Computing, Communication and Electronics (ETCCE): A recommendation system can assist
the user to compose an understanding of requirements and propose informed decisions from a
lot of complicated knowledge. Recommendation from an analysis of sentiments seems to be a
great challenge as user-generated content is represented using human language in several
complicated ways. Many studies have focused on common fields such as reviews of electrical
items, films, and restaurants, but not enough on health and medical issues. Sentiment analysis
of healthcare in general and that of the drug experiences of individuals, in particular, may shed
considerable light on how to focus on improving public health and reach the correct decision.
In this paper, we design and implement a drug recommender system framework that applies
sentiment analysis technologies on drug reviews. The objective of this research is to build a
decision-making support platform to help patients to achieve more significant choices in drug
selection. Firstly, we propose a sentimental measurement approach to drug reviews and
generate ratings on drugs. Secondly, we take how much the drug reviews are useful to users,
patient's conditions, and dictionary sentiment polarity of drug reviews into consideration.
Then, we fuse those factors into the recommendation system to list appropriate medications.
Experiments have been carried out using Decision Tree, K-Nearest Neighbors, and Linear
Support Vector Classifier algorithm in rating generation and Hybrid model in recommendation
based on the given open dataset. The analysis is carried out to tune the parameters for each
algorithm in order to achieve greater performance. Finally, Linear Support Vector Classifier is
selected for rating generation to obtain a good trade-off among model accuracy, model
efficiency, and model scalability. [3].

4. Tianqi Jia; Cuiying Wang, Knowledge Discovery of Prescriptions and Similar Prescriptions of
Guizhi Decoction Based on Structural Partial-Ordered Attribute Diagram, 2013 Third
International Conference on Instrumentation, Measurement, Computer, Communication and
Control: As a new tool of data analysis and knowledge processing, formal concept analysis has
drawn more and more attention in various fields. This research focuses on prescriptions of
GuiZhi Decoction, which is from Zhongjing Zhang's Treatise on Cold Pathogenic Diseases.

fdf
First, we constructed the database for prescriptions of GuiZhi Decoction based on the
prescriptions' names, the concept extraction and formal expression. Then we generate the
formal context and optimized it by use of the mathematical theory of formal concept analysis
and the relationship between prescriptions and herbs in database. In the formal context, the
prescriptions are objects and the herbs are attributes. Next the structural partial-ordered
attribute diagram is generated, so as to visualize the knowledge of prescriptions of GuiZhi
Decoction. Finally, through the analysis of structural partial-ordered attribute diagram, more
comprehensive, objective and multileveled knowledge are discovered. [4]

fdf
CHAPTER 3: SCOPE OF THE PROJECT

3.1 Scope:

The scope of the Machine Learning-based Doctor Receipt Analyzer system using OCR technology
is expansive and transformative within the realm of healthcare administration. By automating the
extraction of crucial information from doctor receipts, the system aims to revolutionize the
traditionally labor-intensive and error-prone process of manual data entry. Its adaptability to diverse
receipt formats, including handwritten and printed text, ensures a broad applicability across different
healthcare providers. The system's potential to enhance accuracy, particularly in deciphering complex
formats, addresses a persistent challenge in data interpretation. Beyond mere automation, its
integration into existing healthcare workflows streamlines processes, expediting billing procedures
and reducing administrative burdens on healthcare professionals. The system's scope extends to
contributing to more effective financial management within healthcare institutions, introducing
advanced technologies like OCR and machine learning to advance the industry's technological
landscape. Moreover, by freeing up valuable time for healthcare professionals, the system fosters an
environment conducive to improved patient care, aligning with the broader goal of enhancing overall
healthcare efficiency and quality

fdf
CHAPTER 4. METHODOLOGY

4.1 Problem Definition:


In the healthcare industry, handwritten medical prescriptions are a common and critical means of
conveying treatment information to patients. However, the illegible handwriting of healthcare
professionals often poses a significant challenge, leading to potential errors and safety concerns in
medication administration. Deciphering these handwritten prescriptions accurately is a time-consuming
and error-prone process. The primary problem addressed by the Smart Doctor Prescription Analyzer is the
inefficiency and risks associated with interpreting handwritten medical prescriptions. This project aims to
develop a technology solution that can automatically and accurately extract medication names and their
prescribed usage from these prescriptions, eliminating the potential for misinterpretation and improving
patient safety and healthcare outcomes.

Technologies:

1. Visual Studio Code:

Visual Studio Code is a free and open-source code editor developed by Microsoft. It is a popular choice
among developers for its versatility and extensive set of features.

Fig 3.1: Visual Studio Code


Here are some key aspects of Visual Studio Code (VS Code):
1. Cross-Platform: VS Code is available for Windows, macOS, and Linux, making it a versatile choice for
developers on various platforms.
2. Lightweight: It’s a lightweight code editor that’s faster and uses fewer system resources compared to
full-fledged integrated development environments (IDEs).
3. Extensible: VS Code supports a wide range of programming languages and has a rich extension
ecosystem. You can install extensions to tailor the editor to your specific needs.

4. Intelligent Code Editing: It offers features like syntax highlighting, code completion, and linting for
various programming languages.

fdf
5. Integrated Git: VS Code has built-in Git support, making it easy to work with version control for your
projects.
6. Debugging: It provides integrated debugging tools for various languages and platforms.
7. Terminal Integration: You can run terminal commands directly within the editor.
8. Customizable Themes and Styles: VS Code allows you to choose from a variety of themes and
customize the editor’s appearance to your liking.
9. Community and Documentation: There’s a large and active community around VS Code, and you can
find extensive documentation and tutorials to help you get started.
10. Visual Studio Live Share: A feature that allows real-time collaboration between developers, making
it easier to work on code together.

VS Code has gained popularity in a wide range of development communities, from web
development to data science, and it’s known for its ease of use, performance, and the ability to adapt it to
different coding workflows.

2. Python:

Fig 3.2: Python software programming language

Python is a multi-paradigm programming language. Object-oriented programming and structured


programming are fully supported, and many of their features support functional programming and aspect-
oriented programming (including metaprogramming and meta objects). Python is an interpreted, object-
oriented, high-level programming language with dynamic semantics. Its high-level built in data structures,
combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application
Development, as well as for use as a scripting or glue language to connect existing component together.
Python’s simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program
maintenance. Python supports modules and packages, which encourages program modularity and code
reuse.

3. SQLite:

fdf
Fig 3.3: SQLite Database

SQLite is an embedded, server-less relational database management system. It is an in-memory


open-source library with zero configuration and does not require any installation. Also, it is very
convenient as it’s less than 500kb in size, which is significantly lesser than other database management
systems.
Features of SQLite as follows,
• SQLite is used to develop embedded software for devices like televisions, cell phones, cameras,
etc.
• It Can manage low to medium-traffic HTTP requests.
• SQLite can change files into smaller size archives with lesser metadata.
• SQLite is used as a temporary dataset to get processed with some data within
an application.
• SQLite is an open-source software. The software does not require any license
after installation. SQLite is serverless as it doesn’t need a different server process or system to
operate.
• SQLite facilitates you to work on multiple databases on the same session simultaneously, thus
making it flexible.

Existing System:
The current manual process of handling doctor receipts in the healthcare system presents a pressing set of
challenges that hinder operational efficiency and accuracy. The labor-intensive nature of manual data entry results
in errors and delays, particularly when deciphering handwritten or varied receipt formats. This inefficiency not
only impacts the timely billing processes but also places a significant burden on healthcare professionals, diverting
their attention from critical patient care responsibilities. The lack of standardized receipt formats across healthcare
providers adds complexity, leading to inconsistent data interpretation. Moreover, the absence of advanced
technological solutions in the current landscape overlooks the potential benefits of automation, machine learning,
and Optical Character Recognition (OCR) technology. These challenges collectively contribute to financial
discrepancies, jeopardizing the overall financial management of healthcare institutions. The Doctor Receipt
Analyzer system aims to address these issues by introducing an automated solution that utilizes machine learning
and OCR technology to streamline the processing of doctor receipts, mitigate.

fdf
CHAPTER 5: DETAILS OF DESIGN, WORKING &PROCESSES.

5.1 Database Design:


In this section , the basis structure of the tables composing the database for the
project are shown along with information about primary and foreign key.

5.1.1 User table:

User Type Size


User_id int 11

User_name varchar 100

text NA
User_address

bigint 20
User_mobile

varchar 100
User_owner

varchar 100
User_email

text NA
User_info

User_fssai varchar 100

varchar 100
User_status

varchar 100
User_uname

User_upassword varchar 100

fdf
5.1.2 Medicince table:

MED Type Size

med_id int 11

med_name varchar 100

text NA
med _address

varchar 100
med owner

varchar 100
med email

text NA
med _info

med varchar 100


fssai
varchar 100
med _status

varchar 100
med uname

med upassword varchar 100

fdf
• DESIGN OF SYSTEM

System Architecture

Fig 5.1: System Architecture


The architecture of the Machine Learning-based Doctor Receipt
Analyzer system is designed to seamlessly integrate OCR technology and
machine learning algorithms, providing an intelligent solution for efficient
processing of medical receipts. At its core, the system follows a modular
architecture, comprising distinct components that collectively contribute to its
functionality. The user interface serves as the entry point, allowing healthcare
professionals to upload receipt images for analysis. The OCR engine, powered
by a library such as Tesseract, converts the receipt images into machine-
readable text. The parsed text, containing essential information, is then
processed by machine learning algorithms to extract key details such as patient
names, dates, services provided, and associated costs. The extracted data is
securely stored in a relational database for future retrieval and analysis. A

fdf
reporting and analytics module enables users to generate insights and reports
from the processed receipt data. The system also incorporates security
measures, including encryption and access controls, to ensure compliance with
healthcare data privacy standards. This modular and integrated architecture
empowers the Machine Learning-based Doctor Receipt Analyzer system to
streamline administrative workflows, reduce manual efforts, and enhance the
accuracy of medical receipt processing in healthcare environments.

DFD Diagrams:

Fig 5.1: DFD Level 0


A level 0 data flow diagram (DFD), also known as a context diagram,
shows a data system as a whole and emphasizes the way it interacts with
external entities. This DFD level 0 example shows how such a system might
function within a typical retail business.

fdf
Fig 5.2: DFD Level 1
DFD 1, a context diagram is decomposed into multiple bubbles/processes. In
this level, we highlight the main objectives of the system and breakdown the high-level
process of 0-level DFD into subprocesses.

fdf
Fig 5.3: DFD Level 2

DFD 2 goes one process deeper into parts of 1-level DFD. It can be used to
project or record the specific/necessary detail about the system’s functioning.

fdf
UML Diagrams:

Fig 5.4: Class Diagram

In software engineering, a class diagram in the Unified Modeling


Language (UML) is a type of static structure diagram that describes the structure of a
system by showing the system's classes, their attributes, operations (or methods), and
the relationships among objects.

The class diagram is the main building block of object-oriented modeling. It is


used for general conceptual modeling of the structure of the application, and for
detailed modeling translating the models into programming code. Class diagrams can
also be used for data modeling.[1] The classes in a class diagram represent both the main
elements, interactions in the application, and the classes to be programmed.

fdf
Fig 5.5: Sequence Diagram
A sequence diagram shows object interactions arranged in time sequence. It
depicts the objects and classes involved in the scenario and the sequence of
messages exchanged between the objects needed to carry out the functionality
of the scenario. Sequence diagrams are typically associated with use case
realizations in the Logical View of the system under development. Sequence
diagrams are sometimes called event diagrams or event scenarios.

A sequence diagram shows, as parallel vertical lines different processes


or objects that live simultaneously, and, as horizontal arrows, the messages
exchanged between them, in the order in which they occur. This allows the
specification of simple runtime scenarios in a graphical manner.

fdf
Fig 5.6: Activity Diagram
Activity diagrams are graphical representations of workflows of stepwise
activities and actions[1] with support for choice, iteration and concurrency. In
the Unified Modeling Language, activity diagrams are intended to model both
computational and organizational processes (i.e., workflows), as well as the data flows
intersecting with the related activities.[2][3] Although activity diagrams primarily show
the overall flow of control, they can also include elements showing the flow of data
between activities through one or more data stores.

fdf
Fig 5.7: Use case Diagram

A use case diagram at its simplest is a representation of a user's interaction with the
system that shows the relationship between the user and the different use cases in which the
user is involved.

Code:
<!doctype html>
<html lang="en">

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Prescription Analyzer</title>
<link rel="icon" href="static/img/favicon.png">
<link

href="https://fonts.googleapis.com/css?family=Poppins:200i,300,300i,400,400i,500,500i,600
,600i,700,700i,800,800i,900,900i&display=swap"
rel="stylesheet">

<!-- Bootstrap CSS -->

fdf
<link rel="stylesheet" href="/static/css/bootstrap.min.css">
<!-- Nice Select CSS -->
<link rel="stylesheet" href="/static/css/nice-select.css">
<!-- Font Awesome CSS -->
<link rel="stylesheet" href="/static/css/font-awesome.min.css">
<!-- icofont CSS -->
<link rel="stylesheet" href="/static/css/icofont.css">
<!-- Slicknav -->
<link rel="stylesheet" href="/static/css/slicknav.min.css">
<!-- Owl Carousel CSS -->
<link rel="stylesheet" href="/static/css/owl-carousel.css">
<!-- Datepicker CSS -->
<link rel="stylesheet" href="/static/css/datepicker.css">
<!-- Animate CSS -->
<link rel="stylesheet" href="/static/css/animate.min.css">
<!-- Magnific Popup CSS -->
<link rel="stylesheet" href="/static/css/magnific-popup.css">

<!-- Medipro CSS -->


<link rel="stylesheet" href="/static/css/normalize.css">

<link rel="stylesheet" href="/static/css/style.css">


<link rel="stylesheet" href="/static/css/responsive.css">
</head>

<body>

<!-- Header Area -->


<header class="header">

<!-- Header Inner -->


<div class="header-inner">
<div class="container">
<div class="inner">
<div class="row">
<div class="col-lg-3 col-md-3 col-12">
<!-- Start Logo -->
<div class="logo1">
<h4 class="mt-2"> <b> Prescription Analyzer </b></h4>
</div>
<!-- End Logo -->
<!-- Mobile Nav -->
<div class="mobile-nav"></div>
<!-- End Mobile Nav -->
</div>
<div class="col-lg-7 col-md-9 col-12">
<!-- Main Menu -->
<div class="main-menu">
<nav class="navigation">

fdf
<ul class="nav menu">
<li><a href="registration">Register </a></li>
<li><a href="log_in">Login </a></li>

</ul>
</nav>
</div>
<!--/ End Main Menu -->
</div>
<div class="col-lg-2 col-12">
<!-- <div class="get-quote">
<a href="appointment.html" class="btn">Book Appointment</a>
</div> -->
</div>
</div>
</div>
</div>
</div>
<!--/ End Header Inner -->
</header>
<!-- End Header Area -->

{% for message in messages %}


<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
{% if message.tags == 'success' %}
<script>
var m = "{{ message }}"
swal(m, '', 'success');
</script>
{% elif message.tags == 'danger' %}
<script>
var m = "{{ message }}"
swal(m, '', 'error');
</script>
{% elif message.tags == 'info' %}
<script>
var m = "{{ message }}"
swal(m, '');
</script>
{% endif %}

{% endfor %}

{% block body%}

{% endblock body %}

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-
C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"

fdf
crossorigin="anonymous"></script>

<!-- jquery Min JS -->


<script src="static/js/jquery.min.js"></script>
<!-- jquery Migrate JS -->
<script src="static/js/jquery-migrate-3.0.0.js"></script>
<!-- jquery Ui JS -->
<script src="static/js/jquery-ui.min.js"></script>
<!-- Easing JS -->
<script src="static/js/easing.js"></script>
<!-- Color JS -->
<script src="static/js/colors.js"></script>
<!-- Popper JS -->
<script src="static/js/popper.min.js"></script>
<!-- Bootstrap Datepicker JS -->
<script src="static/js/bootstrap-datepicker.js"></script>
<!-- Jquery Nav JS -->
<script src="static/js/jquery.nav.js"></script>
<!-- Slicknav JS -->
<script src="static/js/slicknav.min.js"></script>
<!-- ScrollUp JS -->
<script src="static/js/jquery.scrollUp.min.js"></script>
<!-- Niceselect JS -->
<script src="static/js/niceselect.js"></script>
<!-- Tilt Jquery JS -->
<script src="static/js/tilt.jquery.min.js"></script>
<!-- Owl Carousel JS -->
<script src="static/js/owl-carousel.js"></script>
<!-- counterup JS -->
<script src="static/js/jquery.counterup.min.js"></script>
<!-- Steller JS -->
<script src="static/js/steller.js"></script>
<!-- Wow JS -->
<script src="static/js/wow.min.js"></script>
<!-- Magnific Popup JS -->
<script src="static/js/jquery.magnific-popup.min.js"></script>
<!-- Counter Up CDN JS -->
<script
src="http://cdnjs.cloudflare.com/ajax/libs/waypoints/2.0.3/waypoints.min.js"></script>
<!-- Bootstrap JS -->
<script src="static/js/bootstrap.min.js"></script>
<!-- Main JS -->
<script src="static/js/main.js"></script>
</body>

</html>

{% extends 'base.html' %}

fdf
{% block body %}

<section class="appointment">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="section-title">
<h2>Login Form</h2>
<img src="/static/img/section-img.png" alt="#">
{% comment %} <p>Lorem ipsum dolor sit amet consectetur adipiscing elit
praesent aliquet. pretiumts</p> {% endcomment %}
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-12 col-12">
<form class="form" action="" method="POST">
{% csrf_token %}
<div class="row">
<div class="col-lg-12 col-md-6 col-12">
<div class="form-group">
<input name="username" type="text" placeholder="User Name">
</div>
</div>
<div class="col-lg-12 col-md-6 col-12">
<div class="form-group">
<input name="password" type="password" placeholder="Password">
</div>
</div>

</div>
<div class="row">
<div class="col-lg-5 col-md-4 col-12">
<div class="form-group">
<div class="button">
<button type="submit" class="w-100 btn" >Submit </button>
</div>
</div>
</div>

</div>
</form>
</div>
<div class="col-lg-6 col-md-12 ">
<div class="appointment-image ">
<img src="static\img\img3.jpg" alt="#">
</div>
</div>
</div>
</div>

fdf
</section>

{% endblock body %}

<!DOCTYPE html>
<html>
<title>Medicine Traceability</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-
EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-
MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
<!-- Icons font CSS-->
<link href="static/vendor/mdi-font/css/material-design-iconic-font.min.css" rel="stylesheet"
media="all">
<link href="static/vendor/font-awesome-4.7/css/font-awesome.min.css" rel="stylesheet"
media="all">
<!-- Font special for pages-->
<link

href="https://fonts.googleapis.com/css?family=Poppins:100,100i,200,200i,300,300i,400,400i
,500,500i,600,600i,700,700i,800,800i,900,900i"
rel="stylesheet">

<!-- Vendor CSS-->


<link href="static/vendor/select2/select2.min.css" rel="stylesheet" media="all">
<link href="static/vendor/datepicker/daterangepicker.css" rel="stylesheet" media="all">

<!-- Main CSS-->


<link href="static/css/main.css" rel="stylesheet" media="all">

<body>

<!-- Sidebar -->


<div class="w3-sidebar w3-light-blue w3-bar-block " style="width:25%">
<h3 class="w3-bar-item m-5">Prescription Analyzer</h3>
<a href="sidebar" class="btn btn-primary w-100 gap-5">Upload Prescription</a>
<a href="log_out" class="btn btn-primary w-100" style=" margin-top: 5px;">Logout</a>
</div>

fdf
<div class="p-t-100 font-poppins">
<div class="wrapper wrapper--w680" style="margin-left: 30%;">
{% for row in rows %}
<div class="card">
<div class="card-header">
{{row.sub_category}}
</div>
<div class="card-body">
<h2 class="card-title"> {{row.product_name}} </h2>
<h4 class="card-title"> {{row.salt_composition}} </h4>
<h4 class="card-title"> Price : {{row.product_price}} </h4>
<h5 class="card-title"> Manufacturer Name : {{row.product_manufactured}}
</h5>
<h4 class="card-title"> Description :</h4>
<p class="card-text">{{row.medicine_desc}}</p>
<h4 class="card-title mt-2"> Side Effects : </h4>
<p class="card-text">{{row.side_effects}}</p>
</div>
</div>
{% endfor %}
</div>
</div>

</div>
</div>
</div>

<!-- Jquery JS-->


<script src="static/vendor/jquery/jquery.min.js"></script>
<!-- Vendor JS-->
<script src="static/vendor/select2/select2.min.js"></script>
<script src="static/vendor/datepicker/moment.min.js"></script>
<script src="static/vendor/datepicker/daterangepicker.js"></script>

<!-- Main JS-->


<script src="static/js/global.js"></script>

{% block body%}

{% endblock body %}

</body>

</html>

fdf
Backend Code:

from django.shortcuts import render,redirect


from django.contrib.auth.models import User
from django.contrib.auth import authenticate,login,logout
from django.contrib.auth.decorators import login_required
from django.views.decorators.cache import cache_control
from django.contrib import messages
from app.auth import authentication
from .form import document_form
from .process import *
import pandas as pd
from .models import *
# Create your views here.
import random

# Load the medicine data from the CSV file


medicine_data = pd.read_csv('dataset/medicine_data.csv')

def index(request):
return render(request , 'index.html')

def registration(request):
if request.method == "POST":
first_name = request.POST['fname']
last_name = request.POST['lname']
username = request.POST['username']
password = request.POST['password']
password1 = request.POST['repassword']
# print(first_name, contact_no, ussername)
verify = authentication(first_name, last_name, password, password1)
if verify == "success":
user = User.objects.create_user(username, password, password1) #create_user
user.first_name = first_name
user.last_name = last_name
user.save()
messages.success(request, "Your Account has been Created.")
return redirect("log_in")

else:
messages.error(request, verify)
return redirect("registration")

return render(request, 'registration.html')

def log_in(request):
if request.method == "POST":
# return HttpResponse("This is Home page")
username = request.POST['username']
password = request.POST['password']

fdf
user = authenticate(username = username, password = password)
if user is not None:
login(request, user)
messages.success(request, "Log In Successful...!")
return redirect("sidebar")
else:
messages.error(request, "Invalid User...!")
return redirect("log_in")
return render(request, 'log_in.html')

@login_required(login_url="log_in")
@cache_control(no_cache = True, must_revalidate = True, no_store = True)
def dashboard(request):
return render(request, 'dashboard.html')

@login_required(login_url="log_in")
@cache_control(no_cache = True, must_revalidate = True, no_store = True)
def log_out(request):
logout(request)
messages.success(request, "Log out Successfuly...!")
return redirect("/")

@login_required(login_url="log_in")
@cache_control(no_cache=True, must_revalidate=True, no_store=True)
def sidebar(request):
form = document_form(request.POST, request.FILES)
context = {
'fname': request.user.first_name,
'form': document_form(),
}
if request.method == "POST":
if form.is_valid():
# Get the uploaded image file directly from the form
doc = form.cleaned_data['uploaded_doc']
# Process the image data using the processed_image function
text_pred = processed_image(doc.read())
# processed_image = extract_sign(doc)
med_name = extract_medicine_names(text_pred)
print(med_name)
matched_rows = match_medicine_names_with_data(med_name, medicine_data)
random_id = random.randint(100000, 999999)
if matched_rows: # Check if matched_rows is not empty
for row in matched_rows:
medicine_instance = MedicineData()
# Set attributes based on the data from the matched row
medicine_instance.random_id = random_id
medicine_instance.product_name = row['product_name']

fdf
medicine_instance.sub_category = row['sub_category']
medicine_instance.salt_composition = row['salt_composition']
medicine_instance.product_price = row['product_price']
medicine_instance.product_manufactured = row['product_manufactured']
medicine_instance.medicine_desc = row['medicine_desc']
medicine_instance.side_effects = row['side_effects']
medicine_instance.save()
messages.success(request, "Medicine Identified...!")
return redirect("result")

else:
messages.error(request, "Medicine Not Identified...!")
return redirect("sidebar")

return render(request, 'sidebar.html', context)

@login_required(login_url="log_in")
@cache_control(no_cache = True, must_revalidate = True, no_store = True)
def result(request):
medicine_rows = MedicineData.objects.last()
medicine_row_data = MedicineData.objects.all().filter(random_id =
medicine_rows.random_id)
context = {
'fname': request.user.first_name,
'rows' : medicine_row_data
}
return render(request, 'result.html', context)

fdf
CHAPTER 6: RESULT

fdf
Applications:
1) Most of the people, these days are connected with technology
and are familiar with it. So, this website is useful to all the
website users as they can donate the food in their devices
using this website.
2) Very Quick.
3) Simple yet Powerful Medium.
4) 24/7 Availability

fdf
CHAPTER 7: SYSTEM REQUIREMENT

7.1 Software Requirement:


➢ Windows XP, Windows 7 (ultimate, enterprise)
➢ Vs code

7.2 Hardware Requirement:


➢ Processor- i3
➢ Hard Disk- 5GB
➢ Memory-1GB RAM

fdf
CHAPTER 8: CONCLUSION, LIMITATION
ANDFUTURE SCOPE

8.1 Conclusion:
In conclusion, the Machine Learning-based Doctor Receipt
Analyzer system harnessing OCR technology marks a significant
leap forward in healthcare administration. This innovative solution
has successfully automated and streamlined the intricate process of
processing doctor receipts, transcending the limitations posed by
diverse formats and handwritten entries. By seamlessly integrating
machine learning algorithms, the system not only enhances the
accuracy and efficiency of data extraction but also promises to
revolutionize financial management and decision-making within
healthcare institutions. Its adaptability, commitment to data security,
and potential for future advancements position it as a pivotal tool in
the evolving landscape of healthcare administration. As we embrace
this cutting-edge technology, we anticipate a future where
administrative workflows are further optimized, allowing healthcare
professionals to allocate more time and resources to the core of their
practice delivering exceptional patient caree.

8.2 Future Scope:


Future iterations may focus on seamless integration with HR
systems, providing a unified platform for healthcare professionals to
access both medical and financial information in one interface.
Continued advancements in machine learning algorithms may lead
to improved accuracy in data extraction, especially in handling
diverse receipt formats, handwritten text, and complex document
structures

fdf
8.3 Limitation:
• Dataset Important

fdf
CHAPTER 9: APPENDIX

9.1 Appendix

1. Py: Python
2. SQL: Structured Query Language
3. DFD: Data Flow Diagram
4. UI: User interface

9.1 Cost Sheet of Project:

Description Cost(Rs)

Developers Time (150 hours) 3000 (Assuming students own


time)

Testing And Quality Assurance 1500(Assuming Self Testing)

Documentation and User 3000(Documentation)


Manual

Database And Storage 1500(Storage)

Hosting Cost 2000(Cost)

Total Cost 11,000 Rs

fdf
CHAPTER 10: REFERENCE & BIBLIOGRAPHY

[1] Telemedicine, https://www.mohfw.gov.in/pdf/Telemedicine.pdf


[2] Wittich CM, Burkle CM, Lanier WL. Medication errors: an overview for
clinicians. Mayo Clin Proc. 2014 Aug;89(8):1116-25.
[3] CHEN, M. R., WANG, H. F. (2013). The reason and prevention of hospital
medication errors. Practical Journal of Clinical Medicine,
[4] Drug Review Dataset, https://archive.ics.uci.edu/ml/datasets/Drug.
[5] Fox, Susannah, and Maeve Duggan. ”Health online 2013. 2013.”
[6] Bartlett JG, Dowell SF, Mandell LA, File TM Jr, Musher DM, Fine MJ. Prac
tice guidelines for the management of community-acquired pneumonia in
adults.Infectious Diseases Society of America. Clin Infect Dis. 2000
Aug;31(2):347-82.doi: 10.1086/313954. Epub 2000 Sep 7. PMID: 10987697;
PMCID: PMC7109923.
[7] Fox, Susannah Duggan, Maeve. (2012). Health Online 2013. Pew Research
Internet Project Report.
[8] T. N. Tekade and M. Emmanuel, ”Probabilistic aspect mining approach for
interpretation and evaluation of drug reviews,” 2016 International Conference
on Signal Processing, Communication, Power and Embedded System
(SCOPES), Paralakhemundi, 2016, pp. 1471-1476, doi:
10.1109/SCOPES.2016.7955684.
[9] Doulaverakis, C., Nikolaidis, G., Kleontas, A. et al. GalenOWL: Ontology-
based drug recommendations discovery. J Biomed Semant 3, 14 (2012).
[10] Leilei Sun, Chuanren Liu, Chonghui Guo, Hui Xiong, and Yanming Xie.
2016. Data-driven Automatic Treatment Regimen Development and
Recommendation.

fdf

You might also like