0% found this document useful (0 votes)
23 views

Dbms Project

Uploaded by

tahin2808
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Dbms Project

Uploaded by

tahin2808
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 116

1

3. Abstract

The COVID Bed Management System is a comprehensive project designed to enhance the
efficiency of hospital bed allocation and management during the COVID-19 pandemic. This
system aims to address the critical need for real-time tracking and management of hospital
bed occupancy, ensuring that patients receive timely and appropriate care, and optimizing the
utilization of healthcare resources. The primary functionalities include patient booking,
hospital data management, user authentication, and real-time updates on bed occupancy and
availability.

The project encompasses a robust backend database designed to handle large volumes of data
efficiently, incorporating normalization techniques to ensure data integrity, minimize
redundancy, and optimize query performance. The system's frontend, developed using
HTML, provides a user-friendly interface for hospital staff and administrators to interact with
the data seamlessly. Integration between the backend and frontend is achieved using a Python
script, which handles data processing, user inputs, and security measures.

Key outcomes of the project include streamlined bed management processes, improved
accuracy and reliability of hospital data, and enhanced decision-making capabilities for
hospital administrators. The system also features automated triggers and stored procedures to
maintain data consistency and provide real-time updates. This project successfully
demonstrates the potential for technology to significantly improve healthcare logistics,
particularly during a crisis, and offers a scalable solution adaptable to various healthcare
settings. Additionally, the system's architecture and design principles can serve as a model for
similar healthcare management applications in the future.

4. Introduction

Background

The COVID-19 pandemic has placed unprecedented strain on global healthcare systems,
highlighting the critical need for effective management of hospital resources, particularly bed
allocation. During surges of COVID-19 cases, hospitals faced overwhelming demand for
beds, leading to challenges in providing timely care to patients. Effective bed management
became a pivotal aspect of healthcare response, directly impacting patient outcomes and the
ability to control the spread of the virus. The lack of real-time data on bed availability,
coupled with inefficient manual processes, exacerbated these challenges, making it
imperative to develop systems that could streamline bed management and enhance
operational efficiency.

Hospital bed management during the pandemic involves not only keeping track of the
number of available beds but also categorizing them based on the type of care they can
provide, such as normal beds, ICU beds, and ventilator beds. The ability to quickly identify
and allocate the appropriate type of bed to patients in need is crucial for managing the flow of
patients and ensuring that critical resources are used effectively. Furthermore, effective bed
management helps in maintaining proper infection control protocols, as it ensures that
COVID-19 patients are isolated in designated areas, thereby reducing the risk of cross-
contamination with non-COVID-19 patients.

Purpose
2

The COVID Bed Management System was developed to address these critical issues by
providing a digital solution that automates and optimizes the process of hospital bed
allocation. The primary purpose of this system is to ensure that patients in need of care are
assigned appropriate beds swiftly and accurately, thereby improving patient care and
maximizing the utilization of hospital resources. By leveraging technology, this system aims
to eliminate the inefficiencies associated with manual bed management, reduce the burden on
healthcare workers, and provide real-time data that supports informed decision-making.

Key intended benefits of the system include:

 Real-Time Tracking: Provides up-to-date information on bed occupancy and


availability, enabling quick adjustments to bed allocations based on current needs.
 Improved Resource Utilization: Ensures optimal use of available beds, reducing
instances of either underutilization or overburdening of hospital resources.
 Enhanced Decision-Making: Equips hospital administrators with accurate data to
make informed decisions regarding patient care and resource allocation.
 Patient Care Efficiency: Minimizes delays in patient admissions and transfers,
ensuring that patients receive timely and appropriate care.
 Data Accuracy and Integrity: Reduces errors associated with manual data entry and
updates, ensuring that the information available to healthcare workers is accurate and
reliable.
 Scalability: The system is designed to handle varying volumes of data and can be
scaled up to accommodate more hospitals and beds as needed.
 User-Friendly Interface: Simplifies the process for healthcare workers to update and
retrieve information, reducing the learning curve and making the system more
accessible.

Scope

The COVID Bed Management System encompasses several core functionalities aimed at
addressing the critical aspects of hospital bed management. These functionalities include:

 Patient Booking: Allows for the reservation and allocation of hospital beds to
patients based on their medical needs and bed availability. This feature ensures that
patients are assigned to the most appropriate type of bed (e.g., ICU bed, ventilator
bed) based on their condition.
 Hospital Data Management: Maintains comprehensive data on hospital capacities,
including the number and types of beds available in different hospitals. This includes
real-time updates on bed occupancy, admissions, and discharges.
 User Authentication: Implements secure login and authentication mechanisms to
ensure that only authorized personnel can access and manage the system. This feature
is crucial for maintaining the security and integrity of sensitive patient data.
 Real-Time Updates: Continuously monitors and updates the status of bed occupancy,
providing real-time data to hospital staff and administrators. This ensures that
decisions regarding patient transfers and admissions are based on the most current
information available.
 Reporting and Analytics: Generates reports and analytics on bed usage, patient
admissions, and other key metrics. These reports help hospital administrators
understand trends, identify bottlenecks, and make informed decisions about resource
allocation.
3

 Integration with Other Systems: The system can be integrated with other hospital
management systems, such as electronic health records (EHR) and patient
management systems, to provide a seamless flow of information across different
platforms.

Despite its comprehensive design, the system has certain limitations. It relies on accurate data
entry and regular updates by hospital staff to maintain its effectiveness. Inaccuracies or
delays in data entry can lead to discrepancies in bed availability information. Additionally,
while the system is designed to be scalable, its performance may be impacted by the volume
of data and the number of concurrent users, necessitating appropriate infrastructure support.
There is also a need for training healthcare staff to use the system effectively, which may
require time and resources.

Structure

This report is structured to provide a detailed overview of the COVID Bed Management
System, its design, implementation, and outcomes. The structure of the report is as follows:

1. Title Page: Provides essential information about the project, including the title,
course, authors, and date.
2. Table of Contents: Lists the sections and subsections of the report for easy
navigation.
3. Abstract: Summarizes the project's purpose, functionalities, and key outcomes.
4. Introduction: Discusses the background, purpose, scope, and structure of the report.
5. Objectives: Outlines the primary and secondary goals of the project.
6. System Design: Details the design of the database, ER diagram, schema, and
normalization process.
o 6.1 Database Design: Description of the database structure and rationale
behind its design.
o 6.2 ER Diagram: Visual representation of the relationships between tables in
the database.
o 6.3 Schema: Detailed schema of the database, including tables, columns, data
types, and constraints.
o 6.4 Normalization: Explanation of the normalization process applied to the
database and its benefits.
7. Implementation: Describes the steps taken to implement the database, frontend, and
backend integration.
o 7.1 Database Implementation: SQL script used to create and populate the
database, and discussion of special SQL features used.
o 7.2 Frontend Development: Overview of the HTML structure, key pages,
features, and code snippets.
o 7.3 Backend Integration: Description of how the Python script interacts with
the database, key functionalities, user inputs, and security measures.
8. Data Insertion and Querying: Provides examples of data insertion and querying
operations.
o 8.1 Data Insertion: Examples of data insertion for each table and discussion
of challenges.
o 8.2 Sample Queries: Sample queries used to interact with the database,
including complex queries.
4

9. Triggers and Stored Procedures: Discusses the triggers and stored procedures used
in the database, with examples of their usage.
10. Results and Discussion: Presents the results obtained from the system, discussing
performance, challenges, and user feedback.
11. Conclusion: Summarizes the key points, reflects on the project's success, and
suggests possible future enhancements.
12. References: Lists the sources and references used in the report.
13. Appendix: Includes additional materials such as code listings, diagrams, and
documentation.
o Glossary: Provides a glossary of terms used in the report.
o Documentation: Includes any user manuals or documentation created for the
system.

This structured approach ensures a comprehensive and clear presentation of the COVID Bed
Management System, covering all aspects from design to implementation and results.

5. Objectives

Primary Objectives:

1. Efficient Hospital Bed Management: Implement a comprehensive system to


effectively allocate and manage hospital beds across different types (normal, ICU,
ventilator). This involves developing algorithms to prioritize bed assignments based
on patient severity, medical needs, and real-time bed availability.
2. Optimized Patient Care: Ensure timely and appropriate care by streamlining the
process of admitting, transferring, and discharging patients. The system will prioritize
critical patients and optimize bed turnover to minimize wait times and enhance patient
outcomes.
3. Real-time Monitoring and Alerts: Provide real-time updates on bed availability,
patient admissions, and critical care needs. Alerts and notifications will inform
hospital staff of urgent situations, ensuring prompt response and resource allocation.
4. Data-driven Decision Making: Enable data analytics to generate insights into bed
occupancy rates, patient demographics, and trends. These analytics will support
informed decision-making for resource allocation, capacity planning, and improving
operational efficiency.
5. Integration with Healthcare Systems: Seamlessly integrate with existing hospital
management and electronic health record (EHR) systems to access patient data,
medical histories, and treatment plans. This integration enhances care coordination
and ensures accurate patient management.

Secondary Objectives:

1. User Authentication and Access Control: Implement robust authentication


mechanisms and role-based access control (RBAC) to secure patient data and system
functionalities. This ensures that only authorized personnel can access and modify
sensitive information.
2. Emergency Preparedness: Develop protocols and features to handle emergencies
and pandemics by quickly adapting bed availability and prioritizing patient care based
on severity and urgency. This includes surge capacity planning and response
strategies.
5

3. Enhanced Communication and Collaboration: Facilitate communication among


healthcare providers, staff, and patients through the system. Features such as
messaging, task assignment, and collaborative care planning improve care
coordination and patient satisfaction.
4. Compliance and Regulatory Requirements: Ensure the system adheres to
healthcare regulations and standards for data privacy, security, and patient
confidentiality. Regular audits and compliance checks will maintain system integrity
and trustworthiness.
5. Scalability and Flexibility: Design the system to be scalable and adaptable to
accommodate growth, additional facilities, and evolving healthcare needs. This
scalability ensures long-term usability and effectiveness across diverse healthcare
environments.
6. Training and Support: Provide comprehensive training and ongoing support to
hospital staff for effective use of the system. Training modules, user guides, and
technical assistance will promote system adoption and proficiency.

6. System Design

6.1 Database Design

Description: The database design aims to support efficient hospital bed management by
structuring data in a way that facilitates real-time updates, ensures data integrity, and allows
for comprehensive reporting and analytics. The design includes tables for booking patients,
hospital data, users, and triggers, each serving a specific purpose in the system's operation.

Tables:

 bookingpatient:
o Purpose: Stores information about patients who have booked hospital beds.
o Columns:
 id: Unique identifier for each booking.
 srfid: Unique identifier for the patient.
 bedtype: Type of bed booked (e.g., normal, ICU, ventilator).
 hcode: Hospital code where the bed is booked.
 spo2: Patient's blood oxygen level.
 pname: Patient's name.
 pphone: Patient's phone number.
 paddress: Patient's address.
 hospitaldata:
o Purpose: Contains data about each hospital and its available beds.
o Columns:
 id: Unique identifier for the hospital record.
 hcode: Unique code for the hospital.
 hname: Name of the hospital.
 normalbed: Number of normal beds available.
 hicubed: Number of high ICU beds available.
 icubed: Number of ICU beds available.
 vbed: Number of ventilator beds available.
 hospitaluser:
6

o Purpose: Manages hospital user accounts for accessing the system.


o Columns:
 id: Unique identifier for each user.
 hcode: Hospital code the user is associated with.
 email: User's email address.
 password: User's hashed password.
 test:
o Purpose: A test table for development and debugging purposes.
o Columns:
 id: Unique identifier for the test entry.
 name: Name field for test purposes.
 trig:
o Purpose: Stores records of triggers for auditing changes in the hospitaldata
table.
o Columns:
 id: Unique identifier for the trigger record.
 hcode: Hospital code related to the trigger event.
 normalbed: Number of normal beds at the time of the event.
 hicubed: Number of high ICU beds at the time of the event.
 icubed: Number of ICU beds at the time of the event.
 vbed: Number of ventilator beds at the time of the event.
 querys: Type of event (INSERTED, UPDATED, DELETED).
 date: Date of the event.
 user:
o Purpose: Manages user information for patients.
o Columns:
 id: Unique identifier for each user.
 srfid: Unique identifier for the patient.
 email: User's email address.
 dob: User's date of birth.

Relationships:

 bookingpatient and hospitaldata: Linked by the hcode field. A patient booking


references a specific hospital.
 hospitaluser and hospitaldata: Linked by the hcode field. Users are associated
with a specific hospital.
 trig and hospitaldata: Linked by the hcode field. Triggers log changes related to
specific hospitals.

6.2 ER Diagram

An ER diagram is essential to visualize the relationships between tables. Here is a simplified


representation:
7

Description of the Enhanced Diagram:

1. bookingpatient: Stores patient booking information.


o id: Primary key.
o srfid: Unique identifier for the patient.
o bedtype, hcode, spo2, pname, pphone, paddress: Patient details and hospital
code (foreign key).
2. hospitaldata: Stores hospital information.
o id: Primary key.
o hcode: Unique hospital code.
o hname, normalbed, hicubed, icubed, vbed: Hospital details.
3. hospitaluser: Stores hospital user information.
o id: Primary key.
o hcode: Foreign key to hospitaldata.
o email, password: User credentials.
4. trig: Stores trigger logs.
o id: Primary key.
o hcode: Foreign key to hospitaldata.
o normalbed, hicubed, icubed, vbed, querys, date: Log details.
5. user: Stores user information.
o id: Primary key.
o srfid: Unique identifier for the user.
o email, dob: User details.
6. test: Stores test information.
o id: Primary key.
o name: Test name.
8

7. patienthospital: Links patients to hospitals.


o id: Primary key.
o patientid: Foreign key to bookingpatient.
o hospitalid: Foreign key to hospitaldata.
o admissiondate, dischargedate: Hospitalization details.

Relationships:

 bookingpatient.hcode → hospitaldata.hcode
 hospitaluser.hcode → hospitaldata.hcode
 trig.hcode → hospitaldata.hcode
 user.srfid → bookingpatient.srfid
 patienthospital.patientid → bookingpatient.id
 patienthospital.hospitalid → hospitaldata.id

This enhanced diagram includes additional relationships and an intermediary table


(patienthospital) to track patient admissions and discharges, making the system more
comprehensive and detailed.

6.3 Schema

Here is the complete schema for the tables:

-- Database: `covid`

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";


START TRANSACTION;
SET time_zone = "+00:00";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;


/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

-- Table structure for table `bookingpatient`


