0% found this document useful (0 votes)
55 views53 pages

Report Sample

The document is a mini project report on a Hospital Management System submitted by students Sonu Singh and Visheshwar Singh for their Bachelor of Technology degree in Computer Science and Engineering. It outlines the project's aim to streamline patient registration, appointment booking, and data management, enhancing efficiency and reducing waiting times in hospitals. The report includes sections on system requirements, functionalities for administrators, doctors, and patients, as well as acknowledgments and a declaration of originality.

Uploaded by

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

Report Sample

The document is a mini project report on a Hospital Management System submitted by students Sonu Singh and Visheshwar Singh for their Bachelor of Technology degree in Computer Science and Engineering. It outlines the project's aim to streamline patient registration, appointment booking, and data management, enhancing efficiency and reducing waiting times in hospitals. The report includes sections on system requirements, functionalities for administrators, doctors, and patients, as well as acknowledgments and a declaration of originality.

Uploaded by

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

lOMoARcPSD|61553253

MINI Project Report

Mini Project/Internship ** (Dr. A.P.J. Abdul Kalam Technical University)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by ANURAG VERMA (anuragverma28nov@[Link])
lOMoARcPSD|61553253

MINI PROJECT REPORT


On
HOSPITAL MANAGEMENT SYSTEM

For the partial fulfilment for the award of the degree of


Bachelor of Technology
in
Computer Science and Engineering

Submitted By
SONU SINGH (2004220100112)
AND

VISHESHWAR SINGH (20042201000124)

Under the supervision of


Mr. ANUJ SINGH

BANSAL INSTITUTE OF ENGINEERING AND TECHNOLOGY


LUCKNOW

Affiliated to
DR. APJ ABDUL KALAM TECHNICAL UNIVERSITY 2022-23

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

DECLARATION

we hereby declare that the mini project entitled “HOSPITAL MANAGEMENT SYSTEM”
submitted for the B. Tech (CSE) third Year Course work of mini project, is my original work.
have done it myself by the help of some resources and materials which have been required in
this project.

SIGNATURE OF STUDENT
SONU SINGH AND VISHESHWAR SINGH
2004220100112 2004220100124

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

Date:

CERTIFICATE

This is to certify that SONU SINGH (Roll No-2004220100112) and VISHESHWAR


SINGH (Roll No- 2004220100112) has successfully completed mini project entitled
“HOSPITAL MANAGEMENT SYSTEM” and has submitted the report in partial
fulfillment for the award of the degree of [Link] in Computer Science and Engineering to
the Department of CSE, Bansal Institute of Engineering and Technology.

It is further certified that Sonu Singh AND visheshwar singh has fulfilled all the requirements
laid down by Department of CSE, BIET, Lucknow for the submission of project report.

MR. ANUJ SINGH


(Assistant Professor)
CSE Department

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

ACKNOWLEDGEMENT

“It is not the brain that matters the most, but that which guide them: the character, the heart,
generous qualities and progressive force.”
The satisfaction that accompanies the successful completion of any task would be incomplete
without the mention of people who made it possible, whose constant guidance and
encouragement crown all the efforts with success. Thus, the successful completion of this
project is attributing to the great and indispensible help I received from different people.
“No single achievement of a person can be attributed to efforts alone, there are always
helping hands that shape the effort into tangible form.”
First of all, I pay my regards to constant guidance and encouragement received from our
Director Dr. SK Agarwal, Mr. Anuj Singh, our mentor and Head of the Department (CSE),
Dr. CLP Gupta, BIET, Lucknow.
I would also like to acknowledge my immense gratification to my fellow classmates, my
respected family members and my friends for their invaluable support and inspiration. The
help received from each and every one directly or indirectly is duly acknowledged.

SONU SINGH AND VISHESHWAR SINGH


(2004220100112) (2004220100124)

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

ABSTRACT

Our project Hospital Management system includes registration of patients, storing their
details into the system, and also booking their appointments with doctors. Our software has
the facility to give a unique id for every patient and stores the details of every patient and the
staff automatically. User can search availability of a doctor and the details of a patient using
the id. The Hospital Management System can be entered using a username and password. It is
accessible either by an administrator or receptionist. Only they can add data into the database.
The data can be retrieved easily. The interface is very user-friendly. The data are well
protected for personal use and makes the data processing very fast.

It is having mainly two modules. One is at Administration Level and other one is of user i.e
of patients and doctors. The Application maintains authentication in order to access the
application. Administrator task includes managing doctors information, patient’s information.
To achieve this aim a database was designed one for the patient and other for the doctors
which the admin can access. The complaints which are given by user will be referred by
authorities. The Patient modules include checking appointments, prescription. User can also
pay doctor’s Fee online

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

