Last active
May 12, 2021 19:27
-
-
Save vipul43/c978d4039659607411a62495676e089b to your computer and use it in GitHub Desktop.
backup of hospital database structure (without data)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- MariaDB dump 10.19 Distrib 10.5.9-MariaDB, for osx10.16 (x86_64) | |
-- | |
-- Host: localhost Database: hospital | |
-- ------------------------------------------------------ | |
-- Server version 10.5.9-MariaDB | |
/*!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 */; | |
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; | |
/*!40103 SET TIME_ZONE='+00:00' */; | |
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; | |
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; | |
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; | |
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; | |
-- | |
-- Table structure for table `admit` | |
-- | |
DROP TABLE IF EXISTS `admit`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `admit` ( | |
`patient_id` varchar(10) NOT NULL, | |
`room_id` varchar(10) NOT NULL, | |
PRIMARY KEY (`patient_id`,`room_id`), | |
KEY `room_id` (`room_id`), | |
CONSTRAINT `admit_ibfk_1` FOREIGN KEY (`patient_id`) REFERENCES `surgery` (`patient_id`) ON DELETE CASCADE ON UPDATE CASCADE, | |
CONSTRAINT `admit_ibfk_2` FOREIGN KEY (`room_id`) REFERENCES `admit_room` (`id`) ON DELETE CASCADE ON UPDATE CASCADE | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Table structure for table `admit_room` | |
-- | |
DROP TABLE IF EXISTS `admit_room`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `admit_room` ( | |
`id` varchar(10) NOT NULL, | |
`availability` tinyint(1) DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Table structure for table `appointment` | |
-- | |
DROP TABLE IF EXISTS `appointment`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `appointment` ( | |
`id` varchar(10) NOT NULL, | |
`patient_id` varchar(10) NOT NULL, | |
`patient_name` varchar(50) DEFAULT NULL, | |
`date_and_time` datetime DEFAULT NULL, | |
`reason` varchar(80) DEFAULT NULL, | |
PRIMARY KEY (`id`,`patient_id`), | |
KEY `patient_id` (`patient_id`,`patient_name`), | |
CONSTRAINT `appointment_ibfk_1` FOREIGN KEY (`patient_id`, `patient_name`) REFERENCES `patient` (`id`, `name`) ON DELETE CASCADE ON UPDATE CASCADE | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Table structure for table `assign` | |
-- | |
DROP TABLE IF EXISTS `assign`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `assign` ( | |
`nurse_id` varchar(10) DEFAULT NULL, | |
`patient_id` varchar(10) DEFAULT NULL, | |
KEY `nurse_id` (`nurse_id`), | |
KEY `patient_id` (`patient_id`), | |
CONSTRAINT `assign_ibfk_1` FOREIGN KEY (`nurse_id`) REFERENCES `nurse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, | |
CONSTRAINT `assign_ibfk_2` FOREIGN KEY (`patient_id`) REFERENCES `surgery` (`patient_id`) ON DELETE CASCADE ON UPDATE CASCADE | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Table structure for table `attend` | |
-- | |
DROP TABLE IF EXISTS `attend`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `attend` ( | |
`nurse_id` varchar(10) DEFAULT NULL, | |
`epatient_id` varchar(10) DEFAULT NULL, | |
KEY `nurse_id` (`nurse_id`), | |
KEY `epatient_id` (`epatient_id`), | |
CONSTRAINT `attend_ibfk_1` FOREIGN KEY (`nurse_id`) REFERENCES `nurse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, | |
CONSTRAINT `attend_ibfk_2` FOREIGN KEY (`epatient_id`) REFERENCES `emergency_patient` (`id`) ON DELETE CASCADE ON UPDATE CASCADE | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Table structure for table `avail` | |
-- | |
DROP TABLE IF EXISTS `avail`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `avail` ( | |
`patient_id` varchar(10) DEFAULT NULL, | |
`service_id` varchar(10) DEFAULT NULL, | |
KEY `patient_id` (`patient_id`), | |
KEY `service_id` (`service_id`), | |
CONSTRAINT `avail_ibfk_1` FOREIGN KEY (`patient_id`) REFERENCES `patient` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, | |
CONSTRAINT `avail_ibfk_2` FOREIGN KEY (`service_id`) REFERENCES `service` (`id`) ON DELETE CASCADE ON UPDATE CASCADE | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Table structure for table `billing` | |
-- | |
DROP TABLE IF EXISTS `billing`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `billing` ( | |
`id` varchar(10) NOT NULL, | |
`type` varchar(10) DEFAULT NULL, | |
`patient_id` varchar(10) DEFAULT NULL, | |
`amount` float DEFAULT NULL, | |
`date` datetime DEFAULT NULL, | |
`contact_number` varchar(10) DEFAULT NULL, | |
PRIMARY KEY (`id`), | |
KEY `patient_id` (`patient_id`), | |
CONSTRAINT `billing_ibfk_1` FOREIGN KEY (`patient_id`) REFERENCES `patient` (`id`) ON DELETE CASCADE ON UPDATE CASCADE | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Temporary table structure for view `billing_service_surgery` | |
-- | |
DROP TABLE IF EXISTS `billing_service_surgery`; | |
/*!50001 DROP VIEW IF EXISTS `billing_service_surgery`*/; | |
SET @saved_cs_client = @@character_set_client; | |
SET character_set_client = utf8; | |
/*!50001 CREATE TABLE `billing_service_surgery` ( | |
`billing_id` tinyint NOT NULL, | |
`patient_id` tinyint NOT NULL, | |
`billing_amount` tinyint NOT NULL, | |
`billing_date` tinyint NOT NULL, | |
`service_id` tinyint NOT NULL, | |
`service_name` tinyint NOT NULL, | |
`service_availed_date` tinyint NOT NULL, | |
`surgery_id` tinyint NOT NULL, | |
`time_of_surgery` tinyint NOT NULL | |
) ENGINE=MyISAM */; | |
SET character_set_client = @saved_cs_client; | |
-- | |
-- Table structure for table `booking` | |
-- | |
DROP TABLE IF EXISTS `booking`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `booking` ( | |
`patient_id` varchar(10) NOT NULL, | |
`appointment_id` varchar(10) DEFAULT NULL, | |
PRIMARY KEY (`patient_id`), | |
KEY `appointment_id` (`appointment_id`), | |
CONSTRAINT `booking_ibfk_1` FOREIGN KEY (`patient_id`) REFERENCES `patient` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, | |
CONSTRAINT `booking_ibfk_2` FOREIGN KEY (`appointment_id`) REFERENCES `appointment` (`id`) ON DELETE CASCADE ON UPDATE CASCADE | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Table structure for table `death_record` | |
-- | |
DROP TABLE IF EXISTS `death_record`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `death_record` ( | |
`id` varchar(10) NOT NULL, | |
`patient_name` varchar(50) DEFAULT NULL, | |
`cause` varchar(50) DEFAULT NULL, | |
`date_of_death` datetime DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Table structure for table `doctor` | |
-- | |
DROP TABLE IF EXISTS `doctor`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `doctor` ( | |
`id` varchar(10) NOT NULL, | |
`name` varchar(50) DEFAULT NULL, | |
`experience` float DEFAULT NULL, | |
`designation` varchar(20) DEFAULT NULL, | |
`date_joined` date DEFAULT NULL, | |
`contact_number` varchar(10) DEFAULT NULL, | |
`working_hours` float DEFAULT NULL, | |
`salary` float DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Temporary table structure for view `doctor_appointments` | |
-- | |
DROP TABLE IF EXISTS `doctor_appointments`; | |
/*!50001 DROP VIEW IF EXISTS `doctor_appointments`*/; | |
SET @saved_cs_client = @@character_set_client; | |
SET character_set_client = utf8; | |
/*!50001 CREATE TABLE `doctor_appointments` ( | |
`doctor_id` tinyint NOT NULL, | |
`doctor_name` tinyint NOT NULL, | |
`appointment_id` tinyint NOT NULL, | |
`patient_name` tinyint NOT NULL, | |
`patient_id` tinyint NOT NULL, | |
`reason` tinyint NOT NULL | |
) ENGINE=MyISAM */; | |
SET character_set_client = @saved_cs_client; | |
-- | |
-- Temporary table structure for view `doctor_epatient_nurse` | |
-- | |
DROP TABLE IF EXISTS `doctor_epatient_nurse`; | |
/*!50001 DROP VIEW IF EXISTS `doctor_epatient_nurse`*/; | |
SET @saved_cs_client = @@character_set_client; | |
SET character_set_client = utf8; | |
/*!50001 CREATE TABLE `doctor_epatient_nurse` ( | |
`doctor_name` tinyint NOT NULL, | |
`doctor_id` tinyint NOT NULL, | |
`e_patient_id` tinyint NOT NULL, | |
`e_patient_name` tinyint NOT NULL, | |
`nurse_id` tinyint NOT NULL, | |
`nurse_name` tinyint NOT NULL | |
) ENGINE=MyISAM */; | |
SET character_set_client = @saved_cs_client; | |
-- | |
-- Temporary table structure for view `doctor_perform_surgery` | |
-- | |
DROP TABLE IF EXISTS `doctor_perform_surgery`; | |
/*!50001 DROP VIEW IF EXISTS `doctor_perform_surgery`*/; | |
SET @saved_cs_client = @@character_set_client; | |
SET character_set_client = utf8; | |
/*!50001 CREATE TABLE `doctor_perform_surgery` ( | |
`patient_id` tinyint NOT NULL, | |
`patient_name` tinyint NOT NULL, | |
`time_of_surgery` tinyint NOT NULL, | |
`doctor_id` tinyint NOT NULL, | |
`doctor_name` tinyint NOT NULL | |
) ENGINE=MyISAM */; | |
SET character_set_client = @saved_cs_client; | |
-- | |
-- Temporary table structure for view `doctor_schedule_patient` | |
-- | |
DROP TABLE IF EXISTS `doctor_schedule_patient`; | |
/*!50001 DROP VIEW IF EXISTS `doctor_schedule_patient`*/; | |
SET @saved_cs_client = @@character_set_client; | |
SET character_set_client = utf8; | |
/*!50001 CREATE TABLE `doctor_schedule_patient` ( | |
`Doctor_id` tinyint NOT NULL, | |
`Doctor_name` tinyint NOT NULL, | |
`designation` tinyint NOT NULL, | |
`patient_id` tinyint NOT NULL, | |
`patient_name` tinyint NOT NULL | |
) ENGINE=MyISAM */; | |
SET character_set_client = @saved_cs_client; | |
-- | |
-- Temporary table structure for view `doctor_surgery_nurse` | |
-- | |
DROP TABLE IF EXISTS `doctor_surgery_nurse`; | |
/*!50001 DROP VIEW IF EXISTS `doctor_surgery_nurse`*/; | |
SET @saved_cs_client = @@character_set_client; | |
SET character_set_client = utf8; | |
/*!50001 CREATE TABLE `doctor_surgery_nurse` ( | |
`doctor_id` tinyint NOT NULL, | |
`doctor_name` tinyint NOT NULL, | |
`surgery_id` tinyint NOT NULL, | |
`patient_id` tinyint NOT NULL, | |
`patient_name` tinyint NOT NULL, | |
`nurse_id` tinyint NOT NULL, | |
`nurse_name` tinyint NOT NULL | |
) ENGINE=MyISAM */; | |
SET character_set_client = @saved_cs_client; | |
-- | |
-- Table structure for table `emergency_patient` | |
-- | |
DROP TABLE IF EXISTS `emergency_patient`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `emergency_patient` ( | |
`id` varchar(10) NOT NULL, | |
`name` varchar(50) DEFAULT NULL, | |
`gender` varchar(10) DEFAULT NULL, | |
`address` varchar(80) DEFAULT NULL, | |
`contact_number` varchar(10) DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Temporary table structure for view `employee` | |
-- | |
DROP TABLE IF EXISTS `employee`; | |
/*!50001 DROP VIEW IF EXISTS `employee`*/; | |
SET @saved_cs_client = @@character_set_client; | |
SET character_set_client = utf8; | |
/*!50001 CREATE TABLE `employee` ( | |
`employee_id` tinyint NOT NULL, | |
`employee_name` tinyint NOT NULL, | |
`working_hours` tinyint NOT NULL, | |
`employee_salary` tinyint NOT NULL | |
) ENGINE=MyISAM */; | |
SET character_set_client = @saved_cs_client; | |
-- | |
-- Table structure for table `generate` | |
-- | |
DROP TABLE IF EXISTS `generate`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `generate` ( | |
`surgery_id` varchar(10) NOT NULL, | |
`billing_id` varchar(10) NOT NULL, | |
PRIMARY KEY (`surgery_id`,`billing_id`), | |
KEY `billing_id` (`billing_id`), | |
CONSTRAINT `generate_ibfk_1` FOREIGN KEY (`surgery_id`) REFERENCES `surgery` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, | |
CONSTRAINT `generate_ibfk_2` FOREIGN KEY (`billing_id`) REFERENCES `billing` (`id`) ON DELETE CASCADE ON UPDATE CASCADE | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Table structure for table `nurse` | |
-- | |
DROP TABLE IF EXISTS `nurse`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `nurse` ( | |
`id` varchar(10) NOT NULL, | |
`name` varchar(50) DEFAULT NULL, | |
`experience` float DEFAULT NULL, | |
`date_joined` date DEFAULT NULL, | |
`contact_number` varchar(10) DEFAULT NULL, | |
`working_hours` float DEFAULT NULL, | |
`salary` float DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Temporary table structure for view `nurse_assign_patient` | |
-- | |
DROP TABLE IF EXISTS `nurse_assign_patient`; | |
/*!50001 DROP VIEW IF EXISTS `nurse_assign_patient`*/; | |
SET @saved_cs_client = @@character_set_client; | |
SET character_set_client = utf8; | |
/*!50001 CREATE TABLE `nurse_assign_patient` ( | |
`nurse_id` tinyint NOT NULL, | |
`nurse_name` tinyint NOT NULL, | |
`patient_Id` tinyint NOT NULL, | |
`patient_name` tinyint NOT NULL | |
) ENGINE=MyISAM */; | |
SET character_set_client = @saved_cs_client; | |
-- | |
-- Temporary table structure for view `nurse_assign_surgery` | |
-- | |
DROP TABLE IF EXISTS `nurse_assign_surgery`; | |
/*!50001 DROP VIEW IF EXISTS `nurse_assign_surgery`*/; | |
SET @saved_cs_client = @@character_set_client; | |
SET character_set_client = utf8; | |
/*!50001 CREATE TABLE `nurse_assign_surgery` ( | |
`id` tinyint NOT NULL, | |
`patient_id` tinyint NOT NULL, | |
`patient_name` tinyint NOT NULL, | |
`nurse_name` tinyint NOT NULL | |
) ENGINE=MyISAM */; | |
SET character_set_client = @saved_cs_client; | |
-- | |
-- Table structure for table `occur` | |
-- | |
DROP TABLE IF EXISTS `occur`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `occur` ( | |
`surgery_id` varchar(10) DEFAULT NULL, | |
`theatre_id` varchar(10) NOT NULL, | |
PRIMARY KEY (`theatre_id`), | |
KEY `surgery_id` (`surgery_id`), | |
CONSTRAINT `occur_ibfk_1` FOREIGN KEY (`surgery_id`) REFERENCES `surgery` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, | |
CONSTRAINT `occur_ibfk_2` FOREIGN KEY (`theatre_id`) REFERENCES `operation_theatre` (`id`) ON DELETE CASCADE ON UPDATE CASCADE | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Table structure for table `operation_theatre` | |
-- | |
DROP TABLE IF EXISTS `operation_theatre`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `operation_theatre` ( | |
`id` varchar(10) NOT NULL, | |
`surgery_id` varchar(10) DEFAULT NULL, | |
`patient_id` varchar(10) DEFAULT NULL, | |
`availability` tinyint(1) DEFAULT NULL, | |
`room_number` int(10) DEFAULT NULL, | |
PRIMARY KEY (`id`), | |
KEY `surgery_id` (`surgery_id`), | |
KEY `patient_id` (`patient_id`), | |
CONSTRAINT `operation_theatre_ibfk_1` FOREIGN KEY (`surgery_id`) REFERENCES `surgery` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, | |
CONSTRAINT `operation_theatre_ibfk_2` FOREIGN KEY (`patient_id`) REFERENCES `patient` (`id`) ON DELETE CASCADE ON UPDATE CASCADE | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Table structure for table `patient` | |
-- | |
DROP TABLE IF EXISTS `patient`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `patient` ( | |
`id` varchar(10) NOT NULL, | |
`name` varchar(50) NOT NULL, | |
`address` varchar(80) DEFAULT NULL, | |
`contact_number` varchar(10) DEFAULT NULL, | |
`gender` varchar(10) DEFAULT NULL, | |
PRIMARY KEY (`id`,`name`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Temporary table structure for view `patient_appointment_service` | |
-- | |
DROP TABLE IF EXISTS `patient_appointment_service`; | |
/*!50001 DROP VIEW IF EXISTS `patient_appointment_service`*/; | |
SET @saved_cs_client = @@character_set_client; | |
SET character_set_client = utf8; | |
/*!50001 CREATE TABLE `patient_appointment_service` ( | |
`patient_id` tinyint NOT NULL, | |
`patient_name` tinyint NOT NULL, | |
`appointment_reason` tinyint NOT NULL, | |
`appointment_date_and_time` tinyint NOT NULL, | |
`service_name` tinyint NOT NULL, | |
`service_availed_date` tinyint NOT NULL | |
) ENGINE=MyISAM */; | |
SET character_set_client = @saved_cs_client; | |
-- | |
-- Temporary table structure for view `patient_epatient` | |
-- | |
DROP TABLE IF EXISTS `patient_epatient`; | |
/*!50001 DROP VIEW IF EXISTS `patient_epatient`*/; | |
SET @saved_cs_client = @@character_set_client; | |
SET character_set_client = utf8; | |
/*!50001 CREATE TABLE `patient_epatient` ( | |
`patient_id` tinyint NOT NULL, | |
`patient_name` tinyint NOT NULL | |
) ENGINE=MyISAM */; | |
SET character_set_client = @saved_cs_client; | |
-- | |
-- Temporary table structure for view `patient_service` | |
-- | |
DROP TABLE IF EXISTS `patient_service`; | |
/*!50001 DROP VIEW IF EXISTS `patient_service`*/; | |
SET @saved_cs_client = @@character_set_client; | |
SET character_set_client = utf8; | |
/*!50001 CREATE TABLE `patient_service` ( | |
`patient_id` tinyint NOT NULL, | |
`patient_name` tinyint NOT NULL, | |
`service_id` tinyint NOT NULL, | |
`service_name` tinyint NOT NULL, | |
`date_availed` tinyint NOT NULL | |
) ENGINE=MyISAM */; | |
SET character_set_client = @saved_cs_client; | |
-- | |
-- Table structure for table `payment` | |
-- | |
DROP TABLE IF EXISTS `payment`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `payment` ( | |
`service_id` varchar(10) DEFAULT NULL, | |
`billing_id` varchar(10) NOT NULL, | |
PRIMARY KEY (`billing_id`), | |
KEY `service_id` (`service_id`), | |
CONSTRAINT `payment_ibfk_1` FOREIGN KEY (`service_id`) REFERENCES `service` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, | |
CONSTRAINT `payment_ibfk_2` FOREIGN KEY (`billing_id`) REFERENCES `billing` (`id`) ON DELETE CASCADE ON UPDATE CASCADE | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Table structure for table `perform` | |
-- | |
DROP TABLE IF EXISTS `perform`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `perform` ( | |
`doctor_id` varchar(10) DEFAULT NULL, | |
`surgery_id` varchar(10) DEFAULT NULL, | |
KEY `doctor_id` (`doctor_id`), | |
KEY `surgery_id` (`surgery_id`), | |
CONSTRAINT `perform_ibfk_1` FOREIGN KEY (`doctor_id`) REFERENCES `doctor` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, | |
CONSTRAINT `perform_ibfk_2` FOREIGN KEY (`surgery_id`) REFERENCES `surgery` (`id`) ON DELETE CASCADE ON UPDATE CASCADE | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Table structure for table `schedule` | |
-- | |
DROP TABLE IF EXISTS `schedule`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `schedule` ( | |
`patient_id` varchar(10) DEFAULT NULL, | |
`doctor_id` varchar(10) DEFAULT NULL, | |
KEY `patient_id` (`patient_id`), | |
KEY `doctor_id` (`doctor_id`), | |
CONSTRAINT `schedule_ibfk_1` FOREIGN KEY (`patient_id`) REFERENCES `appointment` (`patient_id`) ON DELETE CASCADE ON UPDATE CASCADE, | |
CONSTRAINT `schedule_ibfk_2` FOREIGN KEY (`doctor_id`) REFERENCES `doctor` (`id`) ON DELETE CASCADE ON UPDATE CASCADE | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Table structure for table `service` | |
-- | |
DROP TABLE IF EXISTS `service`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `service` ( | |
`id` varchar(10) NOT NULL, | |
`name` varchar(50) DEFAULT NULL, | |
`patient_id` varchar(10) DEFAULT NULL, | |
`availed_date` datetime DEFAULT NULL, | |
PRIMARY KEY (`id`), | |
KEY `patient_id` (`patient_id`), | |
CONSTRAINT `service_ibfk_1` FOREIGN KEY (`patient_id`) REFERENCES `patient` (`id`) ON DELETE CASCADE ON UPDATE CASCADE | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Table structure for table `surgery` | |
-- | |
DROP TABLE IF EXISTS `surgery`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `surgery` ( | |
`id` varchar(10) NOT NULL, | |
`patient_id` varchar(10) NOT NULL, | |
`patient_name` varchar(50) DEFAULT NULL, | |
`time_of_surgery` datetime DEFAULT NULL, | |
PRIMARY KEY (`id`,`patient_id`), | |
KEY `patient_id` (`patient_id`,`patient_name`), | |
CONSTRAINT `surgery_ibfk_1` FOREIGN KEY (`patient_id`, `patient_name`) REFERENCES `patient` (`id`, `name`) ON DELETE CASCADE ON UPDATE CASCADE | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Temporary table structure for view `surgery_admit_admitroom` | |
-- | |
DROP TABLE IF EXISTS `surgery_admit_admitroom`; | |
/*!50001 DROP VIEW IF EXISTS `surgery_admit_admitroom`*/; | |
SET @saved_cs_client = @@character_set_client; | |
SET character_set_client = utf8; | |
/*!50001 CREATE TABLE `surgery_admit_admitroom` ( | |
`id` tinyint NOT NULL, | |
`patient_id` tinyint NOT NULL, | |
`patient_name` tinyint NOT NULL, | |
`room_id` tinyint NOT NULL, | |
`availability` tinyint NOT NULL | |
) ENGINE=MyISAM */; | |
SET character_set_client = @saved_cs_client; | |
-- | |
-- Temporary table structure for view `surgery_occur_operationtheatre` | |
-- | |
DROP TABLE IF EXISTS `surgery_occur_operationtheatre`; | |
/*!50001 DROP VIEW IF EXISTS `surgery_occur_operationtheatre`*/; | |
SET @saved_cs_client = @@character_set_client; | |
SET character_set_client = utf8; | |
/*!50001 CREATE TABLE `surgery_occur_operationtheatre` ( | |
`id` tinyint NOT NULL, | |
`patient_id` tinyint NOT NULL, | |
`patient_name` tinyint NOT NULL, | |
`operation_theatre_id` tinyint NOT NULL, | |
`availability` tinyint NOT NULL | |
) ENGINE=MyISAM */; | |
SET character_set_client = @saved_cs_client; | |
-- | |
-- Table structure for table `treat` | |
-- | |
DROP TABLE IF EXISTS `treat`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `treat` ( | |
`epatient_id` varchar(10) DEFAULT NULL, | |
`doctor_id` varchar(10) DEFAULT NULL, | |
KEY `epatient_id` (`epatient_id`), | |
KEY `doctor_id` (`doctor_id`), | |
CONSTRAINT `treat_ibfk_1` FOREIGN KEY (`epatient_id`) REFERENCES `emergency_patient` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, | |
CONSTRAINT `treat_ibfk_2` FOREIGN KEY (`doctor_id`) REFERENCES `doctor` (`id`) ON DELETE CASCADE ON UPDATE CASCADE | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Table structure for table `visit` | |
-- | |
DROP TABLE IF EXISTS `visit`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `visit` ( | |
`visitor_id` varchar(10) DEFAULT NULL, | |
`patient_id` varchar(10) DEFAULT NULL, | |
KEY `visitor_id` (`visitor_id`), | |
KEY `patient_id` (`patient_id`), | |
CONSTRAINT `visit_ibfk_1` FOREIGN KEY (`visitor_id`) REFERENCES `visitor` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, | |
CONSTRAINT `visit_ibfk_2` FOREIGN KEY (`patient_id`) REFERENCES `patient` (`id`) ON DELETE CASCADE ON UPDATE CASCADE | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Table structure for table `visitor` | |
-- | |
DROP TABLE IF EXISTS `visitor`; | |
/*!40101 SET @saved_cs_client = @@character_set_client */; | |
/*!40101 SET character_set_client = utf8 */; | |
CREATE TABLE `visitor` ( | |
`id` varchar(10) NOT NULL, | |
`name` varchar(50) DEFAULT NULL, | |
`contact_number` varchar(10) DEFAULT NULL, | |
`gender` varchar(10) DEFAULT NULL, | |
`address` varchar(80) DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; | |
/*!40101 SET character_set_client = @saved_cs_client */; | |
-- | |
-- Temporary table structure for view `visitor_visit_patient` | |
-- | |
DROP TABLE IF EXISTS `visitor_visit_patient`; | |
/*!50001 DROP VIEW IF EXISTS `visitor_visit_patient`*/; | |
SET @saved_cs_client = @@character_set_client; | |
SET character_set_client = utf8; | |
/*!50001 CREATE TABLE `visitor_visit_patient` ( | |
`vistor_id` tinyint NOT NULL, | |
`visitor_name` tinyint NOT NULL, | |
`vistor_number` tinyint NOT NULL, | |
`patient_id` tinyint NOT NULL, | |
`patient_name` tinyint NOT NULL | |
) ENGINE=MyISAM */; | |
SET character_set_client = @saved_cs_client; | |
-- | |
-- Final view structure for view `billing_service_surgery` | |
-- | |
/*!50001 DROP TABLE IF EXISTS `billing_service_surgery`*/; | |
/*!50001 DROP VIEW IF EXISTS `billing_service_surgery`*/; | |
/*!50001 SET @saved_cs_client = @@character_set_client */; | |
/*!50001 SET @saved_cs_results = @@character_set_results */; | |
/*!50001 SET @saved_col_connection = @@collation_connection */; | |
/*!50001 SET character_set_client = utf8 */; | |
/*!50001 SET character_set_results = utf8 */; | |
/*!50001 SET collation_connection = utf8_general_ci */; | |
/*!50001 CREATE ALGORITHM=UNDEFINED */ | |
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ | |
/*!50001 VIEW `billing_service_surgery` AS (select `billing`.`id` AS `billing_id`,`billing`.`patient_id` AS `patient_id`,`billing`.`amount` AS `billing_amount`,`billing`.`date` AS `billing_date`,`service`.`id` AS `service_id`,`service`.`name` AS `service_name`,`service`.`availed_date` AS `service_availed_date`,`surgery`.`id` AS `surgery_id`,`surgery`.`time_of_surgery` AS `time_of_surgery` from ((`billing` left join `service` on(`billing`.`patient_id` = `service`.`patient_id`)) left join `surgery` on(`billing`.`patient_id` = `surgery`.`patient_id`))) */; | |
/*!50001 SET character_set_client = @saved_cs_client */; | |
/*!50001 SET character_set_results = @saved_cs_results */; | |
/*!50001 SET collation_connection = @saved_col_connection */; | |
-- | |
-- Final view structure for view `doctor_appointments` | |
-- | |
/*!50001 DROP TABLE IF EXISTS `doctor_appointments`*/; | |
/*!50001 DROP VIEW IF EXISTS `doctor_appointments`*/; | |
/*!50001 SET @saved_cs_client = @@character_set_client */; | |
/*!50001 SET @saved_cs_results = @@character_set_results */; | |
/*!50001 SET @saved_col_connection = @@collation_connection */; | |
/*!50001 SET character_set_client = utf8 */; | |
/*!50001 SET character_set_results = utf8 */; | |
/*!50001 SET collation_connection = utf8_general_ci */; | |
/*!50001 CREATE ALGORITHM=UNDEFINED */ | |
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ | |
/*!50001 VIEW `doctor_appointments` AS (select `doctor`.`id` AS `doctor_id`,`doctor`.`name` AS `doctor_name`,`appointment`.`id` AS `appointment_id`,`appointment`.`patient_name` AS `patient_name`,`appointment`.`patient_id` AS `patient_id`,`appointment`.`reason` AS `reason` from (`doctor` join (`schedule` join `appointment` on(`appointment`.`patient_id` = `schedule`.`patient_id`)) on(`doctor`.`id` = `schedule`.`doctor_id`))) */; | |
/*!50001 SET character_set_client = @saved_cs_client */; | |
/*!50001 SET character_set_results = @saved_cs_results */; | |
/*!50001 SET collation_connection = @saved_col_connection */; | |
-- | |
-- Final view structure for view `doctor_epatient_nurse` | |
-- | |
/*!50001 DROP TABLE IF EXISTS `doctor_epatient_nurse`*/; | |
/*!50001 DROP VIEW IF EXISTS `doctor_epatient_nurse`*/; | |
/*!50001 SET @saved_cs_client = @@character_set_client */; | |
/*!50001 SET @saved_cs_results = @@character_set_results */; | |
/*!50001 SET @saved_col_connection = @@collation_connection */; | |
/*!50001 SET character_set_client = utf8 */; | |
/*!50001 SET character_set_results = utf8 */; | |
/*!50001 SET collation_connection = utf8_general_ci */; | |
/*!50001 CREATE ALGORITHM=UNDEFINED */ | |
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ | |
/*!50001 VIEW `doctor_epatient_nurse` AS (select `doctor`.`name` AS `doctor_name`,`doctor`.`id` AS `doctor_id`,`emergency_patient`.`id` AS `e_patient_id`,`emergency_patient`.`name` AS `e_patient_name`,`nurse`.`id` AS `nurse_id`,`nurse`.`name` AS `nurse_name` from (`doctor` join (`treat` join (`emergency_patient` join (`attend` join `nurse` on(`attend`.`nurse_id` = `nurse`.`id`)) on(`emergency_patient`.`id` = `attend`.`epatient_id`)) on(`emergency_patient`.`id` = `treat`.`epatient_id`)) on(`doctor`.`id` = `treat`.`doctor_id`))) */; | |
/*!50001 SET character_set_client = @saved_cs_client */; | |
/*!50001 SET character_set_results = @saved_cs_results */; | |
/*!50001 SET collation_connection = @saved_col_connection */; | |
-- | |
-- Final view structure for view `doctor_perform_surgery` | |
-- | |
/*!50001 DROP TABLE IF EXISTS `doctor_perform_surgery`*/; | |
/*!50001 DROP VIEW IF EXISTS `doctor_perform_surgery`*/; | |
/*!50001 SET @saved_cs_client = @@character_set_client */; | |
/*!50001 SET @saved_cs_results = @@character_set_results */; | |
/*!50001 SET @saved_col_connection = @@collation_connection */; | |
/*!50001 SET character_set_client = utf8 */; | |
/*!50001 SET character_set_results = utf8 */; | |
/*!50001 SET collation_connection = utf8_general_ci */; | |
/*!50001 CREATE ALGORITHM=UNDEFINED */ | |
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ | |
/*!50001 VIEW `doctor_perform_surgery` AS (select `surgery`.`patient_id` AS `patient_id`,`surgery`.`patient_name` AS `patient_name`,`surgery`.`time_of_surgery` AS `time_of_surgery`,`doctor`.`id` AS `doctor_id`,`doctor`.`name` AS `doctor_name` from ((`surgery` join `perform` on(`surgery`.`id` = `perform`.`surgery_id`)) join `doctor` on(`perform`.`doctor_id` = `doctor`.`id`))) */; | |
/*!50001 SET character_set_client = @saved_cs_client */; | |
/*!50001 SET character_set_results = @saved_cs_results */; | |
/*!50001 SET collation_connection = @saved_col_connection */; | |
-- | |
-- Final view structure for view `doctor_schedule_patient` | |
-- | |
/*!50001 DROP TABLE IF EXISTS `doctor_schedule_patient`*/; | |
/*!50001 DROP VIEW IF EXISTS `doctor_schedule_patient`*/; | |
/*!50001 SET @saved_cs_client = @@character_set_client */; | |
/*!50001 SET @saved_cs_results = @@character_set_results */; | |
/*!50001 SET @saved_col_connection = @@collation_connection */; | |
/*!50001 SET character_set_client = utf8 */; | |
/*!50001 SET character_set_results = utf8 */; | |
/*!50001 SET collation_connection = utf8_general_ci */; | |
/*!50001 CREATE ALGORITHM=UNDEFINED */ | |
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ | |
/*!50001 VIEW `doctor_schedule_patient` AS (select `doctor`.`id` AS `Doctor_id`,`doctor`.`name` AS `Doctor_name`,`doctor`.`designation` AS `designation`,`patient`.`id` AS `patient_id`,`patient`.`name` AS `patient_name` from ((`doctor` join `schedule` on(`doctor`.`id` = `schedule`.`doctor_id`)) join `patient` on(`patient`.`id` = `schedule`.`patient_id`))) */; | |
/*!50001 SET character_set_client = @saved_cs_client */; | |
/*!50001 SET character_set_results = @saved_cs_results */; | |
/*!50001 SET collation_connection = @saved_col_connection */; | |
-- | |
-- Final view structure for view `doctor_surgery_nurse` | |
-- | |
/*!50001 DROP TABLE IF EXISTS `doctor_surgery_nurse`*/; | |
/*!50001 DROP VIEW IF EXISTS `doctor_surgery_nurse`*/; | |
/*!50001 SET @saved_cs_client = @@character_set_client */; | |
/*!50001 SET @saved_cs_results = @@character_set_results */; | |
/*!50001 SET @saved_col_connection = @@collation_connection */; | |
/*!50001 SET character_set_client = utf8 */; | |
/*!50001 SET character_set_results = utf8 */; | |
/*!50001 SET collation_connection = utf8_general_ci */; | |
/*!50001 CREATE ALGORITHM=UNDEFINED */ | |
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ | |
/*!50001 VIEW `doctor_surgery_nurse` AS (select `doctor`.`id` AS `doctor_id`,`doctor`.`name` AS `doctor_name`,`surgery`.`id` AS `surgery_id`,`surgery`.`patient_id` AS `patient_id`,`surgery`.`patient_name` AS `patient_name`,`nurse`.`id` AS `nurse_id`,`nurse`.`name` AS `nurse_name` from (`doctor` join (`perform` join (`surgery` join (`assign` join `nurse` on(`assign`.`nurse_id` = `nurse`.`id`)) on(`assign`.`patient_id` = `surgery`.`patient_id`)) on(`surgery`.`id` = `perform`.`surgery_id`)) on(`doctor`.`id` = `perform`.`doctor_id`))) */; | |
/*!50001 SET character_set_client = @saved_cs_client */; | |
/*!50001 SET character_set_results = @saved_cs_results */; | |
/*!50001 SET collation_connection = @saved_col_connection */; | |
-- | |
-- Final view structure for view `employee` | |
-- | |
/*!50001 DROP TABLE IF EXISTS `employee`*/; | |
/*!50001 DROP VIEW IF EXISTS `employee`*/; | |
/*!50001 SET @saved_cs_client = @@character_set_client */; | |
/*!50001 SET @saved_cs_results = @@character_set_results */; | |
/*!50001 SET @saved_col_connection = @@collation_connection */; | |
/*!50001 SET character_set_client = utf8 */; | |
/*!50001 SET character_set_results = utf8 */; | |
/*!50001 SET collation_connection = utf8_general_ci */; | |
/*!50001 CREATE ALGORITHM=UNDEFINED */ | |
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ | |
/*!50001 VIEW `employee` AS select `doctor`.`id` AS `employee_id`,`doctor`.`name` AS `employee_name`,`doctor`.`working_hours` AS `working_hours`,`doctor`.`salary` AS `employee_salary` from `doctor` union select `nurse`.`id` AS `employee_id`,`nurse`.`name` AS `employee_name`,`nurse`.`working_hours` AS `employee_working_hours`,`nurse`.`salary` AS `employee_salary` from `nurse` */; | |
/*!50001 SET character_set_client = @saved_cs_client */; | |
/*!50001 SET character_set_results = @saved_cs_results */; | |
/*!50001 SET collation_connection = @saved_col_connection */; | |
-- | |
-- Final view structure for view `nurse_assign_patient` | |
-- | |
/*!50001 DROP TABLE IF EXISTS `nurse_assign_patient`*/; | |
/*!50001 DROP VIEW IF EXISTS `nurse_assign_patient`*/; | |
/*!50001 SET @saved_cs_client = @@character_set_client */; | |
/*!50001 SET @saved_cs_results = @@character_set_results */; | |
/*!50001 SET @saved_col_connection = @@collation_connection */; | |
/*!50001 SET character_set_client = utf8 */; | |
/*!50001 SET character_set_results = utf8 */; | |
/*!50001 SET collation_connection = utf8_general_ci */; | |
/*!50001 CREATE ALGORITHM=UNDEFINED */ | |
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ | |
/*!50001 VIEW `nurse_assign_patient` AS (select `nurse`.`id` AS `nurse_id`,`nurse`.`name` AS `nurse_name`,`patient`.`id` AS `patient_Id`,`patient`.`name` AS `patient_name` from ((`patient` join `assign` on(`patient`.`id` = `assign`.`patient_id`)) join `nurse` on(`nurse`.`id` = `assign`.`nurse_id`))) */; | |
/*!50001 SET character_set_client = @saved_cs_client */; | |
/*!50001 SET character_set_results = @saved_cs_results */; | |
/*!50001 SET collation_connection = @saved_col_connection */; | |
-- | |
-- Final view structure for view `nurse_assign_surgery` | |
-- | |
/*!50001 DROP TABLE IF EXISTS `nurse_assign_surgery`*/; | |
/*!50001 DROP VIEW IF EXISTS `nurse_assign_surgery`*/; | |
/*!50001 SET @saved_cs_client = @@character_set_client */; | |
/*!50001 SET @saved_cs_results = @@character_set_results */; | |
/*!50001 SET @saved_col_connection = @@collation_connection */; | |
/*!50001 SET character_set_client = utf8 */; | |
/*!50001 SET character_set_results = utf8 */; | |
/*!50001 SET collation_connection = utf8_general_ci */; | |
/*!50001 CREATE ALGORITHM=UNDEFINED */ | |
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ | |
/*!50001 VIEW `nurse_assign_surgery` AS (select `surgery`.`id` AS `id`,`surgery`.`patient_id` AS `patient_id`,`surgery`.`patient_name` AS `patient_name`,`nurse`.`name` AS `nurse_name` from ((`assign` join `surgery` on(`assign`.`patient_id` = `surgery`.`patient_id`)) join `nurse` on(`assign`.`nurse_id` = `nurse`.`id`))) */; | |
/*!50001 SET character_set_client = @saved_cs_client */; | |
/*!50001 SET character_set_results = @saved_cs_results */; | |
/*!50001 SET collation_connection = @saved_col_connection */; | |
-- | |
-- Final view structure for view `patient_appointment_service` | |
-- | |
/*!50001 DROP TABLE IF EXISTS `patient_appointment_service`*/; | |
/*!50001 DROP VIEW IF EXISTS `patient_appointment_service`*/; | |
/*!50001 SET @saved_cs_client = @@character_set_client */; | |
/*!50001 SET @saved_cs_results = @@character_set_results */; | |
/*!50001 SET @saved_col_connection = @@collation_connection */; | |
/*!50001 SET character_set_client = utf8 */; | |
/*!50001 SET character_set_results = utf8 */; | |
/*!50001 SET collation_connection = utf8_general_ci */; | |
/*!50001 CREATE ALGORITHM=UNDEFINED */ | |
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ | |
/*!50001 VIEW `patient_appointment_service` AS (select `patient`.`id` AS `patient_id`,`patient`.`name` AS `patient_name`,`appointment`.`reason` AS `appointment_reason`,`appointment`.`date_and_time` AS `appointment_date_and_time`,`service`.`name` AS `service_name`,`service`.`availed_date` AS `service_availed_date` from ((`patient` left join `appointment` on(`patient`.`id` = `appointment`.`patient_id`)) left join `service` on(`patient`.`id` = `service`.`patient_id`))) */; | |
/*!50001 SET character_set_client = @saved_cs_client */; | |
/*!50001 SET character_set_results = @saved_cs_results */; | |
/*!50001 SET collation_connection = @saved_col_connection */; | |
-- | |
-- Final view structure for view `patient_epatient` | |
-- | |
/*!50001 DROP TABLE IF EXISTS `patient_epatient`*/; | |
/*!50001 DROP VIEW IF EXISTS `patient_epatient`*/; | |
/*!50001 SET @saved_cs_client = @@character_set_client */; | |
/*!50001 SET @saved_cs_results = @@character_set_results */; | |
/*!50001 SET @saved_col_connection = @@collation_connection */; | |
/*!50001 SET character_set_client = utf8 */; | |
/*!50001 SET character_set_results = utf8 */; | |
/*!50001 SET collation_connection = utf8_general_ci */; | |
/*!50001 CREATE ALGORITHM=UNDEFINED */ | |
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ | |
/*!50001 VIEW `patient_epatient` AS select `patient`.`id` AS `patient_id`,`patient`.`name` AS `patient_name` from `patient` union select `emergency_patient`.`id` AS `patient_id`,`emergency_patient`.`name` AS `patient_name` from `emergency_patient` */; | |
/*!50001 SET character_set_client = @saved_cs_client */; | |
/*!50001 SET character_set_results = @saved_cs_results */; | |
/*!50001 SET collation_connection = @saved_col_connection */; | |
-- | |
-- Final view structure for view `patient_service` | |
-- | |
/*!50001 DROP TABLE IF EXISTS `patient_service`*/; | |
/*!50001 DROP VIEW IF EXISTS `patient_service`*/; | |
/*!50001 SET @saved_cs_client = @@character_set_client */; | |
/*!50001 SET @saved_cs_results = @@character_set_results */; | |
/*!50001 SET @saved_col_connection = @@collation_connection */; | |
/*!50001 SET character_set_client = utf8 */; | |
/*!50001 SET character_set_results = utf8 */; | |
/*!50001 SET collation_connection = utf8_general_ci */; | |
/*!50001 CREATE ALGORITHM=UNDEFINED */ | |
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ | |
/*!50001 VIEW `patient_service` AS (select `patient`.`id` AS `patient_id`,`patient`.`name` AS `patient_name`,`service`.`id` AS `service_id`,`service`.`name` AS `service_name`,`service`.`availed_date` AS `date_availed` from (`patient` join (`avail` join `service` on(`avail`.`service_id` = `service`.`id`)) on(`patient`.`id` = `avail`.`patient_id`))) */; | |
/*!50001 SET character_set_client = @saved_cs_client */; | |
/*!50001 SET character_set_results = @saved_cs_results */; | |
/*!50001 SET collation_connection = @saved_col_connection */; | |
-- | |
-- Final view structure for view `surgery_admit_admitroom` | |
-- | |
/*!50001 DROP TABLE IF EXISTS `surgery_admit_admitroom`*/; | |
/*!50001 DROP VIEW IF EXISTS `surgery_admit_admitroom`*/; | |
/*!50001 SET @saved_cs_client = @@character_set_client */; | |
/*!50001 SET @saved_cs_results = @@character_set_results */; | |
/*!50001 SET @saved_col_connection = @@collation_connection */; | |
/*!50001 SET character_set_client = utf8 */; | |
/*!50001 SET character_set_results = utf8 */; | |
/*!50001 SET collation_connection = utf8_general_ci */; | |
/*!50001 CREATE ALGORITHM=UNDEFINED */ | |
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ | |
/*!50001 VIEW `surgery_admit_admitroom` AS (select `surgery`.`id` AS `id`,`surgery`.`patient_id` AS `patient_id`,`surgery`.`patient_name` AS `patient_name`,`admit_room`.`id` AS `room_id`,`admit_room`.`availability` AS `availability` from (`admit_room` left join (`admit` join `surgery` on(`admit`.`patient_id` = `surgery`.`patient_id`)) on(`admit`.`room_id` = `admit_room`.`id`))) */; | |
/*!50001 SET character_set_client = @saved_cs_client */; | |
/*!50001 SET character_set_results = @saved_cs_results */; | |
/*!50001 SET collation_connection = @saved_col_connection */; | |
-- | |
-- Final view structure for view `surgery_occur_operationtheatre` | |
-- | |
/*!50001 DROP TABLE IF EXISTS `surgery_occur_operationtheatre`*/; | |
/*!50001 DROP VIEW IF EXISTS `surgery_occur_operationtheatre`*/; | |
/*!50001 SET @saved_cs_client = @@character_set_client */; | |
/*!50001 SET @saved_cs_results = @@character_set_results */; | |
/*!50001 SET @saved_col_connection = @@collation_connection */; | |
/*!50001 SET character_set_client = utf8 */; | |
/*!50001 SET character_set_results = utf8 */; | |
/*!50001 SET collation_connection = utf8_general_ci */; | |
/*!50001 CREATE ALGORITHM=UNDEFINED */ | |
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ | |
/*!50001 VIEW `surgery_occur_operationtheatre` AS (select `surgery`.`id` AS `id`,`surgery`.`patient_id` AS `patient_id`,`surgery`.`patient_name` AS `patient_name`,`operation_theatre`.`id` AS `operation_theatre_id`,`operation_theatre`.`availability` AS `availability` from (`operation_theatre` left join (`occur` join `surgery` on(`occur`.`surgery_id` = `surgery`.`id`)) on(`occur`.`theatre_id` = `operation_theatre`.`id`))) */; | |
/*!50001 SET character_set_client = @saved_cs_client */; | |
/*!50001 SET character_set_results = @saved_cs_results */; | |
/*!50001 SET collation_connection = @saved_col_connection */; | |
-- | |
-- Final view structure for view `visitor_visit_patient` | |
-- | |
/*!50001 DROP TABLE IF EXISTS `visitor_visit_patient`*/; | |
/*!50001 DROP VIEW IF EXISTS `visitor_visit_patient`*/; | |
/*!50001 SET @saved_cs_client = @@character_set_client */; | |
/*!50001 SET @saved_cs_results = @@character_set_results */; | |
/*!50001 SET @saved_col_connection = @@collation_connection */; | |
/*!50001 SET character_set_client = utf8 */; | |
/*!50001 SET character_set_results = utf8 */; | |
/*!50001 SET collation_connection = utf8_general_ci */; | |
/*!50001 CREATE ALGORITHM=UNDEFINED */ | |
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ | |
/*!50001 VIEW `visitor_visit_patient` AS (select `visitor`.`id` AS `vistor_id`,`visitor`.`name` AS `visitor_name`,`visitor`.`contact_number` AS `vistor_number`,`patient`.`id` AS `patient_id`,`patient`.`name` AS `patient_name` from ((`visitor` join `visit` on(`visit`.`visitor_id` = `visitor`.`id`)) join `patient` on(`patient`.`id` = `visit`.`patient_id`))) */; | |
/*!50001 SET character_set_client = @saved_cs_client */; | |
/*!50001 SET character_set_results = @saved_cs_results */; | |
/*!50001 SET collation_connection = @saved_col_connection */; | |
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; | |
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; | |
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; | |
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; | |
/*!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 */; | |
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; | |
-- Dump completed on 2021-05-13 0:55:05 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment