FHM09062601IBL - tambah fitur tindakan medis: table order_tindakan + 4 endpoint

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
sas.fajri
2026-06-11 16:08:34 +07:00
parent e5d5dfd48a
commit 39f4626cdf
2 changed files with 221 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
-- 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;