Chapters
Chapters
CHAPTER 1
INTRODUCTION
1.1 INTRODUCTION
Medico - Pain and palliative care system is an android application developed for a small
clinic to manage staff data and patient data effectively. The main aim of developing “Pain
and palliative care system” is to computerize the services. This project includes registration
of patients, storing their details into the system, and provide the prescription according to
their disease and provide different palliative care services. Healthcare is a field in which
accurate record keeping and communication are critical. The software has the facility to
give a unique id for every patient and stores the details of every patient and the staff
automatically. With the increase of demand in hospitals, we need effective data
management system for handling patient’s data, staff data and treatment details in an
effective way. It deals with the collection of patient’s information, diagnosis details, etc. It
includes a search facility to know the current status of each patient. User can view the
details like home care routine schedule date from their login session. Home care schedule
is created by the nurse.
Since this module has its unique properties, it can extend further to make this system a
complete one.
1.4 OBJECTIVE
The main objective of the system is to computerize the functions of the palliative care
services. The effort given here is to convert the current system of managing data of the
physicians and patients into a computerized system, so that a faster, secure, error free and
efficient computer system involves. In the very first stage, we have to identify the problem
and collect details of problem. It involves gathering of information about the problem of
existing system how the problem must be solved and finding the cost estimates and
implementation specification of the new system.
• Develop an online pain and palliative care system to provide palliative care services to
the patients without any payment.
• Improve the quality and access to palliative care service skill development for service
providers.
• Improve the quality of palliative care service delivery in community and acute care
settings.
• Build and enhance research and data collection capacity within the palliative care sector.
• Strengthen understanding and increase uptake of advance care planning.
• Improve knowledge within the palliative care sector and community awareness of
palliative care.
• Provide palliative care services to the desired persons.
• Improve the collation and dissemination of palliative care information across the sector.
CHAPTER 2
SYSTEM ANALYSIS
2.1 INTRODUCTION
System analysis of study is an important phase of any system development process. The
system is studied to the minutest details and analysed. The system analyst plays the role of
an interrogator and dwells deep into the working of the present system. The system is
viewed as a whole and the inputs to the system are identified. The outputs from the
organization are traced to through the various processing that the input phases through in
the organization. A detailed study of this process must be made by various techniques like
interviews, questionnaires, etc. The data collected by these sources must be scrutinized to
arrives to a conclusion. The conclusion is an understanding of the system function. This
system is called existing system. Now the existing system is close study and problem
solver tries to sort out difficulties that the enterprise faces.
site and can add the previous case history with their disease description. Doctors can view
this detail and can add a prescription. Nurses can view this prescription and the nurses
schedule a home care routine plan to visit the patient homes and provide the services. And
the nurses update the current status of the patient.
In the conduct of the feasibility study, I had to consider three distinct types of feasibility.
These included:
• Technical feasibility
• Operational feasibility
• Economic feasibility
• System Design: The requirement specifications from first phase are studied in this phase
and system design is prepared. System Design helps in specifying hardware and system
requirements and also helps in defining overall system architecture.
• Implementation: With inputs from system design, the system is divides as units. which
are integrated in the next phase. Each unit is developed and tested for its functionality
which is referred to as Unit Testing.
• Integration and Testing: All the units developed in the implementation phase are
integrated into a system after testing of each unit. Post integration the entire system is
tested for any faults and failures.
• Deployment of system: Once the functional and non-functional testing is done, the
software is deployed in the customer environment or released it.
• Maintenance: There are some issues which come up in the client environment. To fix
those issues patches are released. Also, to enhance the product some better versions are
released. Maintenance is done to deliver these changes in the customer environment.
CHAPTER 3
SYSTEM DESIGN
3.1 INTRODUCTION
The pain and palliative care system help patients or their bystanders to register into the
system. It helps them to get their reports up to dates and medicine details also. They can
also book equipment. The doctor can also get the home care reports and case history of the
patients. The nurse would schedule the home care details. That could be viewed by doctor
and he can make appropriate decisions. This project aims to reduce the manual efforts in
pain and palliative clinic.
1. Login
Column Name Data Type Constraints Description
login_id varchar primary key, Login ID
auto increment
username varchar not null Username
password varchar not null Password
usertype varchar not null Usertype
2. Assign_nurse
Column Name Data Type Constraints Description
assign_id varchar primary key, Assign ID
auto increment
nurse_id varchar foreign key Nurse ID
patient_id varchar foreign key Patient ID
date date not null Date
3. Patient
Column Name Data Type Constraints Description
patient_id varchar primary key, Patient ID
auto increment
login_id varchar foreign key Login ID
firstname varchar not null First name
lastname varchar not null Last name
dob date not null Date of birth
phone int not null Phone
email varchar not null Email
place varchar not null Place
district varchar not null District
4. Type
Column Name Data Type Constraints Description
type_id varchar primary key, Type ID
auto increment
type varchar not null Type of medicine
5. Medicines
Column Name Data Type Constraints Description
medicine_id varchar primary key, Medicine ID
auto increment
nurse_id varchar foreign key Nurse ID
type_id varchar foreign key Type of medicine
medicine varchar not null Medicine
details varchar not null Medicine details
rate int not null Rate
quantity int not null Quantity
6. Medicine_details
7. Feedback
Column Name Data Type Constraints Description
feedback_id varchar primary key, Feedback ID
auto increment
patient_id varchar foreign key Patient ID
feedback varchar not null Feedback
date date not null Date
8. Doctors
Column Name Data Type Constraints Description
doctor_id varchar primary key, Doctor ID
auto increment
login_id varchar foreign key Login ID
Fname varchar not null First name
Lname varchar not null Last name
place varchar not null Place
phone int not null Phone
email varchar not null Email
9. Nurses
Column Name Data Type Constraints Description
nurse_id varchar primary key, Nurse ID
auto increment
login_id varchar foreign key Login ID
Fname varchar not null First name
Lname varchar not null Last name
place varchar not null Place
phone int not null Phone
email varchar not null Email
10. Appointments
11. Equipment
12. Equipment_request
13. Medicine_request
14. Medical_history
1. Entity:
Represents a real-world object or concept.
2. Attribute:
Describes properties of an entity.
3. Relationship:
Shows how two or more entities are related.
4. Lines:
Links attributes to entity sets or entity sets to relationships.
5. Cardinality:
Defines the number of instances in a relationship.
Types of cardinalities are:
• One-to-One
• One-to-Many
• Many-to-Many
ADMIN
NURSE
DOCTOR
PATIENT
ADMIN MODULE
• Manage nurses: Allows the admin to add, update, or remove nurse profiles in the
system.
• Manage doctors: Allows the admin to add, update, or remove doctor profiles in the
system.
• View homecare request: Enables the admin to review patient homecare requests and
assign nurses accordingly.
• View enquiry: Lets the admin read and respond to enquiries submitted by patients to
improve service quality.
NURSE MODULE
• Add equipment: Allows nurses to update the inventory by adding new medical
equipment.
• View homecare appointments: Enables nurses to review homecare service assigned
by the admin.
• View equipment request: Allows nurses to review equipment requests and accept
and provide them.
• View medicine request: Enables nurses to process patient requests for medicines by
approving and fulfilling them.
DOCTOR MODULE
• View appointment: Lets doctors see patient appointments and either approve or
decline them based on availability.
• View patient details with medical history: Provides doctors access to patient
profiles and their medical history for better diagnosis.
• Upload prescription: Allows doctors to upload treatment prescriptions for patient
access after consultations.
PATIENT MODULE
• Register and login: Enables new patients to create an account and existing users to
log into the system.
• Add medical history: Lets patients input and maintain records of their past and
current health conditions. They can also upload their diagnostic or lab reports.
• Make appointment: Allows patients to book appointments with doctors either for
in-clinic or homecare visits.
• View appointment: Enables patients to see the details and status of their scheduled
appointments.
• View reports (lab/scanning reports): Allows patients to access their uploaded
diagnostic or lab reports.
• View homecare request and status: Displays the homecare service requests along
with their current status.
• Request equipment and get status: Lets patients view available medical equipment
and send a request for use and track the status.
• Request medicine and get status: Allows patients to browse available medicines
and place requests for required items and track the status.
• Send enquiry: Lets patients submit their enquiries related to the services for
administrative review.
CHAPTER 4
SYSTEM ENVIRONMENT
4.1 INTRODUCTION
The software requirements specification (SRS) is a means of translating the ideas in the
minds of clients into formal documentation. This document forms the development and
software validation. The basic reason for the difficulty in software requirement
specification comes from the fact that there are three interested parties - clients, the end
users and the software developer.
The requirements document has to be such that the client and the user can understand it
easily, and the developers can use it as a basis for software development. Due to the
diverse parties involved in the software requirement specification, a communication gap
exists.
This gap arises when the client does not understand the software or the software
development processor when the developer does not understand the client’s problem and
the application area of SRS bridges this communication gap. Problem analysis is done to
obtain a clear understanding of the needs of the clients and the users, and what exactly is
desired from the software.
The analysis leads to the actual specification. People performing the analysis called
analysts, are also responsible for specifying the requirements. The software project is
initiated by the client’s needs. In the beginning, these needs are in the minds of various
people in the client organization.
The requirement analyst must identify their requirements by talking to these people and
understanding their needs. These people and the existing documents about the current
mode of operation are the basic source of information for the analyst
• Python Flask: Flask is a lightweight Python web framework used to build backend
server logic, APIs, and handle database interactions.
• Java Android: In backend Android development, Java is used to implement the
logic behind app features, manage data, and connect to databases or servers.
• MySQL: MySQL is a popular open-source relational database management system
used to store, manage, and retrieve data for web and mobile applications. It works
with backend languages like Python and Java to handle data operations securely and
efficiently.
CHAPTER 5
SYSTEM IMPLEMENTATION
5.1 INTRODUCTION
Implementation is the stage in the project where theoretical design is turned into a working
system and is giving confidence on the new system for the users which will work
efficiently and effectively. It involves careful planning, investigation of the current system
and its constraints on implementations, design of methods to achieve the changeover, an
evaluation, of changeover methods. Apart from planning major tasks for preparing the
implementation are education and training of users. The major complex system being
implemented the more evolved will be the system analysis and the design effort required
just for implementation. An implementation coordination committee based on policies of
individual organization has been appointed. The implementation process begins with
preparing plan for implementation of the system. According to this plan the activities are to
be carried out discussions made regarding the equipment and resources and the additional
equipment has to be acquired to implement the new system. Implementation is the final
and important phase. The most critical stage in achieving a successful new system and in
giving the users confidence that the new system and in giving the users confidence that the
new system will work and be effective. The system can be implemented only after
thorough testing is done and if found to working according to the specification.
5.2 CODING
Coding, at the heart of system implementation, is the process of translating intricate design
concepts and algorithms into a structured and executable format. It involves the creation of
source code using programming languages that define the system's functionalities and
behaviour. Skilled developers meticulously craft code, applying coding standards and best
practices to ensure readability, maintainability, and scalability. Effective coding demands a
balance between creativity and precision, as developers sculpt the digital framework upon
which the entire system relies, ultimately shaping the user experience and fulfilling the
project's objectives.
collaboration among developers, easier code reviews, reduced bugs, and enhanced overall
software quality. Coding standards cover various aspects of coding, including naming
conventions for variables, functions, classes, and other entities; formatting rules for
indentation, spacing, and line breaks; documentation practices such as comments and code
documentation; usage of programming constructs and patterns; error handling guidelines;
and security considerations.
<div class="top-sec-view"></div>
<center>
<div class="div-view">
<h3 style="margin-top: 30px;padding: 10px;">View Uploads </h3>
</tr>
{% for row in data['view'] %}
<tr>
<td style="padding-top: 10%;">{{loop.index}}</td>
<td ><img src="/{{row['file']}}" width="200px" height="200px"
alt=""></td>
<td style="padding-top: 10%;">{{row['ufname']}}</td>
<td style="padding-top: 10%;">{{row['ulname']}}</td>
<td style="padding-top: 10%;">{{row['uplace']}}</td>
<td style="padding-top: 10%;"></td>
<td style="padding-top: 10%;">{{row['uphone']}}</td>
<td></td>
<td style="padding-top: 10%;">{{row['uemail']}}</td>
<td></td>
</div>
</center>
{% include 'footer.html' %}
//doctor.py
from flask import *
from database import *
doctor=Blueprint('doctor',__name__)
@doctor.route('/dochome')
def dochome():
if not session.get("log_id") is None:
return render_template('doctor_home.html')
else:
return redirect(url_for('public.login'))
@doctor.route('/viewappointment',methods=['get','post'])
def viewappointment():
if not session.get("log_id") is None:
data={}
q="SELECT * FROM USER INNER JOIN appointment USING(user_id) where
doctor_id='%s'"%(session['doc_id'])
data['view']=select(q)
if 'id' in request.args:
id=request.args['id']
q="select * from precautions where appointment_id='%s'"%(id)
res=select(q)
if res:
flash("Precuations are already added...")
return redirect(url_for('doctor.viewappointment'))
else:
id=request.args['id']
data['id']=id
if 'add' in request.form:
apid=request.form['apid']
pre=request.form['pre']
med=request.form['med']
q="insert into precautions values(null,'%s','%s','%s')"%(apid,pre,med)
insert(q)
flash("Precautions are added....")
return redirect(url_for('doctor.viewappointment'))
if 'idd' in request.args:
id=request.args['idd']
q="select * from prescription where appointment_id='%s'"%(id)
res=select(q)
if res:
flash("Prescription are already added...")
return redirect(url_for('doctor.viewappointment'))
else:
idd=request.args['idd']
data['idd']=idd
if 'adds' in request.form:
apid=request.form['apid']
pre=request.form['med']
med=request.form['dose']
q="insert into prescription values(null,'%s','%s','%s')"%(id,pre,med)
insert(q)
flash("prescription are added....")
return redirect(url_for('doctor.viewappointment'))
if 'action' in request.args:
action=request.args['action']
idr=request.args['idr']
else:
action=None
if action=='accept':
q="update appointment set status='accept' where appointment_id='%s'"%(idr)
update(q)
flash("appointment Updated Successfully....")
return redirect(url_for("doctor.viewappointment"))
if action=='reject':
q="update appointment set status='reject' where appointment_id='%s'"%(idr)
update(q)
flash("appointment Updated Successfully....")
return redirect(url_for("doctor.viewappointment"))
return render_template('doctor_view_appointment.html',data=data)
else:
return redirect(url_for('public.login'))
@doctor.route('/viewuploads')
def viewuploads():
if not session.get("log_id") is None:
data={}
q="SELECT * FROM USER INNER JOIN files USING(user_id) "
data['view']=select(q)
return render_template('doctor_view_uploads.html',data=data)
else:
return redirect(url_for('public.login'))
//nurse_view_hrequest.html
{% include 'nurse_header.html' %}
<div class="top-sec-view"></div>
<center>
<div class="div-view">
<h3 style="margin-top: 30px;padding: 10px;">Assigned Home care Requests</h3>
</tr>
{% for row in data['view'] %}
<tr>
<td>{{loop.index}}</td>
<!-- <td>{{row['ufname']}}</td> -->
<td>{{row['ufname']}}{{row['ulname']}}</td>
<td>{{row['nfname']}}{{row['nlname']}}</td>
<td></td>
<td>{{row['date']}}</td>
<td></td>
{% if row['request_status'] == 'accept' %}
<td>Assigned by Admin</td>
{% endif %}
</tr>
{% endfor %}
</table>
</div>
</center>
{% include 'footer.html' %}
VALIDATION
Validation is conducted after the completion of the entire software development process. It
checks if the client gets the product they are expecting. Validation focuses only on the
output; it does not concern itself with the internal processes and technical intricacies of the
development process. Validation helps to determine if the software team has built the right
product. Validation is a One-time process that starts only after the verification is
completed. Software teams often use a wide range of validation methods, including White
Box Testing (non-functional testing or structural/design testing) and Black Box Testing
(functional testing). White Box Testing is a method that helps validate the software
application using a predefined series of inputs and data. Here, testers just compare the
output values against the input values to verify if the application is producing output as
specified by the requirements. There are three vital variables in the Black Box Testing
method (input values, output values, and expected output values). This method is used to
verify if the actual output of the software meets the anticipated or expected output. The
main advantages of validation processes are: It ensures that the expectations of all
stakeholders are fulfilled. It enables software teams to take corrective action if there is a
mismatch between the actual product and the anticipated product. It improves the
reliability of the end-product.
OPTIMIZATION
Code optimization is any method of code modification to improve code quality and
efficiency. A program may be optimized so that it becomes a smaller size, consumes less
memory, executes more rapidly, or performs fewer input/output operations. The basic
requirements optimization methods should comply with, is that an optimized program must
have the same output and side effects as its non-optimized version. This requirement,
however, may be ignored in the case that the benefit from optimization, is estimated to be
more important than probable consequences of a change in the program behaviour.
Optimization can be performed by automatic optimizers, or programmers. An optimizer is
either a specialized software tool or a built-in unit of a compiler (the so-called optimizing
compiler). Modern processors can also optimize the execution order of code instructions.
Optimizations are classified into high-level and low-level optimizations. High-level
optimizations are usually performed by the programmer, who handles abstract entities and
keeps in mind the general framework of the task to optimize the design of a system.
Optimizations performed at the level of elementary structural blocks of source code -
loops, branches, etc. - are usually referred to as high-level Pain and Palliative Care
optimizations too. Low-level optimizations are performed at the stage when source code is
compiled into a set of machine instructions, and it is at this stage that automated
optimization is usually employed. Assembler programmers believe, however, that no
machine, however perfect, can do this better than a skilled programmer
5.3 DEBUGGING
Debugging is a critical process in software development, aimed at identifying, analysing,
and resolving bugs or errors within a program. The first step in effective debugging is
understanding the problem. This involves reproducing the issue consistently and gathering
all relevant information, such as error messages, logs, and user reports. By thoroughly
understanding the problem, developers can formulate hypotheses about the underlying
causes. Without a clear understanding, attempts to fix the issue may be misguided,
potentially introducing new bugs or failing to resolve the original problem.
After isolating the cause, the developer needs to devise a solution. This may involve
writing new code, modifying existing code, or even redesigning parts of the system to
address the issue more effectively. It is crucial to consider the impact of any changes on the
overall system to avoid introducing new bugs. During this phase, developers often write
additional tests to verify that the solution works as intended and that no other parts of the
system are adversely affected. Peer reviews and code analysis tools can provide additional
assurance that the solution is robust and maintainable.
The final step in debugging is reflecting on the process and learning from it. Analysing
how the bug occurred, why it was not caught earlier, and how the debugging process was
handled can provide valuable insights for improving future development practices. Teams
can update their coding standards, testing protocols, and debugging techniques based on
lessons learned. This continuous improvement cycle helps in building more robust and
resilient software systems. Additionally, sharing knowledge gained during the debugging
process can enhance team skills and prevent similar issues in the future.
Debugging is a methodical and iterative process that not only resolves current issues but
also strengthens the overall quality of the software and the skills of the development team.
By following a structured approach to understanding, isolating, solving, implementing, and
reflecting on bugs, developers can improve both the immediate and long-term health of
their projects.
User Authentication
Test Scenario Test Steps Expected Result
User Registration Enter valid patient details and User account created
submit successfully
Login with valid Enter correct email & Redirected to dashboard;
credentials password, Click Login session token generated
Login with invalid Enter wrong details, Click Error: "Invalid credentials"
credentials Login
Profile Update Change user details Profile updated
successfully
Logout functionality Click Logout Redirected to login;
session cleared
Appointments (Doctor)
Test Scenario Test Steps Expected Result
View appointment Login as doctor, Go to Appointments listed
requests appointments
Accept/Reject Select an appointment, update Status updated accordingly
appointment status
Upload prescription Open patient appointment, Prescription uploaded
Upload prescription file successfully
CHAPTER 6
SYSTEM TESTING
6.1 INTRODUCTION
System testing is a crucial phase in the development lifecycle of the Palliative Care project.
It involves evaluating the entire system as a whole to ensure that it meets the specified
requirements, functions correctly, and performs reliably under various conditions. This
chapter outlines the different types of system testing conducted for SCP, including
integration testing and system testing, along with the corresponding test plans and test
cases.
• Objective: The objective of testing this system is to ensure that all major
functionalities—like managing users, handling appointments, medicine/equipment
requests, and feedback—work as intended. It aims to validate that each user type
(Admin, Nurse, Doctor, Patient) can perform their respective actions without issues.
The goal is also to identify any bugs or logical errors before deployment to ensure
smooth user experience and system reliability.
• Strategy: The testing strategy involves a combination of unit testing, integration
testing, system testing, and user acceptance testing. Unit testing checks individual
features like login or adding medicine, while integration testing ensures that modules
like patient → doctor → nurse interactions work correctly. System testing focuses on
the complete workflow, and user acceptance testing checks if the system meets real-
world expectations. Manual testing will be mainly used for this project with all results
tracked using spreadsheets or logs.
• Test Plan: The test plan defines which features will be tested, such as appointment
booking, medical history upload, prescription upload, and request handling. Each
module - Admin, Nurse, Doctor, and Patient—has key functionalities that will be
validated through different test cases. The plan excludes non-functional aspects like
performance and security at this stage. The focus is on functional correctness, user role
coordination, and error-free data flow.
• Test Schedule: The testing will be carried out in phases over approximately two
weeks. It starts with understanding the requirements, followed by writing test cases
and executing tests in stages—unit, integration, and full system. After that, users
simulate real scenarios for UAT (User Acceptance Testing), and any bugs found will
be fixed and re-tested. The schedule ends with a final review and approval for system
release.
• Test Steps:
• Expected Result:
• Test Steps:
4. Deletes a nurse.
• Expected Result:
• Test Scenario: Admin manages doctors (create, edit, delete); patients view doctor list.
• Test Steps:
4. Deletes a doctor.
• Expected Result:
• Test Scenario: Nurse adds medicines, views requests; patients request and view
medicine status.
• Test Steps:
• Expected Result:
• Test Scenario: Nurse adds equipment and handles patient requests; patient views and
requests equipment.
• Test Steps:
• Expected Result:
• Test Scenario: Patient makes appointment; doctor views and uploads prescription.
• Test Steps:
• Expected Result:
1. Appointment is scheduled.
• Test Scenario: Patients request homecare and provide feedback; nurses/admin view
and act.
• Test Steps:
• Expected Result:
CHAPTER 7
SYSTEM MAINTENANCE
7.1 INTRODUCTION
System maintenance is a critical phase of the software development lifecycle that begins
after the deployment of the system and continues throughout its operational life. It ensures
that the software remains functional, secure, and efficient in real-world conditions.
Maintenance involves a range of activities such as identifying and fixing bugs, improving
performance, adapting to new technologies, and enhancing existing features based on user
feedback.
A well-maintained system not only delivers a smooth user experience but also extends the
software’s life, reduces the risk of failures, and minimizes downtime. Regular maintenance
helps organizations keep up with changing user requirements, evolving hardware and
software environments, and new security threats. By continuously monitoring and updating
the application, system maintenance plays a vital role in maintaining the overall health,
stability, and scalability of the software.
CHAPTER 8
SYSTEM SECURITY MEASURES
8.1 INTRODUCTION
System security measures protect the Pain and Palliative Care System from unauthorized
access, data breaches, and cyber threats. With sensitive data such as user credentials, daily
records, vaccine schedules, and stock orders being managed digitally, implementing strong
security mechanisms is essential to ensure data integrity, confidentiality, and system
reliability.
• Regular Security Patches and Updates: The operating system and related
dependencies are frequently updated with the latest security patches. This prevents
the exploitation of known vulnerabilities. Regular updates also include performance
improvements and system optimizations, which contribute to a more secure and
stable environment for hosting the application.
• User Access Control Mechanisms: At the OS level, strict user privilege separation
is maintained. System administrators follow the principle of least privilege, ensuring
users only have the permissions necessary to perform their job functions. For
example, only the system admin has access to configuration files and deployment
tools, while the application users and services run under non-root, limited-access
accounts to minimize the risk of accidental damage or malicious misuse.
• Regular database backups: Daily or scheduled backups are taken to ensure data can
be recovered in case of system failure, accidental deletion, or cyberattack.
• Data encryption (AES for sensitive data): Sensitive information like user passwords
and personal data are encrypted using algorithms like AES, ensuring that even if the
database is compromised, the data remains unreadable.
CHAPTER 9
SYSTEM PLANNING AND SCHEDULING
9.1 INTRODUCTION
System planning and scheduling is a critical phase in the software development life cycle
that outlines the roadmap for project execution. It involves defining project goals,
identifying required resources, estimating timeframes, and creating a structured timeline
for development activities. In the context of the Pain and Palliative Care System, planning
and scheduling ensured that all modules were developed systematically, within scope, and
on time. Proper planning helped in resource allocation, task prioritization, risk mitigation,
and achieving milestones efficiently. It laid the foundation for seamless development,
testing, and deployment by ensuring that every phase of the project was well-coordinated
and aligned with the system’s objectives.
• Task Breakdown: Divide the project into smaller tasks and subtasks, making it
easier to manage and assign responsibilities.
• Task Dependencies: Determine task dependencies to understand which tasks are
prerequisites for others and plan their order of execution.
• Quality Assurance: Define quality standards and procedures to ensure that
deliverables meet the required quality levels.
• Communication Plan: Establish a communication plan to ensure effective
collaboration among team members and stakeholders.
• Cost Estimation: Estimate the project's budget, taking into account all necessary
expenses, including development, testing, and deployment.
• Change Management: Develop a process to manage and document any changes to
the project scope or requirements.
CHAPTER 10
SYSTEM COST ESTIMATION
10.1 INTRODUCTION
System cost estimation is a crucial aspect of project planning and management in the
development of the Pain and Palliative Care System. This chapter outlines the methods and
techniques used to estimate the costs associated with designing, developing, testing, and
deploying the Palliative Care project. By accurately estimating project costs, stakeholders
can make informed decisions, allocate resources effectively, and ensure that the project
remains within budgetary constraints while delivering the desired outcomes.
CHAPTER 11
FUTURE ENHANCEMENT AND SCOPE OF FURTHER
DEVELOPMENT
11.1 INTRODUCTION
Future enhancements play a crucial role in the sustainability and scalability of the Pain and
Palliative Care System. As user expectations, technology continue to evolve and the system
must adapt by introducing new features and improving existing ones. These enhancements
help in increasing the system’s effectiveness, ease of use, and relevance in day-to-day
operations across Palliative Cares. With proper planning and implementation, future
updates can significantly improve efficiency, transparency, and data-driven decision-
making within the system.
ANNEXURE
SL NO ABBREVIATIONS EXPANSIONS
2 OS Operating System
2 ER Diagram 16
7 Class Diagram 22
8 Component Diagram 23
9 Deployment Diagram 23
10 Sequence Diagram 24
11 Input Design 27
12 Output Design 29
13 Gantt Chart 65
14 Pert Chart 66
1 Login 11
2 Assign_nurse 11
3 Patient 11
4 Type 12
5 Medicine 12
6 Medicine_details 12
7 Feedback 12
8 Doctors 13
9 Nurses 13
10 Appointments 13
11 Equipment 13
12 Equipment_request 14
13 Medicine_request 14
14 Medical_history 14
1 User Authentication 48
6 Appointments (Doctor) 49
12.3 REFERENCES
12.3.1 BOOKS
12.3.2 WEBSITES
• Google (https://www.google.co.in)
• Geeks for geeks (https://www.geeksforgeeks.org)
• Stack overflow (https://stackoverflow.com)
• w3schools (https://www.w3schools.com)
• Material UI (https://mui.com/material-ui/)
• GitHub (https://github.com/)
SAMPLE CODES
//api.py
from flask import *
from database import *
import uuid
# from newcnn import *
api=Blueprint('api',__name__)
@api.route('/userregister')
def userregister():
data={}
fname=request.args['fname']
lname=request.args['lname']
place=request.args['place']
phone=request.args['phone']
email=request.args['email']
uname=request.args['username']
passw=request.args['password']
q="select * from login where username='%s'"%(uname)
print(q)
res=select(q)
if res:
data['status']='duplicate'
else:
q="insert into login values(null,'%s','%s','user')"%(uname,passw)
print(q)
id=insert(q)
q="insert into user
values(null,'%s','%s','%s','%s','%s','%s')"%(id,fname,lname,place,phone,email)
print(q)
insert(q)
data['status']='success'
return str(data)
@api.route('/login')
def login():
data={}
username=request.args['username']
password=request.args['password']
@api.route('/uploadfile',methods=['get','post'])
def uploadfile():
data={}
image=request.files['image'];
lid=request.form['lid'];
path="static/uploads/"+str(uuid.uuid4())+image.filename
image.save(path)
if res:
data['status']='success'
data['data']=res
else:
data['status']='failed'
data['method']='uploadfile'
return str(data)
@api.route('/viewdoc')
def viewdoc():
data={}
q="select * from doctor"
res=select(q)
if res:
data['status']='success'
data['data']=res
else:
data['status']='failed'
return str(data)
@api.route('/makeappointment')
def makeappointment():
data={}
docid=request.args['docid']
loginid=request.args['loginid']
date=request.args['date']
time=request.args['time']
q="insert appointment values(null,'%s',(select user_id from user where
login_id='%s'),'%s','pending')"%(docid,loginid,date+"-"+time)
insert(q)
q="select * from doctor"
res=select(q)
if res:
data['status']='success'
data['data']=res
else:
data['status']='failed'
return str(data)
@api.route('/viewmyappointment')
def viewmyappointment():
data={}
id=request.args['id']
q="SELECT * FROM doctor INNER JOIN appointment USING(doctor_id) where
user_id=(select user_id from user where login_id='%s')"%(id)
res=select(q)
if res:
data['status']='success'
data['data']=res
else:
data['status']='failed'
return str(data)
@api.route('/viewoutputs')
def viewoutputs():
data={}
id=request.args['id']
q="SELECT * FROM USER INNER JOIN files USING(user_id) where user_id=(select
user_id from user where login_id='%s')"%(id)
res=select(q)
if res:
data['status']='success'
data['data']=res
else:
data['status']='failed'
return str(data)
@api.route('/viewprecaution')
def viewprecaution():
data={}
id=request.args['id']
q="select *,concat(dfname,dlname) as dname from precautions inner join appointment
using (appointment_id) inner join doctor using(doctor_id) where appointment_id='%s'"%(id)
res=select(q)
if res:
data['status']='success'
data['data']=res
else:
data['status']='failed'
return str(data)
@api.route('/viewenq')
def viewenq():
data={}
id=request.args['id']
q="select * from enquiry inner join user using (user_id) where login_id='%s'"%(id)
res=select(q)
if res:
data['status']='success'
data['data']=res
else:
data['status']='failed'
return str(data)
@api.route('/sendenq')
def sendenq():
data={}
id=request.args['id']
enq=request.args['enq']
q="insert into enquiry values(null,(select user_id from user where
login_id='%s'),'%s','pending',now())"%(id,enq)
insert(q)
q="select * from enquiry inner join user using (user_id) where login_id='%s'"%(id)
res=select(q)
if res:
data['status']='success'
data['data']=res
else:
data['status']='failed'
return str(data)
@api.route('/viewprescription')
def viewprescription():
data={}
id=request.args['id']
q="select *,concat(dfname,dlname) as dname from prescription inner join appointment
using (appointment_id) inner join doctor using(doctor_id) where appointment_id='%s'"%(id)
res=select(q)
if res:
data['status']='success'
data['data']=res
else:
data['status']='failed'
return str(data)
@api.route('/forwordmedicine')
def forwordmedicine():
data={}
preid=request.args['preid']
logid=request.args['loginid']
shopid=request.args['shopid']
@api.route('/virerequeststatus')
def virerequeststatus():
data={}
lid=request.args['lid']
res=select(q)
if res:
data['status']='success'
data['data']=res
else:
data['status']='failed'
return str(data)
@api.route('/makepayment')
def makepayment():
data={}
login_id=request.args['log_id']
pmid=request.args['pmid']
amount=request.args['amount']
q="select request_id from request where prescription_id='%s'"%(pmid)
ress=select(q)
req_id=ress[0]['request_id']
q="insert into payment values(null,(select request_id from request where
prescription_id='%s'),'%s',curdate())"%(pmid,amount)
insert(q)
q="update request set status='paid' where request_id='%s'"%(req_id)
update(q)
data['status']='success'
return str(data)
@api.route('/viewphr')
def viewphr():
data={}
q="select * from nurse"
res=select(q)
if res:
data['status']='success'
data['data']=res
else:
data['status']='failes'
return str(data)
@api.route('/viewlab')
def viewlab():
data={}
q="select * from nurse"
res=select(q)
if res:
data['status']='success'
data['data']=res
else:
data['status']='failes'
return str(data)
@api.route('/vieweqp')
def vieweqp():
data={}
q="select * from equipment"
res=select(q)
if res:
data['status']='success'
data['data']=res
else:
data['status']='failes'
return str(data)
@api.route('/homecarerequest')
def homecarerequest():
labid=request.args['labid']
loginid=request.args['loginid']
data={}
q="select * from homecarerequest where nurse_id='%s' and user_id=(select user_id from
user where login_id='%s') and request_status='pending'"%(labid,loginid)
res1=select(q)
if res1:
data['status']='failed'
else:
q="insert into homecarerequest values(null,'%s',(select user_id from user where
login_id='%s'),curdate(),'pending')"%(labid,loginid)
id=insert(q)
if id:
data['status']='success'
else:
data['status']='failed'
return str(data)
@api.route('/eqprequest')
def eqprequest():
labid=request.args['labid']
loginid=request.args['loginid']
data={}
q="select * from eqprequest where eq_id='%s' and user_id=(select user_id from user
where login_id='%s') and request_status='pending'"%(labid,loginid)
res1=select(q)
if res1:
data['status']='failed'
else:
q="insert into eqprequest values(null,'%s',(select user_id from user where
login_id='%s'),curdate(),'pending')"%(labid,loginid)
id=insert(q)
if id:
data['status']='success'
else:
data['status']='failed'
return str(data)
@api.route('/labappointment')
def labappointment():
data={}
docid=request.args['labid']
loginid=request.args['loginid']
date=request.args['date']
time=request.args['time']
q="insert labappointment values(null,'%s',(select user_id from user where
login_id='%s'),'%s','pending')"%(docid,loginid,date+time)
print(q)
insert(q)
q="select * from lab"
res=select(q)
if res:
data['status']='success'
data['data']=res
else:
data['status']='failed'
return str(data)
@api.route('/Viewmylabappointment')
def Viewmylabappointment():
data={}
id=request.args['id']
q="select * from homecarerequest inner join user using(user_id) inner join nurse
using(nurse_id) where user_id=(select user_id from user where login_id='%s')"%(id)
res=select(q)
if res:
data['status']='success'
data['data']=res
else:
data['status']='failed'
return str(data)
@api.route('/Vieweqpstatus')
def Vieweqpstatus():
data={}
id=request.args['id']
q="select * from eqprequest inner join user using(user_id) inner join equipment
using(eq_id) inner join nurse using (nurse_id) where user_id=(select user_id from user where
login_id='%s')"%(id)
res=select(q)
if res:
data['status']='success'
data['data']=res
else:
data['status']='failed'
return str(data)
//admin.py
from flask import *
from database import *
admin=Blueprint('admin',__name__)
# import functools
# def login_required(func):
# @functools.wraps(func)
# def secure_function():
# if "log_id" not in session:
# return redirect("/")
# return func
# return secure_function
# def secure_function():
# if not session.get("log_id") is None:
# return redirect(url_for('public.login'))
# else:
# return "success"
@admin.route('/adminhome')
def adminhome():
if not session.get("log_id") is None:
return render_template('admin_home.html')
else:
return redirect(url_for('public.login'))
@admin.route('/adddoctors',methods=['get','post'])
def adddoctors():
if not session.get("log_id") is None:
data={}
q="select * from doctor"
res=select(q)
data['dview']=res
if 'add' in request.form:
fname=request.form['fname']
lname=request.form['lname']
place=request.form['place']
phone=request.form['phone']
email=request.form['email']
uname=request.form['uname']
passw=request.form['passw']
q="select * from login where username='%s'"%(uname)
res=select(q)
if res:
flash("Username Already Exists.....")
return redirect(url_for('admin.adddoctors'))
else:
q="insert into login values(null,'%s','%s','doctor')"%(uname,passw)
id=insert(q)
q="insert into doctor
values(null,'%s','%s','%s','%s','%s','%s')"%(id,fname,lname,place,phone,email)
insert(q)
flash("Registration Successfull")
return redirect(url_for('admin.adddoctors'))
if 'action' in request.args:
action=request.args['action']
did=request.args['id']
else:
action=None
if action=='update':
q="select * from doctor where doctor_id='%s'"%(did)
data['up']=select(q)
if 'update' in request.form:
fname=request.form['fname']
lname=request.form['lname']
place=request.form['place']
phone=request.form['phone']
email=request.form['email']
if action=="delete":
q="delete from doctor where doctor_id='%s'"%(did)
delete(q)
flash("Successfully Deleted......")
return redirect(url_for('admin.adddoctors'))
return render_template('admin_manage_doctor.html',data=data)
else:
return redirect(url_for('public.login'))
@admin.route('/addnurse',methods=['get','post'])
def addnurse():
if not session.get("log_id") is None:
data={}
q="select * from nurse"
res=select(q)
data['dview']=res
if 'add' in request.form:
fname=request.form['fname']
lname=request.form['lname']
place=request.form['place']
phone=request.form['phone']
email=request.form['email']
uname=request.form['uname']
passw=request.form['passw']
q="select * from login where username='%s'"%(uname)
res=select(q)
if res:
flash("Username Already Exists.....")
return redirect(url_for('admin.addnurse'))
else:
q="insert into login values(null,'%s','%s','nurse')"%(uname,passw)
id=insert(q)
q="insert into nurse
values(null,'%s','%s','%s','%s','%s','%s')"%(id,fname,lname,place,phone,email)
insert(q)
flash("Registration Successfull")
return redirect(url_for('admin.addnurse'))
if 'action' in request.args:
action=request.args['action']
did=request.args['id']
else:
action=None
if action=='update':
q="select * from nurse where nurse_id='%s'"%(did)
data['up']=select(q)
if 'update' in request.form:
fname=request.form['fname']
lname=request.form['lname']
place=request.form['place']
phone=request.form['phone']
email=request.form['email']
if action=="delete":
q="delete from nurse where nurse_id='%s'"%(did)
delete(q)
flash("Successfully Deleted......")
return redirect(url_for('admin.addnurse'))
return render_template('admin_manage_nurse.html',data=data)
else:
return redirect(url_for('public.login'))
@admin.route('/viewuser')
def viewuser():
if not session.get("log_id") is None:
data={}
q="select * from user"
data['view']=select(q)
return render_template('admin_view_users.html',data=data)
else:
return redirect(url_for('public.login'))
@admin.route('/viewrequest')
def viewrequest():
if not session.get("log_id") is None:
data={}
q="select * from homecarerequest inner join user using(user_id) inner join nurse
using(nurse_id)"
data['view']=select(q)
if 'acpt' in request.args:
acpt=request.args['acpt']
q="update homecarerequest set request_status='accept' where
hrequest_id='%s'"%(acpt)
update(q)
flash("Request Accepted....")
return redirect(url_for('admin.viewrequest'))
if 'rejct' in request.args:
rjct=request.args['rejct']
q="update homecarerequest set request_status='reject' where hrequest_id='%s'"%(rjct)
update(q)
flash("Request Rejected....")
return redirect(url_for('admin.viewrequest'))
return render_template('admin_view_hrequest.html',data=data)
else:
return redirect(url_for('public.login'))
@admin.route('/viewlabs')
def viewlabs():
if not session.get("log_id") is None:
data={}
q="select * from lab"
data['view']=select(q)
return render_template('admin_view_labs.html',data=data)
else:
return redirect(url_for('public.login'))
@admin.route('/viewuploads')
def viewuploads():
if not session.get("log_id") is None:
data={}
q="SELECT * FROM USER INNER JOIN files USING(user_id) "
data['view']=select(q)
return render_template('admin_view_uploads.html',data=data)
else:
return redirect(url_for('public.login'))
@admin.route('/viewenquiry',methods=['get','post'])
def viewenquiry():
if not session.get("log_id") is None:
data={}
q="SELECT * FROM USER INNER JOIN enquiry USING(user_id) "
data['view']=select(q)
if 'id' in request.args:
id=request.args['id']
data['id']=id
eq=request.args['eq']
data['enq']=eq
if 'add' in request.form:
eqid=request.form['eqid']
reply=request.form['reply']
q="update enquiry set reply='%s' where enquiry_id='%s'"%(reply,eqid)
update(q)
flash("replay Updated....")
return redirect(url_for('admin.viewenquiry'))
return render_template('admin_view_enquiry.html',data=data)
else:
return redirect(url_for('public.login'))