22 lines
1.6 KiB
SQL
22 lines
1.6 KiB
SQL
-- Tabel pencatatan tindakan medis per kunjungan
|
|
CREATE TABLE `one_klinik`.`order_tindakan` (
|
|
`orderTindakanID` int(11) NOT NULL AUTO_INCREMENT,
|
|
`orderTindakanOrderID` int(11) NOT NULL DEFAULT 0,
|
|
`orderTindakanT_TestID` int(11) NOT NULL DEFAULT 0 COMMENT 'ref one_lab.t_test - jenis tindakan',
|
|
`orderTindakanSsPriceMouID` int(11) DEFAULT NULL COMMENT 'ref one_lab.ss_price_mou.Ss_PriceMouID (no FK)',
|
|
`orderTindakanBruto` decimal(15,2) NOT NULL DEFAULT 0 COMMENT 'harga sebelum diskon',
|
|
`orderTindakanDiscPersen` decimal(10,2) NOT NULL DEFAULT 0 COMMENT 'diskon %',
|
|
`orderTindakanDiscRp` decimal(15,2) NOT NULL DEFAULT 0 COMMENT 'diskon Rp',
|
|
`orderTindakanTotal` decimal(15,2) NOT NULL DEFAULT 0 COMMENT 'harga setelah diskon',
|
|
`orderTindakanM_DoctorID` int(11) DEFAULT NULL COMMENT 'dokter yang melakukan tindakan (no FK)',
|
|
`orderTindakanPerformedAt` datetime NOT NULL DEFAULT current_timestamp() COMMENT 'jam dilakukan tindakan',
|
|
`orderTindakanCatatan` text DEFAULT NULL,
|
|
`orderTindakanIsActive` char(1) NOT NULL DEFAULT 'Y',
|
|
`orderTindakanUserID` int(11) DEFAULT NULL,
|
|
`orderTindakanCreated` datetime NOT NULL DEFAULT current_timestamp(),
|
|
`orderTindakanLastUpdated` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
|
PRIMARY KEY (`orderTindakanID`),
|
|
KEY `orderTindakanOrderID` (`orderTindakanOrderID`),
|
|
KEY `orderTindakanIsActive` (`orderTindakanIsActive`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|