TABLE OF CONTENT
[Link] CONTENT PAGE NO.

CONCLUSION

FUTURE SCOPE

REFRENCES

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

LIST OF FIGURES

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

LIST OF TABLES

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

CHAPTER-1
INTRODUCTION

1.1 PROBLEM STATEMENT


In this busy world we don’t have the time to wait in infamously long hospital queues.
The problem is, queuing at hospital is often managed manually by administrative staff,
then take a token there and then wait for our turn then ask for the doctor and the most
frustrating thing - we went there by traveling a long distance and then we come to
know the doctor is on leave or the doctor can’t take appointments.

HMS will help us overcome all these problems because now patients can book their
appointments at home, they can check whether the doctor they want to meet is
available or not. Doctors can also confirm or decline appointments, this help both
patient and the doctor because if the doctor declines’ appointment then patient will
know this in advance and patient will visit hospital only when the doctor confirms’ the
appointment this will save time and money of the patient.

Patients can also pay the doctor’s consultant fee online to save their time.

HMS is essential for all healthcare establishments, be it hospitals, nursing homes,


health clinics, rehabilitation centers, dispensaries, or clinics. The main goal is to
computerize all the details regarding the patient and the hospital. The installation of
this healthcare software results in improvement in administrative functions and hence
better patient care, which is the prime focus of any healthcare unit.

Benefits of implementing a hospital management system:


Appointment booking
 Helps patients cut the long queue and saves their time
 Is equipped with features like automated email and text message reminders

Role-Based Access Control


 Allows employees to access only the necessary information to effectively
perform their job duties
 Increases data security and integrity

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

Overall cost reduction


 Cuts down paper costs as all the data are computerized
 No separate costs for setting up physical servers

Data accuracy or Removes human errors


 Alerts when there’s a shortage of stock

• Data security
 Helps to keep patients records private
 Restricts access through role-based access control

• Revenue management
 Makes daily auditing simple
 Helps with statistics and other financial aspect

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

1.2 PROJECT AIM


This software will help the company to be more efficient in registration of their patients and
manage appointments, records of patients. It enables doctors and admin to view and modify
appointments schedules if required. The purpose of this project is to computerize all details
regarding patient details and hospital details.

1.3 SCOPE
The system will be used as the application that serves hospitals, clinic, dispensaries or other
health institutions. The intention of the system is to increase the number of patients that can
be treated and managed properly. If the hospital management system is file based,
management of the hospital has to put much effort on securing the files. They can be easily
damaged by fire, insects and natural disasters. Also could be misplaced by losing data and
information.

1.4 OVERVIEW
Our application contains two modules – the admin module and the user module. Our
application will not only help the admin to preview the monthly and/or yearly data but it will
also allow them to edit, add or update records. The software will also help the admin to
monitor the transactions made by the patients and generate confirmations for the same. The
admin will be able to manage and update information about doctors.

The user module can be accessed by both the doctors and the patients. The doctor can
confirm and/or cancel appointments. The doctors can even add prescriptions for their patients
using our application. The patients will be able to apply for the appointment and make
transaction for the same, and can even cancel appointments with the doctors. They can track
details about the previous transactions made by them.

Advantages
• The system automates the manual procedure of managing hospital activities.
• Doctors can view their patients’ treatment records and details easily.
• It even generates an instant bill.
• The system is convenient and flexible to be used.
• It saves their time, efforts, money and resources.

Disadvantages
• Requires large database.
• The admin has to manually keep updating the information by entering the details in the
system.
• Need Internet connection

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

1.5 OPERATION ENVIRONMENT

PROCESSOR INTEL CORE PROCESSOR OR


RYZEN

OPERATING SYSTEM
WINDOWS 7 OR ABOVE

MEMORY
4GB OR MORE
HARD DISK SPACE
256 GB

DATABASE
SQLite

TBALE 1.1 SYSTEM REQUIRMENT

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

1.6 SOFTWARE AND HARDWARE REQUIREMENTS


This section describes the software and hardware requirements of the system

SOFTWARE REQUIREMENTS

 Operating system - Windows 10 is used as the operating system as it is stable and


supports more features and is more user friendly.

 Database SQLite - SQLite is used as database as it easy to maintain and retrieve


records by simple queries which are in English language which are easy to understand
and easy to write.

 Development tools and Programming language - HTML is used to write the whole
code and develop webpages with CSS for styling work and HTML for sever side
scripting.

 Django is used as framework for website building and work as a backend.

 Python language is used on Django framework.

HARDWARE REQUIREMENTS

 Ryzen 5 is used as a processor because it is fast than other processors an provide


