Advertisement
axyd

clinicdb

May 16th, 2019
398
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 20.05 KB | None | 0 0
  1. -- phpMyAdmin SQL Dump
  2. -- version 4.8.5
  3. -- https://www.phpmyadmin.net/
  4. --
  5. -- Host: localhost
  6. -- Generation Time: May 16, 2019 at 05:17 AM
  7. -- Server version: 8.0.15
  8. -- PHP Version: 7.2.7
  9.  
  10. SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  11. SET AUTOCOMMIT = 0;
  12. START TRANSACTION;
  13. SET time_zone = "+00:00";
  14.  
  15.  
  16. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  17. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  18. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  19. /*!40101 SET NAMES utf8mb4 */;
  20.  
  21. --
  22. -- Database: `clinicdb`
  23. --
  24.  
  25. -- --------------------------------------------------------
  26.  
  27. --
  28. -- Table structure for table `appointment`
  29. --
  30.  
  31. CREATE TABLE `appointment` (
  32.   `id` int(11) NOT NULL,
  33.   `department` varchar(255) NOT NULL,
  34.   `date` datetime NOT NULL,
  35.   `completed` tinyint(1) NOT NULL,
  36.   `no_show` tinyint(1) NOT NULL
  37. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  38.  
  39. --
  40. -- Dumping data for table `appointment`
  41. --
  42.  
  43. INSERT INTO `appointment` (`id`, `department`, `date`, `completed`, `no_show`) VALUES
  44. (1, 'Laboratory', '2019-05-21 08:00:00', 0, 0),
  45. (2, 'Radiology', '2018-11-21 15:00:00', 1, 0),
  46. (3, 'Optometry', '2019-02-13 10:30:00', 0, 1),
  47. (4, 'Cytology', '2019-06-29 11:00:00', 0, 0);
  48.  
  49. -- --------------------------------------------------------
  50.  
  51. --
  52. -- Table structure for table `department`
  53. --
  54.  
  55. CREATE TABLE `department` (
  56.   `id` int(11) NOT NULL,
  57.   `name` varchar(255) NOT NULL,
  58.   `floor` int(11) NOT NULL,
  59.   `poc_name` varchar(255) NOT NULL,
  60.   `poc_phone` bigint(20) NOT NULL
  61. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  62.  
  63. --
  64. -- Dumping data for table `department`
  65. --
  66.  
  67. INSERT INTO `department` (`id`, `name`, `floor`, `poc_name`, `poc_phone`) VALUES
  68. (1, 'Medical Laboratory', 2, 'Mr Dracula', 7567443566),
  69. (2, 'Radiology', 2, 'Mrs Marie Curie', 7326888732),
  70. (3, 'Medical Logistics', 1, 'John Fastwalker III', 7326888733),
  71. (4, 'Pharmacy', 1, 'Dr Green Thumb', 8649371000);
  72.  
  73. -- --------------------------------------------------------
  74.  
  75. --
  76. -- Table structure for table `er`
  77. --
  78.  
  79. CREATE TABLE `er` (
  80.   `roomid` int(11) NOT NULL,
  81.   `patient_id` int(11) NOT NULL,
  82.   `entrance_time` datetime NOT NULL,
  83.   `expected_wait_time` time NOT NULL,
  84.   `doctor_assigned` int(11) NOT NULL
  85. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT;
  86.  
  87. -- --------------------------------------------------------
  88.  
  89. --
  90. -- Table structure for table `erstaff`
  91. --
  92.  
  93. CREATE TABLE `erstaff` (
  94.   `id` int(11) NOT NULL,
  95.   `fName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  96.   `lName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  97.   `phone_ext` int(11) NOT NULL,
  98.   `job_title` varchar(255) NOT NULL,
  99.   `email` varchar(255) NOT NULL,
  100.   `home_phone` int(11) NOT NULL
  101. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT;
  102.  
  103. -- --------------------------------------------------------
  104.  
  105. --
  106. -- Table structure for table `erstaff_is_oncall`
  107. --
  108.  
  109. CREATE TABLE `erstaff_is_oncall` (
  110.   `nr` int(11) NOT NULL,
  111.   `erstaff` int(11) NOT NULL,
  112.   `oncall.id` int(11) NOT NULL
  113. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT;
  114.  
  115. -- --------------------------------------------------------
  116.  
  117. --
  118. -- Table structure for table `erstaff_works_in_er`
  119. --
  120.  
  121. CREATE TABLE `erstaff_works_in_er` (
  122.   `nr` int(11) NOT NULL,
  123.   `erstaff.id` int(11) NOT NULL,
  124.   `er.roomid` int(11) NOT NULL
  125. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT;
  126.  
  127. -- --------------------------------------------------------
  128.  
  129. --
  130. -- Table structure for table `er_has_room`
  131. --
  132.  
  133. CREATE TABLE `er_has_room` (
  134.   `nr` int(11) NOT NULL,
  135.   `er.roomid` int(11) NOT NULL,
  136.   `room.number` int(11) NOT NULL
  137. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  138.  
  139. -- --------------------------------------------------------
  140.  
  141. --
  142. -- Table structure for table `insurance`
  143. --
  144.  
  145. CREATE TABLE `insurance` (
  146.   `market_id` int(32) NOT NULL,
  147.   `type` varchar(255) NOT NULL,
  148.   `provider` varchar(255) NOT NULL,
  149.   `start_date` date NOT NULL,
  150.   `expiration_date` date NOT NULL
  151. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  152.  
  153. --
  154. -- Dumping data for table `insurance`
  155. --
  156.  
  157. INSERT INTO `insurance` (`market_id`, `type`, `provider`, `start_date`, `expiration_date`) VALUES
  158. (4356756, 'free', 'Medicaid', '2018-11-27', '2019-06-27'),
  159. (7689045, 'pay', 'Blue Shield', '2018-12-25', '2019-11-04'),
  160. (98760001, 'free', 'Medicaid', '2018-09-04', '2019-05-19'),
  161. (999888777, 'pay', 'Blue Cross', '2018-03-11', '2019-02-25');
  162.  
  163. -- --------------------------------------------------------
  164.  
  165. --
  166. -- Table structure for table `labstaff`
  167. --
  168.  
  169. CREATE TABLE `labstaff` (
  170.   `id` int(11) NOT NULL,
  171.   `fName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  172.   `lName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  173.   `phone_ext` int(11) NOT NULL,
  174.   `job_title` varchar(255) NOT NULL,
  175.   `email` varchar(255) NOT NULL,
  176.   `home_phone` int(11) NOT NULL
  177. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT;
  178.  
  179. -- --------------------------------------------------------
  180.  
  181. --
  182. -- Table structure for table `labstaff_has_role`
  183. --
  184.  
  185. CREATE TABLE `labstaff_has_role` (
  186.   `nr` int(11) NOT NULL,
  187.   `labstaff.id` int(11) NOT NULL,
  188.   `role.id` int(11) NOT NULL
  189. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  190.  
  191. -- --------------------------------------------------------
  192.  
  193. --
  194. -- Table structure for table `labstaff_runs_labtest`
  195. --
  196.  
  197. CREATE TABLE `labstaff_runs_labtest` (
  198.   `nr` int(11) NOT NULL,
  199.   `labstaff.id` int(11) NOT NULL,
  200.   `labtest.id` int(11) NOT NULL
  201. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  202.  
  203. -- --------------------------------------------------------
  204.  
  205. --
  206. -- Table structure for table `labtest`
  207. --
  208.  
  209. CREATE TABLE `labtest` (
  210.   `id` int(11) NOT NULL,
  211.   `name` varchar(255) NOT NULL,
  212.   `tat_hours` int(11) NOT NULL,
  213.   `fasting` tinyint(1) NOT NULL,
  214.   `stat` tinyint(1) NOT NULL,
  215.   `asap` tinyint(1) NOT NULL
  216. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  217.  
  218. -- --------------------------------------------------------
  219.  
  220. --
  221. -- Table structure for table `medicine`
  222. --
  223.  
  224. CREATE TABLE `medicine` (
  225.   `id` int(11) NOT NULL,
  226.   `name` varchar(255) NOT NULL,
  227.   `concentration` float NOT NULL,
  228.   `unit_of_measurement` varchar(255) NOT NULL,
  229.   `description` varchar(255) NOT NULL,
  230.   `controlled_substance` tinyint(1) NOT NULL
  231. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  232.  
  233. -- --------------------------------------------------------
  234.  
  235. --
  236. -- Table structure for table `oncall`
  237. --
  238.  
  239. CREATE TABLE `oncall` (
  240.   `id` int(11) NOT NULL,
  241.   `staff_id` int(11) NOT NULL,
  242.   `department_id` int(11) NOT NULL,
  243.   `start_time` datetime NOT NULL,
  244.   `end_time` datetime NOT NULL,
  245.   `phone` int(11) NOT NULL,
  246.   `beeper` int(11) NOT NULL
  247. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT;
  248.  
  249. -- --------------------------------------------------------
  250.  
  251. --
  252. -- Table structure for table `patient`
  253. --
  254.  
  255. CREATE TABLE `patient` (
  256.   `id` int(11) NOT NULL,
  257.   `fName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  258.   `lName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  259.   `dob` date NOT NULL,
  260.   `home_phone` int(32) NOT NULL
  261. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  262.  
  263. --
  264. -- Dumping data for table `patient`
  265. --
  266.  
  267. INSERT INTO `patient` (`id`, `fName`, `lName`, `dob`, `home_phone`) VALUES
  268. (1, 'Abe', 'Lincoln', '1900-01-30', 1111111111),
  269. (2, 'Albert', 'Einstein', '1905-03-08', 1111111112),
  270. (3, 'Leeroy', 'Jenkins', '1976-05-18', 1111111113),
  271. (4, 'Robert', 'Paulson', '1983-01-23', 1111111114);
  272.  
  273. -- --------------------------------------------------------
  274.  
  275. --
  276. -- Table structure for table `patientstatus`
  277. --
  278.  
  279. CREATE TABLE `patientstatus` (
  280.   `id` int(11) NOT NULL,
  281.   `admitted` datetime NOT NULL,
  282.   `discharged` datetime NOT NULL,
  283.   `needs_labs` tinyint(1) NOT NULL,
  284.   `needs_medication` tinyint(1) NOT NULL
  285. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT;
  286.  
  287. -- --------------------------------------------------------
  288.  
  289. --
  290. -- Table structure for table `patient_has_appointment`
  291. --
  292.  
  293. CREATE TABLE `patient_has_appointment` (
  294.   `nr` int(11) NOT NULL,
  295.   `patient_id` int(11) NOT NULL,
  296.   `appointment_id` int(11) NOT NULL
  297. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  298.  
  299. --
  300. -- Dumping data for table `patient_has_appointment`
  301. --
  302.  
  303. INSERT INTO `patient_has_appointment` (`nr`, `patient_id`, `appointment_id`) VALUES
  304. (1, 1, 4),
  305. (2, 3, 3),
  306. (3, 1, 1),
  307. (4, 2, 2);
  308.  
  309. -- --------------------------------------------------------
  310.  
  311. --
  312. -- Table structure for table `patient_has_insurance`
  313. --
  314.  
  315. CREATE TABLE `patient_has_insurance` (
  316.   `nr` int(11) NOT NULL,
  317.   `patient.id` int(11) NOT NULL,
  318.   `insurance.market_id` int(11) NOT NULL
  319. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  320.  
  321. --
  322. -- Dumping data for table `patient_has_insurance`
  323. --
  324.  
  325. INSERT INTO `patient_has_insurance` (`nr`, `patient.id`, `insurance.market_id`) VALUES
  326. (1, 1, 4356756),
  327. (2, 2, 7689045),
  328. (3, 3, 999888777),
  329. (4, 4, 98760001);
  330.  
  331. -- --------------------------------------------------------
  332.  
  333. --
  334. -- Table structure for table `patient_has_patientstatus`
  335. --
  336.  
  337. CREATE TABLE `patient_has_patientstatus` (
  338.   `nr` int(11) NOT NULL,
  339.   `patient.id` int(11) NOT NULL,
  340.   `patientstatus.id` int(11) NOT NULL
  341. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  342.  
  343. -- --------------------------------------------------------
  344.  
  345. --
  346. -- Table structure for table `patient_needs_labtest`
  347. --
  348.  
  349. CREATE TABLE `patient_needs_labtest` (
  350.   `nr` int(11) NOT NULL,
  351.   `patient.id` int(11) NOT NULL,
  352.   `labtest.id` int(11) NOT NULL
  353. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  354.  
  355. -- --------------------------------------------------------
  356.  
  357. --
  358. -- Table structure for table `patient_needs_medicine`
  359. --
  360.  
  361. CREATE TABLE `patient_needs_medicine` (
  362.   `nr` int(11) NOT NULL,
  363.   `patient.id` int(11) NOT NULL,
  364.   `medicine.id` int(11) NOT NULL
  365. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  366.  
  367. -- --------------------------------------------------------
  368.  
  369. --
  370. -- Table structure for table `role`
  371. --
  372.  
  373. CREATE TABLE `role` (
  374.   `id` int(11) NOT NULL,
  375.   `name` varchar(255) NOT NULL,
  376.   `description` varchar(255) NOT NULL,
  377.   `critical_staff` tinyint(1) NOT NULL
  378. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  379.  
  380. -- --------------------------------------------------------
  381.  
  382. --
  383. -- Table structure for table `room`
  384. --
  385.  
  386. CREATE TABLE `room` (
  387.   `number` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  388.   `floor` int(11) NOT NULL,
  389.   `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  390.   `storage_room` tinyint(1) NOT NULL,
  391.   `isolation_room` tinyint(1) NOT NULL
  392. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  393.  
  394. -- --------------------------------------------------------
  395.  
  396. --
  397. -- Table structure for table `student`
  398. --
  399.  
  400. CREATE TABLE `student` (
  401.   `id` int(11) NOT NULL,
  402.   `fName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  403.   `lName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  404.   `dob` date NOT NULL,
  405.   `intern` tinyint(1) NOT NULL
  406. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT;
  407.  
  408. --
  409. -- Dumping data for table `student`
  410. --
  411.  
  412. INSERT INTO `student` (`id`, `fName`, `lName`, `dob`, `intern`) VALUES
  413. (1, 'Francisco', 'Franco', '1904-05-12', 0),
  414. (2, 'Mao', 'Zedong', '1892-09-23', 0),
  415. (3, 'Pol', 'Pot', '1925-02-26', 0),
  416. (4, 'Antonio', 'Alazar', '1901-12-08', 1);
  417.  
  418. -- --------------------------------------------------------
  419.  
  420. --
  421. -- Table structure for table `student_studies_in_department`
  422. --
  423.  
  424. CREATE TABLE `student_studies_in_department` (
  425.   `nr` int(11) NOT NULL,
  426.   `student.id` int(11) NOT NULL,
  427.   `department.id` int(11) NOT NULL
  428. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  429.  
  430. -- --------------------------------------------------------
  431.  
  432. --
  433. -- Table structure for table `supportstaff`
  434. --
  435.  
  436. CREATE TABLE `supportstaff` (
  437.   `id` int(11) NOT NULL,
  438.   `fName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  439.   `lName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  440.   `phone_ext` int(11) NOT NULL,
  441.   `job_title` varchar(255) NOT NULL
  442. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT;
  443.  
  444. --
  445. -- Dumping data for table `supportstaff`
  446. --
  447.  
  448. INSERT INTO `supportstaff` (`id`, `fName`, `lName`, `phone_ext`, `job_title`) VALUES
  449. (1, 'Henry', 'Ford', 1234, 'Lab Director'),
  450. (2, 'Harrison', 'Ford', 2222, 'Medical Logistics Apprentice'),
  451. (3, 'Jane', 'Fonda', 2132, 'Medical Logistics Journeyman'),
  452. (4, 'Huddie', 'Leadbetter', 5324, 'Custodian');
  453.  
  454. -- --------------------------------------------------------
  455.  
  456. --
  457. -- Table structure for table `supportstaff_works_in_department`
  458. --
  459.  
  460. CREATE TABLE `supportstaff_works_in_department` (
  461.   `nr` int(11) NOT NULL,
  462.   `supportStaff.id` int(11) NOT NULL,
  463.   `department.id` int(11) NOT NULL
  464. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT;
  465.  
  466. --
  467. -- Dumping data for table `supportstaff_works_in_department`
  468. --
  469.  
  470. INSERT INTO `supportstaff_works_in_department` (`nr`, `supportStaff.id`, `department.id`) VALUES
  471. (1, 1, 1),
  472. (2, 2, 3),
  473. (3, 3, 3);
  474.  
  475. --
  476. -- Indexes for dumped tables
  477. --
  478.  
  479. --
  480. -- Indexes for table `appointment`
  481. --
  482. ALTER TABLE `appointment`
  483.   ADD PRIMARY KEY (`id`);
  484.  
  485. --
  486. -- Indexes for table `department`
  487. --
  488. ALTER TABLE `department`
  489.   ADD PRIMARY KEY (`id`);
  490.  
  491. --
  492. -- Indexes for table `er`
  493. --
  494. ALTER TABLE `er`
  495.   ADD PRIMARY KEY (`roomid`);
  496.  
  497. --
  498. -- Indexes for table `erstaff`
  499. --
  500. ALTER TABLE `erstaff`
  501.   ADD PRIMARY KEY (`id`);
  502.  
  503. --
  504. -- Indexes for table `erstaff_is_oncall`
  505. --
  506. ALTER TABLE `erstaff_is_oncall`
  507.   ADD PRIMARY KEY (`nr`);
  508.  
  509. --
  510. -- Indexes for table `erstaff_works_in_er`
  511. --
  512. ALTER TABLE `erstaff_works_in_er`
  513.   ADD PRIMARY KEY (`nr`);
  514.  
  515. --
  516. -- Indexes for table `er_has_room`
  517. --
  518. ALTER TABLE `er_has_room`
  519.   ADD PRIMARY KEY (`nr`);
  520.  
  521. --
  522. -- Indexes for table `insurance`
  523. --
  524. ALTER TABLE `insurance`
  525.   ADD PRIMARY KEY (`market_id`);
  526.  
  527. --
  528. -- Indexes for table `labstaff`
  529. --
  530. ALTER TABLE `labstaff`
  531.   ADD PRIMARY KEY (`id`);
  532.  
  533. --
  534. -- Indexes for table `labstaff_has_role`
  535. --
  536. ALTER TABLE `labstaff_has_role`
  537.   ADD PRIMARY KEY (`nr`);
  538.  
  539. --
  540. -- Indexes for table `labstaff_runs_labtest`
  541. --
  542. ALTER TABLE `labstaff_runs_labtest`
  543.   ADD PRIMARY KEY (`nr`);
  544.  
  545. --
  546. -- Indexes for table `labtest`
  547. --
  548. ALTER TABLE `labtest`
  549.   ADD PRIMARY KEY (`id`);
  550.  
  551. --
  552. -- Indexes for table `medicine`
  553. --
  554. ALTER TABLE `medicine`
  555.   ADD PRIMARY KEY (`id`);
  556.  
  557. --
  558. -- Indexes for table `oncall`
  559. --
  560. ALTER TABLE `oncall`
  561.   ADD PRIMARY KEY (`id`);
  562.  
  563. --
  564. -- Indexes for table `patient`
  565. --
  566. ALTER TABLE `patient`
  567.   ADD PRIMARY KEY (`id`);
  568.  
  569. --
  570. -- Indexes for table `patientstatus`
  571. --
  572. ALTER TABLE `patientstatus`
  573.   ADD PRIMARY KEY (`id`);
  574.  
  575. --
  576. -- Indexes for table `patient_has_appointment`
  577. --
  578. ALTER TABLE `patient_has_appointment`
  579.   ADD PRIMARY KEY (`nr`);
  580.  
  581. --
  582. -- Indexes for table `patient_has_insurance`
  583. --
  584. ALTER TABLE `patient_has_insurance`
  585.   ADD PRIMARY KEY (`nr`);
  586.  
  587. --
  588. -- Indexes for table `patient_has_patientstatus`
  589. --
  590. ALTER TABLE `patient_has_patientstatus`
  591.   ADD PRIMARY KEY (`nr`);
  592.  
  593. --
  594. -- Indexes for table `patient_needs_labtest`
  595. --
  596. ALTER TABLE `patient_needs_labtest`
  597.   ADD PRIMARY KEY (`nr`);
  598.  
  599. --
  600. -- Indexes for table `patient_needs_medicine`
  601. --
  602. ALTER TABLE `patient_needs_medicine`
  603.   ADD PRIMARY KEY (`nr`);
  604.  
  605. --
  606. -- Indexes for table `role`
  607. --
  608. ALTER TABLE `role`
  609.   ADD PRIMARY KEY (`id`);
  610.  
  611. --
  612. -- Indexes for table `room`
  613. --
  614. ALTER TABLE `room`
  615.   ADD PRIMARY KEY (`number`);
  616.  
  617. --
  618. -- Indexes for table `student`
  619. --
  620. ALTER TABLE `student`
  621.   ADD PRIMARY KEY (`id`);
  622.  
  623. --
  624. -- Indexes for table `student_studies_in_department`
  625. --
  626. ALTER TABLE `student_studies_in_department`
  627.   ADD PRIMARY KEY (`nr`);
  628.  
  629. --
  630. -- Indexes for table `supportstaff`
  631. --
  632. ALTER TABLE `supportstaff`
  633.   ADD PRIMARY KEY (`id`);
  634.  
  635. --
  636. -- Indexes for table `supportstaff_works_in_department`
  637. --
  638. ALTER TABLE `supportstaff_works_in_department`
  639.   ADD PRIMARY KEY (`nr`);
  640.  
  641. --
  642. -- AUTO_INCREMENT for dumped tables
  643. --
  644.  
  645. --
  646. -- AUTO_INCREMENT for table `appointment`
  647. --
  648. ALTER TABLE `appointment`
  649.   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
  650.  
  651. --
  652. -- AUTO_INCREMENT for table `department`
  653. --
  654. ALTER TABLE `department`
  655.   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
  656.  
  657. --
  658. -- AUTO_INCREMENT for table `er`
  659. --
  660. ALTER TABLE `er`
  661.   MODIFY `roomid` int(11) NOT NULL AUTO_INCREMENT;
  662.  
  663. --
  664. -- AUTO_INCREMENT for table `erstaff`
  665. --
  666. ALTER TABLE `erstaff`
  667.   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  668.  
  669. --
  670. -- AUTO_INCREMENT for table `erstaff_is_oncall`
  671. --
  672. ALTER TABLE `erstaff_is_oncall`
  673.   MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT;
  674.  
  675. --
  676. -- AUTO_INCREMENT for table `erstaff_works_in_er`
  677. --
  678. ALTER TABLE `erstaff_works_in_er`
  679.   MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT;
  680.  
  681. --
  682. -- AUTO_INCREMENT for table `er_has_room`
  683. --
  684. ALTER TABLE `er_has_room`
  685.   MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT;
  686.  
  687. --
  688. -- AUTO_INCREMENT for table `labstaff`
  689. --
  690. ALTER TABLE `labstaff`
  691.   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  692.  
  693. --
  694. -- AUTO_INCREMENT for table `labstaff_has_role`
  695. --
  696. ALTER TABLE `labstaff_has_role`
  697.   MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT;
  698.  
  699. --
  700. -- AUTO_INCREMENT for table `labstaff_runs_labtest`
  701. --
  702. ALTER TABLE `labstaff_runs_labtest`
  703.   MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT;
  704.  
  705. --
  706. -- AUTO_INCREMENT for table `medicine`
  707. --
  708. ALTER TABLE `medicine`
  709.   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  710.  
  711. --
  712. -- AUTO_INCREMENT for table `oncall`
  713. --
  714. ALTER TABLE `oncall`
  715.   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  716.  
  717. --
  718. -- AUTO_INCREMENT for table `patient`
  719. --
  720. ALTER TABLE `patient`
  721.   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
  722.  
  723. --
  724. -- AUTO_INCREMENT for table `patientstatus`
  725. --
  726. ALTER TABLE `patientstatus`
  727.   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  728.  
  729. --
  730. -- AUTO_INCREMENT for table `patient_has_appointment`
  731. --
  732. ALTER TABLE `patient_has_appointment`
  733.   MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
  734.  
  735. --
  736. -- AUTO_INCREMENT for table `patient_has_insurance`
  737. --
  738. ALTER TABLE `patient_has_insurance`
  739.   MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
  740.  
  741. --
  742. -- AUTO_INCREMENT for table `patient_has_patientstatus`
  743. --
  744. ALTER TABLE `patient_has_patientstatus`
  745.   MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT;
  746.  
  747. --
  748. -- AUTO_INCREMENT for table `patient_needs_labtest`
  749. --
  750. ALTER TABLE `patient_needs_labtest`
  751.   MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT;
  752.  
  753. --
  754. -- AUTO_INCREMENT for table `patient_needs_medicine`
  755. --
  756. ALTER TABLE `patient_needs_medicine`
  757.   MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT;
  758.  
  759. --
  760. -- AUTO_INCREMENT for table `role`
  761. --
  762. ALTER TABLE `role`
  763.   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  764.  
  765. --
  766. -- AUTO_INCREMENT for table `student`
  767. --
  768. ALTER TABLE `student`
  769.   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
  770.  
  771. --
  772. -- AUTO_INCREMENT for table `student_studies_in_department`
  773. --
  774. ALTER TABLE `student_studies_in_department`
  775.   MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT;
  776.  
  777. --
  778. -- AUTO_INCREMENT for table `supportstaff`
  779. --
  780. ALTER TABLE `supportstaff`
  781.   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
  782.  
  783. --
  784. -- AUTO_INCREMENT for table `supportstaff_works_in_department`
  785. --
  786. ALTER TABLE `supportstaff_works_in_department`
  787.   MODIFY `nr` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  788. COMMIT;
  789.  
  790. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  791. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  792. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement