Add MCU report template mapping flow
This commit is contained in:
52
scripts/sql/2026-04-29_create_mcu_report_url_template.sql
Normal file
52
scripts/sql/2026-04-29_create_mcu_report_url_template.sql
Normal file
@@ -0,0 +1,52 @@
|
||||
CREATE TABLE IF NOT EXISTS `mcu_report_url_template` (
|
||||
`Mcu_ReportUrlTemplateID` int NOT NULL AUTO_INCREMENT,
|
||||
`Mcu_ReportUrlTemplateName` varchar(100) NOT NULL,
|
||||
`Mcu_ReportUrlTemplateType` varchar(20) NOT NULL COMMENT 'BIRT/API',
|
||||
`Mcu_ReportUrlTemplateUrl` text NOT NULL COMMENT 'use placeholders like {{PResumeID}}',
|
||||
`Mcu_ReportUrlTemplateParams` varchar(500) DEFAULT NULL COMMENT 'comma-separated placeholders',
|
||||
`Mcu_ReportUrlTemplateIsActive` char(1) NOT NULL DEFAULT 'Y',
|
||||
`Mcu_ReportUrlTemplateCreated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`Mcu_ReportUrlTemplateCreatedUserID` int NOT NULL DEFAULT '0',
|
||||
`Mcu_ReportUrlTemplateLastUpdated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`Mcu_ReportUrlTemplateLastUpdatedUserID` int NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`Mcu_ReportUrlTemplateID`),
|
||||
UNIQUE KEY `uk_report_name` (`Mcu_ReportUrlTemplateName`),
|
||||
KEY `idx_active` (`Mcu_ReportUrlTemplateIsActive`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
INSERT INTO `mcu_report_url_template`
|
||||
(`Mcu_ReportUrlTemplateName`,`Mcu_ReportUrlTemplateType`,`Mcu_ReportUrlTemplateUrl`,`Mcu_ReportUrlTemplateParams`)
|
||||
VALUES
|
||||
('cover','BIRT','/birt/run?__report=report/one/mcu/rpt_mcu_resume_cover.rptdesign&__format=pdf&username={{username}}&PID={{PResumeID}}&tm={{PTimestamp}}','username,PResumeID,PTimestamp'),
|
||||
('coverprimaya','BIRT','/birt/run?__report=report/one/mcu/rpt_mcu_resume_cover_primaya.rptdesign&__format=pdf&username={{username}}&PID={{PResumeID}}&tm={{PTimestamp}}','username,PResumeID,PTimestamp'),
|
||||
('kesimpulandansaran','BIRT','/birt/run?__report=report/one/mcu/rpt_mcu_saran_kesimpulan_v2.rptdesign&__format=pdf&username={{username}}&PID={{PResumeID}}&tm={{PTimestamp}}','username,PResumeID,PTimestamp'),
|
||||
('kesimpulandansaran2logo','BIRT','/birt/run?__report=report/one/mcu/rpt_mcu_saran_kesimpulan_portal.rptdesign&__format=pdf&username={{username}}&PID={{PResumeID}}&tm={{PTimestamp}}','username,PResumeID,PTimestamp'),
|
||||
('kesimpulandansaran2logobg','BIRT','/birt/run?__report=report/one/mcu/rpt_mcu_saran_kesimpulan{{PBgSuffix}}_portal.rptdesign&__format=pdf&username={{username}}&PID={{PResumeID}}&tm={{PTimestamp}}','username,PResumeID,PBgSuffix,PTimestamp'),
|
||||
('kesimpulandansaran2','BIRT','/birt/run?__report=report/one/mcu/rpt_mcu_saran_kesimpulan.rptdesign&__format=pdf&username={{username}}&PID={{PResumeID}}&tm={{PTimestamp}}','username,PResumeID,PTimestamp'),
|
||||
('resume','BIRT','/birt/run?__report=report/one/mcu/rpt_mcu_resume.rptdesign&__format=pdf&username={{username}}&PID={{PResumeID}}&tm={{PTimestamp}}','username,PResumeID,PTimestamp'),
|
||||
('gabunganlogo','API','/one-api/tools/listrptpatienttahunanportal/get_list_patient_rpt/{{POrderID}}/{{PTimestamp}}','POrderID,PTimestamp'),
|
||||
('gabunganlogobg','API','/one-api/tools/listrptpatienttahunanportalbg/get_list_patient_rpt/{{POrderID}}/{{PBg}}/{{PTimestamp}}','POrderID,PBg,PTimestamp'),
|
||||
('gabunganlogoeng','API','/one-api/tools/listrptpatienttahunanportaleng/get_list_patient_rpt/{{POrderID}}/{{PTimestamp}}','POrderID,PTimestamp'),
|
||||
('gabunganlogoengbg','API','/one-api/tools/listrptpatienttahunanportalengbg/get_list_patient_rpt/{{POrderID}}/{{PBg}}/{{PTimestamp}}','POrderID,PBg,PTimestamp'),
|
||||
('gabunganlogoprimaya','API','/one-api/tools/listrptpatienttahunanportalprimaya/get_list_patient_rpt/{{POrderID}}/{{PTimestamp}}','POrderID,PTimestamp'),
|
||||
('gabunganlogoprimayabg','API','/one-api/tools/listrptpatienttahunanportalprimayabg/get_list_patient_rpt/{{POrderID}}/{{PBg}}/{{PTimestamp}}','POrderID,PBg,PTimestamp'),
|
||||
('gabungan','API','/one-api/tools/listrptpatienttahunan/get_list_patient_rpt/{{POrderID}}/{{PTimestamp}}','POrderID,PTimestamp'),
|
||||
('gabunganeng','API','/one-api/tools/listrptpatienttahunaneng/get_list_patient_rpt/{{POrderID}}/{{PTimestamp}}','POrderID,PTimestamp'),
|
||||
('gabunganprimaya','API','/one-api/tools/listrptpatienttahunanprimaya/get_list_patient_rpt/{{POrderID}}/{{PTimestamp}}','POrderID,PTimestamp'),
|
||||
('gabunganlogotanpakesimpulan','API','/one-api/tools/listrptpatienttahunanportal/get_list_patient_rpt/{{POrderID}}/{{PTimestamp}}/Y','POrderID,PTimestamp'),
|
||||
('gabunganlogotanpakesimpulanbg','API','/one-api/tools/listrptpatienttahunanportalbg/get_list_patient_rpt/{{POrderID}}/{{PBg}}/{{PTimestamp}}/Y','POrderID,PBg,PTimestamp'),
|
||||
('gabunganlogotanpakesimpulaneng','API','/one-api/tools/listrptpatienttahunanportaleng/get_list_patient_rpt/{{POrderID}}/{{PTimestamp}}/Y','POrderID,PTimestamp'),
|
||||
('gabungantanpakesimpulan','API','/one-api/tools/listrptpatienttahunan/get_list_patient_rpt/{{POrderID}}/{{PTimestamp}}/Y','POrderID,PTimestamp'),
|
||||
('gabungantanpakesimpulaneng','API','/one-api/tools/listrptpatienttahunaneng/get_list_patient_rpt/{{POrderID}}/{{PTimestamp}}/Y','POrderID,PTimestamp'),
|
||||
('gabungan2logo','API','/one-api/tools/listrptpatientportal/get_list_patient_rpt/{{POrderID}}/{{PTimestamp}}','POrderID,PTimestamp'),
|
||||
('gabungan2logobg','API','/one-api/tools/listrptpatientportalbg/get_list_patient_rpt/{{POrderID}}/{{PBg}}/{{PTimestamp}}','POrderID,PBg,PTimestamp'),
|
||||
('gabungan2','API','/one-api/tools/listrptpatient/get_list_patient_rpt/{{POrderID}}/{{PTimestamp}}','POrderID,PTimestamp'),
|
||||
('haji','API','/one-api/tools/listrptpatienthaji/get_list_patient_rpt/{{PReIDHaji}}/{{PTimestamp}}','PReIDHaji,PTimestamp'),
|
||||
('hajiportal','API','/one-api/tools/listrptpatienthajiportal/get_list_patient_rpt/{{PReIDHaji}}/{{PTimestamp}}','PReIDHaji,PTimestamp'),
|
||||
('patientlabel','BIRT','/birt/run?__report=report/one/rekap/rpt_mcu_patient_label_lab.rptdesign&__format=pdf&username={{username}}&PNolab={{PLabNumber}}&PType={{PLabelType}}&tm={{PTimestamp}}&PStartDate={{PStartDate}}&PEndDate={{PEndDate}}&PMcuID={{PMcuID}}','username,PLabNumber,PLabelType,PTimestamp,PStartDate,PEndDate,PMcuID')
|
||||
ON DUPLICATE KEY UPDATE
|
||||
Mcu_ReportUrlTemplateType = VALUES(Mcu_ReportUrlTemplateType),
|
||||
Mcu_ReportUrlTemplateUrl = VALUES(Mcu_ReportUrlTemplateUrl),
|
||||
Mcu_ReportUrlTemplateParams = VALUES(Mcu_ReportUrlTemplateParams),
|
||||
Mcu_ReportUrlTemplateIsActive = 'Y',
|
||||
Mcu_ReportUrlTemplateLastUpdated = NOW();
|
||||
14
scripts/sql/2026-04-29_create_mgm_mcureport.sql
Normal file
14
scripts/sql/2026-04-29_create_mgm_mcureport.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
CREATE TABLE IF NOT EXISTS `mgm_mcureport` (
|
||||
`Mgm_McuReportID` int NOT NULL AUTO_INCREMENT,
|
||||
`Mgm_McuReportMgm_McuID` int NOT NULL,
|
||||
`Mgm_McuReportMcu_ReportUrlTemplateID` int NOT NULL,
|
||||
`Mgm_McuReportIsActive` char(1) NOT NULL DEFAULT 'Y',
|
||||
`Mgm_McuReportCreated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`Mgm_McuReportCreatedUserID` int NOT NULL DEFAULT '0',
|
||||
`Mgm_McuReportLastUpdated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`Mgm_McuReportLastUpdatedUserID` int NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`Mgm_McuReportID`),
|
||||
UNIQUE KEY `uk_mcu_report` (`Mgm_McuReportMgm_McuID`),
|
||||
KEY `idx_template` (`Mgm_McuReportMcu_ReportUrlTemplateID`),
|
||||
KEY `idx_active` (`Mgm_McuReportIsActive`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
Reference in New Issue
Block a user