reliable and stable and we can run our pc for longtime. By using this processor, we
can keep on developing our project without any worries.

 RAM 8GB is used as it will provide fast reading and writing capabilities and will in
turn support in processing.

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

1.7 FUNCTIONS

ADMIN
 Can register/view/approve/reject/delete doctor
 Can view/book/approve Appointment
 Can admit/view/approve/reject/discharge patient

DOCTOR
 Apply for job in hospital. Then Login Can only view their patient details
 Can view their Appointments, booked by admin.
 Can delete their Appointment, when doctor attended their appointment.

PATIENT
 Create account for admit bur approval required by admin.
 Can view assigned doctor's details like specialization and mobile number.
 Can book appointment. ( approval needed by admin)

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

1.1PROPOSED SYSTEM
This Hospital Patient Info Management System is a self-contained system that manages
activities of the hospital. Due to improperly managed details medical center faces quite a lot
of difficulties in accessing past data as well as managing present data. The fully functional
automated hospital management system which will be developed through this project will
eliminate the disadvantages caused by the manual system by improving the reliability,
efficiency and performance. The usage of a database to store patient, employee, stock details
etc. will accommodate easy access, retrieval, and search and manipulation of data. The access
limitations provided through access privilege levels will enhance the security of the system.
The system will facilitate concurrent access and convenient management of activities of the
medical center.

System Interfaces:
❖ User Interfaces
 This section provides a detailed description of all inputs into and outputs from the
system. It also gives a description of the hardware, software and communication
interfaces and provides basic prototypes of the user interface.
 The protocol used shall be HTTP.
 The Port number used will be 80.
 There shall be logical address of the system in IPv4 format.

❖ Hardware Interfaces
 Laptop/Desktop PC-Purpose of this is to give information when Patients ask
information about doctors, medicine available lab tests etc. To perform such Action it
need very efficient computer otherwise due to that reason patients have to wait for a
long time to get what they ask for.
 Laser Printer (B/W) - This device is for printing patients’ info etc.
 Wi-Fi router - Wi-Fi router is used to for internetwork operations inside of a hospital
and simply data transmission from pc’s to sever.

Communication Interfaces
 NIC (Network Interface Card) – It is a computer hardware component that
allows a computer to connect to a network. NICs may be used for both wired
and wireless connections.
 CAT 5 network cable- for high signal integrity
 TCP/IP protocol- Internet service provider to access and share information
over the Internet
 Ethernet Communications Interface- Ethernet is a frame-based computer
network technology for local area networks (LANs)

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

CHAPTER-2
OTHER TECHNOLOGY USED

2.1 SOFTWARE TOOLS USED

 The whole Project is divided in two parts the front end and the back end.

Front End : The front end is designed using of HTML & CSS.

HTML
HTML or Hyper Text Markup Language is the main markup language for creating web
pages and other information that can be displayed in a web browser.

HTML is written in the form of HTML elements consisting of tags enclosed in angle brackets
(like <html>), within the web page content. HTML tags most commonly come in pairs like
<h1> and </h1>, although some tags represent empty elements and so are unpaired, for
example<img>.

The first tag in a pair is the start tag, and the second tag is the end tag (they are also called
opening tags and closing tags). In between these tags web designers can add text, further tags,
comments and other types of text-based content. The purpose of a web browser is to read
HTML documents and compose them into visible or audible web pages. The browser does
not display the HTML tags, but uses the tags to interpret the content of the [Link]
elements form the building blocks of all websites.

HTML allows images and objects to be embedded and can be used to create interactive
forms. It provides a means to create structured documents by denoting structural semantics
for text such as headings, paragraphs, lists, links, quotes and other items. It can embed scripts
written in languages such as CSS which affect the behavior of HTML web pages.

CSS

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

Cascading Style Sheets (CSS) is a style sheet language used for describing the look and
formatting of a document written in a markup language. While most often used to style web
pages and interfaces written in HTML and XHTML, the language can be applied to any kind
of XML document, including plain XML, SVG and XUL. CSS is a cornerstone specification
of the web and almost all web pages use CSS style sheets to describe their presentation.

CSS is designed primarily to enable the separation of document content from document
presentation, including elements such as the layout, colors, and fonts.

This separation can improve content accessibility, provide more flexibility and control in the
specification of presentation characteristics, enable multiple pages to share formatting, and
reduce complexity and repetition in the structural content (such as by allowing for table less
web design).

CSS can also allow the same markup page to be presented in different styles for different
rendering methods, such as on-screen, in print, by voice (when read out by a speech-based
browser or screen reader) and on Braille-based, tactile devices. It can also be used to allow
the web page to display differently depending on the screen size or device on which it is
being viewed. While the author of a document typically links that document to a CSS file,
readers can use a different style sheet, perhaps one on their own computer, to override the one
the author has specified.

