Webservice sederhana untuk keperluan pembelajaran pemrograman webservice di ITB STIKOM Bali, MK Perancangan Web dan Pemrograman Web.
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

219 linhas
6.2 KiB

3 anos atrás
  1. SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  2. SET AUTOCOMMIT = 0;
  3. START TRANSACTION;
  4. SET time_zone = "+00:00";
  5. CREATE TABLE `dokter` (
  6. `id` bigint(20) UNSIGNED NOT NULL,
  7. `nama` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
  8. `spesialis` varchar(90) COLLATE utf8mb4_unicode_ci NOT NULL,
  9. `id_poliklinik` bigint(20) NOT NULL
  10. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  11. -- --------------------------------------------------------
  12. --
  13. -- Table structure for table `jadwal_dokters`
  14. --
  15. CREATE TABLE `jadwal` (
  16. `id` bigint(20) UNSIGNED NOT NULL,
  17. `id_dokter` bigint(20) NOT NULL,
  18. `hari` tinyint(4) NOT NULL,
  19. `mulai` time NOT NULL,
  20. `selesai` time NOT NULL,
  21. `max` int(10) NOT NULL
  22. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  23. -- --------------------------------------------------------
  24. --
  25. -- Table structure for table `jaminans`
  26. --
  27. CREATE TABLE `jaminan` (
  28. `id` bigint(20) UNSIGNED NOT NULL,
  29. `nama` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
  30. `type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL
  31. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  32. -- --------------------------------------------------------
  33. --
  34. -- Table structure for table `pasiens`
  35. --
  36. CREATE TABLE `pasien` (
  37. `id` bigint(20) UNSIGNED NOT NULL,
  38. `rm` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
  39. `nik` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  40. `nama` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
  41. `jns_kelamin` int(11) NOT NULL,
  42. `tmp_lahir` varchar(90) COLLATE utf8mb4_unicode_ci NOT NULL,
  43. `tgl_lahir` date NOT NULL,
  44. `alamat` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL
  45. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  46. -- --------------------------------------------------------
  47. --
  48. -- Table structure for table `pendaftarans`
  49. --
  50. CREATE TABLE `pendaftaran` (
  51. `id` bigint(20) UNSIGNED NOT NULL,
  52. `nomer` bigint(20) NOT NULL
  53. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  54. -- --------------------------------------------------------
  55. --
  56. -- Table structure for table `polikliniks`
  57. --
  58. CREATE TABLE `poliklinik` (
  59. `id` bigint(20) UNSIGNED NOT NULL,
  60. `nama` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
  61. `type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL
  62. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  63. -- --------------------------------------------------------
  64. --
  65. -- Indexes for table `dokters`
  66. --
  67. ALTER TABLE `dokter`
  68. ADD PRIMARY KEY (`id`);
  69. --
  70. -- Indexes for table `jadwal_dokters`
  71. --
  72. ALTER TABLE `jadwal`
  73. ADD PRIMARY KEY (`id`);
  74. --
  75. -- Indexes for table `jaminans`
  76. --
  77. ALTER TABLE `jaminan`
  78. ADD PRIMARY KEY (`id`);
  79. --
  80. -- Indexes for table `pasiens`
  81. --
  82. ALTER TABLE `pasien`
  83. ADD PRIMARY KEY (`id`);
  84. --
  85. -- Indexes for table `pendaftarans`
  86. --
  87. ALTER TABLE `pendaftaran`
  88. ADD PRIMARY KEY (`id`);
  89. --
  90. -- Indexes for table `polikliniks`
  91. --
  92. ALTER TABLE `poliklinik`
  93. ADD PRIMARY KEY (`id`);
  94. --
  95. -- AUTO_INCREMENT for table `dokters`
  96. --
  97. ALTER TABLE `dokter`
  98. MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
  99. --
  100. -- AUTO_INCREMENT for table `jadwal_dokters`
  101. --
  102. ALTER TABLE `jadwal`
  103. MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
  104. --
  105. -- AUTO_INCREMENT for table `jaminans`
  106. --
  107. ALTER TABLE `jaminan`
  108. MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
  109. --
  110. -- AUTO_INCREMENT for table `pasiens`
  111. --
  112. ALTER TABLE `pasien`
  113. MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
  114. --
  115. -- AUTO_INCREMENT for table `pendaftarans`
  116. --
  117. ALTER TABLE `pendaftaran`
  118. MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
  119. --
  120. -- AUTO_INCREMENT for table `polikliniks`
  121. --
  122. ALTER TABLE `poliklinik`
  123. MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
  124. INSERT INTO pasien (`id`, `rm`, `nik`, `nama`, `jns_kelamin`, `tmp_lahir`, `tgl_lahir`, `alamat`) VALUES
  125. ("1", "510303200000023", "5102044311820002", "Ni Nyoman Mariawati", "2", "Baturiti", "1982-11-03", "Jl Raya Baturiti no 98 Tabanan"),
  126. ("2", "510303200000156", "5171021206790001", "Ajitapa", "1", "Denpasar", "1979-06-12", "Jl Raya Kapal no 12 Mengwi");
  127. INSERT INTO jaminan (`id`, `nama`, `type`) VALUES
  128. ("1", "Umum", "abc"),
  129. ("2", "BPJS", "abc"),
  130. ("3", "Prudential", "abc"),
  131. ("4", "Sequislife", "abc"),
  132. ("5", "AXA", "abc"),
  133. ("6", "Allianz", "abc");
  134. INSERT INTO poliklinik (`id`, `nama`, `type`) VALUES
  135. ("1", "Klinik Umum", "reguler"),
  136. ("2", "Klinik Mata", "reguler"),
  137. ("3", "Klinik THT", "reguler"),
  138. ("4", "Klinik Anak", "eksekutif"),
  139. ("5", "Klinik Obgyn", "eksekutif");
  140. INSERT INTO dokter (`id`, `nama`, `spesialis`, `id_poliklinik`) VALUES
  141. ("1", "dr. Wayan Astawa", "Sp. A", "4"),
  142. ("2", "dr. DA Santi", "Sp. A", "4"),
  143. ("3", "dr. IB Adiaksa", "Sp. A", "4"),
  144. ("4", "dr. Jepri Hendra", "Sp. A", "4"),
  145. ("5", "dr. Budiman", "Sp. A", "4"),
  146. ("6", "dr. IGA Rusmini", "Sp. OG", "5"),
  147. ("7", "dr. Nurayanti", "Sp. OG", "5"),
  148. ("8", "dr. Gunadi", "Sp. OG", "5"),
  149. ("9", "dr. IGN Sumerta", "Sp. OG", "5"),
  150. ("10", "dr. Donyarta", "Sp. OG", "5");
  151. INSERT INTO jadwal (`id`, `id_dokter`, `hari`, `mulai`, `selesai`, `max`) VALUES
  152. ("1", "1", "1", "09:00", "13:00", "50"),
  153. ("2", "2", "1", "13:00", "17:00", "50"),
  154. ("3", "3", "1", "17:00", "21:00", "50"),
  155. ("4", "4", "2", "09:00", "13:00", "50"),
  156. ("5", "1", "2", "13:00", "17:00", "50"),
  157. ("6", "5", "2", "17:00", "21:00", "50"),
  158. ("7", "1", "3", "09:00", "13:00", "50"),
  159. ("8", "4", "3", "13:00", "17:00", "50"),
  160. ("9", "3", "3", "17:00", "21:00", "50"),
  161. ("10", "4", "4", "09:00", "13:00", "50"),
  162. ("11", "2", "4", "13:00", "17:00", "50"),
  163. ("12", "5", "4", "17:00", "21:00", "50"),
  164. ("13", "2", "5", "09:00", "13:00", "50"),
  165. ("14", "3", "5", "13:00", "17:00", "50"),
  166. ("15", "5", "5", "17:00", "21:00", "50"),
  167. ("16", "6", "1", "09:00", "13:00", "50"),
  168. ("17", "7", "1", "13:00", "17:00", "50"),
  169. ("18", "8", "1", "17:00", "21:00", "50"),
  170. ("19", "9", "2", "09:00", "13:00", "50"),
  171. ("20", "7", "2", "13:00", "17:00", "50"),
  172. ("21", "10", "2", "17:00", "21:00", "50"),
  173. ("22", "6", "3", "09:00", "13:00", "50"),
  174. ("23", "9", "3", "13:00", "17:00", "50"),
  175. ("24", "10", "3", "17:00", "21:00", "50"),
  176. ("25", "8", "4", "09:00", "13:00", "50"),
  177. ("26", "10", "4", "13:00", "17:00", "50"),
  178. ("27", "9", "4", "17:00", "21:00", "50"),
  179. ("28", "7", "5", "09:00", "13:00", "50"),
  180. ("29", "6", "5", "13:00", "17:00", "50"),
  181. ("30", "8", "5", "17:00", "21:00", "50");
  182. COMMIT;