--
-- Host: localhost    Database: patient_chat_portal
-- ------------------------------------------------------


--
-- Table structure for table `chatbot_info`
--

CREATE TABLE `chatbot_info` (
  `chat_id` int NOT NULL AUTO_INCREMENT,
  `email` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `name` char(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  PRIMARY KEY (`chat_id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `chatbot_info`
--

INSERT INTO `chatbot_info` VALUES (1,'tusharmore@smartdatainc.net','tushar'),(7,'rushikeshmargode@smartdatainc.net','Rushikesh'),(8,'tushare@smartdatainc.net','rushikesh'),(9,'re@smartdatainc.net',''),(10,'sidhant.motghare@smartdatainc.net','sidhant'),(11,'raghavsharma@smartdatainc.net','raghav'),(12,'kartik@win.com','Kartik'),(13,'gn@yopmail.com','Nigel Mansell'),(14,'kartikprashar@smartdatainc.net','kartik'),(15,'wk25@live.com','John Smith'),(16,'brian.kelly@patientportal.com','Brian kelly'),(17,'hinabazta1920@gmail.com','Hina'),(18,'as@yopmail.com','Amit Sharma'),(19,'ak@yopmail.com','Amit Sharma'),(20,'vinod@yopmail.com','Vinod Sharma'),(21,'samit.sdei@gmail.com','Nigel Mansell'),(22,'tushar@yopmail.com','Tushar More');

--
-- Table structure for table `doctor`
--

CREATE TABLE `doctor` (
  `doctor_id` int NOT NULL AUTO_INCREMENT,
  `first_name` char(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `last_name` char(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `address_one` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `address_two` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `zip_code` int DEFAULT NULL,
  `city` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `state` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  PRIMARY KEY (`doctor_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `doctor`
--


--
-- Table structure for table `forms`
--

CREATE TABLE `forms` (
  `form_id` int NOT NULL AUTO_INCREMENT,
  `form_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `form_description` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `create_date` date NOT NULL,
  `active_status` int NOT NULL,
  `update_date` date DEFAULT NULL,
  `delete_date` date DEFAULT NULL,
  `is_delete` int NOT NULL,
  PRIMARY KEY (`form_id`)
) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `forms`
--

INSERT INTO `forms` VALUES (44,'General Survey','General Survey','2023-07-17',1,'2023-07-18',NULL,0),(45,'General Feedback','General Feedback','2023-07-17',1,'2023-07-18',NULL,0),(46,'General Information','General Information','2023-07-18',1,'2023-07-18',NULL,0),(47,'Surgery Information','Surgery Information','2023-07-18',1,NULL,NULL,0);

--
-- Table structure for table `question_answer`
--

CREATE TABLE `question_answer` (
  `ans_id` int NOT NULL AUTO_INCREMENT,
  `questions_id` int NOT NULL,
  `create_date` date NOT NULL,
  `active_status` int DEFAULT NULL,
  `update_date` date DEFAULT NULL,
  `delete_date` date DEFAULT NULL,
  `is_delete` int NOT NULL,
  `ans_value` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`ans_id`),
  KEY `fk_question_answer_1_idx` (`questions_id`),
  CONSTRAINT `fk_question_answer_1` FOREIGN KEY (`questions_id`) REFERENCES `questions` (`question_id`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `question_answer`
--

INSERT INTO `question_answer` VALUES (1,137,'2023-07-17',1,NULL,NULL,0,'Graduation'),(2,137,'2023-07-17',1,NULL,NULL,0,'Masters'),(3,137,'2023-07-17',1,NULL,NULL,0,'Doctrate'),(4,138,'2023-07-17',1,NULL,NULL,0,'Graduación'),(5,138,'2023-07-17',1,NULL,NULL,0,'Maestros'),(6,138,'2023-07-17',1,NULL,NULL,0,'Doctorado'),(7,143,'2023-07-17',1,NULL,NULL,0,'1'),(8,143,'2023-07-17',1,NULL,NULL,0,'2'),(9,143,'2023-07-17',1,NULL,NULL,0,'3'),(10,143,'2023-07-17',1,NULL,NULL,0,'4'),(11,143,'2023-07-17',1,NULL,NULL,0,'5'),(12,144,'2023-07-17',1,NULL,NULL,0,'My name is John\n\nMi nombre es John.'),(13,144,'2023-07-17',1,NULL,NULL,0,'My name is John\n\nMi nombre es John.'),(14,144,'2023-07-17',1,NULL,NULL,0,'I love you\n\nTe amo'),(15,144,'2023-07-17',1,NULL,NULL,0,'I need help.\n\nNecesito ayuda.'),(16,144,'2023-07-17',1,NULL,NULL,0,'I need help\n\nNecesito ayuda'),(17,149,'2023-07-18',1,NULL,NULL,0,'Yes'),(18,149,'2023-07-18',1,NULL,NULL,0,'No'),(19,150,'2023-07-18',1,NULL,NULL,0,'Sí'),(20,150,'2023-07-18',1,NULL,NULL,0,'No'),(21,153,'2023-07-18',1,NULL,NULL,0,'Male'),(22,153,'2023-07-18',1,NULL,NULL,0,'Female'),(23,154,'2023-07-18',1,NULL,NULL,0,'Masculino'),(24,154,'2023-07-18',1,NULL,NULL,0,'Mujer');

--
-- Table structure for table `questions`
--

CREATE TABLE `questions` (
  `question_id` int NOT NULL AUTO_INCREMENT,
  `form_id` int NOT NULL,
  `question_relation_id` int DEFAULT NULL,
  `question_lang` varchar(50) NOT NULL,
  `question_value` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `create_date` date NOT NULL,
  `active_status` int NOT NULL,
  `update_date` date DEFAULT NULL,
  `delete_date` date DEFAULT NULL,
  `question_type` varchar(100) NOT NULL,
  `is_delete` int NOT NULL,
  PRIMARY KEY (`question_id`),
  KEY `fk_form_question` (`form_id`),
  CONSTRAINT `fk_form_question` FOREIGN KEY (`form_id`) REFERENCES `forms` (`form_id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE=InnoDB AUTO_INCREMENT=155 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `questions`
--

INSERT INTO `questions` VALUES (131,44,NULL,'en-US','What is your first name','2023-07-17',1,'2023-07-17',NULL,'ST',0),(132,44,131,'es-US','¿Cuál es tu primer nombre?','2023-07-17',1,NULL,NULL,'ST',0),(133,44,NULL,'en-US','What is your last name','2023-07-17',1,NULL,NULL,'ST',0),(134,44,133,'es-US','¿Cuál es tu apellido?','2023-07-17',1,NULL,NULL,'ST',0),(135,44,NULL,'en-US','What is your age','2023-07-17',1,NULL,NULL,'ST',0),(136,44,135,'es-US','¿Cuál es tu edad?','2023-07-17',1,NULL,NULL,'ST',0),(137,44,NULL,'en-US','What is your highest Qualification','2023-07-17',1,NULL,NULL,'MCSA',0),(138,44,137,'es-US','¿Cuál es tu mayor calificación?','2023-07-17',1,NULL,NULL,'MCSA',0),(139,45,NULL,'en-US','What is your first name','2023-07-17',1,NULL,NULL,'ST',0),(140,45,139,'es-US','¿Cuál es tu primer nombre?','2023-07-17',1,NULL,NULL,'ST',0),(141,45,NULL,'en-US','What is your last name','2023-07-17',1,NULL,NULL,'ST',0),(142,45,141,'es-US','¿Cuál es tu apellido?','2023-07-17',1,NULL,NULL,'ST',0),(143,45,NULL,'en-US','How you rate me out of 5','2023-07-17',1,NULL,NULL,'MCSA',0),(144,45,143,'es-US','¿Cómo me calificas de 5?','2023-07-17',1,NULL,NULL,'MCSA',0),(145,46,NULL,'en-US','What is your name ?','2023-07-18',1,NULL,NULL,'ST',0),(146,46,145,'es-US','¿Cuál es tu nombre??','2023-07-18',1,'2023-07-18',NULL,'ST',0),(147,46,NULL,'en-US','What is your age ?','2023-07-18',1,NULL,NULL,'ST',0),(148,46,147,'es-US','¿Cuál es tu edad?','2023-07-18',1,NULL,NULL,'ST',0),(149,46,NULL,'en-US','Are you working ?','2023-07-18',1,NULL,NULL,'MCSA',0),(150,46,149,'es-US','¿Estás trabajando?','2023-07-18',1,NULL,NULL,'MCSA',0),(151,46,NULL,'en-US','What is your monthly income ?','2023-07-18',1,NULL,NULL,'ST',0),(152,46,151,'es-US','¿Cuál es tu ingreso mensual?','2023-07-18',1,NULL,NULL,'ST',0),(153,47,NULL,'en-US','What is your gender ?','2023-07-18',1,NULL,NULL,'MCSA',0),(154,47,153,'es-US','¿Cuál es tu género?','2023-07-18',1,NULL,NULL,'MCSA',0);