However if the author or the reader did not link the document to a specific style sheet the
default style of the browser will be applied.
CSS specifies a priority scheme to determine which style rules apply if more than one rule
matches against a particular element. In this so-called cascade, priorities or weights are
calculated and assigned to rules, so that the results are predictable.

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

BACK END OF THE WEBSITE:


SQLite: Database of the website:

It is a relational database management system (RDBMS) contained in a C library. In contrast


to many other database management systems, SQLite is not a client–server database engine.
Rather, it is embedded into the end program.

SQLite generally follows PostgreSQL syntax. SQLite uses a dynamically and weakly typed
SQL syntax that does not guarantee the domain integrity. This means that one can, for
example, insert a string into a column defined as an integer.
SQLite will attempt to convert data between formats where appropriate, the string "123" into
an integer in this case, but does not guarantee such conversions and will store the data as-is if
such a conversion is not possible. SQLite is a popular choice as embedded database software
for local/client storage in application software such as web browsers. It is arguably the most
widely deployed database engine, as it is used today by several widespread browsers,
operating systems, and embedded systems (such as mobile phones), among others.

SQLite has bindings to many programming languages.


SQLite implements most of the SQL-92 standard for SQL, but lacks some features. For
example, it only partially provides triggers and cannot write to views (however, it provides
instead of triggers that provide this functionality). Its support of ALTER TABLE statements
is limited.

SQLite uses an unusual type system for a SQL-compatible DBMS: instead of assigning a
type to a column as in most SQL database systems, types are assigned to individual values; in
language terms it is dynamically typed. Moreover, it is weakly typed in some of the same
ways that Perl is: one can insert a string into an integer column (although SQLite will try to
convert the string to an integer first, if the column's preferred type is integer).
This adds flexibility to columns, especially when bound to a dynamically typed scripting
language. However, the technique is not portable to other SQL products.

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

PYTHON

Python is a general-purpose interpreted, interactive, object-oriented, and high-level


programming language. It was created by Guido van Rossum during 1985- 1990. Like Perl,
Python source code is also available under the GNU General Public License (GPL).
This tutorial gives enough understanding on Python programming language.

Python is an interpreted high-level general-purpose programming language. Its design


philosophy emphasizes code readability with its use of significant indentation.
Its language constructs as well as its object-oriented approach aim to help programmers write
clear, logical code for small and large-scale projects.

Python is dynamically-typed and garbage-collected. It supports multiple programming


paradigms, including structured (particularly, procedural), object-oriented and functional
programming. It is often described as a "batteries included" language due to its
comprehensive standard library.

 Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).
 Python has a simple syntax similar to the English language.
 Python has syntax that allows developers to write programs with fewer lines than
some other programming languages.
 Python runs on an interpreter system, meaning that code can be executed as soon as it
is written. This means that prototyping can be very quick.
 Python can be treated in a procedural way, an object-oriented way or a functional
way.

Advantages of Python
1. Easy to Read, Learn and Write

Python is a high-level programming language that has English-like syntax. This makes it
easier to read and understand the code.
Python is really easy to pick up and learn, that is why a lot of people recommend Python to
beginners. You need less lines of code to perform the same task as compared to other major
languages like C/C++ and Java.

2. Improved Productivity

Python is a very productive language. Due to the simplicity of Python, developers can focus
on solving the problem. They don’t need to spend too much time in understanding
the syntax or behavior of the programming language. You write less code and get more
things done.

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

3. Interpreted Language

Python is an interpreted language which means that Python directly executes the code line by
line. In case of any error, it stops further execution and reports back the error which has
occurred.
Python shows only one error even if the program has multiple errors. This
makes debugging easier.

4. Dynamically Typed

Python doesn’t know the type of variable until we run the code. It automatically assigns the
data type during execution. The programmer doesn’t need to worry about declaring variables
and their data types.

5. Free and Open-Source

Python comes under the OSI approved open-source license. This makes
it free to use and distribute. You can download the source code, modify it and even
distribute your version of Python. This is useful for organizations that want to modify some
specific behavior and use their version for development.

6. Vast Libraries Support

The standard library of Python is huge, you can find almost all the functions needed for your
task. So, you don’t have to depend on external libraries.

But even if you do, a Python package manager (pip) makes things easier to import other
great packages from the Python package index . It consists of over 200,000 packages.

7. Portability

In many languages like C/C++, you need to change your code to run the program on different
platforms. That is not the same with Python. You only write once and run it anywhere.

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

2.2 DJANGO AS FRAMEWORK:

Django is a high-level Python web framework that enables rapid development of secure and
maintainable websites. Built by experienced developers, Django takes care of much of the
hassle of web development, so you can focus on writing your app without needing to reinvent
the wheel. It is free and open source, has a thriving and active community, great
documentation, and many options for free and paid-for support.

Django helps you write software that is:

Complete
Django follows the "Batteries included" philosophy and provides almost everything
developers might want to do "out of the box". Because everything you need is part of the
one "product", it all works seamlessly together, follows consistent design principles, and
has extensive and up-to-date documentation.

Versatile

Django can be (and has been) used to build almost any type of website — from content
management systems and wikis, through to social networks and news sites. It can work
with any client-side framework, and can deliver content in almost any format (including
HTML, RSS feeds, JSON, XML, etc). The site you are currently reading is built with
Django!

Internally, while it provides choices for almost any functionality you might want (e.g.
several popular databases, templating engines, etc.), it can also be extended to use other
components if needed.

Secure

Django helps developers avoid many common security mistakes by providing a


framework that has been engineered to "do the right things" to protect the website
automatically. For example, Django provides a secure way to manage user accounts and
passwords, avoiding common mistakes like putting session information in cookies where it
is vulnerable (instead cookies just contain a key, and the actual data is stored in the
database) or directly storing passwords rather than a password hash.

A password hash is a fixed-length value created by sending the password through


a cryptography hash function. Django can check if an entered password is correct by
running it through the hash function and comparing the output to the stored hash value.
However due to the "one-way" nature of the function, even if a stored hash value is
compromised it is hard for an attacker to work out the original password.

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

Django enables protection against many vulnerabilities by default, including SQL


injection, cross-site scripting, cross-site request forgery and clickjacking (see website
security for more details of such attacks).

Scalable

Django uses a component-based "shared-nothing" architecture (each part of the


architecture is independent of the others, and can hence be replaced or changed if needed).
Having a clear separation between the different parts means that it can scale for increased
traffic by adding hardware at any level: caching servers, database servers, or application
servers. Some of the busiest sites have successfully scaled Django to meet their demands
(e.g. Instagram and Disqus, to name just two).

Maintainable
Django code is written using design principles and patterns that encourage the creation of
maintainable and reusable code. In particular, it makes use of the Don't Repeat Yourself
(DRY) principle so there is no unnecessary duplication, reducing the amount of code.
Django also promotes the grouping of related functionality into reusable "applications"
and, at a lower level, groups related code into modules (along the lines of the model view
controller pattern).

Portable
Django is written in Python, which runs on many platforms. That means that you are not
tied to any particular server platform, and can run your applications on many of Linux,
Windows, and Mac OS X. Furthermore, Django is well-supported by many web hosting
providers, who often provide specific infrastructure and documentation for hosting Django
sites.

What does Django code look like?

In a traditional data-driven website, a web application waits for HTTP requests from the web
browser (or other client). When a request is received the application works out what is needed
based on the URL and possibly information in POST data or GET data. Depending on what is
required it may then read or write information from a database or perform other tasks required
to satisfy the request. The application will then return a response to the web browser, often
dynamically creating an HTML page for the browser to display by inserting the retrieved data
into placeholders in an HTML template.

Django web applications typically group the code that handles each of these steps into separate
files:

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

FIGURE 2.1.1 FLOWCHART OF CODE OF DJANGO

 URLs: While it is possible to process requests from every single URL via a single
function, it is much more maintainable to write a separate view function to handle each
resource. A URL mapper is used to redirect HTTP requests to the appropriate view
based on the request URL. The URL mapper can also match particular patterns of
strings or digits that appear in a URL and pass these to a view function as data.

 View: A view is a request handler function, which receives HTTP requests and returns
HTTP responses. Views access the data needed to satisfy requests via models, and
delegate the formatting of the response to templates.

 Models: Models are Python objects that define the structure of an application's data,
and provide mechanisms to manage (add, modify, delete) and query records in the
database.

 Templates: A template is a text file defining the structure or layout of a file (such as
an HTML page), with placeholders used to represent actual content. A view can
dynamically create an HTML page using an HTML template, populating it with data

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

from a model. A template can be used to define the structure of any type of file; it
doesn't have to be HTML!
The sections below will give you an idea of what these main parts of a Django app look like

Sending the request to the right view ([Link])


A URL mapper is typically stored in a file named [Link]. In the example below, the mapper
(url patterns) defines a list of mappings between routes (specific URL patterns) and
corresponding view functions. If an HTTP Request is received that has a URL matching a
specified pattern, then the associated view function will be called and passed the request.

Handling the request ([Link])


Views are the heart of the web application, receiving HTTP requests from web clients and
returning HTTP responses. In between, they marshal the other resources of the framework to
access databases, render templates, etc.

The example below shows a minimal view function index(), which could have been called by
our URL mapper in the previous section. Like all view functions it receives
an HttpRequest object as a parameter (request) and returns an HttpResponse object. In this case we
don't do anything with the request, and our response returns a hard-coded string.

A Little bit of python

Python modules are "libraries" of functions, stored in separate files, that we might want to use
in our code. Here we import just the HttpResponse object from the [Link] module so that
we can use it in our view: from [Link] import HttpResponse . There are other ways of
importing some or all objects from a module.

Functions are declared using the def keyword as shown above, with named parameters listed
in brackets after the name of the function; the whole line ends in a colon. Note how the next
lines are all indented. The indentation is important, as it specifies that the lines of code are
inside that particular block (mandatory indentation is a key feature of Python, and is one
reason that Python code is so easy to read).

Views are usually stored in a file called [Link].

Defining data models ([Link])


Django web applications manage and query data through Python objects referred to as models.
Models define the structure of stored data, including the field types and possibly also their
maximum size, default values, selection list options, help text for documentation, label text for
forms, etc. The definition of the model is independent of the underlying database — you can

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

choose one of several as part of your project settings. Once you've chosen what database you
want to use, you don't need to talk to it directly at all — you just write your model structure
and other code, and Django handles all the "dirty work" of communicating with the database
for you.

The code snippet below shows a very simple Django model for a Team object. The Team class
is derived from the django class [Link]. It defines the team name and team level as
character fields and specifies a maximum number of characters to be stored for each record.
The team_level can be one of several values, so we define it as a choice field and provide a
mapping between choices to be displayed and data to be stored, along with a default value.

Note : A little bit of Python:

Python supports "object-oriented programming", a style of programming where we organize


our code into objects, which include related data and functions for operating on that data.
Objects can also inherit/extend/derive from other objects, allowing common behavior between
related objects to be shared. In Python we use the keyword class to define the "blueprint" for
an object. We can create multiple specific instances of the type of object based on the model in
the class. So for example, here we have a Team class, which derives from the Model class.
This means it is a model, and will contain all the methods of a model, but we can also give it
specialized features of its own too. In our model we define the fields our database will need to
store our data, giving them specific names. Django uses these definitions, including the field
names, to create the underlying database.

Querying data ([Link])


The Django model provides a simple query API for searching the associated database. This
can match against a number of fields at a time using different criteria (e.g. exact, case-
insensitive, greater than, etc.), and can support complex statements (for example, you can
specify a search on U11 teams that have a team name that starts with "Fr" or ends with "al").

The code snippet shows a view function (resource handler) for displaying all of our U09
teams. The list_teams = [Link](team_level__exact="U09") line shows how we can use the
model query API to filter for all records where the team_level field has exactly the text 'U09'
(note how this criteria is passed to the filter() function as an argument, with the field name and
match type separated by a double underscore: team_level__exact).

This function uses the render() function to create the HttpResponse that is sent back to the
browser. This function is a shortcut; it creates an HTML file by combining a specified HTML
template and some data to insert in the template (provided in the variable named " context"). In
the next section we show how the template has the data inserted in it to create the HTML.

Rendering data (HTML templates)


Template systems allow you to specify the structure of an output document, using
placeholders for data that will be filled in when a page is generated. Templates are often used

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

to create HTML, but can also create other types of document. Django supports both its native
templating system and another popular Python library called Jinja2 out of the box (it can also
be made to support other systems if needed).

The code snippet shows what the HTML template called by the render() function in the
previous section might look like. This template has been written under the assumption that it
will have access to a list variable called youngest teams when it is rendered (this is contained in
the context variable inside the render() function above). Inside the HTML skeleton we have an
expression that first checks if the youngest teams variable exists, and then iterates it in a for loop.
On each iteration the template displays each team's team name value in an <li> element.

The preceding sections show the main features that you'll use in almost every web application:
URL mapping, views, models and templates. Just a few of the other things provided by
Django include:

 Forms: HTML Forms are used to collect user data for processing on the server.
Django simplifies form creation, validation, and processing.

 User authentication and permissions: Django includes a robust user authentication


and permission system that has been built with security in mind.

 Caching: Creating content dynamically is much more computationally intensive (and


slow) than serving static content. Django provides flexible caching so that you can
store all or part of a rendered page so that it doesn't get re-rendered except when
necessary.

 Administration site: The Django administration site is included by default when you
create an app using the basic skeleton. It makes it trivially easy to provide an admin
page for site administrators to create, edit, and view any data models in your site.

 Serializing data: Django makes it easy to serialize and serve your data as XML or
JSON. This can be useful when creating a web service (a website that purely serves
data to be consumed by other applications or sites, and doesn't display anything itself),
or when creating a website in which the client-side code handles all the rendering of
data.

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

CHAPTER 3
ABOUT THE PROJECT

3.1 EXPLANATION:

The project Hospital Management system includes registration of patients, storing their
details into the system, and also computerized billing in the pharmacy, and labs. The
software has the facility to give a unique id for every patient and stores the details of
every patient and the staff automatically. It includes a search facility to know the current
status of each room. User can search availability of a doctor and the details of a patient
using the id.

The Hospital Management System can be entered using a username and password. It is
accessible either by an administrator or receptionist. Only they can add data into the
database. The data can be retrieved easily. The interface is very user-friendly. The data
are well protected for personal use and makes the data processing very fast.

Hospital Management System is powerful, flexible, and easy to use and is designed and
developed to deliver real conceivable benefits to hospitals.

Hospital Management System is designed for multispeciality hospitals, to cover a wide


range of hospital administration and management processes. It is an integrated end-to end
Hospital Management System that provides relevant information across the hospital to
support effective decision making for patient care, hospital administration and critical
financial accounting, in a seamless flow.

Hospital Management System is a software product suite designed to improve the quality
and management of hospital management in the areas of clinical process analysis and
activity-based costing. Hospital Management System enables you to develop your
organization and improve its effectiveness and quality of work. Managing the key
processes efficiently is critical to the success of the hospital helps you manage your
processes

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

3.2 MODULE DESCRIPTION:

ADMIN
Admin has the full access to the system which means he is able to manage any activity
with regard to the system. He is the highest privileged user who can access to the system.

Key functions:
 Access patient record, doctor Record.
 Add new doctor entry in system database.
 Confirm Payment and Generate Bill.
 View Records.(Total no of patients treated, doctor added/remove, consultant fee).

PATIENT
Patients can choose the best preferred appointments from the options provided and can
also change the appointment schedule or cancel it. After appt. is confirmed by the
respective doctor they can pay their consultant fee online. Patients have access to only
their records.

Key functions:
 Make appointment.
 Cancel appointment.
 Update Details.
 Payment.
 View Payment History.

DOCTOR
Doctors can view the patient appointment list and provide the confirmation or make
changes in the appointment list if required. Doctors have access to only records of those
patients whom they are treating.

Key functions:
 Confirmation of appointment.
 Cancellation of appointment.
 Modification of appointment list.
 Add Prescription.

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

3.3 SYSTEM DESIGN

DATA FLOW DIAGRAM

FIG 3.1 CONTEXT LEVEL DFD

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

DFD LEVEL 1

FIG 3.2 LEVEL 1-DFD

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

FIG 3.3 LEVEL-2 REGISTRATION

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

FIG 3.4 LEVEL LOGIN

FIG 3.5 LEVEL 2 MAKE APPOINTMENT

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

FIG 3.6 LEVEL 2 ADD PRESCRIPTION

FIG 3.7 LEVEL 2 DOCTOR MODULE

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

FIG 3.8 LEVEL 2 PATIENT MODULE


3.4 DATA DESIGN

TABLE 3.1 PATIENT TABLE

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

TABLE 3.2 APPOINTMENT TABLE

TABLE 3.3 DOCTOR TABLE

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

TABLE 3.4 PRESCRIPTION TABLE

TABLE 3.5 ADMIN TABLE

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

TABLE 3.6 BILL

CHAPTER 4
IMPLEMENTATION

4.1 ER DIAGRAM

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

FIG 4.1 ER DIAGRAM

4.2USE CASE DIAGRAM:

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

FIG 4.2 USE CASE DIAGRAM

4.3 USE CASE DESCRIPTION

(1) PATIENT

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

* REGISTRATION

DESCRIPTION - The new patient can register themselves and add their details
like name, age, gender, blood group etc. The patient entry will be made in the
hms database.

PRE -CONDITION – The patient must be a new patient, If necessary fields left
by user then prompt user to fill the necessary fields.

MAIN FLOW OF EVENTS


1. Patient selects sign up in login module.
2. A registration form get displayed
3. Patient fills the required details.

POST CONDITIONS - Patient record is added to hms database.

* UPDATION

DESCRIPTION-The patient should be enabled to update his/her details and the


changes should reflect in hms database.

PRE-CONDITION – The patient must be a registered patient, The patient


cannot update details after treatment starts.

MAIN FLOW OF EVENTS


1. Patient logs in to the system.
2. Patient view his record
3. Patient selects update details.
4. Now patient may change the necessary fields.
5. Pop of update details.

POST CONDITION - The record of patient is updated in hms database.

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

*APPOINTMENT

DESCRIPTION - It shows users a list of available doctors, timings, dates and


enables patients to select the most suitable appointment date and doctor. The
patient may also the cancel the appointment.

PRE-CONDITION - The patient must be a registered patient, Patient can fix


only one appointment for a particular department.

MAIN FLOW OF EVENT


1. Patient first logs in to system.
2. View his/her record.
3. Create a new appointment or cancel the appointment..

POST CONDITIONS - patient details are displayed and a new appointment is


fix or a existing appointment is cancelled. The hms database is updated.

(2) DOCTOR

DESCRIPTION- The doctor view patient record/ update his details and add
description of the treatment given to patient.

PRE-CONDITION – The doctor must be a registered doctor, System does not


allow the doctor to modify the qualification, hospital managed details.

MAIN FLOW OF EVENTS

[Link] logs in to the system.

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

2. Doctor may select view patient.


2.1 Patient record is displayed with treatment history.
3. Doctor add description of patient treatment.
4. Doctor may select appointment details
4.1 Appointment Requests is displayed with schedule.
5. Doctor confirm or cancel appointment.

POST CONDITION – The patient and doctor ‘s database are updated.

(3) ADMIN

DESCRIPTION - The admin add doctor, update docotr details and verify
payment and generate Bill/Reciept for the same.

MAIN FLOW OF EVENTS


1. Admin logs in the system.
2. Admin may add doctor new doctor.
2.1 admin fills the doctor’s details.
3. Admin view Doctor record.
3.1 Admin enters the doctor id in the system.
3.2 Doctor details are displayed, Admin can update details.
4. Admin Verify the payment submited by the Patient.
4.1 Generate Bill/Reciept and confirmation message for the same.

PRE –CONDITION - Admin must first log in with his/her credentials.

POST CONDITION - The hms database is updated

4.4 SCREENSHOT WITH FUNCTION CODE

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

FIG 4.1.1 HOMEPGAE OF HMS

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

FIG 4.2.2 ADMIN SIGN UP AND LOGIN PAGE

FUNCTION CODE FOR ADMIN SIGNUP AND LOGIN

def adminclick_view(request):
if [Link].is_authenticated:
return HttpResponseRedirect('afterlogin')
return render(request,'hospital/[Link]')

class AdminSigupForm([Link]):
class Meta:
model=User
fields=['first_name','last_name','username','password']
widgets = {
'password': [Link]()
}

def admin_signup_view(request):
form=[Link]()
if [Link]=='POST':
form=[Link]([Link])
if form.is_valid():

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

user=[Link]()
user.set_password([Link])
[Link]()
my_admin_group = [Link].get_or_create(name='ADMIN')
my_admin_group[0].user_set.add(user)
return HttpResponseRedirect('adminlogin')
return render(request,'hospital/[Link]',{'form':form})

FIG 4.2.3 ADMIN LOGIN PAGE

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

FIG 4.2.4 ADMIN DASHBORD

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

FIG 4.2.5 DOCTOR SIGNUP AND LOGIN PAGE

def doctor_signup_view(request):
userForm=[Link]()
doctorForm=[Link]()
mydict={'userForm':userForm,'doctorForm':doctorForm}
if [Link]=='POST':
userForm=[Link]([Link])
doctorForm=[Link]([Link],[Link])
if userForm.is_valid() and doctorForm.is_valid():
user=[Link]()
user.set_password([Link])
[Link]()
doctor=[Link](commit=False)
[Link]=user
doctor=[Link]()
my_doctor_group = [Link].get_or_create(name='DOCTOR')
my_doctor_group[0].user_set.add(user)
return HttpResponseRedirect('doctorlogin')
return render(request,'hospital/[Link]',context=mydict)

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

FIG 4.2.6 DOCTOR LOGIN PAGE

FIG 4.2.7 DOCTOR DASHBORD

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

CONCLUSION

 Hospital Management System is an organized computerized system


designed and programmed to deal with day-to-day operations and
management of hospital activities

 The project Hospital Management system includes the registration of


patients, storing their details in the system, and also computerized billing
in the pharmacy, and labs.

 The software has the facility to give a unique id for every patient and
stores the details of every patient and the staff automatically.

 Users can search the availability of a doctor and the details of a patient
using the id.

 Hospital Management System enables you to develop your organization


and improve its effectiveness and quality of work.

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

FUTURE SCOPE

 Patients can book appointment to consult with doctor online.

 Patient can see and download their lab test result online

 Online payment method will be added along with bill generation

 Home lab test will be provided upon booking in nearby areas of hospital .

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])


lOMoARcPSD|61553253

REFERENCES

Downloaded by ANURAG VERMA (anuragverma28nov@[Link])

You might also like