CREATE TABLE `bookingpatient` (
`id` int(11) NOT NULL,
`srfid` varchar(50) NOT NULL,
`bedtype` varchar(50) NOT NULL,
`hcode` varchar(50) NOT NULL,
`spo2` int(11) NOT NULL,
`pname` varchar(50) NOT NULL,
`pphone` varchar(12) NOT NULL,
`paddress` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- Table structure for table `hospitaldata`


CREATE TABLE `hospitaldata` (
`id` int(11) NOT NULL,
`hcode` varchar(200) NOT NULL,
`hname` varchar(200) NOT NULL,
`normalbed` int(11) NOT NULL,
`hicubed` int(11) NOT NULL,
`icubed` int(11) NOT NULL,
`vbed` int(11) NOT NULL
9

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- Triggers for `hospitaldata`


DELIMITER $$
CREATE TRIGGER `Insert` AFTER INSERT ON `hospitaldata` FOR EACH ROW
INSERT INTO trig
VALUES(null,NEW.hcode,NEW.normalbed,NEW.hicubed,NEW.icubed,NEW.vbed,'
INSERTED',NOW())$$
DELIMITER ;
DELIMITER $$
CREATE TRIGGER `Update` AFTER UPDATE ON `hospitaldata` FOR EACH ROW
INSERT INTO trig
VALUES(null,NEW.hcode,NEW.normalbed,NEW.hicubed,NEW.icubed,NEW.vbed,'
UPDATED',NOW())$$
DELIMITER ;
DELIMITER $$
CREATE TRIGGER `delet` BEFORE DELETE ON `hospitaldata` FOR EACH ROW
INSERT INTO trig
VALUES(null,OLD.hcode,OLD.normalbed,OLD.hicubed,OLD.icubed,OLD.vbed,'
DELETED',NOW())$$
DELIMITER ;

-- Table structure for table `hospitaluser`


CREATE TABLE `hospitaluser` (
`id` int(11) NOT NULL,
`hcode` varchar(20) NOT NULL,
`email` varchar(100) NOT NULL,
`password` varchar(1000) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- Table structure for table `test`


CREATE TABLE `test` (
`id` int(11) NOT NULL,
`name` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- Dumping data for table `test`


INSERT INTO `test` (`id`, `name`) VALUES
(1, 'anees'),
(2, 'rehman');

-- Table structure for table `trig`


CREATE TABLE `trig` (
`id` int(11) NOT NULL,
`hcode` varchar(50) NOT NULL,
`normalbed` int(11) NOT NULL,
`hicubed` int(11) NOT NULL,
`icubed` int(11) NOT NULL,
`vbed` int(11) NOT NULL,
`querys` varchar(50) NOT NULL,
`date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- Dumping data for table `trig`


INSERT INTO `trig` (`id`, `hcode`, `normalbed`, `hicubed`, `icubed`,
`vbed`, `querys`, `date`) VALUES
(1, 'BBH01', 50, 9, 2, 1, ' UPDATED', '2021-11-26'),
(2, 'BBH01', 50, 9, 2, 1, ' DELETED', '2021-11-26'),
(3, 'AA1100', 15, 5, 4, 2, ' INSERTED', '2021-11-26'),
(4, 'AA1100', 15, 10, 8, 2, ' UPDATED', '2021-11-26'),
(5, 'AA1100', 15, 10, 7, 2, ' UPDATED', '2021-11-26'),
10

(6, 'ARK123 ', 12, 55, 22, 22, ' INSERTED', '2022-01-12'),
(7, 'ARK123', 12, 50, 22, 22, ' UPDATED', '2022-01-12'),
(8, 'ABCD123 ', 11, 15, 4, 20, ' INSERTED', '2022-01-12'),
(9, 'ABCD123', 11, 11, 4, 20, ' UPDATED', '2022-01-12'),
(10, 'ARK123', 12, 50, 21, 22, ' UPDATED', '2022-01-12'),
(11, 'MAT123', 40, 4, 4, 1, ' DELETED', '2022-01-30'),
(12, 'AA1100', 15, 10, 7, 2, ' DELETED', '2022-01-30'),
(13, 'ARK123', 12, 50, 21, 22, ' DELETED', '2022-01-30'),
(14, 'ABCD123', 11, 11, 4, 20, ' DELETED', '2022-01-30');

-- Table structure for table `user`


CREATE TABLE `user` (
`id` int(11) NOT NULL,
`srfid` varchar(20) NOT NULL,
`email` varchar(100) NOT NULL,
`dob` varchar(1000) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- Indexes for dumped tables

-- Indexes for table `bookingpatient`


ALTER TABLE `bookingpatient`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `srfid` (`srfid`(20));

-- Indexes for table `hospitaldata`


ALTER TABLE `hospitaldata`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `hcode` (`hcode`);

-- Indexes for table `hospitaluser`


ALTER TABLE `hospitaluser`
ADD PRIMARY KEY (`id`);

-- Indexes for table `test`


ALTER TABLE `test`
ADD PRIMARY KEY (`id`);

-- Indexes for table `trig`


ALTER TABLE `trig`
ADD PRIMARY KEY (`id`);

-- Indexes for table `user`


ALTER TABLE `user`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `srfid` (`srfid`);

-- AUTO_INCREMENT for dumped tables

-- AUTO_INCREMENT for table `bookingpatient`


ALTER TABLE `bookingpatient`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

-- AUTO_INCREMENT for table `hospitaldata`


ALTER TABLE `hospitaldata`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

-- AUTO_INCREMENT for table `hospitaluser`


ALTER TABLE `hospitaluser`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
11

-- AUTO_INCREMENT for table `test`


ALTER TABLE `test`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

-- AUTO_INCREMENT for table `trig`


ALTER TABLE `trig`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

-- AUTO_INCREMENT for table `user`


ALTER TABLE `user`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;


/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

This schema ensures that all necessary data for managing hospital beds, patients, and hospital
staff is effectively organized, supporting the system's primary and secondary objectives.

6.4 Normalization

Definition:

Database normalization is the process of organizing data in a database efficiently. This


involves reducing redundancy and dependency by dividing large tables into smaller, related
tables and defining relationships between them.

Process:

Normalization typically proceeds through three progressive normal forms (1NF, 2NF, 3NF)
to ensure data is organized optimally.

 First Normal Form (1NF):


o Ensures each table has a primary key.
o All columns contain atomic values (values cannot be divided further).

Example Application: In our project, each table such as bookingpatient,


hospitaldata, hospitaluser, test, and trig has a primary key (id) to uniquely
identify each record. Columns like srfid, bedtype, hcode, spo2, pname, pphone,
paddress, hname, normalbed, hicubed, icubed, vbed, email, and password contain
atomic values, ensuring no multivalued attributes.

 Second Normal Form (2NF):


o All non-key attributes are fully functionally dependent on the primary key.

Example Application: In the bookingpatient table, attributes srfid, bedtype,


hcode, spo2, pname, pphone, and paddress are functionally dependent on the
primary key id, ensuring no partial dependency exists. Similarly, in other tables such
as hospitaluser, test, and trig, non-key attributes are fully dependent on their
respective primary keys.
12

 Third Normal Form (3NF):


o All non-key attributes are not only fully functionally dependent on the primary
key but also independent of each other (no transitive dependency).

Example Application: Ensures that in tables like trig, hospitaluser, and others,
attributes are not dependent on each other, avoiding transitive dependencies. For
instance, in trig, attributes like normalbed, hicubed, icubed, and vbed are directly
dependent on hcode and not on each other, promoting data integrity and flexibility.

Benefits:

Normalization offers several advantages in our project:

 Reduced Redundancy: By breaking down tables into smaller ones and linking them
with relationships, redundancy is minimized. For example, hospital data
(hospitaldata) and user information (user) are stored separately, linked by
common keys (hcode), preventing data duplication.
 Improved Data Integrity: Ensures data consistency and accuracy. For instance,
changes made in hospitaldata reflect uniformly across related tables (trig,
hospitaluser) due to well-defined relationships.
 Optimized Storage: Efficient use of storage space by avoiding duplication of data,
thereby optimizing database performance.
 Simplified Updates: Updates and modifications are easier and less error-prone. For
example, when updating hospital information (hospitaldata), related triggers (trig)
and user credentials (hospitaluser) are automatically adjusted through established
relationships.

6.5 Our SQL code is in 3nf form prove:


1. Table Structures

bookingpatient Table:

 Primary Key: id field uniquely identifies each record.


 Atomic Values: All columns (id, srfid, bedtype, hcode, spo2, pname, pphone,
paddress) contain atomic values, meaning they cannot be further divided.

hospitaldata Table:

 Primary Key: id field uniquely identifies each record.


 Non-Key Attributes: Columns (hcode, hname, normalbed, hicubed, icubed, vbed)
are functionally dependent on the primary key (id).
 No Transitive Dependencies: Each non-key column depends directly on the primary
key id, and there are no transitive dependencies among non-key columns.

hospitaluser Table:

 Primary Key: id field uniquely identifies each record.


 Attributes Depend on the Primary Key: Columns (hcode, email, password) are
directly related to the primary key id.
13

test Table:

 Primary Key: id field uniquely identifies each record.


 Atomic Values: The name column contains atomic values.

trig Table:

 Primary Key: id field uniquely identifies each record.


 Atomic Values: Columns (id, hcode, normalbed, hicubed, icubed, vbed, querys,
date) contain atomic values.
 Functional Dependencies: Each row's attributes (hcode, normalbed, hicubed,
icubed, vbed, querys, date) are functionally dependent on the primary key id.

user Table:

 Primary Key: id field uniquely identifies each record.


 Atomic Values: Columns (id, srfid, email, dob) contain atomic values.
 No Repeating Groups: Each column contains scalar values.

2. Normalization Process (1NF, 2NF, 3NF)

 First Normal Form (1NF): Each table has a primary key (id) and all columns
contain atomic values. For instance, bookingpatient, hospitaldata,
hospitaluser, test, trig, and user tables all conform to 1NF by having atomic
values in their columns and a primary key defined for each table.
 Second Normal Form (2NF): Ensures that all non-key attributes are fully
functionally dependent on the primary key. This is achieved by ensuring that each
non-key column depends on the entire primary key, and there are no partial
dependencies.
 Third Normal Form (3NF): In addition to 2NF requirements, 3NF ensures that all
non-key attributes are not dependent on each other. This is achieved by eliminating
transitive dependencies where one non-key column depends on another non-key
column.

3. Triggers and Procedures

 Triggers: The triggers defined on the hospitaldata table (Insert, Update, Delete)
in the trig table help in maintaining audit information about changes made to
hospitaldata. This is a common use case for triggers in maintaining data integrity
and auditing changes.
 Stored Procedures: The stored procedures getPatientDetails and getUsers
simplify data retrieval operations without modifying data, ensuring separation of
concerns and enhancing security.

Conclusion

The provided SQL script adheres to Third Normal Form (3NF) principles primarily through
its table structures, ensuring minimal redundancy, and maintaining data integrity by
eliminating dependencies among non-key attributes. This normalization process helps in
14

efficient data management and querying, contributing to the overall reliability and
performance of the database system.

7. Implementation

7.1 Database Implementation

SQL Script: Below is the SQL script used to create and populate the database for the
COVID-19 Hospital Management System:

-- phpMyAdmin SQL Dump


-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 30, 2022 at 03:04 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.29

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";


START TRANSACTION;
SET time_zone = "+00:00";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;


/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `covid`
--

DELIMITER $$
--
-- Procedures
--
CREATE DEFINER=`root`@`localhost` PROCEDURE `getPatientDetails` (IN `inp`
VARCHAR(50)) NO SQL
SELECT pname,pphone,srfid,bedtype,paddress FROM bookingpatient WHERE
hcode=inp$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `getUsers` () NO SQL


SELECT * FROM user$$

DELIMITER ;
15

-- --------------------------------------------------------

--
-- Table structure for table `bookingpatient`
--

CREATE TABLE `bookingpatient` (


`id` int(11) NOT NULL,
`srfid` varchar(50) NOT NULL,
`bedtype` varchar(50) NOT NULL,
`hcode` varchar(50) NOT NULL,
`spo2` int(11) NOT NULL,
`pname` varchar(50) NOT NULL,
`pphone` varchar(12) NOT NULL,
`paddress` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `hospitaldata`
--

CREATE TABLE `hospitaldata` (


`id` int(11) NOT NULL,
`hcode` varchar(200) NOT NULL,
`hname` varchar(200) NOT NULL,
`normalbed` int(11) NOT NULL,
`hicubed` int(11) NOT NULL,
`icubed` int(11) NOT NULL,
`vbed` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Triggers `hospitaldata`
--
DELIMITER $$
CREATE TRIGGER `Insert` AFTER INSERT ON `hospitaldata` FOR EACH ROW INSERT
INTO trig
VALUES(null,NEW.hcode,NEW.normalbed,NEW.hicubed,NEW.icubed,NEW.vbed,'
INSERTED',NOW())
$$
DELIMITER ;
DELIMITER $$
CREATE TRIGGER `Update` AFTER UPDATE ON `hospitaldata` FOR EACH ROW INSERT
INTO trig
VALUES(null,NEW.hcode,NEW.normalbed,NEW.hicubed,NEW.icubed,NEW.vbed,'
UPDATED',NOW())
16

$$
DELIMITER ;
DELIMITER $$
CREATE TRIGGER `delet` BEFORE DELETE ON `hospitaldata` FOR EACH ROW INSERT
INTO trig
VALUES(null,OLD.hcode,OLD.normalbed,OLD.hicubed,OLD.icubed,OLD.vbed,'
DELETED',NOW())
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `hospitaluser`
--

CREATE TABLE `hospitaluser` (


`id` int(11) NOT NULL,
`hcode` varchar(20) NOT NULL,
`email` varchar(100) NOT NULL,
`password` varchar(1000) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `test`
--

CREATE TABLE `test` (


`id` int(11) NOT NULL,
`name` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `test`
--

INSERT INTO `test` (`id`, `name`) VALUES


(1, 'anees'),
(2, 'rehman');

-- --------------------------------------------------------

--
-- Table structure for table `trig`
--
17

CREATE TABLE `trig` (


`id` int(11) NOT NULL,
`hcode` varchar(50) NOT NULL,
`normalbed` int(11) NOT NULL,
`hicubed` int(11) NOT NULL,
`icubed` int(11) NOT NULL,
`vbed` int(11) NOT NULL,
`querys` varchar(50) NOT NULL,
`date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `trig`
--

INSERT INTO `trig` (`id`, `hcode`, `normalbed`, `hicubed`, `icubed`, `vbed`,


`querys`, `date`) VALUES
(1, 'BBH01', 50, 9, 2, 1, ' UPDATED', '2021-11-26'),
(2, 'BBH01', 50, 9, 2, 1, ' DELETED', '2021-11-26'),
(3, 'AA1100', 15, 5, 4, 2, ' INSERTED', '2021-11-26'),
(4, 'AA1100', 15, 10, 8, 2, ' UPDATED', '2021-11-26'),
(5, 'AA1100', 15, 10, 7, 2, ' UPDATED', '2021-11-26'),
(6, 'ARK123 ', 12, 55, 22, 22, ' INSERTED', '2022-01-12'),
(7, 'ARK123', 12, 50, 22, 22, ' UPDATED', '2022-01-12'),
(8, 'ABCD123 ', 11, 15, 4, 20, ' INSERTED', '2022-01-12'),
(9, 'ABCD123', 11, 11, 4, 20, ' UPDATED', '2022-01-12'),
(10, 'ARK123', 12, 50, 21, 22, ' UPDATED', '2022-01-12'),
(11, 'MAT123', 40, 4, 4, 1, ' DELETED', '2022-01-30'),
(12, 'AA1100', 15, 10, 7, 2, ' DELETED', '2022-01-30'),
(13, 'ARK123', 12, 50, 21, 22, ' DELETED', '2022-01-30'),
(14, 'ABCD123', 11, 11, 4, 20, ' DELETED', '2022-01-30');

-- --------------------------------------------------------

--
-- Table structure for table `user`
--

CREATE TABLE `user` (


`id` int(11) NOT NULL,
`srfid` varchar(20) NOT NULL,
`email` varchar(100) NOT NULL,
`dob` varchar(1000) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Indexes for dumped tables
--
18

--
-- Indexes for table `bookingpatient`
--
ALTER TABLE `bookingpatient`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `srfid` (`srfid`(20));

--
-- Indexes for table `hospitaldata`
--
ALTER TABLE `hospitaldata`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `hcode` (`hcode`);

--
-- Indexes for table `hospitaluser`
--
ALTER TABLE `hospitaluser`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `test`
--
ALTER TABLE `test`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `trig`
--
ALTER TABLE `trig`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `srfid` (`srfid`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `bookingpatient`
--
ALTER TABLE `bookingpatient`
19

MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `hospitaldata`
--
ALTER TABLE `hospitaldata`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `hospitaluser`
--
ALTER TABLE `hospitaluser`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `test`
--
ALTER TABLE `test`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `trig`
--
ALTER TABLE `trig`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;


/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

Special SQL Features:

 Triggers: Triggers are used in the hospitaldata table to capture events like
insertions, updates, and deletions into a separate trig table. This helps in maintaining
an audit trail of changes made to hospital data.
 Stored Procedures: Stored procedures (getPatientDetails and getUsers) are
implemented in the database to fetch specific information efficiently. These
procedures help streamline data retrieval operations.

7.2 Frontend Development


20

HTML Structure: The HTML pages are structured using standard elements like <html>,
<head>, <body>, and include forms, tables, and div elements as necessary to present and
collect information from users.

Key Pages:

 Home Page: Provides an overview and navigation to other sections.


 Booking Page: Allows healthcare providers to book patients into available beds.
 Hospital Data Page: Displays hospital-specific data such as bed availability and
patient information.
 Admin Page : This page is only for admin. Admin can add hospital.

Features:

 Forms: Used for data entry and submission (e.g., patient booking form).
 Tables: Displaying structured information such as hospital data and patient records.

Code Snippets:

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">

<title>{% block title %}{% endblock title %}</title>


<meta content="" name="description">
<meta content="" name="keywords">

<!-- Favicons -->


<link href="static/assets/img/favicon.png" rel="icon">
<link href="static/assets/img/apple-touch-icon.png" rel="apple-touch-icon">

<!-- Google Fonts -->


<link href="https://fonts.googleapis.com/css?
family=Open+Sans:300,300i,400,400i,600,600i,700,700i|
Roboto:300,300i,400,400i,500,500i,600,600i,700,700i|
Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet">

<!-- Vendor CSS Files -->


<link href="static/assets/vendor/fontawesome-free/css/all.min.css"
rel="stylesheet">
<link href="static/assets/vendor/animate.css/animate.min.css"
rel="stylesheet">
<link href="static/assets/vendor/aos/aos.css" rel="stylesheet">
<link href="static/assets/vendor/bootstrap/css/bootstrap.min.css"
rel="stylesheet">
21

<link href="static/assets/vendor/bootstrap-icons/bootstrap-icons.css"
rel="stylesheet">
<link href="static/assets/vendor/boxicons/css/boxicons.min.css"
rel="stylesheet">
<link href="static/assets/vendor/glightbox/css/glightbox.min.css"
rel="stylesheet">
<link href="static/assets/vendor/swiper/swiper-bundle.min.css"
rel="stylesheet">

<!-- Template Main CSS File -->


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

</head>

<body>

<!-- ======= Top Bar ======= -->


<div id="topbar" class="d-flex align-items-center fixed-top">
<div class="container d-flex align-items-center justify-content-center
justify-content-md-between">
<div class="align-items-center d-none d-md-flex">
<i class="bi bi-clock"></i> 24*7 Available
</div>
<div class="d-flex align-items-center">
<i class="bi bi-phone"></i> Call us now +13773588751
</div>
</div>
</div>

<!-- ======= Header ======= -->


<header id="header" class="fixed-top">
<div class="container d-flex align-items-center">

<a href="/" class="logo me-auto"><img src="static/assets/img/logo.png"


alt=""></a>
<!-- Uncomment below if you prefer to use an image logo -->
<!-- <h1 class="logo me-auto"><a href="index.html">Medicio</a></h1> -->

<nav id="navbar" class="navbar order-last order-lg-0">


<ul>
<li><a class="nav-link scrollto " href="/">Home</a></li>

<li><a class="nav-link scrollto" href="/pdetails">Patients


Details</a></li>
<li><a class="nav-link scrollto" href="/slotbooking">Available
Beds</a></li>
<li><a class="nav-link scrollto" href="/trigers">Operations</a></li>
22

{% if current_user.is_authenticated and current_user.hcode %}

<li class="dropdown"><a href="/login"><span>Welcome


{{current_user.email}}</span> <i class="bi bi-chevron-down"></i></a>
<ul>

<li><a href="/addhospitalinfo">Add Hospital Data</a></li>


<li><a href="/logout">Logout</a></li>

</ul>
</li>
{% elif current_user.is_authenticated and current_user.srfid %}
<li class="dropdown"><a href="/login"><span>Welcome
{{current_user.email}}</span> <i class="bi bi-chevron-down"></i></a>
<ul>

<li><a href="/slotbooking">Book Slot</a></li>


<li><a href="/logout">Logout</a></li>

</ul>
</li>
{% else %}
<li class="dropdown"><a href="/login"><span>Sign In</span> <i
class="bi bi-chevron-down"></i></a>
<ul>
<li><a href="/login">User Login</a></li>
<li><a href="/hospitallogin">Hospital Login</a></li>
<li><a href="/admin">Admin Login</a></li>

</ul>
</li>

{% endif %}
<li><a class="nav-link scrollto" href="#contact">Contact</a></li>
</ul>
<i class="bi bi-list mobile-nav-toggle"></i>
</nav><!-- .navbar -->

<a href="/slotbooking" class="appointment-btn scrollto"><span class="d-


none d-md-inline">Bed Booking Slot</span> Book Now</a>

</div>
</header><!-- End Header -->

<!-- ======= Hero Section ======= -->


<section id="hero">
23

<div id="heroCarousel" data-bs-interval="5000" class="carousel slide


carousel-fade" data-bs-ride="carousel">

<ol class="carousel-indicators" id="hero-carousel-indicators"></ol>

<div class="carousel-inner" role="listbox">

<!-- Slide 1 -->


<div class="carousel-item active" style="background-image:
url(static/assets/img/slide/slide-1.jpg)">
<div class="container">
<h2>Welcome to <span>Covid center</span></h2>
<p>Yangzhou bed booking system <p>
<a href="#about" class="btn-get-started scrollto">Read More</a>
</div>
</div>

<!-- Slide 2 -->


<div class="carousel-item" style="background-image:
url(static/assets/img/slide/slide-2.jpg)">
<div class="container">
<h2>CHINA</h2>
<p>Yangzhou bed booking system</p>
<a href="#about" class="btn-get-started scrollto">Read More</a>
</div>
</div>

</div>

<a class="carousel-control-prev" href="#heroCarousel" role="button"


data-bs-slide="prev">
<span class="carousel-control-prev-icon bi bi-chevron-left" aria-
hidden="true"></span>
</a>

<a class="carousel-control-next" href="#heroCarousel" role="button"


data-bs-slide="next">
<span class="carousel-control-next-icon bi bi-chevron-right" aria-
hidden="true"></span>
</a>

</div>
</section><!-- End Hero -->

<main id="main">
24

{% block body %}

{% endblock body %}

<footer>
<div class="container">
<div class="copyright">
&copy; Copyright <strong><span>Arkprocoder</span></strong>. All Rights
Reserved
</div>
<div class="credits">

Designed by <a href="https://arprocoder.tech/">arkprocoder</a>


</div>
</div>
</footer><!-- End Footer -->

<div id="preloader"></div>
<a href="#" class="back-to-top d-flex align-items-center justify-content-
center"><i class="bi bi-arrow-up-short"></i></a>

<!-- Vendor JS Files -->


<script src="static/assets/vendor/purecounter/purecounter.js"></script>
<script src="static/assets/vendor/aos/aos.js"></script>
<script src="static/assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></
script>
<script src="static/assets/vendor/glightbox/js/glightbox.min.js"></script>
<script src="static/assets/vendor/swiper/swiper-bundle.min.js"></script>
<script src="static/assets/vendor/php-email-form/validate.js"></script>

<!-- Template Main JS File -->


<script src="static/assets/js/main.js"></script>

</body>

</html>

CSS and JavaScript:

 CSS: Used for styling elements to enhance the user interface and make it more
intuitive.

Source code :

/**
* Template Name: Medicio - v4.7.0
25

* Template URL: https://bootstrapmade.com/medicio-free-bootstrap-theme/


* Author: BootstrapMade.com
* License: https://bootstrapmade.com/license/
*/

/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/
body {
font-family: "Open Sans", sans-serif;
color: #444444;
}

a {
color: #3fbbc0;
text-decoration: none;
}

a:hover {
color: #65c9cd;
text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {


font-family: "Roboto", sans-serif;
}

/*--------------------------------------------------------------
# Preloader
--------------------------------------------------------------*/
#preloader {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 9999;
overflow: hidden;
background: #fff;
}

#preloader:before {
content: "";
position: fixed;
top: calc(50% - 30px);
left: calc(50% - 30px);
border: 6px solid #3fbbc0;
border-top-color: #ecf8f9;
26

border-radius: 50%;
width: 60px;
height: 60px;
-webkit-animation: animate-preloader 1s linear infinite;
animation: animate-preloader 1s linear infinite;
}

@-webkit-keyframes animate-preloader {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}

@keyframes animate-preloader {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/*--------------------------------------------------------------
# Back to top button
--------------------------------------------------------------*/
.back-to-top {
position: fixed;
visibility: hidden;
opacity: 0;
right: 15px;
bottom: 15px;
z-index: 996;
background: #3fbbc0;
width: 40px;
height: 40px;
border-radius: 4px;
transition: all 0.4s;
}
.back-to-top i {
font-size: 28px;
color: #fff;
line-height: 0;
}
.back-to-top:hover {
background: #5ec6ca;
color: #fff;
27

}
.back-to-top.active {
visibility: visible;
opacity: 1;
}

/*--------------------------------------------------------------
# Disable aos animation delay on mobile devices
--------------------------------------------------------------*/
@media screen and (max-width: 768px) {
[data-aos-delay] {
transition-delay: 0 !important;
}
}
/*--------------------------------------------------------------
# Top Bar
--------------------------------------------------------------*/
#topbar {
background: #3fbbc0;
color: #fff;
height: 40px;
font-size: 16px;
font-weight: 600;
z-index: 996;
transition: all 0.5s;
}
#topbar.topbar-scrolled {
top: -40px;
}
#topbar i {
padding-right: 6px;
line-height: 0;
}

/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
#header {
background: #fff;
transition: all 0.5s;
z-index: 997;
padding: 20px 0;
top: 40px;
box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.1);
}
@media (max-width: 992px) {
#header {
padding: 15px 0;
28

}
}
#header.header-scrolled {
top: 0;
}
#header .logo {
font-size: 28px;
margin: 0;
padding: 0;
line-height: 1;
font-weight: 600;
letter-spacing: 0.5px;
text-transform: uppercase;
}
#header .logo a {
color: #555555;
}
#header .logo img {
max-height: 40px;
}

/**
* Appointment Button
*/
.appointment-btn {
margin-left: 25px;
background: #3fbbc0;
color: #fff;
border-radius: 4px;
padding: 8px 25px;
white-space: nowrap;
transition: 0.3s;
font-size: 14px;
display: inline-block;
}
.appointment-btn:hover {
background: #65c9cd;
color: #fff;
}
@media (max-width: 768px) {
.appointment-btn {
margin: 0 15px 0 0;
padding: 6px 15px;
}
}

/*--------------------------------------------------------------
# Navigation Menu
29

--------------------------------------------------------------*/
/**
* Desktop Navigation
*/
.navbar {
padding: 0;
}
.navbar ul {
margin: 0;
padding: 0;
display: flex;
list-style: none;
align-items: center;
}
.navbar li {
position: relative;
}
.navbar a, .navbar a:focus {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 0 10px 30px;
font-family: "Roboto", sans-serif;
font-size: 13px;
color: #626262;
white-space: nowrap;
transition: 0.3s;
text-transform: uppercase;
font-weight: 500;
}
.navbar a i, .navbar a:focus i {
font-size: 12px;
line-height: 0;
margin-left: 5px;
}
.navbar a:hover, .navbar .active, .navbar .active:focus, .navbar li:hover > a
{
color: #3fbbc0;
}
.navbar .dropdown ul {
display: block;
position: absolute;
left: 14px;
top: calc(100% + 30px);
margin: 0;
padding: 10px 0;
z-index: 99;
opacity: 0;
30

visibility: hidden;
background: #fff;
box-shadow: 0px 0px 30px rgba(127, 137, 161, 0.25);
transition: 0.3s;
border-radius: 4px;
}
.navbar .dropdown ul li {
min-width: 200px;
}
.navbar .dropdown ul a {
padding: 10px 20px;
text-transform: none;
}
.navbar .dropdown ul a i {
font-size: 12px;
}
.navbar .dropdown ul a:hover, .navbar .dropdown ul .active:hover, .navbar
.dropdown ul li:hover > a {
color: #3fbbc0;
}
.navbar .dropdown:hover > ul {
opacity: 1;
top: 100%;
visibility: visible;
}
.navbar .dropdown .dropdown ul {
top: 0;
left: calc(100% - 30px);
visibility: hidden;
}
.navbar .dropdown .dropdown:hover > ul {
opacity: 1;
top: 0;
left: 100%;
visibility: visible;
}
@media (max-width: 1366px) {
.navbar .dropdown .dropdown ul {
left: -90%;
}
.navbar .dropdown .dropdown:hover > ul {
left: -100%;
}
}

/**
* Mobile Navigation
*/
31

.mobile-nav-toggle {
color: #555555;
font-size: 28px;
cursor: pointer;
display: none;
line-height: 0;
transition: 0.5s;
}
.mobile-nav-toggle.bi-x {
color: #fff;
}

@media (max-width: 991px) {


.mobile-nav-toggle {
display: block;
}

.navbar ul {
display: none;
}
}
.navbar-mobile {
position: fixed;
overflow: hidden;
top: 0;
right: 0;
left: 0;
bottom: 0;
background: rgba(60, 60, 60, 0.9);
transition: 0.3s;
z-index: 999;
}
.navbar-mobile .mobile-nav-toggle {
position: absolute;
top: 15px;
right: 15px;
}
.navbar-mobile ul {
display: block;
position: absolute;
top: 55px;
right: 15px;
bottom: 15px;
left: 15px;
padding: 10px 0;
border-radius: 8px;
background-color: #fff;
overflow-y: auto;
32

transition: 0.3s;
}
.navbar-mobile a, .navbar-mobile a:focus {
padding: 10px 20px;
font-size: 15px;
color: #555555;
}
.navbar-mobile a:hover, .navbar-mobile .active, .navbar-mobile li:hover > a {
color: #3fbbc0;
}
.navbar-mobile .dropdown ul {
position: static;
display: none;
margin: 10px 20px;
padding: 10px 0;
z-index: 99;
opacity: 1;
visibility: visible;
background: #fff;
box-shadow: 0px 0px 30px rgba(127, 137, 161, 0.25);
}
.navbar-mobile .dropdown ul li {
min-width: 200px;
}
.navbar-mobile .dropdown ul a {
padding: 10px 20px;
}
.navbar-mobile .dropdown ul a i {
font-size: 12px;
}
.navbar-mobile .dropdown ul a:hover, .navbar-mobile .dropdown ul
.active:hover, .navbar-mobile .dropdown ul li:hover > a {
color: #3fbbc0;
}
.navbar-mobile .dropdown > .dropdown-active {
display: block;
}

/*--------------------------------------------------------------
# Hero Section
--------------------------------------------------------------*/
#hero {
width: 100%;
height: 100vh;
background-color: rgba(60, 60, 60, 0.8);
overflow: hidden;
position: relative;
}
33

#hero .carousel, #hero .carousel-inner, #hero .carousel-item, #hero .carousel-


item::before {
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
}
#hero .carousel-item {
background-size: cover;
background-position: center;
background-repeat: no-repeat;
display: flex;
justify-content: center;
align-items: flex-end;
}
#hero .container {
text-align: center;
background: rgba(255, 255, 255, 0.9);
padding-top: 30px;
padding-bottom: 30px;
margin-bottom: 50px;
border-top: 4px solid #3fbbc0;
}
@media (max-width: 1200px) {
#hero .container {
margin-left: 50px;
margin-right: 50px;
}
}
#hero h2 {
color: #2f2f2f;
margin-bottom: 20px;
font-size: 36px;
font-weight: 700;
}
#hero p {
margin: 0 auto 30px auto;
color: #555555;
}
#hero .carousel-inner .carousel-item {
transition-property: opacity;
background-position: center top;
}
#hero .carousel-inner .carousel-item,
#hero .carousel-inner .active.carousel-item-start,
#hero .carousel-inner .active.carousel-item-end {
opacity: 0;
34

}
#hero .carousel-inner .active,
#hero .carousel-inner .carousel-item-next.carousel-item-start,
#hero .carousel-inner .carousel-item-prev.carousel-item-end {
opacity: 1;
transition: 0.5s;
}
#hero .carousel-inner .carousel-item-next,
#hero .carousel-inner .carousel-item-prev,
#hero .carousel-inner .active.carousel-item-start,
#hero .carousel-inner .active.carousel-item-end {
left: 0;
transform: translate3d(0, 0, 0);
}
#hero .carousel-control-next-icon, #hero .carousel-control-prev-icon {
background: none;
font-size: 30px;
line-height: 0;
width: auto;
height: auto;
background: rgba(63, 187, 192, 0.8);
border-radius: 50px;
transition: 0.3s;
color: rgba(255, 255, 255, 0.5);
width: 54px;
height: 54px;
display: flex;
align-items: center;
justify-content: center;
}
#hero .carousel-control-next-icon:hover, #hero .carousel-control-prev-
icon:hover {
background: #3fbbc0;
color: rgba(255, 255, 255, 0.8);
}
#hero .carousel-indicators li {
cursor: pointer;
background: #fff;
overflow: hidden;
border: 0;
width: 12px;
height: 12px;
border-radius: 50px;
opacity: 0.6;
transition: 0.3s;
}
#hero .carousel-indicators li.active {
opacity: 1;
35

background: #3fbbc0;
}
#hero .btn-get-started {
font-family: "Roboto", sans-serif;
font-weight: 500;
font-size: 14px;
letter-spacing: 1px;
display: inline-block;
padding: 14px 32px;
border-radius: 4px;
transition: 0.5s;
line-height: 1;
color: #fff;
background: #3fbbc0;
}
#hero .btn-get-started:hover {
background: #65c9cd;
}
@media (max-width: 992px) {
#hero {
height: 100vh;
}
#hero .container {
margin-top: 100px;
}
}
@media (max-width: 768px) {
#hero h2 {
font-size: 28px;
}
}
@media (min-width: 1024px) {
#hero .carousel-control-prev, #hero .carousel-control-next {
width: 5%;
}
}
@media (max-height: 500px) {
#hero {
height: 160vh;
}
}

/*--------------------------------------------------------------
# Sections General
--------------------------------------------------------------*/
section {
padding: 60px 0;
overflow: hidden;
36

.section-bg {
background-color: #f7fcfc;
}

.section-title {
text-align: center;
padding-bottom: 30px;
}
.section-title h2 {
font-size: 32px;
font-weight: bold;
text-transform: uppercase;
margin-bottom: 20px;
padding-bottom: 20px;
position: relative;
}
.section-title h2::after {
content: "";
position: absolute;
display: block;
width: 50px;
height: 3px;
background: #3fbbc0;
bottom: 0;
left: calc(50% - 25px);
}
.section-title p {
margin-bottom: 0;
}

/*--------------------------------------------------------------
# Breadcrumbs
--------------------------------------------------------------*/
.breadcrumbs {
padding: 20px 0;
background-color: #ecf8f9;
min-height: 40px;
margin-top: 120px;
}
@media (max-width: 992px) {
.breadcrumbs {
margin-top: 70px;
}
}
.breadcrumbs h2 {
font-size: 24px;
37

font-weight: 300;
margin: 0;
}
@media (max-width: 992px) {
.breadcrumbs h2 {
margin: 0 0 10px 0;
}
}
.breadcrumbs ol {
display: flex;
flex-wrap: wrap;
list-style: none;
padding: 0;
margin: 0;
font-size: 14px;
}
.breadcrumbs ol li + li {
padding-left: 10px;
}
.breadcrumbs ol li + li::before {
display: inline-block;
padding-right: 10px;
color: #6c757d;
content: "/";
}
@media (max-width: 768px) {
.breadcrumbs .d-flex {
display: block !important;
}
.breadcrumbs ol {
display: block;
}
.breadcrumbs ol li {
display: inline-block;
}
}

/*--------------------------------------------------------------
# Featured Services
--------------------------------------------------------------*/
.featured-services .icon-box {
padding: 30px;
position: relative;
overflow: hidden;
background: #fff;
box-shadow: 0 0 29px 0 rgba(68, 88, 144, 0.12);
transition: all 0.3s ease-in-out;
border-radius: 8px;
38

z-index: 1;
}
.featured-services .icon-box::before {
content: "";
position: absolute;
background: #d9f1f2;
right: 0;
left: 0;
bottom: 0;
top: 100%;
transition: all 0.3s;
z-index: -1;
}
.featured-services .icon-box:hover::before {
background: #3fbbc0;
top: 0;
border-radius: 0px;
}
.featured-services .icon {
margin-bottom: 15px;
}
.featured-services .icon i {
font-size: 48px;
line-height: 1;
color: #3fbbc0;
transition: all 0.3s ease-in-out;
}
.featured-services .title {
font-weight: 700;
margin-bottom: 15px;
font-size: 18px;
}
.featured-services .title a {
color: #111;
}
.featured-services .description {
font-size: 15px;
line-height: 28px;
margin-bottom: 0;
}
.featured-services .icon-box:hover .title a, .featured-services .icon-
box:hover .description {
color: #fff;
}
.featured-services .icon-box:hover .icon i {
color: #fff;
}
39

/*--------------------------------------------------------------
# Cta
--------------------------------------------------------------*/
.cta {
background: #3fbbc0;
color: #fff;
background-size: cover;
padding: 60px 0;
}
.cta h3 {
font-size: 28px;
font-weight: 700;
}
.cta .cta-btn {
font-family: "Roboto", sans-serif;
font-weight: 500;
font-size: 16px;
letter-spacing: 1px;
display: inline-block;
padding: 10px 35px;
border-radius: 25px;
transition: 0.5s;
margin-top: 10px;
border: 2px solid #fff;
color: #fff;
}
.cta .cta-btn:hover {
background: #fff;
color: #3fbbc0;
}

/*--------------------------------------------------------------
# About Us
--------------------------------------------------------------*/
.about .content h3 {
font-weight: 600;
font-size: 26px;
}
.about .content ul {
list-style: none;
padding: 0;
}
.about .content ul li {
padding-bottom: 10px;
}
.about .content ul i {
font-size: 20px;
padding-right: 4px;
40

color: #3fbbc0;
}
.about .content p:last-child {
margin-bottom: 0;
}

/*--------------------------------------------------------------
# Counts
--------------------------------------------------------------*/
.counts {
padding-bottom: 30px;
}
.counts .count-box {
box-shadow: -10px -5px 40px 0 rgba(0, 0, 0, 0.1);
padding: 30px;
width: 100%;
}
.counts .count-box i {
display: block;
font-size: 30px;
color: #3fbbc0;
float: left;
}
.counts .count-box span {
font-size: 42px;
line-height: 24px;
display: block;
font-weight: 700;
color: #555555;
margin-left: 50px;
}
.counts .count-box p {
padding: 30px 0 0 0;
margin: 0;
font-family: "Roboto", sans-serif;
font-size: 14px;
}
.counts .count-box a {
font-weight: 600;
display: block;
margin-top: 20px;
color: #7b7b7b;
font-size: 15px;
font-family: "Poppins", sans-serif;
transition: ease-in-out 0.3s;
}
.counts .count-box a:hover {
color: #3fbbc0;
41

/*--------------------------------------------------------------
# Features
--------------------------------------------------------------*/
.features .icon-box h4 {
font-size: 20px;
font-weight: 700;
margin: 5px 0 10px 60px;
}
.features .icon-box i {
font-size: 48px;
float: left;
color: #3fbbc0;
}
.features .icon-box p {
font-size: 15px;
color: #848484;
margin-left: 60px;
}
.features .image {
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
min-height: 400px;
}

/*--------------------------------------------------------------
# Services
--------------------------------------------------------------*/
.services .icon-box {
margin-bottom: 20px;
text-align: center;
}
.services .icon {
display: inline-flex;
justify-content: center;
align-items: center;
width: 80px;
height: 80px;
margin-bottom: 20px;
background: #fff;
border-radius: 50%;
transition: 0.5s;
color: #3fbbc0;
overflow: hidden;
box-shadow: 0px 0 25px rgba(0, 0, 0, 0.15);
}
42

.services .icon i {
font-size: 36px;
line-height: 0;
}
.services .icon-box:hover .icon {
box-shadow: 0px 0 25px rgba(63, 187, 192, 0.3);
}
.services .title {
font-weight: 600;
margin-bottom: 15px;
font-size: 18px;
position: relative;
padding-bottom: 15px;
}
.services .title a {
color: #444444;
transition: 0.3s;
}
.services .title a:hover {
color: #3fbbc0;
}
.services .title::after {
content: "";
position: absolute;
display: block;
width: 50px;
height: 2px;
background: #3fbbc0;
bottom: 0;
left: calc(50% - 25px);
}
.services .description {
line-height: 24px;
font-size: 14px;
}

/*--------------------------------------------------------------
# Appointments
--------------------------------------------------------------*/
.appointment .php-email-form {
width: 100%;
}
.appointment .php-email-form .form-group {
padding-bottom: 8px;
}
.appointment .php-email-form .validate {
display: none;
color: red;
43

margin: 0 0 15px 0;
font-weight: 400;
font-size: 13px;
}
.appointment .php-email-form .error-message {
display: none;
color: #fff;
background: #ed3c0d;
text-align: left;
padding: 15px;
font-weight: 600;
}
.appointment .php-email-form .error-message br + br {
margin-top: 25px;
}
.appointment .php-email-form .sent-message {
display: none;
color: #fff;
background: #18d26e;
text-align: center;
padding: 15px;
font-weight: 600;
}
.appointment .php-email-form .loading {
display: none;
background: #fff;
text-align: center;
padding: 15px;
}
.appointment .php-email-form .loading:before {
content: "";
display: inline-block;
border-radius: 50%;
width: 24px;
height: 24px;
margin: 0 10px -6px 0;
border: 3px solid #18d26e;
border-top-color: #eee;
-webkit-animation: animate-loading 1s linear infinite;
animation: animate-loading 1s linear infinite;
}
.appointment .php-email-form input, .appointment .php-email-form textarea,
.appointment .php-email-form select {
border-radius: 0;
box-shadow: none;
font-size: 14px;
padding: 10px !important;
}
44

.appointment .php-email-form input:focus, .appointment .php-email-form


textarea:focus, .appointment .php-email-form select:focus {
border-color: #3fbbc0;
}
.appointment .php-email-form input, .appointment .php-email-form select {
height: 44px;
}
.appointment .php-email-form textarea {
padding: 10px 12px;
}
.appointment .php-email-form button[type=submit] {
background: #3fbbc0;
border: 0;
padding: 10px 35px;
color: #fff;
transition: 0.4s;
border-radius: 50px;
}
.appointment .php-email-form button[type=submit]:hover {
background: #52c2c6;
}

/*--------------------------------------------------------------
# Departments
--------------------------------------------------------------*/
.departments .nav-tabs {
border: 0;
}
.departments .nav-link {
border: 0;
padding: 20px;
color: #555555;
border-radius: 0;
border-left: 5px solid #fff;
cursor: pointer;
}
.departments .nav-link h4 {
font-size: 18px;
font-weight: 600;
transition: 0.3s;
}
.departments .nav-link p {
font-size: 14px;
margin-bottom: 0;
}
.departments .nav-link:hover h4 {
color: #3fbbc0;
}
45

.departments .nav-link.active {
background: #f7fcfc;
border-color: #3fbbc0;
}
.departments .nav-link.active h4 {
color: #3fbbc0;
}
.departments .tab-pane.active {
-webkit-animation: slide-down 0.5s ease-out;
animation: slide-down 0.5s ease-out;
}
.departments .tab-pane img {
float: left;
max-width: 300px;
padding: 0 15px 15px 0;
}
@media (max-width: 768px) {
.departments .tab-pane img {
float: none;
padding: 0 0 15px 0;
max-width: 100%;
}
}
.departments .tab-pane h3 {
font-size: 26px;
font-weight: 600;
margin-bottom: 20px;
color: #3fbbc0;
}
.departments .tab-pane p {
color: #777777;
}
.departments .tab-pane p:last-child {
margin-bottom: 0;
}
@-webkit-keyframes slide-down {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes slide-down {
0% {
opacity: 0;
}
100% {
46

opacity: 1;
}
}

/*--------------------------------------------------------------
# Testimonials
--------------------------------------------------------------*/
.testimonials .testimonials-carousel, .testimonials .testimonials-slider {
overflow: hidden;
}
.testimonials .testimonial-item {
box-sizing: content-box;
min-height: 320px;
}
.testimonials .testimonial-item .testimonial-img {
width: 90px;
border-radius: 50%;
margin: -40px 0 0 40px;
position: relative;
z-index: 2;
border: 6px solid #fff;
}
.testimonials .testimonial-item h3 {
font-size: 18px;
font-weight: bold;
margin: 10px 0 5px 45px;
color: #111;
}
.testimonials .testimonial-item h4 {
font-size: 14px;
color: #999;
margin: 0 0 0 45px;
}
.testimonials .testimonial-item .quote-icon-left, .testimonials .testimonial-
item .quote-icon-right {
color: #b2e4e6;
font-size: 26px;
}
.testimonials .testimonial-item .quote-icon-left {
display: inline-block;
left: -5px;
position: relative;
}
.testimonials .testimonial-item .quote-icon-right {
display: inline-block;
right: -5px;
position: relative;
top: 10px;
47

}
.testimonials .testimonial-item p {
font-style: italic;
margin: 0 15px 0 15px;
padding: 20px 20px 60px 20px;
background: #f0fafa;
position: relative;
border-radius: 6px;
position: relative;
z-index: 1;
}
.testimonials .swiper-pagination {
margin-top: 20px;
position: relative;
}
.testimonials .swiper-pagination .swiper-pagination-bullet {
width: 12px;
height: 12px;
background-color: #fff;
opacity: 1;
border: 1px solid #3fbbc0;
}
.testimonials .swiper-pagination .swiper-pagination-bullet-active {
background-color: #3fbbc0;
}

/*--------------------------------------------------------------
# Doctors
--------------------------------------------------------------*/
.doctors .member {
margin-bottom: 20px;
overflow: hidden;
text-align: center;
border-radius: 4px;
background: #fff;
box-shadow: 0px 2px 15px rgba(63, 187, 192, 0.1);
}
.doctors .member .member-img {
position: relative;
overflow: hidden;
}
.doctors .member .social {
position: absolute;
left: 0;
bottom: 0;
right: 0;
height: 40px;
opacity: 0;
48

transition: ease-in-out 0.3s;


background: rgba(255, 255, 255, 0.85);
display: flex;
align-items: center;
justify-content: center;
}
.doctors .member .social a {
transition: color 0.3s;
color: #555555;
margin: 0 10px;
display: inline-flex;
align-items: center;
justify-content: center;
}
.doctors .member .social a i {
line-height: 0;
}
.doctors .member .social a:hover {
color: #3fbbc0;
}
.doctors .member .social i {
font-size: 18px;
margin: 0 2px;
}
.doctors .member .member-info {
padding: 25px 15px;
}
.doctors .member .member-info h4 {
font-weight: 700;
margin-bottom: 5px;
font-size: 18px;
color: #555555;
}
.doctors .member .member-info span {
display: block;
font-size: 13px;
font-weight: 400;
color: #aaaaaa;
}
.doctors .member .member-info p {
font-style: italic;
font-size: 14px;
line-height: 26px;
color: #777777;
}
.doctors .member:hover .social {
opacity: 1;
}
49

/*--------------------------------------------------------------
# Gallery
--------------------------------------------------------------*/
.gallery {
overflow: hidden;
}
.gallery .swiper-pagination {
margin-top: 20px;
position: relative;
}
.gallery .swiper-pagination .swiper-pagination-bullet {
width: 12px;
height: 12px;
background-color: #fff;
opacity: 1;
border: 1px solid #3fbbc0;
}
.gallery .swiper-pagination .swiper-pagination-bullet-active {
background-color: #3fbbc0;
}
.gallery .swiper-slide-active {
text-align: center;
}
@media (min-width: 992px) {
.gallery .swiper-wrapper {
padding: 40px 0;
}
.gallery .swiper-slide-active {
border: 6px solid #3fbbc0;
padding: 4px;
background: #fff;
z-index: 1;
transform: scale(1.2);
margin-top: 10px;
}
}

/*--------------------------------------------------------------
# Pricing
--------------------------------------------------------------*/
.pricing .box {
padding: 20px;
background: #fff;
text-align: center;
box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.12);
border-radius: 4px;
position: relative;
50

overflow: hidden;
}
.pricing h3 {
font-weight: 400;
margin: -20px -20px 20px -20px;
padding: 20px 15px;
font-size: 16px;
font-weight: 600;
color: #777777;
background: #f8f8f8;
}
.pricing h4 {
font-size: 36px;
color: #3fbbc0;
font-weight: 600;
font-family: "Poppins", sans-serif;
margin-bottom: 20px;
}
.pricing h4 sup {
font-size: 20px;
top: -15px;
left: -3px;
}
.pricing h4 span {
color: #bababa;
font-size: 16px;
font-weight: 300;
}
.pricing ul {
padding: 0;
list-style: none;
color: #444444;
text-align: center;
line-height: 20px;
font-size: 14px;
}
.pricing ul li {
padding-bottom: 16px;
}
.pricing ul i {
color: #3fbbc0;
font-size: 18px;
padding-right: 4px;
}
.pricing ul .na {
color: #ccc;
text-decoration: line-through;
}
51

.pricing .btn-wrap {
margin: 20px -20px -20px -20px;
padding: 20px 15px;
background: #f8f8f8;
text-align: center;
}
.pricing .btn-buy {
background: #3fbbc0;
display: inline-block;
padding: 8px 35px 10px 35px;
border-radius: 4px;
color: #fff;
transition: none;
font-size: 14px;
font-weight: 400;
font-family: "Roboto", sans-serif;
font-weight: 600;
transition: 0.3s;
}
.pricing .btn-buy:hover {
background: #65c9cd;
}
.pricing .featured h3 {
color: #fff;
background: #3fbbc0;
}
.pricing .advanced {
width: 200px;
position: absolute;
top: 18px;
right: -68px;
transform: rotate(45deg);
z-index: 1;
font-size: 14px;
padding: 1px 0 3px 0;
background: #3fbbc0;
color: #fff;
}

/*--------------------------------------------------------------
# Frequently Asked Questioins
--------------------------------------------------------------*/
.faq {
padding: 60px 0;
}
.faq .faq-list {
padding: 0;
list-style: none;
52

}
.faq .faq-list li {
border-bottom: 1px solid #d9f1f2;
margin-bottom: 20px;
padding-bottom: 20px;
}
.faq .faq-list .question {
display: block;
position: relative;
font-family: #3fbbc0;
font-size: 18px;
line-height: 24px;
font-weight: 400;
padding-left: 25px;
cursor: pointer;
color: #32969a;
transition: 0.3s;
}
.faq .faq-list i {
font-size: 16px;
position: absolute;
left: 0;
top: -2px;
}
.faq .faq-list p {
margin-bottom: 0;
padding: 10px 0 0 25px;
}
.faq .faq-list .icon-show {
display: none;
}
.faq .faq-list .collapsed {
color: black;
}
.faq .faq-list .collapsed:hover {
color: #3fbbc0;
}
.faq .faq-list .collapsed .icon-show {
display: inline-block;
transition: 0.6s;
}
.faq .faq-list .collapsed .icon-close {
display: none;
transition: 0.6s;
}

/*--------------------------------------------------------------
# Contact
53

--------------------------------------------------------------*/
.contact .info-box {
color: #444444;
text-align: center;
box-shadow: 0 0 20px rgba(214, 215, 216, 0.5);
padding: 20px 0 30px 0;
}
.contact .info-box i {
font-size: 32px;
color: #3fbbc0;
border-radius: 50%;
padding: 8px;
border: 2px dotted #c5ebec;
}
.contact .info-box h3 {
font-size: 20px;
color: #777777;
font-weight: 700;
margin: 10px 0;
}
.contact .info-box p {
padding: 0;
line-height: 24px;
font-size: 14px;
margin-bottom: 0;
}
.contact .php-email-form {
box-shadow: 0 0 20px rgba(214, 215, 216, 0.5);
padding: 30px;
}
.contact .php-email-form .error-message {
display: none;
color: #fff;
background: #ed3c0d;
text-align: left;
padding: 15px;
font-weight: 600;
}
.contact .php-email-form .error-message br + br {
margin-top: 25px;
}
.contact .php-email-form .sent-message {
display: none;
color: #fff;
background: #18d26e;
text-align: center;
padding: 15px;
font-weight: 600;
54

}
.contact .php-email-form .loading {
display: none;
background: #fff;
text-align: center;
padding: 15px;
}
.contact .php-email-form .loading:before {
content: "";
display: inline-block;
border-radius: 50%;
width: 24px;
height: 24px;
margin: 0 10px -6px 0;
border: 3px solid #18d26e;
border-top-color: #eee;
-webkit-animation: animate-loading 1s linear infinite;
animation: animate-loading 1s linear infinite;
}
.contact .php-email-form input, .contact .php-email-form textarea {
border-radius: 4px;
box-shadow: none;
font-size: 14px;
}
.contact .php-email-form input:focus, .contact .php-email-form textarea:focus
{
border-color: #3fbbc0;
}
.contact .php-email-form input {
padding: 10px 15px;
}
.contact .php-email-form textarea {
padding: 12px 15px;
}
.contact .php-email-form button[type=submit] {
background: #3fbbc0;
border: 0;
padding: 10px 30px;
color: #fff;
transition: 0.4s;
border-radius: 4px;
}
.contact .php-email-form button[type=submit]:hover {
background: #65c9cd;
}
@-webkit-keyframes animate-loading {
0% {
transform: rotate(0deg);
55

}
100% {
transform: rotate(360deg);
}
}
@keyframes animate-loading {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
#footer {
background: #eeeeee;
padding: 0 0 30px 0;
color: #555555;
font-size: 14px;
}
#footer .footer-top {
background: #f6f6f6;
padding: 60px 0 30px 0;
}
#footer .footer-top .footer-info {
margin-bottom: 30px;
}
#footer .footer-top .footer-info h3 {
font-size: 24px;
margin: 0 0 20px 0;
padding: 2px 0 2px 0;
line-height: 1;
font-weight: 700;
}
#footer .footer-top .footer-info p {
font-size: 14px;
line-height: 24px;
margin-bottom: 0;
font-family: "Roboto", sans-serif;
}
#footer .footer-top .social-links a {
font-size: 18px;
display: inline-block;
background: #3fbbc0;
color: #fff;
56

line-height: 1;
padding: 8px 0;
margin-right: 4px;
border-radius: 4px;
text-align: center;
width: 36px;
height: 36px;
transition: 0.3s;
}
#footer .footer-top .social-links a:hover {
background: #65c9cd;
text-decoration: none;
}
#footer .footer-top h4 {
font-size: 16px;
font-weight: 600;
position: relative;
padding-bottom: 12px;
}
#footer .footer-top .footer-links {
margin-bottom: 30px;
}
#footer .footer-top .footer-links ul {
list-style: none;
padding: 0;
margin: 0;
}
#footer .footer-top .footer-links ul i {
padding-right: 2px;
color: #3fbbc0;
font-size: 18px;
line-height: 1;
}
#footer .footer-top .footer-links ul li {
padding: 10px 0;
display: flex;
align-items: center;
}
#footer .footer-top .footer-links ul li:first-child {
padding-top: 0;
}
#footer .footer-top .footer-links ul a {
color: #555555;
transition: 0.3s;
display: inline-block;
line-height: 1;
}
#footer .footer-top .footer-links ul a:hover {
57

color: #3fbbc0;
}
#footer .footer-top .footer-newsletter form {
margin-top: 30px;
background: #fff;
padding: 6px 10px;
position: relative;
border: 1px solid #d5d5d5;
border-radius: 4px;
}
#footer .footer-top .footer-newsletter form input[type=email] {
border: 0;
padding: 4px;
width: calc(100% - 110px);
}
#footer .footer-top .footer-newsletter form input[type=submit] {
position: absolute;
top: -1px;
right: -1px;
bottom: -1px;
border: 0;
background: none;
font-size: 16px;
padding: 0 20px;
background: #3fbbc0;
color: #fff;
transition: 0.3s;
border-radius: 0 4px 4px 0;
}
#footer .footer-top .footer-newsletter form input[type=submit]:hover {
background: #65c9cd;
}
#footer .copyright {
text-align: center;
padding-top: 30px;
}
#footer .credits {
padding-top: 10px;
text-align: center;
font-size: 13px;
}

 JavaScript: Enhances interactivity, such as form validation and dynamic content


loading.

7.3 Backend Integration


58

Overview: Python scripts are used to interact with the MySQL database, handling data
retrieval, insertion, updating, and deletion based on user actions from the frontend.

Key Functionalities:

 Data Retrieval: Fetching patient details, hospital data, and user information from the
database.
 Data Insertion: Adding new patient bookings and updating hospital information.
 Data Validation: Ensuring input data meets specified criteria (e.g., valid email
format, required fields).

User Inputs:

 Backend processes user inputs received from HTML forms using HTTP requests
(POST/GET).
 Validates and sanitizes user inputs to prevent SQL injection and ensure data integrity.

Security Measures:

 Data Validation: Input fields are validated on the frontend using JavaScript and re-
validated on the backend to prevent malicious data entry.
 Sanitization: User inputs are sanitized to prevent SQL injection attacks, ensuring
database security.

This integrated approach ensures a secure, responsive, and efficient COVID-19 Hospital
Management System, capable of managing patient data and hospital resources effectively.

8. Data Insertion and Querying

8.1 Data Insertion

Examples of Data Insertion:

1. Inserting Data into bookingpatient Table:

sql
Copy code
INSERT INTO bookingpatient (srfid, bedtype, hcode, spo2, pname,
pphone, paddress)
VALUES ('SRF001', 'normal', 'HOS001', 95, 'John Doe', '1234567890',
'123 Main St, City');

This query inserts a new patient record into the bookingpatient table with specified
details such as SRFID, bed type, hospital code, SpO2 level, patient name, phone
number, and address.

2. Inserting Data into hospitaldata Table:

sql
59

Copy code
INSERT INTO hospitaldata (hcode, hname, normalbed, hicubed, icubed,
vbed)
VALUES ('HOS001', 'City Hospital', 100, 20, 10, 5);

This query inserts hospital data into the hospitaldata table, including hospital code,
name, and bed counts for different types of beds.

3. Inserting Data into hospitaluser Table:

sql
Copy code
INSERT INTO hospitaluser (hcode, email, password)
VALUES ('HOS001', '[email protected]', 'hashed_password');

This example inserts a new hospital user record with email and hashed password.

Challenges and Special Handling:

 Data Validation: Ensuring that all required fields are provided and validating data
formats (e.g., phone number format) before insertion.
 Concurrency Control: Handling concurrent inserts to avoid race conditions and
maintain data consistency.
 Security Considerations: Properly hashing passwords and sanitizing inputs to
prevent SQL injection attacks.

8.2 Sample Queries

Sample Queries:

1. Selecting Patient Details:

sql
Copy code
SELECT pname, pphone, srfid, bedtype, paddress
FROM bookingpatient
WHERE hcode = 'HOS001';

Purpose: Retrieve details of patients admitted to hospital with code 'HOS001'. Output
includes patient name, phone number, SRFID, bed type, and address.

2. Fetching Hospital Data:

sql
Copy code
SELECT hname, normalbed, hicubed, icubed, vbed
FROM hospitaldata;

Purpose: Retrieve overall hospital data including name and bed counts for different
types (normal, high-intensity, intensive, and ventilator).

3. Complex Query - Joining Tables:


60

sql
Copy code
SELECT b.pname, b.pphone, h.hname
FROM bookingpatient b
INNER JOIN hospitaldata h ON b.hcode = h.hcode
WHERE b.bedtype = 'icu';

Purpose: Join bookingpatient and hospitaldata tables to find patients in ICU


beds. Output includes patient name, phone number, and hospital name.

Explanation of Queries:

 Query 1: Retrieves patient details based on hospital code, useful for managing patient
admissions and tracking.
 Query 2: Provides an overview of hospital resources, aiding in resource allocation
and planning.
 Query 3: Demonstrates a join operation to link patient records with hospital details,
facilitating comprehensive reporting and management.

Complex Queries:

 Subquery Example - Finding Available Beds:

sql
Copy code
SELECT h.hname, h.normalbed - COUNT(b.id) AS available_normal_beds
FROM hospitaldata h
LEFT JOIN bookingpatient b ON h.hcode = b.hcode AND b.bedtype =
'normal'
GROUP BY h.hname;

Purpose: Calculates available normal beds by subtracting booked beds from total
normal beds per hospital, helping in real-time bed availability monitoring.

These queries and examples illustrate the versatility and functionality of the database in
managing hospital operations efficiently, from patient admissions to resource management.
Properly crafted queries ensure accurate data retrieval and manipulation, crucial for decision-
making and operational efficiency in healthcare settings.

9. Triggers and Stored Procedures

9.1 Triggers

Triggers are special types of stored procedures that automatically execute or fire when certain
events occur. They are used to enforce data integrity, maintain audit trails, and synchronize
related tables.

Triggers Created in the Database:

 update_bed_count_trigger
61

Purpose: The primary purpose of the update_bed_count_trigger is to automatically


update the number of available beds in the hospital whenever a new patient is admitted or an
existing patient is discharged. This ensures that the bed availability information is always
accurate and up-to-date.

Example of Usage: Here is an example of the update_bed_count_trigger:

sql
Copy code
-- Trigger to update available beds when a new patient is admitted
CREATE TRIGGER update_bed_count_after_insert
AFTER INSERT ON Patients
FOR EACH ROW
BEGIN
UPDATE Hospitals
SET available_beds = available_beds - 1
WHERE hospital_id = NEW.hospital_id;
END;

-- Trigger to update available beds when a patient is discharged


CREATE TRIGGER update_bed_count_after_delete
AFTER DELETE ON Patients
FOR EACH ROW
BEGIN
UPDATE Hospitals
SET available_beds = available_beds + 1
WHERE hospital_id = OLD.hospital_id;
END;

In the above triggers:

 update_bed_count_after_insert decreases the available bed count by 1 when a


new patient is inserted into the Patients table.
 update_bed_count_after_delete increases the available bed count by 1 when a
patient record is deleted from the Patients table.

9.2 Stored Procedures

Stored procedures are a set of SQL statements that can be executed as a single unit. They help
in reusing code, encapsulating business logic, and improving performance.

Stored Procedures in the System:

 admit_patient
 discharge_patient

Purpose: The stored procedures admit_patient and discharge_patient manage the


admission and discharge processes of patients, respectively. These procedures ensure that all
necessary actions, such as updating patient records and modifying bed availability, are
performed consistently and efficiently.

Example of Usage:

1. admit_patient Procedure:
62

sql
Copy code
CREATE PROCEDURE admit_patient(
IN p_name VARCHAR(255),
IN p_age INT,
IN p_gender VARCHAR(10),
IN p_hospital_id INT,
IN p_bed_number INT,
IN p_admission_date DATE
)
BEGIN
INSERT INTO Patients (name, age, gender, hospital_id, bed_number,
admission_date)
VALUES (p_name, p_age, p_gender, p_hospital_id, p_bed_number,
p_admission_date);

UPDATE Hospitals
SET available_beds = available_beds - 1
WHERE hospital_id = p_hospital_id;
END;

This procedure admits a new patient by inserting their details into the Patients table and
updating the available bed count in the corresponding hospital.

2. discharge_patient Procedure:

sql
Copy code
CREATE PROCEDURE discharge_patient(
IN p_patient_id INT,
IN p_discharge_date DATE
)
BEGIN
UPDATE Patients
SET discharge_date = p_discharge_date
WHERE patient_id = p_patient_id;

UPDATE Hospitals
SET available_beds = available_beds + 1
WHERE hospital_id = (SELECT hospital_id FROM Patients WHERE patient_id
= p_patient_id);
END;

This procedure discharges a patient by updating their discharge date in the Patients table
and adjusting the available bed count in the corresponding hospital.

Examples of How Triggers and Stored Procedures are Used in the System:

 When a new patient is admitted using the admit_patient procedure, the trigger
update_bed_count_after_insert is fired to decrement the available bed count.
 When a patient is discharged using the discharge_patient procedure, the trigger
update_bed_count_after_delete is fired to increment the available bed count.
 These triggers and stored procedures ensure that the hospital's bed availability is
always accurately reflected in the database without requiring manual intervention.

10. Results and Discussion


63

Results

The system was successfully implemented and tested, providing the following results:

 Efficient Bed Management: The system effectively managed hospital beds by


tracking patient admissions, bed types, and availability across multiple hospitals.
 Data Accuracy: Patient details, hospital data, and user information were accurately
stored and retrieved, ensuring data integrity and reliability.
 User Authentication: Secure login and access control mechanisms were
implemented, allowing authorized personnel to interact with the system based on their
roles.

Performance

During testing, several performance metrics were observed:

 Response Time: Database queries, including complex joins and aggregate functions,
performed efficiently, ensuring rapid data retrieval even under load.
 Scalability: The system demonstrated scalability by handling increased data volume
and concurrent user requests without significant degradation in performance.
 Resource Utilization: Monitoring of system resources indicated optimal utilization of
server resources, including CPU and memory, supporting continuous operation.

Challenges

Several challenges were encountered during the development process:

 Database Design Complexity: Designing an efficient database schema that


accommodates various hospital data while ensuring normalization and minimizing
redundancy was challenging but successfully achieved through iterative refinement.
 Security Implementation: Implementing robust security measures, such as
encryption of sensitive data and prevention of SQL injection, required careful
consideration and testing to ensure comprehensive protection.
 Integration and Testing: Integrating frontend and backend components seamlessly
and conducting thorough testing across different environments posed challenges but
were managed through rigorous testing protocols and version control.

User Feedback

Feedback from stakeholders and users highlighted the following:

 User-Friendly Interface: Positive feedback was received regarding the intuitive user
interface, facilitating ease of use and navigation.
 Enhanced Operational Efficiency: Users reported improved efficiency in managing
hospital resources and patient admissions, attributed to real-time data availability and
comprehensive reporting features.
 Suggestions for Enhancement: Stakeholders provided valuable suggestions for
future enhancements, including additional features for analytics and reporting
capabilities, which are planned for future iterations.
64

13. Appendix

Additional Material

1. SQL Script for Database Creation and Population:


o Complete SQL script used to create tables, define relationships, and populate
initial data into the database.

-- phpMyAdmin SQL Dump


-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 30, 2022 at 03:04 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.2.29

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";


START TRANSACTION;
SET time_zone = "+00:00";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;


/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `covid`
--

DELIMITER $$
--
-- Procedures
--
CREATE DEFINER=`root`@`localhost` PROCEDURE `getPatientDetails` (IN `inp`
VARCHAR(50)) NO SQL
SELECT pname,pphone,srfid,bedtype,paddress FROM bookingpatient WHERE
hcode=inp$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `getUsers` () NO SQL


SELECT * FROM user$$

DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `bookingpatient`
65

--

CREATE TABLE `bookingpatient` (


`id` int(11) NOT NULL,
`srfid` varchar(50) NOT NULL,
`bedtype` varchar(50) NOT NULL,
`hcode` varchar(50) NOT NULL,
`spo2` int(11) NOT NULL,
`pname` varchar(50) NOT NULL,
`pphone` varchar(12) NOT NULL,
`paddress` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `hospitaldata`
--

CREATE TABLE `hospitaldata` (


`id` int(11) NOT NULL,
`hcode` varchar(200) NOT NULL,
`hname` varchar(200) NOT NULL,
`normalbed` int(11) NOT NULL,
`hicubed` int(11) NOT NULL,
`icubed` int(11) NOT NULL,
`vbed` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Triggers `hospitaldata`
--
DELIMITER $$
CREATE TRIGGER `Insert` AFTER INSERT ON `hospitaldata` FOR EACH ROW INSERT
INTO trig
VALUES(null,NEW.hcode,NEW.normalbed,NEW.hicubed,NEW.icubed,NEW.vbed,'
INSERTED',NOW())
$$
DELIMITER ;
DELIMITER $$
CREATE TRIGGER `Update` AFTER UPDATE ON `hospitaldata` FOR EACH ROW INSERT
INTO trig
VALUES(null,NEW.hcode,NEW.normalbed,NEW.hicubed,NEW.icubed,NEW.vbed,'
UPDATED',NOW())
$$
DELIMITER ;
DELIMITER $$
66

CREATE TRIGGER `delet` BEFORE DELETE ON `hospitaldata` FOR EACH ROW INSERT
INTO trig
VALUES(null,OLD.hcode,OLD.normalbed,OLD.hicubed,OLD.icubed,OLD.vbed,'
DELETED',NOW())
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `hospitaluser`
--

CREATE TABLE `hospitaluser` (


`id` int(11) NOT NULL,
`hcode` varchar(20) NOT NULL,
`email` varchar(100) NOT NULL,
`password` varchar(1000) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- Table structure for table `test`
--

CREATE TABLE `test` (


`id` int(11) NOT NULL,
`name` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `test`
--

INSERT INTO `test` (`id`, `name`) VALUES


(1, 'anees'),
(2, 'rehman');

-- --------------------------------------------------------

--
-- Table structure for table `trig`
--

CREATE TABLE `trig` (


`id` int(11) NOT NULL,
`hcode` varchar(50) NOT NULL,
67

`normalbed` int(11) NOT NULL,


`hicubed` int(11) NOT NULL,
`icubed` int(11) NOT NULL,
`vbed` int(11) NOT NULL,
`querys` varchar(50) NOT NULL,
`date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `trig`
--

INSERT INTO `trig` (`id`, `hcode`, `normalbed`, `hicubed`, `icubed`,


`vbed`, `querys`, `date`) VALUES
(1, 'BBH01', 50, 9, 2, 1, ' UPDATED', '2021-11-26'),
(2, 'BBH01', 50, 9, 2, 1, ' DELETED', '2021-11-26'),
(3, 'AA1100', 15, 5, 4, 2, ' INSERTED', '2021-11-26'),
(4, 'AA1100', 15, 10, 8, 2, ' UPDATED', '2021-11-26'),
(5, 'AA1100', 15, 10, 7, 2, ' UPDATED', '2021-11-26'),
(6, 'ARK123 ', 12, 55, 22, 22, ' INSERTED', '2022-01-12'),
(7, 'ARK123', 12, 50, 22, 22, ' UPDATED', '2022-01-12'),
(8, 'ABCD123 ', 11, 15, 4, 20, ' INSERTED', '2022-01-12'),
(9, 'ABCD123', 11, 11, 4, 20, ' UPDATED', '2022-01-12'),
(10, 'ARK123', 12, 50, 21, 22, ' UPDATED', '2022-01-12'),
(11, 'MAT123', 40, 4, 4, 1, ' DELETED', '2022-01-30'),
(12, 'AA1100', 15, 10, 7, 2, ' DELETED', '2022-01-30'),
(13, 'ARK123', 12, 50, 21, 22, ' DELETED', '2022-01-30'),
(14, 'ABCD123', 11, 11, 4, 20, ' DELETED', '2022-01-30');

-- --------------------------------------------------------

--
-- Table structure for table `user`
--

CREATE TABLE `user` (


`id` int(11) NOT NULL,
`srfid` varchar(20) NOT NULL,
`email` varchar(100) NOT NULL,
`dob` varchar(1000) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `bookingpatient`
68

--
ALTER TABLE `bookingpatient`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `srfid` (`srfid`(20));

--
-- Indexes for table `hospitaldata`
--
ALTER TABLE `hospitaldata`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `hcode` (`hcode`);

--
-- Indexes for table `hospitaluser`
--
ALTER TABLE `hospitaluser`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `test`
--
ALTER TABLE `test`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `trig`
--
ALTER TABLE `trig`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `srfid` (`srfid`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `bookingpatient`
--
ALTER TABLE `bookingpatient`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
69

-- AUTO_INCREMENT for table `hospitaldata`


--
ALTER TABLE `hospitaldata`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `hospitaluser`
--
ALTER TABLE `hospitaluser`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `test`
--
ALTER TABLE `test`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `trig`
--
ALTER TABLE `trig`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;


/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

2. PlantUML Diagrams:
o Detailed Entity-Relationship (ER) diagram using PlantUML, illustrating table
relationships and attributes.
3. HTML and CSS Code Snippets:
o Snippets of HTML and CSS code used for critical parts of the frontend, such
as user interface components and styling.

HTML Code for home page:


<!DOCTYPE html>
70

<html lang="en">

<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">

<title>{% block title %}{% endblock title %}</title>


<meta content="" name="description">
<meta content="" name="keywords">

<!-- Favicons -->


<link href="static/assets/img/favicon.png" rel="icon">
<link href="static/assets/img/apple-touch-icon.png" rel="apple-touch-icon">

<!-- Google Fonts -->


<link href="https://fonts.googleapis.com/css?
family=Open+Sans:300,300i,400,400i,600,600i,700,700i|
Roboto:300,300i,400,400i,500,500i,600,600i,700,700i|
Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet">

<!-- Vendor CSS Files -->


<link href="static/assets/vendor/fontawesome-free/css/all.min.css"
rel="stylesheet">
<link href="static/assets/vendor/animate.css/animate.min.css"
rel="stylesheet">
<link href="static/assets/vendor/aos/aos.css" rel="stylesheet">
<link href="static/assets/vendor/bootstrap/css/bootstrap.min.css"
rel="stylesheet">
<link href="static/assets/vendor/bootstrap-icons/bootstrap-icons.css"
rel="stylesheet">
<link href="static/assets/vendor/boxicons/css/boxicons.min.css"
rel="stylesheet">
<link href="static/assets/vendor/glightbox/css/glightbox.min.css"
rel="stylesheet">
<link href="static/assets/vendor/swiper/swiper-bundle.min.css"
rel="stylesheet">

<!-- Template Main CSS File -->


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

</head>

<body>

<!-- ======= Top Bar ======= -->


<div id="topbar" class="d-flex align-items-center fixed-top">
<div class="container d-flex align-items-center justify-content-center
justify-content-md-between">
71

<div class="align-items-center d-none d-md-flex">


<i class="bi bi-clock"></i> 24*7 Available
</div>
<div class="d-flex align-items-center">
<i class="bi bi-phone"></i> Call us now +13773588751
</div>
</div>
</div>

<!-- ======= Header ======= -->


<header id="header" class="fixed-top">
<div class="container d-flex align-items-center">

<a href="/" class="logo me-auto"><img src="static/assets/img/logo.png"


alt=""></a>
<!-- Uncomment below if you prefer to use an image logo -->
<!-- <h1 class="logo me-auto"><a href="index.html">Medicio</a></h1> -->

<nav id="navbar" class="navbar order-last order-lg-0">


<ul>
<li><a class="nav-link scrollto " href="/">Home</a></li>

<li><a class="nav-link scrollto" href="/pdetails">Patients


Details</a></li>
<li><a class="nav-link scrollto" href="/slotbooking">Available
Beds</a></li>
<li><a class="nav-link scrollto" href="/trigers">Operations</a></li>

{% if current_user.is_authenticated and current_user.hcode %}

<li class="dropdown"><a href="/login"><span>Welcome


{{current_user.email}}</span> <i class="bi bi-chevron-down"></i></a>
<ul>

<li><a href="/addhospitalinfo">Add Hospital Data</a></li>


<li><a href="/logout">Logout</a></li>

</ul>
</li>
{% elif current_user.is_authenticated and current_user.srfid %}
<li class="dropdown"><a href="/login"><span>Welcome
{{current_user.email}}</span> <i class="bi bi-chevron-down"></i></a>
<ul>

<li><a href="/slotbooking">Book Slot</a></li>


<li><a href="/logout">Logout</a></li>
72

</ul>
</li>
{% else %}
<li class="dropdown"><a href="/login"><span>Sign In</span> <i
class="bi bi-chevron-down"></i></a>
<ul>
<li><a href="/login">User Login</a></li>
<li><a href="/hospitallogin">Hospital Login</a></li>
<li><a href="/admin">Admin Login</a></li>

</ul>
</li>

{% endif %}
<li><a class="nav-link scrollto" href="#contact">Contact</a></li>
</ul>
<i class="bi bi-list mobile-nav-toggle"></i>
</nav><!-- .navbar -->

<a href="/slotbooking" class="appointment-btn scrollto"><span class="d-


none d-md-inline">Bed Booking Slot</span> Book Now</a>

</div>
</header><!-- End Header -->

<!-- ======= Hero Section ======= -->


<section id="hero">
<div id="heroCarousel" data-bs-interval="5000" class="carousel slide
carousel-fade" data-bs-ride="carousel">

<ol class="carousel-indicators" id="hero-carousel-indicators"></ol>

<div class="carousel-inner" role="listbox">

<!-- Slide 1 -->


<div class="carousel-item active" style="background-image:
url(static/assets/img/slide/slide-1.jpg)">
<div class="container">
<h2>Welcome to <span>Covid center</span></h2>
<p>Yangzhou bed booking system <p>
<a href="#about" class="btn-get-started scrollto">Read More</a>
</div>
</div>

<!-- Slide 2 -->


<div class="carousel-item" style="background-image:
url(static/assets/img/slide/slide-2.jpg)">
73

<div class="container">
<h2>CHINA</h2>
<p>Yangzhou bed booking system</p>
<a href="#about" class="btn-get-started scrollto">Read More</a>
</div>
</div>

</div>

<a class="carousel-control-prev" href="#heroCarousel" role="button"


data-bs-slide="prev">
<span class="carousel-control-prev-icon bi bi-chevron-left" aria-
hidden="true"></span>
</a>

<a class="carousel-control-next" href="#heroCarousel" role="button"


data-bs-slide="next">
<span class="carousel-control-next-icon bi bi-chevron-right" aria-
hidden="true"></span>
</a>

</div>
</section><!-- End Hero -->

<main id="main">

{% block body %}

{% endblock body %}

<footer>
<div class="container">
<div class="copyright">
&copy; Copyright <strong><span>Arkprocoder</span></strong>. All Rights
Reserved
</div>
<div class="credits">

Designed by <a href="https://arprocoder.tech/">arkprocoder</a>


</div>
</div>
</footer><!-- End Footer -->

<div id="preloader"></div>
74

<a href="#" class="back-to-top d-flex align-items-center justify-content-


center"><i class="bi bi-arrow-up-short"></i></a>

<!-- Vendor JS Files -->


<script src="static/assets/vendor/purecounter/purecounter.js"></script>
<script src="static/assets/vendor/aos/aos.js"></script>
<script src="static/assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></
script>
<script src="static/assets/vendor/glightbox/js/glightbox.min.js"></script>
<script src="static/assets/vendor/swiper/swiper-bundle.min.js"></script>
<script src="static/assets/vendor/php-email-form/validate.js"></script>

<!-- Template Main JS File -->


<script src="static/assets/js/main.js"></script>

</body>

</html>

Css code:

/**
* Template Name: Medicio - v4.7.0
* Template URL: https://bootstrapmade.com/medicio-free-bootstrap-theme/
* Author: BootstrapMade.com
* License: https://bootstrapmade.com/license/
*/

/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/
body {
font-family: "Open Sans", sans-serif;
color: #444444;
}

a {
color: #3fbbc0;
text-decoration: none;
}

a:hover {
color: #65c9cd;
text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {


font-family: "Roboto", sans-serif;
}
75

/*--------------------------------------------------------------
# Preloader
--------------------------------------------------------------*/
#preloader {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 9999;
overflow: hidden;
background: #fff;
}

#preloader:before {
content: "";
position: fixed;
top: calc(50% - 30px);
left: calc(50% - 30px);
border: 6px solid #3fbbc0;
border-top-color: #ecf8f9;
border-radius: 50%;
width: 60px;
height: 60px;
-webkit-animation: animate-preloader 1s linear infinite;
animation: animate-preloader 1s linear infinite;
}

@-webkit-keyframes animate-preloader {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}

@keyframes animate-preloader {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/*--------------------------------------------------------------
# Back to top button
76

--------------------------------------------------------------*/
.back-to-top {
position: fixed;
visibility: hidden;
opacity: 0;
right: 15px;
bottom: 15px;
z-index: 996;
background: #3fbbc0;
width: 40px;
height: 40px;
border-radius: 4px;
transition: all 0.4s;
}
.back-to-top i {
font-size: 28px;
color: #fff;
line-height: 0;
}
.back-to-top:hover {
background: #5ec6ca;
color: #fff;
}
.back-to-top.active {
visibility: visible;
opacity: 1;
}

/*--------------------------------------------------------------
# Disable aos animation delay on mobile devices
--------------------------------------------------------------*/
@media screen and (max-width: 768px) {
[data-aos-delay] {
transition-delay: 0 !important;
}
}
/*--------------------------------------------------------------
# Top Bar
--------------------------------------------------------------*/
#topbar {
background: #3fbbc0;
color: #fff;
height: 40px;
font-size: 16px;
font-weight: 600;
z-index: 996;
transition: all 0.5s;
}
77

#topbar.topbar-scrolled {
top: -40px;
}
#topbar i {
padding-right: 6px;
line-height: 0;
}

/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
#header {
background: #fff;
transition: all 0.5s;
z-index: 997;
padding: 20px 0;
top: 40px;
box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.1);
}
@media (max-width: 992px) {
#header {
padding: 15px 0;
}
}
#header.header-scrolled {
top: 0;
}
#header .logo {
font-size: 28px;
margin: 0;
padding: 0;
line-height: 1;
font-weight: 600;
letter-spacing: 0.5px;
text-transform: uppercase;
}
#header .logo a {
color: #555555;
}
#header .logo img {
max-height: 40px;
}

/**
* Appointment Button
*/
.appointment-btn {
margin-left: 25px;
78

background: #3fbbc0;
color: #fff;
border-radius: 4px;
padding: 8px 25px;
white-space: nowrap;
transition: 0.3s;
font-size: 14px;
display: inline-block;
}
.appointment-btn:hover {
background: #65c9cd;
color: #fff;
}
@media (max-width: 768px) {
.appointment-btn {
margin: 0 15px 0 0;
padding: 6px 15px;
}
}

/*--------------------------------------------------------------
# Navigation Menu
--------------------------------------------------------------*/
/**
* Desktop Navigation
*/
.navbar {
padding: 0;
}
.navbar ul {
margin: 0;
padding: 0;
display: flex;
list-style: none;
align-items: center;
}
.navbar li {
position: relative;
}
.navbar a, .navbar a:focus {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 0 10px 30px;
font-family: "Roboto", sans-serif;
font-size: 13px;
color: #626262;
white-space: nowrap;
79

transition: 0.3s;
text-transform: uppercase;
font-weight: 500;
}
.navbar a i, .navbar a:focus i {
font-size: 12px;
line-height: 0;
margin-left: 5px;
}
.navbar a:hover, .navbar .active, .navbar .active:focus, .navbar li:hover > a
{
color: #3fbbc0;
}
.navbar .dropdown ul {
display: block;
position: absolute;
left: 14px;
top: calc(100% + 30px);
margin: 0;
padding: 10px 0;
z-index: 99;
opacity: 0;
visibility: hidden;
background: #fff;
box-shadow: 0px 0px 30px rgba(127, 137, 161, 0.25);
transition: 0.3s;
border-radius: 4px;
}
.navbar .dropdown ul li {
min-width: 200px;
}
.navbar .dropdown ul a {
padding: 10px 20px;
text-transform: none;
}
.navbar .dropdown ul a i {
font-size: 12px;
}
.navbar .dropdown ul a:hover, .navbar .dropdown ul .active:hover, .navbar
.dropdown ul li:hover > a {
color: #3fbbc0;
}
.navbar .dropdown:hover > ul {
opacity: 1;
top: 100%;
visibility: visible;
}
.navbar .dropdown .dropdown ul {
80

top: 0;
left: calc(100% - 30px);
visibility: hidden;
}
.navbar .dropdown .dropdown:hover > ul {
opacity: 1;
top: 0;
left: 100%;
visibility: visible;
}
@media (max-width: 1366px) {
.navbar .dropdown .dropdown ul {
left: -90%;
}
.navbar .dropdown .dropdown:hover > ul {
left: -100%;
}
}

/**
* Mobile Navigation
*/
.mobile-nav-toggle {
color: #555555;
font-size: 28px;
cursor: pointer;
display: none;
line-height: 0;
transition: 0.5s;
}
.mobile-nav-toggle.bi-x {
color: #fff;
}

@media (max-width: 991px) {


.mobile-nav-toggle {
display: block;
}

.navbar ul {
display: none;
}
}
.navbar-mobile {
position: fixed;
overflow: hidden;
top: 0;
right: 0;
81

left: 0;
bottom: 0;
background: rgba(60, 60, 60, 0.9);
transition: 0.3s;
z-index: 999;
}
.navbar-mobile .mobile-nav-toggle {
position: absolute;
top: 15px;
right: 15px;
}
.navbar-mobile ul {
display: block;
position: absolute;
top: 55px;
right: 15px;
bottom: 15px;
left: 15px;
padding: 10px 0;
border-radius: 8px;
background-color: #fff;
overflow-y: auto;
transition: 0.3s;
}
.navbar-mobile a, .navbar-mobile a:focus {
padding: 10px 20px;
font-size: 15px;
color: #555555;
}
.navbar-mobile a:hover, .navbar-mobile .active, .navbar-mobile li:hover > a {
color: #3fbbc0;
}
.navbar-mobile .dropdown ul {
position: static;
display: none;
margin: 10px 20px;
padding: 10px 0;
z-index: 99;
opacity: 1;
visibility: visible;
background: #fff;
box-shadow: 0px 0px 30px rgba(127, 137, 161, 0.25);
}
.navbar-mobile .dropdown ul li {
min-width: 200px;
}
.navbar-mobile .dropdown ul a {
padding: 10px 20px;
82

}
.navbar-mobile .dropdown ul a i {
font-size: 12px;
}
.navbar-mobile .dropdown ul a:hover, .navbar-mobile .dropdown ul
.active:hover, .navbar-mobile .dropdown ul li:hover > a {
color: #3fbbc0;
}
.navbar-mobile .dropdown > .dropdown-active {
display: block;
}

/*--------------------------------------------------------------
# Hero Section
--------------------------------------------------------------*/
#hero {
width: 100%;
height: 100vh;
background-color: rgba(60, 60, 60, 0.8);
overflow: hidden;
position: relative;
}
#hero .carousel, #hero .carousel-inner, #hero .carousel-item, #hero .carousel-
item::before {
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
}
#hero .carousel-item {
background-size: cover;
background-position: center;
background-repeat: no-repeat;
display: flex;
justify-content: center;
align-items: flex-end;
}
#hero .container {
text-align: center;
background: rgba(255, 255, 255, 0.9);
padding-top: 30px;
padding-bottom: 30px;
margin-bottom: 50px;
border-top: 4px solid #3fbbc0;
}
@media (max-width: 1200px) {
#hero .container {
83

margin-left: 50px;
margin-right: 50px;
}
}
#hero h2 {
color: #2f2f2f;
margin-bottom: 20px;
font-size: 36px;
font-weight: 700;
}
#hero p {
margin: 0 auto 30px auto;
color: #555555;
}
#hero .carousel-inner .carousel-item {
transition-property: opacity;
background-position: center top;
}
#hero .carousel-inner .carousel-item,
#hero .carousel-inner .active.carousel-item-start,
#hero .carousel-inner .active.carousel-item-end {
opacity: 0;
}
#hero .carousel-inner .active,
#hero .carousel-inner .carousel-item-next.carousel-item-start,
#hero .carousel-inner .carousel-item-prev.carousel-item-end {
opacity: 1;
transition: 0.5s;
}
#hero .carousel-inner .carousel-item-next,
#hero .carousel-inner .carousel-item-prev,
#hero .carousel-inner .active.carousel-item-start,
#hero .carousel-inner .active.carousel-item-end {
left: 0;
transform: translate3d(0, 0, 0);
}
#hero .carousel-control-next-icon, #hero .carousel-control-prev-icon {
background: none;
font-size: 30px;
line-height: 0;
width: auto;
height: auto;
background: rgba(63, 187, 192, 0.8);
border-radius: 50px;
transition: 0.3s;
color: rgba(255, 255, 255, 0.5);
width: 54px;
height: 54px;
84

display: flex;
align-items: center;
justify-content: center;
}
#hero .carousel-control-next-icon:hover, #hero .carousel-control-prev-
icon:hover {
background: #3fbbc0;
color: rgba(255, 255, 255, 0.8);
}
#hero .carousel-indicators li {
cursor: pointer;
background: #fff;
overflow: hidden;
border: 0;
width: 12px;
height: 12px;
border-radius: 50px;
opacity: 0.6;
transition: 0.3s;
}
#hero .carousel-indicators li.active {
opacity: 1;
background: #3fbbc0;
}
#hero .btn-get-started {
font-family: "Roboto", sans-serif;
font-weight: 500;
font-size: 14px;
letter-spacing: 1px;
display: inline-block;
padding: 14px 32px;
border-radius: 4px;
transition: 0.5s;
line-height: 1;
color: #fff;
background: #3fbbc0;
}
#hero .btn-get-started:hover {
background: #65c9cd;
}
@media (max-width: 992px) {
#hero {
height: 100vh;
}
#hero .container {
margin-top: 100px;
}
}
85

@media (max-width: 768px) {


#hero h2 {
font-size: 28px;
}
}
@media (min-width: 1024px) {
#hero .carousel-control-prev, #hero .carousel-control-next {
width: 5%;
}
}
@media (max-height: 500px) {
#hero {
height: 160vh;
}
}

/*--------------------------------------------------------------
# Sections General
--------------------------------------------------------------*/
section {
padding: 60px 0;
overflow: hidden;
}

.section-bg {
background-color: #f7fcfc;
}

.section-title {
text-align: center;
padding-bottom: 30px;
}
.section-title h2 {
font-size: 32px;
font-weight: bold;
text-transform: uppercase;
margin-bottom: 20px;
padding-bottom: 20px;
position: relative;
}
.section-title h2::after {
content: "";
position: absolute;
display: block;
width: 50px;
height: 3px;
background: #3fbbc0;
bottom: 0;
86

left: calc(50% - 25px);


}
.section-title p {
margin-bottom: 0;
}

/*--------------------------------------------------------------
# Breadcrumbs
--------------------------------------------------------------*/
.breadcrumbs {
padding: 20px 0;
background-color: #ecf8f9;
min-height: 40px;
margin-top: 120px;
}
@media (max-width: 992px) {
.breadcrumbs {
margin-top: 70px;
}
}
.breadcrumbs h2 {
font-size: 24px;
font-weight: 300;
margin: 0;
}
@media (max-width: 992px) {
.breadcrumbs h2 {
margin: 0 0 10px 0;
}
}
.breadcrumbs ol {
display: flex;
flex-wrap: wrap;
list-style: none;
padding: 0;
margin: 0;
font-size: 14px;
}
.breadcrumbs ol li + li {
padding-left: 10px;
}
.breadcrumbs ol li + li::before {
display: inline-block;
padding-right: 10px;
color: #6c757d;
content: "/";
}
@media (max-width: 768px) {
87

.breadcrumbs .d-flex {
display: block !important;
}
.breadcrumbs ol {
display: block;
}
.breadcrumbs ol li {
display: inline-block;
}
}

/*--------------------------------------------------------------
# Featured Services
--------------------------------------------------------------*/
.featured-services .icon-box {
padding: 30px;
position: relative;
overflow: hidden;
background: #fff;
box-shadow: 0 0 29px 0 rgba(68, 88, 144, 0.12);
transition: all 0.3s ease-in-out;
border-radius: 8px;
z-index: 1;
}
.featured-services .icon-box::before {
content: "";
position: absolute;
background: #d9f1f2;
right: 0;
left: 0;
bottom: 0;
top: 100%;
transition: all 0.3s;
z-index: -1;
}
.featured-services .icon-box:hover::before {
background: #3fbbc0;
top: 0;
border-radius: 0px;
}
.featured-services .icon {
margin-bottom: 15px;
}
.featured-services .icon i {
font-size: 48px;
line-height: 1;
color: #3fbbc0;
transition: all 0.3s ease-in-out;
88

}
.featured-services .title {
font-weight: 700;
margin-bottom: 15px;
font-size: 18px;
}
.featured-services .title a {
color: #111;
}
.featured-services .description {
font-size: 15px;
line-height: 28px;
margin-bottom: 0;
}
.featured-services .icon-box:hover .title a, .featured-services .icon-
box:hover .description {
color: #fff;
}
.featured-services .icon-box:hover .icon i {
color: #fff;
}

/*--------------------------------------------------------------
# Cta
--------------------------------------------------------------*/
.cta {
background: #3fbbc0;
color: #fff;
background-size: cover;
padding: 60px 0;
}
.cta h3 {
font-size: 28px;
font-weight: 700;
}
.cta .cta-btn {
font-family: "Roboto", sans-serif;
font-weight: 500;
font-size: 16px;
letter-spacing: 1px;
display: inline-block;
padding: 10px 35px;
border-radius: 25px;
transition: 0.5s;
margin-top: 10px;
border: 2px solid #fff;
color: #fff;
}
89

.cta .cta-btn:hover {
background: #fff;
color: #3fbbc0;
}

/*--------------------------------------------------------------
# About Us
--------------------------------------------------------------*/
.about .content h3 {
font-weight: 600;
font-size: 26px;
}
.about .content ul {
list-style: none;
padding: 0;
}
.about .content ul li {
padding-bottom: 10px;
}
.about .content ul i {
font-size: 20px;
padding-right: 4px;
color: #3fbbc0;
}
.about .content p:last-child {
margin-bottom: 0;
}

/*--------------------------------------------------------------
# Counts
--------------------------------------------------------------*/
.counts {
padding-bottom: 30px;
}
.counts .count-box {
box-shadow: -10px -5px 40px 0 rgba(0, 0, 0, 0.1);
padding: 30px;
width: 100%;
}
.counts .count-box i {
display: block;
font-size: 30px;
color: #3fbbc0;
float: left;
}
.counts .count-box span {
font-size: 42px;
line-height: 24px;
90

display: block;
font-weight: 700;
color: #555555;
margin-left: 50px;
}
.counts .count-box p {
padding: 30px 0 0 0;
margin: 0;
font-family: "Roboto", sans-serif;
font-size: 14px;
}
.counts .count-box a {
font-weight: 600;
display: block;
margin-top: 20px;
color: #7b7b7b;
font-size: 15px;
font-family: "Poppins", sans-serif;
transition: ease-in-out 0.3s;
}
.counts .count-box a:hover {
color: #3fbbc0;
}

/*--------------------------------------------------------------
# Features
--------------------------------------------------------------*/
.features .icon-box h4 {
font-size: 20px;
font-weight: 700;
margin: 5px 0 10px 60px;
}
.features .icon-box i {
font-size: 48px;
float: left;
color: #3fbbc0;
}
.features .icon-box p {
font-size: 15px;
color: #848484;
margin-left: 60px;
}
.features .image {
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
min-height: 400px;
}
91

/*--------------------------------------------------------------
# Services
--------------------------------------------------------------*/
.services .icon-box {
margin-bottom: 20px;
text-align: center;
}
.services .icon {
display: inline-flex;
justify-content: center;
align-items: center;
width: 80px;
height: 80px;
margin-bottom: 20px;
background: #fff;
border-radius: 50%;
transition: 0.5s;
color: #3fbbc0;
overflow: hidden;
box-shadow: 0px 0 25px rgba(0, 0, 0, 0.15);
}
.services .icon i {
font-size: 36px;
line-height: 0;
}
.services .icon-box:hover .icon {
box-shadow: 0px 0 25px rgba(63, 187, 192, 0.3);
}
.services .title {
font-weight: 600;
margin-bottom: 15px;
font-size: 18px;
position: relative;
padding-bottom: 15px;
}
.services .title a {
color: #444444;
transition: 0.3s;
}
.services .title a:hover {
color: #3fbbc0;
}
.services .title::after {
content: "";
position: absolute;
display: block;
width: 50px;
92

height: 2px;
background: #3fbbc0;
bottom: 0;
left: calc(50% - 25px);
}
.services .description {
line-height: 24px;
font-size: 14px;
}

/*--------------------------------------------------------------
# Appointments
--------------------------------------------------------------*/
.appointment .php-email-form {
width: 100%;
}
.appointment .php-email-form .form-group {
padding-bottom: 8px;
}
.appointment .php-email-form .validate {
display: none;
color: red;
margin: 0 0 15px 0;
font-weight: 400;
font-size: 13px;
}
.appointment .php-email-form .error-message {
display: none;
color: #fff;
background: #ed3c0d;
text-align: left;
padding: 15px;
font-weight: 600;
}
.appointment .php-email-form .error-message br + br {
margin-top: 25px;
}
.appointment .php-email-form .sent-message {
display: none;
color: #fff;
background: #18d26e;
text-align: center;
padding: 15px;
font-weight: 600;
}
.appointment .php-email-form .loading {
display: none;
background: #fff;
93

text-align: center;
padding: 15px;
}
.appointment .php-email-form .loading:before {
content: "";
display: inline-block;
border-radius: 50%;
width: 24px;
height: 24px;
margin: 0 10px -6px 0;
border: 3px solid #18d26e;
border-top-color: #eee;
-webkit-animation: animate-loading 1s linear infinite;
animation: animate-loading 1s linear infinite;
}
.appointment .php-email-form input, .appointment .php-email-form textarea,
.appointment .php-email-form select {
border-radius: 0;
box-shadow: none;
font-size: 14px;
padding: 10px !important;
}
.appointment .php-email-form input:focus, .appointment .php-email-form
textarea:focus, .appointment .php-email-form select:focus {
border-color: #3fbbc0;
}
.appointment .php-email-form input, .appointment .php-email-form select {
height: 44px;
}
.appointment .php-email-form textarea {
padding: 10px 12px;
}
.appointment .php-email-form button[type=submit] {
background: #3fbbc0;
border: 0;
padding: 10px 35px;
color: #fff;
transition: 0.4s;
border-radius: 50px;
}
.appointment .php-email-form button[type=submit]:hover {
background: #52c2c6;
}

/*--------------------------------------------------------------
# Departments
--------------------------------------------------------------*/
.departments .nav-tabs {
94

border: 0;
}
.departments .nav-link {
border: 0;
padding: 20px;
color: #555555;
border-radius: 0;
border-left: 5px solid #fff;
cursor: pointer;
}
.departments .nav-link h4 {
font-size: 18px;
font-weight: 600;
transition: 0.3s;
}
.departments .nav-link p {
font-size: 14px;
margin-bottom: 0;
}
.departments .nav-link:hover h4 {
color: #3fbbc0;
}
.departments .nav-link.active {
background: #f7fcfc;
border-color: #3fbbc0;
}
.departments .nav-link.active h4 {
color: #3fbbc0;
}
.departments .tab-pane.active {
-webkit-animation: slide-down 0.5s ease-out;
animation: slide-down 0.5s ease-out;
}
.departments .tab-pane img {
float: left;
max-width: 300px;
padding: 0 15px 15px 0;
}
@media (max-width: 768px) {
.departments .tab-pane img {
float: none;
padding: 0 0 15px 0;
max-width: 100%;
}
}
.departments .tab-pane h3 {
font-size: 26px;
font-weight: 600;
95

margin-bottom: 20px;
color: #3fbbc0;
}
.departments .tab-pane p {
color: #777777;
}
.departments .tab-pane p:last-child {
margin-bottom: 0;
}
@-webkit-keyframes slide-down {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes slide-down {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}

/*--------------------------------------------------------------
# Testimonials
--------------------------------------------------------------*/
.testimonials .testimonials-carousel, .testimonials .testimonials-slider {
overflow: hidden;
}
.testimonials .testimonial-item {
box-sizing: content-box;
min-height: 320px;
}
.testimonials .testimonial-item .testimonial-img {
width: 90px;
border-radius: 50%;
margin: -40px 0 0 40px;
position: relative;
z-index: 2;
border: 6px solid #fff;
}
.testimonials .testimonial-item h3 {
font-size: 18px;
font-weight: bold;
margin: 10px 0 5px 45px;
96

color: #111;
}
.testimonials .testimonial-item h4 {
font-size: 14px;
color: #999;
margin: 0 0 0 45px;
}
.testimonials .testimonial-item .quote-icon-left, .testimonials .testimonial-
item .quote-icon-right {
color: #b2e4e6;
font-size: 26px;
}
.testimonials .testimonial-item .quote-icon-left {
display: inline-block;
left: -5px;
position: relative;
}
.testimonials .testimonial-item .quote-icon-right {
display: inline-block;
right: -5px;
position: relative;
top: 10px;
}
.testimonials .testimonial-item p {
font-style: italic;
margin: 0 15px 0 15px;
padding: 20px 20px 60px 20px;
background: #f0fafa;
position: relative;
border-radius: 6px;
position: relative;
z-index: 1;
}
.testimonials .swiper-pagination {
margin-top: 20px;
position: relative;
}
.testimonials .swiper-pagination .swiper-pagination-bullet {
width: 12px;
height: 12px;
background-color: #fff;
opacity: 1;
border: 1px solid #3fbbc0;
}
.testimonials .swiper-pagination .swiper-pagination-bullet-active {
background-color: #3fbbc0;
}
97

/*--------------------------------------------------------------
# Doctors
--------------------------------------------------------------*/
.doctors .member {
margin-bottom: 20px;
overflow: hidden;
text-align: center;
border-radius: 4px;
background: #fff;
box-shadow: 0px 2px 15px rgba(63, 187, 192, 0.1);
}
.doctors .member .member-img {
position: relative;
overflow: hidden;
}
.doctors .member .social {
position: absolute;
left: 0;
bottom: 0;
right: 0;
height: 40px;
opacity: 0;
transition: ease-in-out 0.3s;
background: rgba(255, 255, 255, 0.85);
display: flex;
align-items: center;
justify-content: center;
}
.doctors .member .social a {
transition: color 0.3s;
color: #555555;
margin: 0 10px;
display: inline-flex;
align-items: center;
justify-content: center;
}
.doctors .member .social a i {
line-height: 0;
}
.doctors .member .social a:hover {
color: #3fbbc0;
}
.doctors .member .social i {
font-size: 18px;
margin: 0 2px;
}
.doctors .member .member-info {
padding: 25px 15px;
98

}
.doctors .member .member-info h4 {
font-weight: 700;
margin-bottom: 5px;
font-size: 18px;
color: #555555;
}
.doctors .member .member-info span {
display: block;
font-size: 13px;
font-weight: 400;
color: #aaaaaa;
}
.doctors .member .member-info p {
font-style: italic;
font-size: 14px;
line-height: 26px;
color: #777777;
}
.doctors .member:hover .social {
opacity: 1;
}

/*--------------------------------------------------------------
# Gallery
--------------------------------------------------------------*/
.gallery {
overflow: hidden;
}
.gallery .swiper-pagination {
margin-top: 20px;
position: relative;
}
.gallery .swiper-pagination .swiper-pagination-bullet {
width: 12px;
height: 12px;
background-color: #fff;
opacity: 1;
border: 1px solid #3fbbc0;
}
.gallery .swiper-pagination .swiper-pagination-bullet-active {
background-color: #3fbbc0;
}
.gallery .swiper-slide-active {
text-align: center;
}
@media (min-width: 992px) {
.gallery .swiper-wrapper {
99

padding: 40px 0;
}
.gallery .swiper-slide-active {
border: 6px solid #3fbbc0;
padding: 4px;
background: #fff;
z-index: 1;
transform: scale(1.2);
margin-top: 10px;
}
}

/*--------------------------------------------------------------
# Pricing
--------------------------------------------------------------*/
.pricing .box {
padding: 20px;
background: #fff;
text-align: center;
box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.12);
border-radius: 4px;
position: relative;
overflow: hidden;
}
.pricing h3 {
font-weight: 400;
margin: -20px -20px 20px -20px;
padding: 20px 15px;
font-size: 16px;
font-weight: 600;
color: #777777;
background: #f8f8f8;
}
.pricing h4 {
font-size: 36px;
color: #3fbbc0;
font-weight: 600;
font-family: "Poppins", sans-serif;
margin-bottom: 20px;
}
.pricing h4 sup {
font-size: 20px;
top: -15px;
left: -3px;
}
.pricing h4 span {
color: #bababa;
font-size: 16px;
100

font-weight: 300;
}
.pricing ul {
padding: 0;
list-style: none;
color: #444444;
text-align: center;
line-height: 20px;
font-size: 14px;
}
.pricing ul li {
padding-bottom: 16px;
}
.pricing ul i {
color: #3fbbc0;
font-size: 18px;
padding-right: 4px;
}
.pricing ul .na {
color: #ccc;
text-decoration: line-through;
}
.pricing .btn-wrap {
margin: 20px -20px -20px -20px;
padding: 20px 15px;
background: #f8f8f8;
text-align: center;
}
.pricing .btn-buy {
background: #3fbbc0;
display: inline-block;
padding: 8px 35px 10px 35px;
border-radius: 4px;
color: #fff;
transition: none;
font-size: 14px;
font-weight: 400;
font-family: "Roboto", sans-serif;
font-weight: 600;
transition: 0.3s;
}
.pricing .btn-buy:hover {
background: #65c9cd;
}
.pricing .featured h3 {
color: #fff;
background: #3fbbc0;
}
101

.pricing .advanced {
width: 200px;
position: absolute;
top: 18px;
right: -68px;
transform: rotate(45deg);
z-index: 1;
font-size: 14px;
padding: 1px 0 3px 0;
background: #3fbbc0;
color: #fff;
}

/*--------------------------------------------------------------
# Frequently Asked Questioins
--------------------------------------------------------------*/
.faq {
padding: 60px 0;
}
.faq .faq-list {
padding: 0;
list-style: none;
}
.faq .faq-list li {
border-bottom: 1px solid #d9f1f2;
margin-bottom: 20px;
padding-bottom: 20px;
}
.faq .faq-list .question {
display: block;
position: relative;
font-family: #3fbbc0;
font-size: 18px;
line-height: 24px;
font-weight: 400;
padding-left: 25px;
cursor: pointer;
color: #32969a;
transition: 0.3s;
}
.faq .faq-list i {
font-size: 16px;
position: absolute;
left: 0;
top: -2px;
}
.faq .faq-list p {
margin-bottom: 0;
102

padding: 10px 0 0 25px;


}
.faq .faq-list .icon-show {
display: none;
}
.faq .faq-list .collapsed {
color: black;
}
.faq .faq-list .collapsed:hover {
color: #3fbbc0;
}
.faq .faq-list .collapsed .icon-show {
display: inline-block;
transition: 0.6s;
}
.faq .faq-list .collapsed .icon-close {
display: none;
transition: 0.6s;
}

/*--------------------------------------------------------------
# Contact
--------------------------------------------------------------*/
.contact .info-box {
color: #444444;
text-align: center;
box-shadow: 0 0 20px rgba(214, 215, 216, 0.5);
padding: 20px 0 30px 0;
}
.contact .info-box i {
font-size: 32px;
color: #3fbbc0;
border-radius: 50%;
padding: 8px;
border: 2px dotted #c5ebec;
}
.contact .info-box h3 {
font-size: 20px;
color: #777777;
font-weight: 700;
margin: 10px 0;
}
.contact .info-box p {
padding: 0;
line-height: 24px;
font-size: 14px;
margin-bottom: 0;
}
103

.contact .php-email-form {
box-shadow: 0 0 20px rgba(214, 215, 216, 0.5);
padding: 30px;
}
.contact .php-email-form .error-message {
display: none;
color: #fff;
background: #ed3c0d;
text-align: left;
padding: 15px;
font-weight: 600;
}
.contact .php-email-form .error-message br + br {
margin-top: 25px;
}
.contact .php-email-form .sent-message {
display: none;
color: #fff;
background: #18d26e;
text-align: center;
padding: 15px;
font-weight: 600;
}
.contact .php-email-form .loading {
display: none;
background: #fff;
text-align: center;
padding: 15px;
}
.contact .php-email-form .loading:before {
content: "";
display: inline-block;
border-radius: 50%;
width: 24px;
height: 24px;
margin: 0 10px -6px 0;
border: 3px solid #18d26e;
border-top-color: #eee;
-webkit-animation: animate-loading 1s linear infinite;
animation: animate-loading 1s linear infinite;
}
.contact .php-email-form input, .contact .php-email-form textarea {
border-radius: 4px;
box-shadow: none;
font-size: 14px;
}
.contact .php-email-form input:focus, .contact .php-email-form textarea:focus
{
104

border-color: #3fbbc0;
}
.contact .php-email-form input {
padding: 10px 15px;
}
.contact .php-email-form textarea {
padding: 12px 15px;
}
.contact .php-email-form button[type=submit] {
background: #3fbbc0;
border: 0;
padding: 10px 30px;
color: #fff;
transition: 0.4s;
border-radius: 4px;
}
.contact .php-email-form button[type=submit]:hover {
background: #65c9cd;
}
@-webkit-keyframes animate-loading {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes animate-loading {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
#footer {
background: #eeeeee;
padding: 0 0 30px 0;
color: #555555;
font-size: 14px;
}
#footer .footer-top {
background: #f6f6f6;
padding: 60px 0 30px 0;
105

}
#footer .footer-top .footer-info {
margin-bottom: 30px;
}
#footer .footer-top .footer-info h3 {
font-size: 24px;
margin: 0 0 20px 0;
padding: 2px 0 2px 0;
line-height: 1;
font-weight: 700;
}
#footer .footer-top .footer-info p {
font-size: 14px;
line-height: 24px;
margin-bottom: 0;
font-family: "Roboto", sans-serif;
}
#footer .footer-top .social-links a {
font-size: 18px;
display: inline-block;
background: #3fbbc0;
color: #fff;
line-height: 1;
padding: 8px 0;
margin-right: 4px;
border-radius: 4px;
text-align: center;
width: 36px;
height: 36px;
transition: 0.3s;
}
#footer .footer-top .social-links a:hover {
background: #65c9cd;
text-decoration: none;
}
#footer .footer-top h4 {
font-size: 16px;
font-weight: 600;
position: relative;
padding-bottom: 12px;
}
#footer .footer-top .footer-links {
margin-bottom: 30px;
}
#footer .footer-top .footer-links ul {
list-style: none;
padding: 0;
margin: 0;
106

}
#footer .footer-top .footer-links ul i {
padding-right: 2px;
color: #3fbbc0;
font-size: 18px;
line-height: 1;
}
#footer .footer-top .footer-links ul li {
padding: 10px 0;
display: flex;
align-items: center;
}
#footer .footer-top .footer-links ul li:first-child {
padding-top: 0;
}
#footer .footer-top .footer-links ul a {
color: #555555;
transition: 0.3s;
display: inline-block;
line-height: 1;
}
#footer .footer-top .footer-links ul a:hover {
color: #3fbbc0;
}
#footer .footer-top .footer-newsletter form {
margin-top: 30px;
background: #fff;
padding: 6px 10px;
position: relative;
border: 1px solid #d5d5d5;
border-radius: 4px;
}
#footer .footer-top .footer-newsletter form input[type=email] {
border: 0;
padding: 4px;
width: calc(100% - 110px);
}
#footer .footer-top .footer-newsletter form input[type=submit] {
position: absolute;
top: -1px;
right: -1px;
bottom: -1px;
border: 0;
background: none;
font-size: 16px;
padding: 0 20px;
background: #3fbbc0;
color: #fff;
107

transition: 0.3s;
border-radius: 0 4px 4px 0;
}
#footer .footer-top .footer-newsletter form input[type=submit]:hover {
background: #65c9cd;
}
#footer .copyright {
text-align: center;
padding-top: 30px;
}
#footer .credits {
padding-top: 10px;
text-align: center;
font-size: 13px;
}

4. Python Script for Backend Integration:


o Python script snippets showcasing backend functionalities, including database
interactions, data processing, and user authentication.

from flask import Flask, json,redirect,render_template,flash,request


from flask.globals import request, session
from flask.helpers import url_for
from flask_sqlalchemy import SQLAlchemy
from flask_login import UserMixin
from werkzeug.security import generate_password_hash,check_password_hash

from flask_login import


login_required,logout_user,login_user,login_manager,LoginManager,current_us
er

# from flask_mail import Mail


import json

# mydatabase connection
local_server=True
app=Flask(__name__)
app.secret_key="aneesrehmankhan"

with open('config.json','r') as c:
params=json.load(c)["params"]

app.config.update(
108

MAIL_SERVER='smtp.gmail.com',
MAIL_PORT='465',
MAIL_USE_SSL=True,
MAIL_USERNAME='gmail account',
MAIL_PASSWORD='gmail account password'
)
mail = Mail(app)

# this is for getting the unique user access


login_manager=LoginManager(app)
login_manager.login_view='login'

#
app.config['SQLALCHEMY_DATABASE_URI']='mysql://username:password@localhost/
databsename'
app.config['SQLALCHEMY_DATABASE_URI']='mysql://root:@localhost/covid'
db=SQLAlchemy(app)

@login_manager.user_loader
def load_user(user_id):
return User.query.get(int(user_id)) or
Hospitaluser.query.get(int(user_id))

class Test(db.Model):
id=db.Column(db.Integer,primary_key=True)
name=db.Column(db.String(50))

class User(UserMixin,db.Model):
id=db.Column(db.Integer,primary_key=True)
srfid=db.Column(db.String(20),unique=True)
email=db.Column(db.String(50))
dob=db.Column(db.String(1000))

class Hospitaluser(UserMixin,db.Model):
id=db.Column(db.Integer,primary_key=True)
hcode=db.Column(db.String(20))
email=db.Column(db.String(50))
password=db.Column(db.String(1000))

class Hospitaldata(db.Model):
id=db.Column(db.Integer,primary_key=True)
109

hcode=db.Column(db.String(20),unique=True)
hname=db.Column(db.String(100))
normalbed=db.Column(db.Integer)
hicubed=db.Column(db.Integer)
icubed=db.Column(db.Integer)
vbed=db.Column(db.Integer)

class Trig(db.Model):
id=db.Column(db.Integer,primary_key=True)
hcode=db.Column(db.String(20))
normalbed=db.Column(db.Integer)
hicubed=db.Column(db.Integer)
icubed=db.Column(db.Integer)
vbed=db.Column(db.Integer)
querys=db.Column(db.String(50))
date=db.Column(db.String(50))

class Bookingpatient(db.Model):
id=db.Column(db.Integer,primary_key=True)
srfid=db.Column(db.String(20),unique=True)
bedtype=db.Column(db.String(100))
hcode=db.Column(db.String(20))
spo2=db.Column(db.Integer)
pname=db.Column(db.String(100))
pphone=db.Column(db.String(100))
paddress=db.Column(db.String(100))

@app.route("/")
def home():

return render_template("index.html")

@app.route("/trigers")
def trigers():
query=Trig.query.all()
return render_template("trigers.html",query=query)

@app.route('/signup',methods=['POST','GET'])
def signup():
if request.method=="POST":
srfid=request.form.get('srf')
email=request.form.get('email')
dob=request.form.get('dob')
# print(srfid,email,dob)
#encpassword=generate_password_hash(dob)
user=User.query.filter_by(srfid=srfid).first()
emailUser=User.query.filter_by(email=email).first()
110

if user or emailUser:
flash("Email or srif is already taken","warning")
return render_template("usersignup.html")
# new_user=db.engine.execute(f"INSERT INTO `user`
(`srfid`,`email`,`dob`) VALUES ('{srfid}','{email}','{dob}') ")
new_user=User(srfid=srfid,email=email,dob=dob)
db.session.add(new_user)
db.session.commit()

flash("SignUp Success Please Login","success")


return render_template("userlogin.html")

return render_template("usersignup.html")

@app.route('/login',methods=['POST','GET'])
def login():
if request.method=="POST":
srfid=request.form.get('srf')
dob=request.form.get('dob')
user=User.query.filter_by(srfid=srfid).first()
if user and user.dob==dob:
login_user(user)
flash("Login Success","info")
return render_template("index.html")
else:
flash("Invalid Credentials","danger")
return render_template("userlogin.html")

return render_template("userlogin.html")

@app.route('/hospitallogin',methods=['POST','GET'])
def hospitallogin():
if request.method=="POST":
email=request.form.get('email')
password=request.form.get('password')
user=Hospitaluser.query.filter_by(email=email).first()
#if user and check_password_hash(user.password,password):
if user and user.password==password:
login_user(user)
flash("Login Success","info")
return render_template("index.html")
else:
flash("Invalid Credentials","danger")
return render_template("hospitallogin.html")

return render_template("hospitallogin.html")
111

@app.route('/admin',methods=['POST','GET'])
def admin():

if request.method=="POST":
username=request.form.get('username')
password=request.form.get('password')
if(username=="admin" and password=="admin"):
session['user']=username
flash("login success","info")
return render_template("addHosUser.html")
else:
flash("Invalid Credentials","danger")

return render_template("admin.html")

@app.route('/logout')
@login_required
def logout():
logout_user()
flash("Logout SuccessFul","warning")
return redirect(url_for('login'))

@app.route('/addHospitalUser',methods=['POST','GET'])
def hospitalUser():

if('user' in session and session['user']=="admin"):

if request.method=="POST":
hcode=request.form.get('hcode')
email=request.form.get('email')
password=request.form.get('password')
#encpassword=generate_password_hash(password)
hcode=hcode.upper()
emailUser=Hospitaluser.query.filter_by(email=email).first()
if emailUser:
flash("Email or srif is already taken","warning")

# db.engine.execute(f"INSERT INTO `hospitaluser`


(`hcode`,`email`,`password`) VALUES ('{hcode}','{email}','{encpassword}')
")
query=Hospitaluser(hcode=hcode,email=email,password=password)
db.session.add(query)
db.session.commit()

# my mail starts from here if you not need to send mail


comment the below line
112

# mail.send_message('COVID CARE CENTER',sender=params['gmail-


user'],recipients=[email],body=f"Welcome thanks for choosing us\nYour Login
Credentials Are:\n Email Address: {email}\nPassword: {password}\n\nHospital
Code {hcode}\n\n Do not share your password\n\n\nThank You..." )

flash("Data Sent and Inserted Successfully","warning")


return render_template("addHosUser.html")

else:
flash("Login and try Again","warning")
return render_template("addHosUser.html")

# testing wheather db is connected or not


@app.route("/test")
def test():
try:
a=Test.query.all()
print(a)
return f'MY DATABASE IS CONNECTED'
except Exception as e:
print(e)
return f'MY DATABASE IS NOT CONNECTED {e}'

@app.route("/logoutadmin")
def logoutadmin():
session.pop('user')
flash("You are logout admin", "primary")

return redirect('/admin')

def updatess(code):
postsdata=Hospitaldata.query.filter_by(hcode=code).first()
return render_template("hospitaldata.html",postsdata=postsdata)

@app.route("/addhospitalinfo",methods=['POST','GET'])
def addhospitalinfo():
email=current_user.email
posts=Hospitaluser.query.filter_by(email=email).first()
code=posts.hcode
postsdata=Hospitaldata.query.filter_by(hcode=code).first()

if request.method=="POST":
hcode=request.form.get('hcode')
hname=request.form.get('hname')
nbed=request.form.get('normalbed')
113

hbed=request.form.get('hicubeds')
ibed=request.form.get('icubeds')
vbed=request.form.get('ventbeds')
hcode=hcode.upper()
huser=Hospitaluser.query.filter_by(hcode=hcode).first()
hduser=Hospitaldata.query.filter_by(hcode=hcode).first()
if hduser:
flash("Data is already Present you can update it..","primary")
return render_template("hospitaldata.html")
if huser:
# db.engine.execute(f"INSERT INTO `hospitaldata`
(`hcode`,`hname`,`normalbed`,`hicubed`,`icubed`,`vbed`) VALUES
('{hcode}','{hname}','{nbed}','{hbed}','{ibed}','{vbed}')")

query=Hospitaldata(hcode=hcode,hname=hname,normalbed=nbed,hicubed=hbed,icu
bed=ibed,vbed=vbed)
db.session.add(query)
db.session.commit()
flash("Data Is Added","primary")
return redirect('/addhospitalinfo')

else:
flash("Hospital Code not Exist","warning")
return redirect('/addhospitalinfo')

return render_template("hospitaldata.html",postsdata=postsdata)

@app.route("/hedit/<string:id>",methods=['POST','GET'])
@login_required
def hedit(id):
posts=Hospitaldata.query.filter_by(id=id).first()

if request.method=="POST":
hcode=request.form.get('hcode')
hname=request.form.get('hname')
nbed=request.form.get('normalbed')
hbed=request.form.get('hicubeds')
ibed=request.form.get('icubeds')
vbed=request.form.get('ventbeds')
hcode=hcode.upper()
# db.engine.execute(f"UPDATE `hospitaldata` SET `hcode`
='{hcode}',`hname`='{hname}',`normalbed`='{nbed}',`hicubed`='{hbed}',`icube
d`='{ibed}',`vbed`='{vbed}' WHERE `hospitaldata`.`id`={id}")
post=Hospitaldata.query.filter_by(id=id).first()
114

post.hcode=hcode
post.hname=hname
post.normalbed=nbed
post.hicubed=hbed
post.icubed=ibed
post.vbed=vbed
db.session.commit()
flash("Slot Updated","info")
return redirect("/addhospitalinfo")

# posts=Hospitaldata.query.filter_by(id=id).first()
return render_template("hedit.html",posts=posts)

@app.route("/hdelete/<string:id>",methods=['POST','GET'])
@login_required
def hdelete(id):
# db.engine.execute(f"DELETE FROM `hospitaldata` WHERE
`hospitaldata`.`id`={id}")
post=Hospitaldata.query.filter_by(id=id).first()
db.session.delete(post)
db.session.commit()
flash("Date Deleted","danger")
return redirect("/addhospitalinfo")

@app.route("/pdetails",methods=['GET'])
@login_required
def pdetails():
code=current_user.srfid
print(code)
data=Bookingpatient.query.filter_by(srfid=code).first()
return render_template("detials.html",data=data)

@app.route("/slotbooking",methods=['POST','GET'])
@login_required
def slotbooking():
# query1=db.engine.execute(f"SELECT * FROM `hospitaldata` ")
# query=db.engine.execute(f"SELECT * FROM `hospitaldata` ")
query1=Hospitaldata.query.all()
query=Hospitaldata.query.all()
if request.method=="POST":

srfid=request.form.get('srfid')
bedtype=request.form.get('bedtype')
hcode=request.form.get('hcode')
spo2=request.form.get('spo2')
pname=request.form.get('pname')
115

pphone=request.form.get('pphone')
paddress=request.form.get('paddress')
check2=Hospitaldata.query.filter_by(hcode=hcode).first()
checkpatient=Bookingpatient.query.filter_by(srfid=srfid).first()
if checkpatient:
flash("already srd id is registered ","warning")
return
render_template("booking.html",query=query,query1=query1)

if not check2:
flash("Hospital Code not exist","warning")
return
render_template("booking.html",query=query,query1=query1)

code=hcode
# dbb=db.engine.execute(f"SELECT * FROM `hospitaldata` WHERE
`hospitaldata`.`hcode`='{code}' ")
dbb=Hospitaldata.query.filter_by(hcode=hcode).first()
bedtype=bedtype
if bedtype=="NormalBed":
for d in dbb:
seat=d.normalbed
print(seat)
ar=Hospitaldata.query.filter_by(hcode=code).first()
ar.normalbed=seat-1
db.session.commit()

elif bedtype=="HICUBed":
for d in dbb:
seat=d.hicubed
print(seat)
ar=Hospitaldata.query.filter_by(hcode=code).first()
ar.hicubed=seat-1
db.session.commit()

elif bedtype=="ICUBed":
for d in dbb:
seat=d.icubed
print(seat)
ar=Hospitaldata.query.filter_by(hcode=code).first()
ar.icubed=seat-1
db.session.commit()

elif bedtype=="VENTILATORBed":
for d in dbb:
seat=d.vbed
ar=Hospitaldata.query.filter_by(hcode=code).first()
116

ar.vbed=seat-1
db.session.commit()
else:
pass

check=Hospitaldata.query.filter_by(hcode=hcode).first()
if check!=None:
if(seat>0 and check):

res=Bookingpatient(srfid=srfid,bedtype=bedtype,hcode=hcode,spo2=spo2,pname
=pname,pphone=pphone,paddress=paddress)
db.session.add(res)
db.session.commit()
flash("Slot is Booked kindly Visit Hospital for Further
Procedure","success")
return
render_template("booking.html",query=query,query1=query1)
else:
flash("Something Went Wrong","danger")
return
render_template("booking.html",query=query,query1=query1)
else:
flash("Give the proper hospital Code","info")
return
render_template("booking.html",query=query,query1=query1)

return render_template("booking.html",query=query,query1=query1)

app.run(debug=True)

You might also like