$v) { $this->dbx = $this->load->database($v, true); $sql = "UPDATE `s_menu` SET `S_MenuUrl` = 'test/vuex/one-fo-close-new-v2' WHERE `S_MenuUrl` LIKE '%one-fo-close-new%'"; // $query = $this->dbx->query($sql); $sql = "UPDATE m_usergroup SET M_UserGroupDashboard = 'one-ui/test/vuex/one-fo-close-new-v2' WHERE M_UserGroupDashboard LIKE '%one-fo-close-new%'"; // $query = $this->dbx->query($sql); $sql = "UPDATE `s_menu` SET `S_MenuUrl` = 'test/vuex/one-fo-close-cashier' WHERE `S_MenuUrl` LIKE '%one-fo-close-cashier%'"; // $query = $this->dbx->query($sql); $sql = "UPDATE m_usergroup SET M_UserGroupDashboard = 'one-ui/test/vuex/one-fo-close-cashier' WHERE M_UserGroupDashboard LIKE '%one-fo-close-cashier%'"; // $query = $this->dbx->query($sql); $sql = "UPDATE `s_menu` SET `S_MenuUrl` = 'test/vuex/one-fo-close-cashier-klinik' WHERE `S_MenuUrl` LIKE '%one-fo-close-cashier-klinik%'"; // $query = $this->dbx->query($sql); $sql = "UPDATE m_usergroup SET M_UserGroupDashboard = 'one-ui/test/vuex/one-fo-close-cashier-klinik' WHERE M_UserGroupDashboard LIKE '%one-fo-close-cashier-klinik%'"; // $query = $this->dbx->query($sql); $sql = "INSERT INTO `s_menu` (`S_MenuID`, `S_MenuName`, `S_MenuUrl`, `S_MenuIcon`, `S_MenuParentS_MenuID`, `S_MenuLevel`, `S_MenuIsParent`, `S_MenuOrder`, `S_MenuIsActive`, `S_MenuCreated`, `S_MenuLastUpdated`) VALUES (522, 'Tutup Kasir Klinik ', 'test/vuex/one-fo-close-cashier-klinik/', NULL, 131, 1, 'N', 1, 'Y', '2024-10-02 16:37:02', '2024-10-02 16:37:02')"; $sql = "UPDATE s_menu SET S_MenuIsActive = 'N' WHERE S_MenuName like 'Tutup Kasir Klinik%' and S_MenuUrl = 'test/vuex/one-fo-close-cashier-klinik/' AND S_MenuIsActive = 'Y' AND S_MenuID != ( SELECT S_MenuID FROM s_menu WHERE S_MenuName like 'Tutup Kasir Klinik%' and S_MenuUrl = 'test/vuex/one-fo-close-cashier-klinik/' AND S_MenuIsActive = 'Y' ORDER BY S_MenuID DESC LIMIT 1 )"; // $query = $this->dbx->query($sql); $sql = "CREATE TABLE one_klinik.`f_payment_kasir` ( `F_PaymentKasirID` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, `F_PaymentKasirNumber` varchar(50) NOT NULL, `F_PaymentKasirDate` datetime NOT NULL, `F_PaymentKasirCreated` timestamp NULL, `F_PaymentKasirLastUpdated` timestamp NULL, `F_PaymentKasirIsReceived` varchar(1) NOT NULL DEFAULT 'N', `F_PaymentKasirUserID` int(11) NULL, `F_PaymentKasirIsActive` varchar(1) NOT NULL DEFAULT 'Y', `F_PaymentKasirReceivedUserID` int(11) NULL, `F_PaymentKasirReceivedDate` datetime NULL );"; // $query = $this->dbx->query($sql); $sql = "CREATE TABLE one_klinik.`f_payment_kasir_detail` ( `F_PaymentKasirDetailID` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, `F_PaymentKasirDetailF_PaymentID` int(11) NULL, `F_PaymentKasirDetailCreated` datetime NULL ON UPDATE CURRENT_TIMESTAMP, `F_PaymentKasirDetailLastUpdated` datetime NULL ON UPDATE CURRENT_TIMESTAMP, `F_PaymentKasirDetailIsActive` varchar(1) NULL DEFAULT 'Y', `F_PaymentKasirDetailF_PaymentKasirID` int(11) NULL );"; $query = $this->dbx->query($sql); $sql = "UPDATE `s_menu` SET `S_MenuUrl` = 'test/vuex/one-sample-lab-v15' WHERE `S_MenuUrl` LIKE '%one-sample-lab-vvii%'"; // $query = $this->dbx->query($sql); $sql = "UPDATE m_usergroup SET M_UserGroupDashboard = 'one-ui/test/vuex/one-sample-lab-v15' WHERE M_UserGroupDashboard LIKE '%one-sample-lab-vvii%'"; //$query = $this->dbx->query($sql); $sql = "UPDATE `s_menu` SET `S_MenuUrl` = 'test/vuex/one-sample-radiodiagnostic-v5' WHERE `S_MenuUrl` LIKE '%one-sample-radiodiagnostic-v3%'"; //$query = $this->dbx->query($sql); $sql = "UPDATE m_usergroup SET M_UserGroupDashboard = 'one-ui/test/vuex/one-sample-radiodiagnostic-v5' WHERE M_UserGroupDashboard LIKE '%one-sample-radiodiagnostic-v3%'"; //$query = $this->dbx->query($sql); $sql = "UPDATE `s_menu` SET `S_MenuUrl` = 'test/vuex/one-sample-electromedis-v5' WHERE `S_MenuUrl` LIKE '%one-sample-electromedis-v2%'"; //$query = $this->dbx->query($sql); $sql = "UPDATE m_usergroup SET M_UserGroupDashboard = 'one-ui/test/vuex/one-sample-electromedis-v5' WHERE M_UserGroupDashboard LIKE '%one-sample-electromedis-v2%'"; //$query = $this->dbx->query($sql); $sql = "UPDATE `s_menu` SET `S_MenuUrl` = 'test/vuex/one-sample-others-v5' WHERE `S_MenuUrl` LIKE '%one-sample-others-v%'"; //$query = $this->dbx->query($sql); $sql = "UPDATE m_usergroup SET M_UserGroupDashboard = 'one-ui/test/vuex/one-sample-others-v5' WHERE M_UserGroupDashboard LIKE '%one-sample-others-v%'"; //$query = $this->dbx->query($sql); $sql = "UPDATE `mcu_statusresult` SET `Mcu_StatusResultID` = '5', `Mcu_StatusResultName` = 'Spirometri', `Mcu_StatusResultIsDefault` = 'N', `Mcu_StatusResultJson` = '[{\"id\":\"Y\",\"name\":\"Normal\"},{\"id\":\"K\",\"name\":\"Kelainan Restriksi\"},{\"id\":\"L\",\"name\":\"Kelainan Obstruksi\"},{\"id\":\"KX\",\"name\":\"Kelainan Restriksi dengan Obstruksi\"},{\"id\":\"LX\",\"name\":\"Kelainan Obstruksi dengan Restriksi\"},{\"id\":\"G\",\"name\":\"Lainnya\"}]', `Mcu_StatusResultIsActive` = 'Y', `Mcu_StatusResultUserID` = '1', `Mcu_StatusResultCreated` = now(), `Mcu_StatusResultLastUpdated` = '2022-11-01 11:58:21' WHERE `Mcu_StatusResultID` = '5';"; //$query = $this->dbx->query($sql); $sql = "INSERT INTO `mcu_statusresult_value` (`Mcu_StatusResultValueCode`, `Mcu_StatusResultValueName`, `Mcu_StatusResultValueIsActive`, `Mcu_StatusResultValueCreated`, `Mcu_StatusResultValueLastUpdated`, `Mcu_StatusResultValueUserID`) SELECT 'KX', 'Kelainan Restriksi dengan Obstruksi', 'Y', '2022-11-01 19:10:59', '2022-11-01 11:53:25', '1';"; //$query = $this->dbx->query($sql); $sql = "INSERT INTO `mcu_statusresult_value` (`Mcu_StatusResultValueCode`, `Mcu_StatusResultValueName`, `Mcu_StatusResultValueIsActive`, `Mcu_StatusResultValueCreated`, `Mcu_StatusResultValueLastUpdated`, `Mcu_StatusResultValueUserID`) SELECT 'LX', 'Kelainan Obstruksi dengan Restriksi', 'Y', '2022-11-01 19:13:12', '2022-11-01 11:54:24', '1';"; //$query = $this->dbx->query($sql); $sql = "INSERT INTO `mcu_statusresult_value` (`Mcu_StatusResultValueCode`, `Mcu_StatusResultValueName`, `Mcu_StatusResultValueIsActive`, `Mcu_StatusResultValueCreated`, `Mcu_StatusResultValueLastUpdated`, `Mcu_StatusResultValueUserID`) SELECT 'LX', 'Kelainan Obstruksi dengan Restriksi', 'Y', '2022-11-01 19:13:12', '2022-11-01 11:54:24', '1';"; //$query = $this->dbx->query($sql); /*$sql = "SELECT DATA_TYPE, CHARACTER_MAXIMUM_LENGTH AS MAX_LENGTH FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 't_packet' AND COLUMN_NAME = 'T_PacketSasCode'"; $query = $this->dbx->query($sql); $row_data = $query->row_array(); if($row_data){ if(intval($row_data['MAX_LENGTH']) <> 10){ echo $v." Belum Update"; } }*/ $sql = "DROP TRIGGER one_klinik.`order_bi`"; //$query = $this->dbx->query($sql); $sql = "CREATE TRIGGER one_klinik.`order_bi` BEFORE INSERT ON `order` FOR EACH ROW BEGIN SET NEW.orderNumber = (SELECT `fn_numbering_klinik`('K')); END "; //$query = $this->dbx->query($sql); $sql = "UPDATE s_menu SET S_MenuIsActive = 'N' WHERE S_MenuUrl = 'test/vuex/one-fo-clinic-registration/'"; //$query = $this->dbx->query($sql); $sql = "UPDATE s_menu SET S_MenuIsActive = 'N' WHERE S_MenuUrl = 'test/vuex/one-fo-clinic-poly/'"; //$query = $this->dbx->query($sql); $sql = "UPDATE `s_menu` SET `S_MenuOrder` = '6' WHERE `S_MenuIsActive` = 'Y' AND ( `S_MenuUrl` = 'test/vuex/one-sample-others-v5/' OR `S_MenuUrl` = 'test/vuex/one-sample-others-v2/' )"; //$query = $this->dbx->query($sql); $sql = "UPDATE `s_menu` SET S_MenuUrl = 'test/vuex/one-md-doctor-cabang-v2' WHERE `S_MenuName` = 'dokter cabang' "; //$query = $this->dbx->query($sql); $sql = "INSERT INTO `s_menu` (`S_MenuName`, `S_MenuUrl`, `S_MenuIcon`, `S_MenuParentS_MenuID`, `S_MenuLevel`, `S_MenuIsParent`, `S_MenuOrder`, `S_MenuIsActive`, `S_MenuCreated`, `S_MenuLastUpdated`) VALUES ('Listing Pasien Klinik', 'test/vuex/one-order-list-patient/', NULL, '117', '1', 'N', '0', 'Y', now(), now())"; //$query = $this->dbx->query($sql); $sql = "CREATE TABLE `t_sampling_clinic_queue_by_action` ( `T_SamplingQueueByActionID` int(11) NOT NULL AUTO_INCREMENT, `T_SamplingQueueByActionT_SampleStationID` int(11) NOT NULL, `T_SamplingQueueByActionT_OrderHeaderID` int(11) NOT NULL, `T_SamplingQueueByActionT_SamplingQueueStatusID` int(11) NOT NULL, `T_SamplingQueueByActionCreated` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE current_timestamp(), `T_SamplingQueueByActionUserID` int(11) NOT NULL, PRIMARY KEY (`T_SamplingQueueByActionID`), KEY `T_SamplingQueueByActionCreated` (`T_SamplingQueueByActionCreated`), KEY `T_SamplingQueueByActionT_SampleStationID` (`T_SamplingQueueByActionT_SampleStationID`), KEY `T_SamplingQueueByActionT_SamplingQueueStatusID` (`T_SamplingQueueByActionT_SamplingQueueStatusID`), KEY `T_SamplingQueueByActionT_OrderHeaderID` (`T_SamplingQueueByActionT_OrderHeaderID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1"; //$query = $this->dbx->query($sql); $sql = "CREATE TABLE `t_sampling_clinic_queue_last_status` ( `T_SamplingQueueLastStatusID` int(11) NOT NULL AUTO_INCREMENT, `T_SamplingQueueLastStatusConfirm` char(1) NOT NULL DEFAULT 'N', `T_SamplingQueueLastStatusT_SampleStationID` int(11) NOT NULL, `T_SamplingQueueLastStatusT_OrderHeaderID` int(11) NOT NULL, `T_SamplingQueueLastStatusT_SamplingQueueStatusID` int(11) NOT NULL, `T_SamplingQueueLastStatusIsActive` char(1) NOT NULL DEFAULT 'Y', `T_SamplingQueueLastStatusLastUpdated` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `T_SamplingQueueLastStatusUserID` int(11) NOT NULL, PRIMARY KEY (`T_SamplingQueueLastStatusID`), UNIQUE KEY `unikkolom` (`T_SamplingQueueLastStatusT_SampleStationID`,`T_SamplingQueueLastStatusT_OrderHeaderID`,`T_SamplingQueueLastStatusIsActive`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"; //$query = $this->dbx->query($sql); $sql = "CREATE TRIGGER `t_sampling_clinic_queue_last_status_ai` AFTER INSERT ON `t_sampling_clinic_queue_last_status` FOR EACH ROW BEGIN INSERT INTO t_sampling_clinic_queue_by_action( T_SamplingQueueByActionT_SampleStationID, T_SamplingQueueByActionT_OrderHeaderID, T_SamplingQueueByActionT_SamplingQueueStatusID, T_SamplingQueueByActionCreated, T_SamplingQueueByActionUserID ) VALUES( NEW.T_SamplingQueueLastStatusT_SampleStationID, NEW.T_SamplingQueueLastStatusT_OrderHeaderID, NEW.T_SamplingQueueLastStatusT_SamplingQueueStatusID, NOW(), NEW.T_SamplingQueueLastStatusUserID ); END"; //$query = $this->dbx->query($sql); $sql = "CREATE TRIGGER `t_sampling_clinic_queue_last_status_bu` BEFORE UPDATE ON `t_sampling_clinic_queue_last_status` FOR EACH ROW BEGIN IF OLD.T_SamplingQueueLastStatusT_SamplingQueueStatusID = 5 AND NEW.T_SamplingQueueLastStatusT_SamplingQueueStatusID <> 2 THEN SET NEW.T_SamplingQueueLastStatusT_SamplingQueueStatusID = 5; END IF; END"; //$query = $this->dbx->query($sql); $sql = "CREATE TRIGGER `t_sampling_clinic_queue_last_status_au` AFTER UPDATE ON `t_sampling_clinic_queue_last_status` FOR EACH ROW BEGIN IF OLD.T_SamplingQueueLastStatusT_SamplingQueueStatusID <> NEW.T_SamplingQueueLastStatusT_SamplingQueueStatusID THEN INSERT INTO t_sampling_clinic_queue_by_action( T_SamplingQueueByActionT_SampleStationID, T_SamplingQueueByActionT_OrderHeaderID, T_SamplingQueueByActionT_SamplingQueueStatusID, T_SamplingQueueByActionCreated, T_SamplingQueueByActionUserID ) VALUES( NEW.T_SamplingQueueLastStatusT_SampleStationID, NEW.T_SamplingQueueLastStatusT_OrderHeaderID, NEW.T_SamplingQueueLastStatusT_SamplingQueueStatusID, NOW(), NEW.T_SamplingQueueLastStatusUserID ); END IF; END"; //$query = $this->dbx->query($sql); $sql = "CREATE FUNCTION `fn_sampling_clinic_queue_status_id` (`POrderID` int, `PStationID` int) RETURNS int(11) READS SQL DATA BEGIN DECLARE RST INT; SET RST = 0; SELECT T_SamplingQueueLastStatusT_SamplingQueueStatusID INTO RST FROM t_sampling_clinic_queue_last_status WHERE T_SamplingQueueLastStatusT_OrderHeaderID = POrderID AND T_SamplingQueueLastStatusT_SampleStationID = PStationID; RETURN RST; END"; //$query = $this->dbx->query($sql); $sql = "CREATE FUNCTION `fn_sampling_clinic_queue_status_name` (`POrderID` int, `PStationID` int) RETURNS varchar(35) CHARACTER SET 'latin1' READS SQL DATA BEGIN DECLARE RST VARCHAR(35); SET RST = 'New'; SELECT T_SamplingQueueStatusName INTO RST FROM t_sampling_clinic_queue_last_status JOIN t_sampling_queue_status ON T_SamplingQueueLastStatusT_SamplingQueueStatusID = T_SamplingQueueStatusID WHERE T_SamplingQueueLastStatusT_OrderHeaderID = POrderID AND T_SamplingQueueLastStatusT_SampleStationID = PStationID; RETURN RST; END"; //$query = $this->dbx->query($sql); $sql = "ALTER TABLE one_klinik.`order` ADD `orderQueueNumber` varchar(25) NULL DEFAULT '' AFTER `orderDate`, ADD `orderM_LocationID` int NULL DEFAULT '0' AFTER `orderQueueNumber`;"; //$query = $this->dbx->query($sql); $sql = "ALTER TABLE `antrian_samplestation` ADD `AntrianSampleStationOrderID` int NULL DEFAULT '0' AFTER `AntrianSampleStationTime`"; //$query = $this->dbx->query($sql); $sql = "UPDATE `s_menu` SET `S_MenuUrl` = 'test/vuex/one-fo-klinik-setting-v3/' WHERE `S_MenuName` = 'setting klinik'"; //$query = $this->dbx->query($sql); $sql = "UPDATE `s_menu` SET `S_MenuUrl` = 'test/vuex/one-klinik-anamnese-doctor-v2/' WHERE `S_MenuName` = 'periksa dokter'"; //$query = $this->dbx->query($sql); $sql = "UPDATE `s_menu` SET `S_MenuUrl` = 'test/vuex/one-klinik-fo-registration-v2/' WHERE `S_MenuUrl` LIKE '%one-klinik-fo-registration%'"; //$query = $this->dbx->query($sql); $sql = "UPDATE `s_menu` SET `S_MenuIsActive` = 'N' WHERE `S_MenuName` = 'Anamnesa'"; //$query = $this->dbx->query($sql); $sql = "INSERT INTO `s_menu` (`S_MenuName`, `S_MenuUrl`, `S_MenuIcon`, `S_MenuParentS_MenuID`, `S_MenuLevel`, `S_MenuIsParent`, `S_MenuOrder`, `S_MenuIsActive`, `S_MenuCreated`, `S_MenuLastUpdated`) SELECT 'Antrian Klinik', 'test/vuex/one-doctor-klinik/', NULL, '117', '1', 'N', '0', 'Y', '2019-06-21 10:22:03', '2023-12-15 13:57:42' "; //$query = $this->dbx->query($sql); $sql = "ALTER TABLE one_klinik.`setting` ADD `settingM_LocationID` int(11) NOT NULL DEFAULT '0' AFTER `settingPriceDefault`"; //$query = $this->dbx->query($sql); $sql = "ALTER TABLE one_klinik.`setting` ADD `settingT_SampleStationID` int(11) NOT NULL DEFAULT '0' AFTER `settingM_LocationID`"; //$query = $this->dbx->query($sql); //update menu screening $sql = "ALTER TABLE one_klinik.`order` ADD `orderIsScreening` char(1) NULL DEFAULT 'N' COMMENT 'N=>Y=>D' AFTER `orderTotal`"; //$query = $this->dbx->query($sql); $sql = "CREATE TABLE one_klinik.`screening_parameter` ( `ScreeningParameterID` int(11192) NOT NULL AUTO_INCREMENT, `ScreeningParameterType` varchar(100) DEFAULT NULL COMMENT 'kesadaran,pernafasan, resiko_jatuh, nyeri_dada, skala_nyeri, batuk, keputusan', `ScreeningParameterCode` varchar(50) DEFAULT NULL, `ScreeningParameterDisplay` varchar(255) DEFAULT NULL, `ScreeningParameterIsActive` char(1) NOT NULL DEFAULT 'Y', `ScreeningParameterUserID` int(11) DEFAULT 0, `ScreeningParameterCreated` datetime DEFAULT NULL, `ScreeningParameterLastUpdated` timestamp NULL DEFAULT NULL, PRIMARY KEY (`ScreeningParameterID`), KEY `ScreeningParameterType` (`ScreeningParameterType`), KEY `ScreeningParameterCode` (`ScreeningParameterCode`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;"; //$query = $this->dbx->query($sql); $sql = "CREATE TABLE one_klinik.`screening_parameter` ( `ScreeningParameterID` int(11192) NOT NULL AUTO_INCREMENT, `ScreeningParameterType` varchar(100) DEFAULT NULL COMMENT 'kesadaran,pernafasan, resiko_jatuh, nyeri_dada, skala_nyeri, batuk, keputusan', `ScreeningParameterCode` varchar(50) DEFAULT NULL, `ScreeningParameterDisplay` varchar(255) DEFAULT NULL, `ScreeningParameterIsActive` char(1) NOT NULL DEFAULT 'Y', `ScreeningParameterUserID` int(11) DEFAULT 0, `ScreeningParameterCreated` datetime DEFAULT NULL, `ScreeningParameterLastUpdated` timestamp NULL DEFAULT NULL, PRIMARY KEY (`ScreeningParameterID`), KEY `ScreeningParameterType` (`ScreeningParameterType`), KEY `ScreeningParameterCode` (`ScreeningParameterCode`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;"; //$query = $this->dbx->query($sql); $sql = "CREATE TABLE one_klinik.`order_screening` ( `orderScreeningID` int(11) NOT NULL AUTO_INCREMENT, `orderScreeningOrderID` int(11) DEFAULT 0, `orderScreeningKesanUmum` text DEFAULT '', `orderScreeningValueKesadaran` varchar(50) DEFAULT NULL, `orderScreeningValuePernafasan` varchar(50) DEFAULT NULL, `orderScreeningValueResikoJatuh` varchar(50) DEFAULT NULL, `orderScreeningValueNyeriDada` varchar(50) DEFAULT NULL, `orderScreeningValueSkalaNyeri` varchar(50) DEFAULT NULL, `orderScreeningValueBatuk` varchar(50) DEFAULT NULL, `orderScreeningValueKeputusan` varchar(50) DEFAULT NULL, `orderScreeningIsActive` char(1) NOT NULL DEFAULT 'Y', `orderScreeningCreated` datetime DEFAULT NULL, `orderScreeningLastUpdated` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `orderScreeningUserID` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`orderScreeningID`), KEY `orderScreeningOrderID` (`orderScreeningOrderID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;"; //$query = $this->dbx->query($sql); $sql = "INSERT INTO `s_menu` ( `S_MenuName`, `S_MenuUrl`, `S_MenuIcon`, `S_MenuParentS_MenuID`, `S_MenuLevel`, `S_MenuIsParent`, `S_MenuOrder`, `S_MenuIsActive`, `S_MenuCreated`, `S_MenuLastUpdated`) VALUES ( 'Screening', 'test/vuex/one-klinik-screening/', NULL, 117, 1, 'N', 1, 'Y', '2019-06-21 10:22:03', '2024-01-17 14:16:33')"; //$query = $this->dbx->query($sql); $sql = "UPDATE `s_menu` SET `S_MenuOrder` = '3' WHERE `S_MenuParentS_MenuID` = '117' AND `S_MenuName` = 'Screening'"; //$query = $this->dbx->query($sql); $sql = "UPDATE `s_menu` SET `S_MenuUrl` = 'test/vuex/one-doctor-klinik-v2/' WHERE `S_MenuParentS_MenuID` = '117' AND `S_MenuName` = 'Antrian Klinik';"; //$query = $this->dbx->query($sql); $sql = "UPDATE `s_menu` SET `S_MenuUrl` = 'test/vuex/one-klinik-resume-medic-v2/' WHERE `S_MenuParentS_MenuID` = '117' AND `S_MenuName` = 'Resume Medis'"; //$query = $this->dbx->query($sql); $sql = "INSERT INTO `s_menu` (`S_MenuID`, `S_MenuName`, `S_MenuUrl`, `S_MenuIcon`, `S_MenuParentS_MenuID`, `S_MenuLevel`, `S_MenuIsParent`, `S_MenuOrder`, `S_MenuIsActive`, `S_MenuCreated`, `S_MenuLastUpdated`) VALUES (349, 'Consumable', 'test/vuex/one-list-consumable/', NULL, 114, 1, 'N', 105, 'Y', '2023-11-08 13:35:02', '2023-11-08 13:35:02')"; //$query = $this->dbx->query($sql); $sql = "INSERT INTO `s_menu` ( `S_MenuName`, `S_MenuUrl`, `S_MenuIcon`, `S_MenuParentS_MenuID`, `S_MenuLevel`, `S_MenuIsParent`, `S_MenuOrder`, `S_MenuIsActive`, `S_MenuCreated`, `S_MenuLastUpdated`) VALUES ( 'Master Consumable', 'test/vuex/one-md-consumable/', NULL, 68, 2, 'N', 111, 'Y', '2023-11-08 14:16:44', '2023-11-08 14:16:44');"; //$query = $this->dbx->query($sql); $sql = "CREATE TABLE `m_satuan` ( `M_SatuanID` int(11) NOT NULL AUTO_INCREMENT, `M_SatuanName` varchar(250) DEFAULT NULL, `M_SatuanIsActive` char(1) NOT NULL DEFAULT 'Y', `M_SatuanCreated` date DEFAULT NULL, `M_SatuanLastUpdated` timestamp NULL DEFAULT NULL, `M_SatuanM_UserID` int(11) DEFAULT NULL, PRIMARY KEY (`M_SatuanID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;"; //$query = $this->dbx->query($sql); $sql = "CREATE TABLE `m_consumable` ( `M_ConsumableID` int(11) NOT NULL AUTO_INCREMENT, `M_ConsumableCode` varchar(10) NOT NULL, `M_ConsumableName` varchar(250) NOT NULL, `M_ConsumableDefaultM_SatuanID` int(11) NOT NULL, `M_ConsumableDefaultShow` char(1) NOT NULL DEFAULT 'N', `M_ConsumableDefaultQty` int(11) NOT NULL, `M_ConsumableIsActive` char(1) NOT NULL DEFAULT 'Y', `M_ConsumableUserID` int(11) NOT NULL, `M_ConsumableCreated` datetime DEFAULT current_timestamp(), `M_ConsumableLastUpdated` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`M_ConsumableID`), KEY `M_ConsumableDefaultM_SatuanID` (`M_ConsumableDefaultM_SatuanID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; "; //$query = $this->dbx->query($sql); $sql = "ALTER TABLE one_klinik.`order` ADD `orderIsReopen` varchar(15) COLLATE 'latin1_swedish_ci' NOT NULL DEFAULT 'N' AFTER `orderStatus`, ADD `orderReOpenCount` int NOT NULL DEFAULT '0' AFTER `orderIsReopen`, ADD `orderReOpenM_DoctorID` int NOT NULL DEFAULT '0' AFTER `orderReOpenCount`;"; //$query = $this->dbx->query($sql); $sql = "CREATE TABLE one_klinik.`order_doctor_additional` ( `orderDoctorAdditionalID` int(11) NOT NULL AUTO_INCREMENT, `orderDoctorAdditionalOrderID` int(11) NOT NULL DEFAULT 0, `orderDoctorAdditionalReOpenCount` int(11) NOT NULL DEFAULT 0, `orderDoctorAdditionalM_DoctorID` int(11) NOT NULL DEFAULT 0, `orderDoctorAdditionalType` varchar(50) NOT NULL DEFAULT '', `orderDoctorAdditionalValue` text NOT NULL DEFAULT '', `orderDoctorAdditionalICD10Code` varchar(50) NOT NULL DEFAULT '', `orderDoctorAdditionalICD10Text` text NOT NULL DEFAULT '', `orderDoctorAdditionalIsActive` char(1) NOT NULL DEFAULT 'Y', `orderDoctorAdditionalCreated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `orderDoctorAdditionalLastUdated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `orderDoctorAdditionalUserID` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`orderDoctorAdditionalID`), KEY `orderDoctorAdditionalOrderID` (`orderDoctorAdditionalOrderID`), KEY `orderDoctorAdditionalM_DoctorID` (`orderDoctorAdditionalM_DoctorID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; "; //$query = $this->dbx->query($sql); $sql = "UPDATE `s_menu` SET `S_MenuUrl` = 'test/vuex/one-order-list-patient-v2/' WHERE `S_MenuUrl` LIKE '%ne-order-list-patient%'"; //$query = $this->dbx->query($sql); $sql = "UPDATE `s_menu` SET `S_MenuUrl` = 'test/vuex/one-klinik-anamnese-doctor-v3/' WHERE `S_MenuUrl` LIKE '%one-klinik-anamnese-doctor-v%'"; //$query = $this->dbx->query($sql); $sql = "UPDATE m_usergroup SET M_UserGroupDashboard = 'one-ui/test/vuex/one-fo-registration-v29' WHERE M_UserGroupDashboard = 'one-ui/test/vuex/one-fo-registration-v28'"; //$query = $this->dbx->query($sql); $sql = "ALTER TABLE one_klinik.`order_doctor` ADD `orderDoctorDiagnoseAwal` text COLLATE 'latin1_swedish_ci' NULL AFTER `orderDoctorReceipt`;"; //$query = $this->dbx->query($sql); $sql = "ALTER TABLE one_klinik.`order_diagnose_icd10` ADD `orderDiagnoseIcd10Awal` varchar(25) NULL DEFAULT '' AFTER `orderDiagnoseIcd10OrderID`, ADD `orderDiagnoseIcd10AwalText` text NULL DEFAULT '' AFTER `orderDiagnoseIcd10Awal`, CHANGE `orderDiagnoseIcd10Primary` `orderDiagnoseIcd10Primary` varchar(25) COLLATE 'latin1_swedish_ci' NULL DEFAULT '' AFTER `orderDiagnoseIcd10AwalText`, CHANGE `orderDiagnoseIcd10PrimaryText` `orderDiagnoseIcd10PrimaryText` text COLLATE 'latin1_swedish_ci' NULL DEFAULT '' AFTER `orderDiagnoseIcd10Primary`, CHANGE `orderDiagnoseIcd10Sekunder` `orderDiagnoseIcd10Sekunder` varchar(25) COLLATE 'latin1_swedish_ci' NULL DEFAULT '' AFTER `orderDiagnoseIcd10PrimaryText`, CHANGE `orderDiagnoseIcd10SekunderText` `orderDiagnoseIcd10SekunderText` text COLLATE 'latin1_swedish_ci' NULL DEFAULT '' AFTER `orderDiagnoseIcd10Sekunder`, CHANGE `orderDiagnoseIcd10LastUpdated` `orderDiagnoseIcd10LastUpdated` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP AFTER `orderDiagnoseIcd10UserID`;"; //$query = $this->dbx->query($sql); $sql = "INSERT INTO `m_delivery` ( `M_DeliveryM_DeliveryTypeID`, `M_DeliveryName`, `M_DeliveryPosition`, `M_DeliverySource`, `M_DeliveryIsHomeService`, `M_DeliveryCreated`, `M_DeliveryLastUpdated`, `M_DeliveryIsActive`) VALUES ( 10, 'eResult', 14, 'ERESULT', 'N', NULL, NULL, 'Y');"; //$query = $this->dbx->query($sql); $sql = "INSERT INTO `m_deliverytype` (`M_DeliveryTypeID`, `M_DeliveryTypeCode`, `M_DeliveryTypeName`, `M_DeliveryTypeCreated`, `M_DeliveryTypeLastUpdated`, `M_DeliveryTypeIsActive`) VALUES (10, 'ERESULT', 'Kirim E Result', '2019-03-08 13:30:24', '2019-03-13 16:11:42', 'Y');"; //$query = $this->dbx->query($sql); $sql = "CREATE TABLE `t_samplingso_form_addon` ( `T_SamplingSoFormAddOnID` int(11) NOT NULL AUTO_INCREMENT, `T_SamplingSoFormAddOnT_SamplingSoID` int(11) NOT NULL DEFAULT 0, `T_SamplingSoFormAddOnBB` float NOT NULL DEFAULT 0, `T_SamplingSoFormAddOnIsActive` char(1) NOT NULL DEFAULT 'Y', `T_SamplingSoFormAddOnCreated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `T_SamplingSoFormAddOnLastUpdated` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `T_SamplingSoFormAddOnUserID` int(11) NOT NULL DEFAULT 0, PRIMARY KEY (`T_SamplingSoFormAddOnID`), UNIQUE KEY `DT_SamplingSoFormAddOnT_SamplingSoID` (`T_SamplingSoFormAddOnT_SamplingSoID`), KEY `T_SamplingSoFormAddOnT_SamplingSoID` (`T_SamplingSoFormAddOnT_SamplingSoID`), KEY `T_SamplingSoFormAddOnIsActive` (`T_SamplingSoFormAddOnIsActive`), KEY `T_SamplingSoFormAddOnUserID` (`T_SamplingSoFormAddOnUserID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;"; //$query = $this->dbx->query($sql); $sql = "UPDATE `s_menu` SET `S_MenuUrl` = 'test/vuex/one-fo-supervisor-v11/' WHERE `S_MenuUrl` LIKE '%one-fo-supervisor-v%'"; //$query = $this->dbx->query($sql); /*$sql = "ALTER TABLE `m_doctormcu` ADD `M_DoctorMcuPriceKlinik` int NOT NULL DEFAULT '0' AFTER `M_DoctorMcuDefaultKlinik`";*/ //$query = $this->dbx->query($sql); /*$sql = "UPDATE `s_menu` SET `S_MenuUrl` = 'test/vuex/one-md-doctor-cabang-v3/' WHERE `S_MenuUrl` LIKE '%one-md-doctor-cabang%'"; //$query = $this->dbx->query($sql);*/ //$sql = "UPDATE `s_menu` SET `S_MenuUrl` = 'test/vuex/one-klinik-fo-registration-v3/' WHERE `S_MenuUrl` LIKE '%one-klinik-fo-registration-v%'"; //$query = $this->dbx->query($sql); //$sql = "UPDATE `s_menu` SET `S_MenuUrl` = 'test/vuex/one-fo-cashier-new-payment-v24' WHERE `S_MenuUrl` LIKE '%test/vuex/one-fo-cashier-new-payment%'"; //$query = $this->dbx->query($sql); /* $sql = "UPDATE `s_menu` SET `S_MenuUrl` = 'test/vuex/one-mcu-offline-preregister-app-v3/' WHERE `S_MenuUrl` LIKE '%test/vuex/one-mcu-offline-preregister-app%'"; //$query = $this->dbx->query($sql); $sql = "UPDATE `s_menu` SET `S_MenuUrl` = 'test/vuex/one-fo-registration-v31/' WHERE `S_MenuUrl` LIKE '%one-fo-registration-v%'"; //$query = $this->dbx->query($sql); $sql = "UPDATE m_usergroup SET M_UserGroupDashboard = 'one-ui/test/vuex/one-fo-registration-v31' WHERE M_UserGroupDashboard LIKE '%one-ui/test/vuex/one-fo-registration-v%'"; //$query = $this->dbx->query($sql); */ $sql = "ALTER TABLE one_klinik.`order_doctor` ADD `orderDoctorFisik` text COLLATE 'utf8_general_ci' NULL"; //$query = $this->dbx->query($sql); $sql = "UPDATE `s_menu` SET `S_MenuUrl` = 'test/vuex/one-klinik-anamnese-doctor-v5/' WHERE `S_MenuName` = 'Periksa Dokter';"; //$query = $this->dbx->query($sql); $sql = "UPDATE m_usergroup SET M_UserGroupDashboard = 'one-ui/test/vuex/one-klinik-anamnese-doctor-v5' WHERE M_UserGroupDashboard LIKE '%one-ui/test/vuex/one-klinik-anamnese-doctor-v%'"; //$query = $this->dbx->query($sql); $sql = "CREATE TABLE `other_patologi_anatomy` ( `Other_PatologiAnatomyID` int(11) NOT NULL AUTO_INCREMENT, `Other_PatologiAnatomyT_OrderDetailID` int(11) NOT NULL, `Other_PatologiAnatomyM_DoctorID` int(11) NOT NULL, `Other_PatologiAnatomyNoSediaan` varchar(255) NOT NULL DEFAULT '', `Other_PatologiAnatomyKeteranganKlinis` varchar(255) NOT NULL DEFAULT '', `Other_PatologiAnatomyLokasiOrgan` varchar(255) NOT NULL DEFAULT '', `Other_PatologiAnatomyMakroskopik` text NOT NULL DEFAULT '\'\\\'\\\'\'', `Other_PatologiAnatomyMikroskopik` text NOT NULL DEFAULT '\'\\\'\\\'\'', `Other_PatologiAnatomyKesimpulan` text NOT NULL DEFAULT '\'\\\'\\\'\'', `Other_PatologiAnatomyIsActive` char(1) NOT NULL DEFAULT 'Y', `Other_PatologiAnatomyUserID` int(11) NOT NULL DEFAULT 0, `Other_PatologiAnatomyCreated` datetime NOT NULL, `Other_PatologiAnatomyLastUpdated` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`Other_PatologiAnatomyID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;"; //$query = $this->dbx->query($sql); $sql = "CREATE TABLE `log_other_patologianatomy` ( `Log_OtherPatologiAnatomyID` int(11) NOT NULL AUTO_INCREMENT, `Log_OtherPatologiAnatomyT_OrderDetailID` int(11) NOT NULL, `Log_OtherPatologiAnatomyDateTime` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `Log_OtherPatologiAnatomySON` text DEFAULT NULL, `Log_OtherPatologiAnatomyUserID` int(11) DEFAULT NULL, PRIMARY KEY (`Log_OtherPatologiAnatomyID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;"; //$query = $this->dbx->query($sql); $sql = "CREATE TRIGGER `other_patologi_anatomy_ai` AFTER INSERT ON `other_patologi_anatomy` FOR EACH ROW BEGIN UPDATE t_orderdetail SET T_OrderDetailResult = 'Terlampir' WHERE T_OrderDetailID = NEW.Other_PatologiAnatomyT_OrderDetailID; END;; CREATE TRIGGER `other_patologi_anatomy_au` AFTER UPDATE ON `other_patologi_anatomy` FOR EACH ROW BEGIN IF NEW.Other_PatologiAnatomyIsActive = 'N' THEN UPDATE t_orderdetail SET T_OrderDetailResult = '' WHERE T_OrderDetailID = NEW.Other_PatologiAnatomyT_OrderDetailID; END IF END"; //$query = $this->dbx->query($sql); $sql = "UPDATE `s_menu` SET `S_MenuUrl` = 'test/vuex/one-fo-supervisor-v12/' WHERE `S_MenuUrl` LIKE CONCAT('%','test/vuex/one-fo-supervisor-v','%')"; //$query = $this->dbx->query($sql); if ($query) { echo $v . "-OK"; } else { echo $v . "-ERROR "; } } } } ?>