/*!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 tis620 */;
/*!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' */;
DROP TABLE IF EXISTS `clinic`;
CREATE TABLE `clinic` (
  `clinic` char(3) NOT NULL DEFAULT '',
  `name` varchar(150) DEFAULT NULL,
  `labparam` varchar(10) DEFAULT NULL,
  `icd10` varchar(6) DEFAULT NULL,
  `chronic` char(1) DEFAULT NULL,
  `clinic_guid` varchar(38) DEFAULT NULL,
  `pcu_code` int(11) DEFAULT NULL,
  `oapp_activity_id` varchar(5) DEFAULT NULL,
  `disable_dialog` char(1) DEFAULT NULL,
  `hos_guid` varchar(38) DEFAULT NULL,
  `no_export` char(1) DEFAULT NULL,
  `active_status` char(1) DEFAULT NULL,
  `hosxp_clinic_type_id` int(11) DEFAULT NULL,
  `online_register_type_id` int(11) DEFAULT NULL,
  `online_ncd_segment_id` varchar(50) DEFAULT NULL,
  `online_ncd_key` varchar(50) DEFAULT NULL,
  `depcode` varchar(3) DEFAULT NULL,
  `location` varchar(200) DEFAULT NULL,
  `phone` varchar(50) DEFAULT NULL,
  `oldcode` varchar(20) DEFAULT NULL,
  `open_time` time DEFAULT NULL,
  `close_time` time DEFAULT NULL,
  `app_limit_qty` int(11) DEFAULT NULL,
  `limit_access` char(1) DEFAULT NULL,
  `sss_clinic_code` char(3) DEFAULT NULL,
  `use_app_qs_slot` char(1) DEFAULT NULL,
  `queue_prefix` varchar(5) DEFAULT NULL,
  `kiosk_opd_qs_room_id` int(11) DEFAULT NULL,
  `opd_kios_dep_menu_id` int(11) DEFAULT NULL,
  `opd_qs_schedule_tmpl_type_id` int(11) DEFAULT NULL,
  `moph_vaccine_ncd_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`clinic`),
  KEY `ix_name` (`name`),
  KEY `ix_clinic_guid` (`clinic_guid`),
  KEY `ix_sss_clinic_code` (`sss_clinic_code`)
) ENGINE=InnoDB DEFAULT CHARSET=tis620;

LOCK TABLES `clinic` WRITE;
/*!40000 ALTER TABLE `clinic` DISABLE KEYS */;
INSERT INTO `clinic` VALUES
  ('000', 'ตรวจโรคทั่วไป', NULL, 'Z000', 'N', '9a0e1033-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('001', 'DM โรคเบาหวาน (E10-E14)', NULL, 'E119', 'Y', '9a0e127e-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', 'Y', 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('002', 'HT โรคความดัน (I10-I15)', NULL, 'I10', 'Y', '9a0e1402-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', 'Y', 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('003', 'IHD โรคหัวใจ (I20-I25)', NULL, 'I519', 'N', '9a0e157e-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('004', 'โรคธัยรอยด์', NULL, 'E07', 'N', '9a0e16fa-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('005', 'CANCER โรคมะเร็ง (C00-C97)', NULL, 'C009', 'Y', '9a0e1876-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('006', 'สุขภาพเด็กดี', NULL, NULL, 'N', '9a0e19f7-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('007', 'โรคตา', NULL, NULL, 'N', '9a0e1b72-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('008', 'Rheumatoid โรคกระดูกและข้อ (M05-M06)', NULL, 'M069', 'Y', '9a0e1cdb-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('009', 'โรคปอด', NULL, 'J439', 'Y', '9a0e1e4f-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('010', 'ทันตกรรม', NULL, NULL, 'N', '9a0e1fc1-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('011', 'โรคไตวาย (N181-N185,N189)', NULL, 'N189', 'Y', '9a0e2134-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('012', 'Asthma โรคหอบหืด (J45-J46)', NULL, 'J459', 'Y', '9a0e229b-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('013', 'Storoke (I64)', NULL, 'I64', 'Y', '9a0e2408-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('014', 'Emphysema โรคถุงลมโป่งพอง (J43)', '', 'J43', 'Y', '9a0e257c-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('015', 'TB โรควัณโรค (A15-A16)', NULL, 'A169', 'Y', '9a0e26ed-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('016', 'โรคหัวใจขาดเลือด', NULL, 'I259', 'Y', '9a0e2858-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('017', 'โรคโลหิตจาง', NULL, 'D649', 'N', '9a0e29cc-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('018', 'โรคซึมเศร้า', NULL, 'F30', 'N', '9a0e2b46-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('019', 'โรคอัมพฤกษ์ อัมพาต', NULL, '', 'N', '9a0e2ef1-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('021', 'โรคหลอดลมอักเสบเรื้อรัง', NULL, 'J42', 'N', '9a0e306b-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('022', 'โรคพิษสุราเรื้อรัง', NULL, 'F100', 'Y', '9a0e31e8-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('023', 'COPD (J449)', NULL, 'J449', 'Y', '9a0e335d-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('024', 'โรคจิตเภท', NULL, 'F20', 'N', '9a0e34db-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('025', 'โรคเอดส์ (HIV)', NULL, 'B209', 'Y', '9a0e3644-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', 'Y', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('026', 'Obesity โรคอ้วน (E66)', NULL, 'E669', 'Y', '9a0e37bb-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('027', 'โรคตับ (K74,K703,K717)', NULL, 'K74', 'Y', '9a0e392f-fa6c-11e2-8938-87bc1946169c', NULL, NULL, NULL, NULL, 'N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('028', 'วางแผนครอบครัว', NULL, NULL, 'N', NULL, NULL, NULL, NULL, NULL, NULL, 'Y', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('029', 'ฝากครรภ์', NULL, NULL, 'N', NULL, NULL, NULL, NULL, NULL, NULL, 'Y', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
  ('030', 'เยี่ยมบ้าน', NULL, NULL, 'N', NULL, NULL, NULL, NULL, NULL, NULL, 'Y', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
/*!40000 ALTER TABLE `clinic` ENABLE KEYS */;
UNLOCK TABLES;

/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!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 */;
