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

Python Alert Reminder System Project

Uploaded by

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

Python Alert Reminder System Project

Uploaded by

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

ALERT REMINDER

NOTIFICATION WITH PYTHON

ELINA MOHAPATRA
Registration Number: 2001289197

Department of Computer Science & Information Technology

TRIDENT ACADEMY OF TECHNOLOGY


Bhubaneswar-751024, Odisha, India.

2020-24

1
Project Report on

ALERT REMINDER NOTIFICATION


WITH PYTHON
Submitted in Partial Fulfillment of the
Requirement for the 7th Sem. Minor Project
of

Bachelor of
Technology in
Computer Science & Engineering

Submitted by

ELINA MOHAPATRA
ADI AVIJNAN DAS
Registration Number: 2001289197
Registration Number: 2001289195

Under the Guidance of

Ranjeep Kumar Pradhan


HOD, Dept. of CSIT

Department of Computer Science & Engineering

TRIDENT ACADEMY OF TECHNOLOGY


Bhubaneswar-751024, Odisha, India
2
CERTIFICATE OF APPROVAL

This [Link]. Viva-Voce Examination of the Minor Project work submitted by the candidate
Elina Mohapatra bearing BPUT Registration Number: 2001289197 is held during 29th

November, 2021 and is accepted in partial fulfillment of the requirement for the award of the
degree of Bachelor of Technology in Computer Science & Engineering of Biju Patnaik
University of Technology, Odisha.

Place: Bhubaneswar Dr. Biswaranjan Nayak

Date: 29-11, 2021 Dept. of CSE, Project Guide

Place: Bhubaneswar
Date: 29-11, 2021 HOD, Dept. of CSE

3
DECLARATION

I, Soumyakant Tripathy declare that the Minor Project Work presented through this report was
carried out by me in accordance with the requirements and in compliance of the Academic
Regulations of the Biju Patnaik University of Technology (BAR) for the Bachelor of
Technology ([Link].) Degree Programed in Information Technology and that it has not been
submitted for any other academic award. Except where indicated by specific reference in the
text, the work is solely my own work. Work done in collaboration with, or with the assistance of,
others, has been acknowledged and is indicated as such. Any views expressed in the report are
those of the author.

Place: Bhubaneswar Soumyakant Tripathy


Date: 29-11, 2021 [Link]: 1801289305

ii

2
CERTIFICATE

This is to certify that the report of the Minor Project Work on the topic entitled “ ALERT
REMINDER NOTIFICATION WITH PYTHON”, which is submitted by Elina Mohapatra in
partial fulfillment of the requirement for the award of the of Bachelor of Technology in Computer
Science & Engineering of Biju Patnaik University of Technology, Odisha, is a bona fide record
of the candidate's own work carried out by him under my supervision.

Supervisor Head of the Department


(Ranjeep Kumar Pradhan)
HOD, Dept. of CSIT Professor & Head, Dept. of CSE
Trident Academy of
Technology Trident Academy of Technology
Bhubaneswar-751024, Odisha,
Bhubaneswar, India. India.

3
ABSTRACT

In this project, This is an Android-based application in which an automatic alarm ringing system is
implemented. It focuses on doctor and patient interaction. Patients need not remember their
medicine dosage timings as they can set an alarm on their dosage timings. The alarm can be set for
multiple medicines and timings including date, time and medicine description. A notification will
be sent to them through email or message inside the system preferably chosen by the patients.
They can search doctor disease wise. The patients will get the contact details of doctors as per their
availability. Also the users can see different articles related to medical fields and health care tips.
The system focuses on easy navigation and good user interface. Many such Medical Reminder
Systems have been developed where a new hardware is required but in our work we have made an
attempt to develop a system which is economical, time-saving and supports medication adherence.

Place: Bhubaneswar Elina Mohapatra


Date: 29-11, 2021 [Link]: 2001289197

5
ACKNOWLEDGMENTS

I take this opportunity to express my gratitude to the people who have been instrumental in
the successful completion of this project. I am, in the first place, obliged and grateful to my
parents without whose support and care I could not have completed this project. I express my
deep gratitude towards my guide, Ranjeep Kumar Pradhan, HOD, Dept. of CSIT, Trident
Academy of Technology, Bhubaneswar, for his tremendous support, encouragement and
help.
I convey my sincere thanks to our HOD, Department of Computer Science & Information
Technology and the principal of Trident Academy of Technology, Bhubaneswar, for their
permission and cooperation in the completion of the project without experiencing any
hurdles. I would like to extend my gratitude to the Department of Computer Science &
Engineering, Trident Academy of Technology, Bhubaneswar, for their support and
cooperation.
Finally, I extend my appreciation to all my friends, teaching and non-teaching staffs, who
directly or indirectly helped me in this endeavor.

Place: Bhubaneswar Elina Mohapatra

6
Date: 29-11, 2021
Regd. No: 2001289197

7
CONTENTS

Approval i

Declaration ii

Certificate iii

Abstract iv

Acknowledgements v

Contents vi

1 The Problem Statement 1


1.1 About the Problem Statement 1

2 Introduction 2
2.1 Definition of Regression 2
2.1.1 Simple Linear Regression 3
2.1.2 Multi linear Regression 4
2.1.3 Non-Linear Regression 6
2.1.4 Overfitting in Regression 7
2.1.5 Support vector regression 8
2.1.6 Decission Tree regression 12

3 Python & Related Libraries 16


3.1 About Python 16
3.1.1 Numpy 17
3.1.2 Pandas 19
3.1.3 SK Learn 20
3.1.4 Matplotlib 21
3.1.5 Plotly Express 22
3.1.6 Prophet 24

vi

8
4 EDA for Preprocessing 25

4.1.1 EDA 25
4.1.2 Data Preprocessing 27
4.1.3 Coding & Results 28

5 Conclusions & Future Scope 33

5.1 Conclusion 33
5.2 Future Scope 33

References 34

vii

9
CHAPTER 1

The Problem Statement

Many people struggle to remember to take their medication on time and as prescribed, leading to

potential health complications and reduced treatment efficancy. A simple and accessible solution

is needed to address this challenge and improve medication adherence

About the Problem Statement:-


Here we will use decision tree model along with some other algorithms. A decision tree
regression is a non-parametric supervised learning method used for both classification and
regression tasks. Many different models can be used, the best is the Decision Tree. It tries to fit
data with the best hyperplane which goes through the points and gives less error.

10
CHAPTER 2

INTRODUCTION

The category of patients involve all human beings-teachers, students, businessmen, housewives,
children and also all of us have a busy hectic schedule. Today’s life is full of responsibilities and
stress. So people are prone to diseases of different types and it is our duty to make ourselves stay fit
and healthy. If the patient stays at home then he or she might get someone to look after him/her but
when one is not at home, is out of the city or state away from home then it is hard for the family
members to call them and remind them their dosage timings every time. In our developing and
technology dependent life we totally rely on gadgets especially smart phones. Today everyone has a
smart phone. With this we get an opportunity to use technology in a better way so that it can be made
useful to us. And it plays an important part in our daily life and helps us staying fit in many ways.
The remarkable problem is that patients forget to take the proper medicines in proper proportion and
in proper time. Medication adherence, which refers to the degree or extent to which a patient takes
the right medication at the right time according to a doctor’s prescription, has recently emerged as a
serious issue because many studies have reported that non-adherence may critically affect the patient,
thereby raising medical costs .Medication non adherence is a common, complex, and costly problem
that contributes to poor treatment outcomes and consumes health care resources

 So we are introducing an Android application whose objective is to remind the patients of their dosage
timings through Alarm Ringing system so that they can stay fit and healthy. Through navigation they can
search doctors and hospitals and contact details so that they can easily get proper treatment on time. This
application focuses on the people who forget to take medicines on time. It allows users to set an alarm along
with the fields of date, time and medicine description which will allow them to set alarm for
multiple medicines at different time intervals. The notification system will send a notification after setting
an alarm. The user can activate or deactivate the notification accordingly. It will be sent as
email or message as selected by the user. The patients can search doctor disease wise and area
wise which will provide easy searching facility along with doctor’s contact information, visiting

11
place and availability time. Medication reminders help in decreasing medication dispensing errors and
wrong dosages.

 GOALS

The application is designed on Eclipse. It can be helpful in defense sector and emergency conditions (accidents) and
can spread health care awareness. It is life-saving, money saving and time saving application which is easy to use
and provides a good user interface.

MOTIVATION FOR WORK

Many Medication Systems have been developed based upon different platforms and concepts. Use of
healthcare related apps is growing but there are many issues related to their functionality. My Alert
Reminder is a medication reminder system for children. It runs on mobile devices such as smart phones,
providing user interfaces for configuring medication schedules and user alerts for reminding users about the
time and type of medication according to the configured medication schedule. Some systems use sensors,
radio-frequency identification (RFID), or motion detection technologies to ensure that patients actually take
their medications. Park et al proposed medication reminder synchronization system based on data
synchronization. It transmits OMA (open mobile alliance) DS (data synchronization) based messages
containing the patient’s medication data and the device configuration data to a remote manager/medical
staff. It also synchronizes data (including medication schedules)modified/generated by these personnel in the
medication server [1].Prasad B has discussed the approach of Medicine reminder pro. It is a free application
which supports up to 15 reminders. User can select them in either repeating or non-repeating alarm patterns.
Any hourly time interval between alarms can be selected, starting from the minimum of 1 hour. At the
scheduled time, application will produce a notification with an alarm, vibration or LED indication. [7] Zao et
all have developed Wedjat – Smart Phone Application which tries to avoid medicine administration errors
[8]. There are many loopholes of existing reminder systems. To list a few: They do not provide disease wise
searching of the Doctors, no optional notification only compulsion, no facility for scheduling
of appointments to the doctors .Some of the systems have a default alarm tone so the users cannot change
them. The scheduled reminder suggests any kind of medicine ,dose of medicine, etc. automatically without
doctor’s prescription, which can cause harm to the patients. Lastly, many of the systems available require
special hardware which need to be purchased. Sothis app would be of great help to peoples of various age
groups as it would be free of cost and easy to function .

12
OBJECTIVE FOR WORK

We are introducing an Android application whose objective is to remind the patients of their dosage
timings through Alarm Ringing system so that they can stay fit and healthy. Through navigation
they can search doctors and hospitals and contact details so that they can easily get proper treatment
on time. This application focusses on the people who forget to take medicines on time. It allows
users to set an alarm along with the fields of date, time and medicine description which will allow
them to set alarm for multiple medicines at different time intervals. The notification system will
send a notification after setting an alarm. The user can activate or deactivate the notification
accordingly. It will be sent as email or message as selected by the user. The patients can search
doctor disease wise and area wise which will provide easy searching facility along with doctor’s
contact information, visiting place and availability time. Medication reminders help in decreasing
medication dispensing errors and wrong dosages.

13
CHAPTER 3

SURVEY AND RESEARCH


For instance, a recent study found out that the risk of hospitalized patients,
having diabetes congestive heart failure, mellitus, hypertension ,or hyper
cholesterol via who actually were non adherent to prescribed remedy was more
in comparison with the general population. Non-adherence rate can vary widely,
even in the rigid controlled and monitored environment of a clinical test. To
mention, patients with long term conditions are questionable to follow
prescription than those with acute state.

 The effectiveness of a therapy or treatment directly depends upon a


patient's ability and willingness to follow a prescribed regimen. The
patient's ability for reading and understanding the instructions for
medication is a key factor.

 Patients who face difficulties in understanding the instructions in a


prescription which ultimately results in decreased adherence and poor
medication management and consumption.

 Issues of low literacy must be recognized and strategies designed with this
limitation in consideration.

 A patient with heart failure problem not taking prescribed medication or


who tents to forget to take their medicine, costs the U.S. health care system
an average of almost $8,000 annually, according to a 2011analysis
published in Health Affairs

They've determined several reasons behind not taking proper medication


