CPP Final Report Group 7
CPP Final Report Group 7
CPP Final Report Group 7
VISION
VISION
MISSION
M2: To bench mark the global standards of quality education in the Institute.
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
“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
CERTIFICATE
This is to Certify that this report,
“MEDICINE PRESCRIPTION SYSTEM”
Submitted by
Samruddhi Shekatkar
Kartiki Malode
Manas Bhole
Neel Patel
Prof.P.M.Takate Prof.S.B.Patil
Project Guide Head,
Lecturer in IT Department Dept. of IT
Sincerely,
Samruddhi Shekatkar
Kartiki Malode
Manas Bhole
Neel Patel
INDEX
Certificate
Acknowledgement
List of Figures
Abstract
01 Introduction
1.1 Introduction 12
02 Literature Survey 16
03 Scope Of Project 19
04 Methodology 20
4.1 HTML 20
4.2 Py 22
4.3 MySQL 22
5.3 Code 29
06 Result 42
6.3 Website 43
07 System Requirement 44
9.1 Software Requirement 44
7.1 Conclusion 45
7.2 Limitations 45
09 Appendix 47
10.1 References 48
10.2 Bibliography 48
List of Figures
6 Class Diagram 16
7 Activity Diagram 17
8 Sequence Diagram 18
9 Component Diagram 19
11 Use-Case Diagram 20
ABSTRACT
fdf
CHAPTER 1. INTRODUCTION
1.1 Introduction:
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
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:
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:
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:
fdf
CHAPTER 2. LITERATURE SURVEY
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
Technologies:
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.
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:
3. SQLite:
fdf
Fig 3.3: SQLite Database
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.
text NA
User_address
bigint 20
User_mobile
varchar 100
User_owner
varchar 100
User_email
text NA
User_info
varchar 100
User_status
varchar 100
User_uname
fdf
5.1.2 Medicince table:
med_id int 11
text NA
med _address
varchar 100
med owner
varchar 100
med email
text NA
med _info
varchar 100
med uname
fdf
• DESIGN OF SYSTEM
System Architecture
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:
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:
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.
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">
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">
<body>
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 -->
{% 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>
</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">
<body>
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>
{% block body%}
{% endblock body %}
</body>
</html>
fdf
Backend Code:
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")
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")
@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
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.
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
Description Cost(Rs)
fdf
CHAPTER 10: REFERENCE & BIBLIOGRAPHY
fdf