and among those, one of them is:

 There is a high degree of complications for patients who takes several


different drugs for a variety of conditions.
14
 There are currently around 80million U.S. residents with several
chronic conditions and multiple medications to manage.

Patients who have a several different kind of prescriptions are dubious to


follow medications because they may have difficulty managing schedule
that involves taking several different medications schedule throughout the
day.

REASONS FOR LOW MEDICATION ADHERENCE

While designing and planning for this thesis, several papers had been gone
through to make it possible as it was very challenging to complete the job
with a limited knowledge. By taking into consideration of the Geriatric and
also the disabled people we took survey of them by asking the basic need
for them about medication .

We asked people in NGO, about their medication problem, what kind of


feasibility they expect about the medication reminder.

In this paper, a device consisting of no interference of human. This system


makes use of the concept of rotating compartments in circular step wise
motion using stepper motor which is used to store the pills.

It also purvey built in alarming system with the device consisting of


notification sound to indicate the time of medication. But the main
disadvantage of this system is, it needs manual handling of system.

Also they have used smartphone, which is mostly not used by elderly
people In “Pill Dispenser with alarm Via Smart phone notification system,
proposed a dispenser consisting of alarm system which helps to get alert in
the form of notification on smartphones or desktop.

15
.

CHAPTER 4
________________________________________
_

BENEFITS

 Using information technology (IT) to support patient self-


management has the potential to foster shared accountability for
healthcare outcomes by improving patient adherence to healthcare
regimens
 Currently the majority of alerts have been developed for clinicians to
assist them in clinical care management
 Leveraging IT to foster patient engagement in their healthcare
regimen may be particularly significant, as a patient only spends a
small amount of time in a clinical environment.
 Alerts and reminders are delivered in several ways that reflect the
urgency of the information from a conspicuous pop-up box or text
message, which usually indicates that the alert is important, to
something as subtle as a change in font that can designate a difference
between a generic or brand name medication.
 Alerts and reminders are informatics interventions typically delivered
through an electronic health record (EHR), a digital record of patient
data, but can also include paper mailings and brochures

 foster better health processes


 better individual patient care
 better health of patient

16
CHAPTER 5

SYSTEM ANALYSIS

This section describes the architecture of the system. This system was developed
using python, therefore the users only need to execute the main python executable with
the relevant parameters described throughout this section in order to use it. A more
detailed explanation over the files and directories that make up the system is described
in the attachments section , under the User Guide section

Requirements
To proceed with the implementation of the system, we need to identify the
requirements that are needed for us to be able to conclude it. We can sum arise the
main system requirements that need to be taken into consideration throughout the
system implementation

[Link] app should not fail in any condition.


[Link] database should be maintained properly.
[Link] alarm should work properly without any malfunction.
[Link] system would be friendly to the software

Proposed System

The proposed system is based on Android Operating system which will remind
the users to take medicines on time through notification and automatic alarm
ringing system. Android is a Linux-based operating system designed primarily
for touch screen mobile devices such as smart phones and tablet computers ,
developed by Google in conjunction with the Open Handset Alliance. Android
was built from the ground-up to enable developers to create compelling mobile
applications that take full advantage of all a handset has to offer. The system is
specified on android operating system only because the market share of Android
is high. Android also comes with an application development framework(ADF),
17
which provides an API for application development and includes services for
building GUI applications, data access, and other component types.

CHAPTER 6
_____________________________________________

PYTHON RELATED LIBRARIES

Python is one of the most popular programming languages for this task and it has
replaced many languages in the industry, one of the reason is its vast collection of
libraries .
About Python
 There are a lot of reasons why Python is popular among developers and one of
them is that it has an amazingly large collection of libraries that users can work
with .
 From developing to deploying and maintaining Python wants their developers
to be more productive .
 Python is becoming hugely popular among machine learning experts .

Using python we can create our application using GUI interface such as Tkinter

Coding Implementation
import tkinter as tk
from tkinter import ttk
from datetime import datetime
from plyer import notification
import threading
import time

18
then we have to define the alarm

class AlarmApp:
def __init__(self, root):
[Link] = root
[Link]("Alarm App")

self.label_time = [Link](root, text="Enter the alarm time (HH:MM AM/PM):")


self.label_time.pack(pady=5)

self.entry_time = [Link](root)
self.entry_time.pack(pady=5)

self.label_message = [Link](root, text="Enter the alert message:")


self.label_message.pack(pady=5)

self.entry_message = [Link](root)
self.entry_message.pack(pady=5)

self.label_medicine = [Link](root, text="Enter the medicine name:")


self.label_medicine.pack(pady=5)

self.entry_medicine = [Link](root)
self.entry_medicine.pack(pady=5)

self.button_set_alarm = [Link](root, text="Set Alarm", command=self.set_alarm)


self.button_set_alarm.pack(pady=10)

def set_alarm(self):
alarm_time_str = self.entry_time.get()
alert_message = self.entry_message.get()
medicine_name = self.entry_medicine.get()

check error through exception handling


try:
alarm_time = [Link](alarm_time_str, '%I:%M %p')
current_time = [Link]().strftime('%I:%M %p')
print(f"Alarm set for {alarm_time_str}. Waiting for alarm...")
time_diff = (alarm_time - [Link](current_time, '%I:%M
%p')).total_seconds()
19
[Link](time_diff, self.show_notification, args=[alert_message,
medicine_name, alarm_time_str]).start()
except ValueError as e:
print(f"Error: {e}. Please enter the correct time format (HH:MM AM/PM).")

20
define the notification :

def show_notification(self, alert_message, medicine_name, alarm_time_str):


notification_title = "Alarm Notification"
notification_message = f"{alert_message}\nTake your {medicine_name}
medicine.\nIt's {alarm_time_str}."

[Link](
title=notification_title,
message=notification_message,
timeout=10
)

Main function:

if __name__ == "__main__":
root = [Link]()
app = AlarmApp(root)
[Link]()

21
RESULT

22
CHAPTER 7

SYSTEM DESIGN AND IMPLEMENTATION

Medication reminders help in decreasing medication dispensing errors


and wrong dosages. The Reminder system consists of two parts –setting
Alarm and getting notification.

SET ALARM MODULE

It helps in reminding about the medicines. User can add details of the
dosage schedules. Using the date field one can enter the starting and
ending dates between which he has to take medicines. The time field
shows the time of dosage and on that time the alarm will get rung. The
user can add the description of the medicine, including name, purpose
and other related description. All the information will be saved in the
database. This makes any time availability of the patients’ records.
They can change the ringtone of the alarm from the ringtones stored in
the devices

GET NOTIFICATION MODULE

Once the alarm is set then the user gets the notification. The users can
activate or deactivate this accordingly. If he does not require the notification he
can turn off it. If he requires this system then a notification will be sent into his
device. Again if he wants the notification in email form, he can select
the ‘Notification through Email Mode’ or if he requires it in a message format he
can go with ‘Notification through Message Mode’

23
CHAPTER 8

IMPLICATIONS AND LIMITATIONS

[Link] IMPLICATIONS

 Use and dependency on technology in healthcare is well


established and growing, our findings indicate that
automated technology may reliably assist patients to
adhere to their health regimen.

 Automated appointment reminders, for instance, may


increase attendance rates and potentially reduce clinic
costs. Automated electronic reminders and alerts may
also be used to supplement discharge instructions,
increasing adherence and thereby decreasing
readmission rates.

 Sending electronic messages increases patients’ exposure


to educational material pertaining to their illness and has
the potential to allow patients to reflect on the material in
a setting away from the clinician.

 The use of an automated electronic reminder system may


also supplement discharge instructions to decrease
readmission rates and encourage adherence to discharge
plan

2. LIMITATIONS

There is an overwhelming amount of literature on the use


of specific technology to improve health outcomes.

24
o To narrow our findings we restricted our search to
automated technology. There are a great number of
studies that used text messaging, emails, and/or other
technologies to assist patients in adhering to their
health regimens that were not automated.

o For example, studies where nurses, research assistants,


or other clinicians sent such notifications manually
were excluded.

o We excluded all studies that did not employ an


automated approach to narrow our search results. This
limits our findings to a partial picture of the use of
health technologies.

25
CHAPTER 9
_________________________________
DISCUSSIONS AND CONCLUSIONS

While the greatest number of studies in this review focused on automated


reminders sent to patients to improve attendance rates for appointments,
other studies bring to light the efficacy of using automated technologies to
help patients achieve improved health outcomes through the use of
automated alerts. Recognizing potential benefits to patients and providers,
the US government has provided financial incentives for providers to
increase use of technology to assist in the delivery of health care. The use
of electronic and automated reminders to compliment the use of electronic
health records and online health monitoring systems is has become
increasingly popular across the globe. Unlike clinician alerts,
comparatively few studies have thus far investigated the emerging trends
of automated patient alerts, but have become a growing trend. More than
half (61%; n = 32) of the studies included in our review were published
since 2010.

The majority of the studies that used a behavior reminder intervention


targeted chronic conditions such as asthma, obesity, and HIV. The use of
automated technologies to remind patients to perform a behavior such as
taking medications, eating more fruits and vegetables, or adhering to a
complex medication regimen can serve to augment in-clinic education,
which can facilitate behavior change. Evidence suggests that patients only
comprehend and understand a small percent of what health care providers
discuss with them in the clinic setting.[16] Using behavior reminders can
help to reiterate and reinforce what was discussed in the clinic setting. It is
also important to note that adherence to a prescribed regimen increases
patients’ autonomy, self-efficacy, and long-term health outcomes. [17]

When reflecting on the use of text messages patients stated that the
messages were a way to feel more connected to their provider and engaged
in their health care.[18] Patients also reported that they were more likely to
adhere to a suggested regimen or advice if the message was personalized
[19] and if the reminder required an action from the patient such as turning

26
off the reminder.[20] However, care must be taken to observe patient
privacy and avoid the potential for others to view sensitive messages sent
to mobile phones. As technology changes to allow alerts to be presented in
a more discrete way this aspect might change. Further, while some patients
preferred letters mailed through the postal system, most preferred an
individual message sent directly to their personal mobile phone.

Automated reminders and alerts were effective across genders, age groups,
and socio-economic status. Appointment reminders increased attendance
regardless of the type of appointment. Automated reminders targeted at
modifying behaviors were also shown to be effective. Automated
appointment reminders increase attendance rates and have the potential to
decrease clinic costs due to missed appointments and reduce on the time it
takes for clinic staff to contact and remind patients of their appointments.
The literature also suggests that text messaging is an effective way to alert
patients of an upcoming appointment regardless of their age.

27
CHAPTER 10
_________________________________
Conclusion

Thus by referring many existing products, previous projects and research


papers based on medicine dispenser and also taking into consideration
problems faced by disabled people, Geriatrics, etc. We thought of such a
system which will help to overcome the disadvantage of existing or
previous system. A mobile-phone-based
automated medication reminder system shows promise in improving
medication adherence and blood pressure in high-cardiovascular-risk
individuals. The patients will get the schedule of medicine in-take time
with medicine image, starting and automatic alarm ringing system and
doctor’s contact details. The scheduled reminder will not suggest any kind
of medicine which is not prescribed by the doctor that will assure the
safety of the patient and also will avoid wrong dosages. This will be done
without any extra cost.

Our review indicates that reminders and alerts are advantageous in


many ways; they can be used to reach patients outside of regular
clinic settings and they can be tailored for individual messages. An
unanticipated finding in the literature indicates there is a minimal
age barrier in the efficacy of automated reminders sent to patients.
As technology and patients’ proficiency with technology evolves,
the use and dissemination of patient alerts will change. The
predominant type of alert currently used is text messaging by

28
mobile phone. This trend is likely to change as newer technologies
emerge, providers broaden their use of alerts to encompass a
greater breadth of purposes, and patients become more involved in
the management of their own healthcare.

29
REFERENCES
__________________________________

30

You might also like