-- ===========================================================================
-- 医保影像云图像质控规范 - CT检查部位质控标准 (第2批)
-- 基于《医保影像云图像质控规范 (YXY-QC-2025-A1)》
-- 
-- 本文件包含以下部位的CT质控标准：
--   - 5.4.2 口腔颌面 (9个检查项目)
--   - 5.4.3 眼部 (2个检查项目)
--   - 5.4.4 鼻咽部 (2个检查项目)
-- 
-- 检查项目总数: 13
-- 质控因子总数: 104
-- 
-- 创建时间: 2026-01-13
-- ===========================================================================

-- 5.4.2.1 颌面部CT平扫 - 因子1: 检查范围
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLO_5_4_2_1_1', 'CT_MAXILLO_5_4_2_1_1', '检查范围', 3, 'boolean',
'检查范围从眉弓至舌骨或下颌骨下缘',
'{"type": "dicom_check", "method": "checkSCAN_RANGE", "params": {"minSliceCount": 25, "expectedBodyPart": "口腔颌面", "checkCoverage": true}, "isVeto": false, "description": "检查范围从眉弓至舌骨或下颌骨下缘"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.1 颌面部CT平扫 - 因子2: 图像偏中心
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLO_5_4_2_1_2', 'CT_MAXILLO_5_4_2_1_2', '图像偏中心', 3, 'boolean',
'断层位于图像正中',
'{"type": "opencv_check", "method": "checkIMAGE_CENTERING", "params": {"maxOffsetRatio": 0.15}, "isVeto": false, "description": "断层位于图像正中"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.1 颌面部CT平扫 - 因子3: 重建参数
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLO_5_4_2_1_3', 'CT_MAXILLO_5_4_2_1_3', '重建参数', 3, 'boolean',
'厚层≤3.0mm，薄层≤0.625mm，DFOV：18cm',
'{"type": "dicom_check", "method": "checkRECONSTRUCTION_PARAMS", "params": {"thickSliceMax": 3.0, "thickIntervalMax": 3.0, "thinSliceMax": 0.625, "thinIntervalMax": 0.625, "dfov": 18, "dfovTolerance": 2.0}, "isVeto": false, "description": "厚层≤3.0mm，薄层≤0.625mm，DFOV：18cm"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.1 颌面部CT平扫 - 因子4: 窗口技术
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLO_5_4_2_1_4', 'CT_MAXILLO_5_4_2_1_4', '窗口技术', 3, 'boolean',
'软组织窗：窗宽350~400HU，窗位35~45HU',
'{"type": "dicom_check", "method": "checkWINDOW_TECHNIQUE", "params": {"softTissueWindow": {"windowWidth": {"min": 350, "max": 400}, "windowCenter": {"min": 35, "max": 45}}}, "isVeto": true, "description": "软组织窗：窗宽350~400HU，窗位35~45HU"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.1 颌面部CT平扫 - 因子5: 扫描体位
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLO_5_4_2_1_5', 'CT_MAXILLO_5_4_2_1_5', '扫描体位', 3, 'boolean',
'仰卧位',
'{"type": "dicom_check", "method": "checkSCAN_POSITION", "params": {"expectedPosition": ["HFS", "FFS"]}, "isVeto": false, "description": "仰卧位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.1 颌面部CT平扫 - 因子6: 图像标识
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLO_5_4_2_1_6', 'CT_MAXILLO_5_4_2_1_6', '图像标识', 3, 'boolean',
'影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位',
'{"type": "dicom_check", "method": "checkImageAnnotation", "params": {"requiredFields": ["StudyInstanceUID", "BodyPartExamined", "PatientName", "PatientSex", "PatientAge", "StudyDate", "StudyTime", "KVP", "ScanDirection"]}, "isVeto": true, "description": "影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.1 颌面部CT平扫 - 因子7: 图像伪影
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLO_5_4_2_1_7', 'CT_MAXILLO_5_4_2_1_7', '图像伪影', 3, 'boolean',
'没有运动伪影以及高衰减伪影',
'{"type": "opencv_check", "method": "checkIMAGE_ARTIFACTS", "params": {"motionThreshold": 30.0, "beamHardeningThreshold": 50.0}, "isVeto": true, "description": "没有运动伪影以及高衰减伪影"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.1 颌面部CT平扫 - 因子8: 图像清晰度
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLO_5_4_2_1_8', 'CT_MAXILLO_5_4_2_1_8', '图像清晰度', 3, 'boolean',
'能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构',
'{"type": "opencv_check", "method": "checkIMAGE_CLARITY", "params": {"sharpnessThreshold": 100.0, "contrastThreshold": 50.0}, "isVeto": false, "description": "能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.1 颌面部CT平扫 - 因子9: 对称性要求
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLO_5_4_2_1_9', 'CT_MAXILLO_5_4_2_1_9', '对称性要求', 3, 'boolean',
'双侧结构对称显示',
'{"type": "opencv_check", "method": "checkSYMMETRY", "params": {"symmetryThreshold": 0.85}, "isVeto": false, "description": "双侧结构对称显示"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.1 颌面部CT平扫 - 质控标准
INSERT INTO `qc_standard` (`id`, `standard_code`, `standard_name`, `modality`, `body_part`, `scan_type`, `exam_item`, `pass_score`, `description`, `status`, `create_time`, `update_time`) VALUES
('STD_CT_5_4_2_1', 'CT_5_4_2_1', '颌面部CT平扫质控标准', 'CT', '口腔颌面', '平扫', '颌面部CT平扫', 80,
'颌面部CT平扫质控标准，包含9个质控因子',
1, NOW(), NOW());

-- 5.4.2.1 颌面部CT平扫 - 标准-因子关联
INSERT INTO `qc_standard_factor` (`id`, `standard_id`, `factor_id`, `weight`, `is_required`, `sort_order`, `create_time`, `update_time`) VALUES
('SF_CT_5_4_2_1_1', 'STD_CT_5_4_2_1', 'CT_MAXILLO_5_4_2_1_1', 10.00, 1, 1, NOW(), NOW()),
('SF_CT_5_4_2_1_2', 'STD_CT_5_4_2_1', 'CT_MAXILLO_5_4_2_1_2', 8.00, 1, 2, NOW(), NOW()),
('SF_CT_5_4_2_1_3', 'STD_CT_5_4_2_1', 'CT_MAXILLO_5_4_2_1_3', 10.00, 1, 3, NOW(), NOW()),
('SF_CT_5_4_2_1_4', 'STD_CT_5_4_2_1', 'CT_MAXILLO_5_4_2_1_4', 18.00, 1, 4, NOW(), NOW()),
('SF_CT_5_4_2_1_5', 'STD_CT_5_4_2_1', 'CT_MAXILLO_5_4_2_1_5', 8.00, 1, 5, NOW(), NOW()),
('SF_CT_5_4_2_1_6', 'STD_CT_5_4_2_1', 'CT_MAXILLO_5_4_2_1_6', 18.00, 1, 6, NOW(), NOW()),
('SF_CT_5_4_2_1_7', 'STD_CT_5_4_2_1', 'CT_MAXILLO_5_4_2_1_7', 16.00, 1, 7, NOW(), NOW()),
('SF_CT_5_4_2_1_8', 'STD_CT_5_4_2_1', 'CT_MAXILLO_5_4_2_1_8', 12.00, 1, 8, NOW(), NOW()),
('SF_CT_5_4_2_1_9', 'STD_CT_5_4_2_1', 'CT_MAXILLO_5_4_2_1_9', 10.00, 1, 9, NOW(), NOW());


-- 5.4.2.2 颌面部CT增强 - 因子1: 检查范围
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLO_5_4_2_2_1', 'CT_MAXILLO_5_4_2_2_1', '检查范围', 3, 'boolean',
'检查范围从眉弓至舌骨或下颌骨下缘',
'{"type": "dicom_check", "method": "checkSCAN_RANGE", "params": {"minSliceCount": 25, "expectedBodyPart": "口腔颌面", "checkCoverage": true}, "isVeto": false, "description": "检查范围从眉弓至舌骨或下颌骨下缘"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.2 颌面部CT增强 - 因子2: 图像偏中心
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLO_5_4_2_2_2', 'CT_MAXILLO_5_4_2_2_2', '图像偏中心', 3, 'boolean',
'断层位于图像正中',
'{"type": "opencv_check", "method": "checkIMAGE_CENTERING", "params": {"maxOffsetRatio": 0.15}, "isVeto": false, "description": "断层位于图像正中"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.2 颌面部CT增强 - 因子3: 重建参数
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLO_5_4_2_2_3', 'CT_MAXILLO_5_4_2_2_3', '重建参数', 3, 'boolean',
'厚层≤3.0mm，薄层≤0.625mm，DFOV：18cm',
'{"type": "dicom_check", "method": "checkRECONSTRUCTION_PARAMS", "params": {"thickSliceMax": 3.0, "thickIntervalMax": 3.0, "thinSliceMax": 0.625, "thinIntervalMax": 0.625, "dfov": 18, "dfovTolerance": 2.0}, "isVeto": false, "description": "厚层≤3.0mm，薄层≤0.625mm，DFOV：18cm"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.2 颌面部CT增强 - 因子4: 窗口技术
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLO_5_4_2_2_4', 'CT_MAXILLO_5_4_2_2_4', '窗口技术', 3, 'boolean',
'软组织窗：窗宽350~400HU，窗位35~45HU',
'{"type": "dicom_check", "method": "checkWINDOW_TECHNIQUE", "params": {"softTissueWindow": {"windowWidth": {"min": 350, "max": 400}, "windowCenter": {"min": 35, "max": 45}}}, "isVeto": true, "description": "软组织窗：窗宽350~400HU，窗位35~45HU"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.2 颌面部CT增强 - 因子5: 扫描体位
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLO_5_4_2_2_5', 'CT_MAXILLO_5_4_2_2_5', '扫描体位', 3, 'boolean',
'仰卧位',
'{"type": "dicom_check", "method": "checkSCAN_POSITION", "params": {"expectedPosition": ["HFS", "FFS"]}, "isVeto": false, "description": "仰卧位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.2 颌面部CT增强 - 因子6: 图像标识
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLO_5_4_2_2_6', 'CT_MAXILLO_5_4_2_2_6', '图像标识', 3, 'boolean',
'影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位',
'{"type": "dicom_check", "method": "checkImageAnnotation", "params": {"requiredFields": ["StudyInstanceUID", "BodyPartExamined", "PatientName", "PatientSex", "PatientAge", "StudyDate", "StudyTime", "KVP", "ScanDirection"]}, "isVeto": true, "description": "影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.2 颌面部CT增强 - 因子7: 图像伪影
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLO_5_4_2_2_7', 'CT_MAXILLO_5_4_2_2_7', '图像伪影', 3, 'boolean',
'没有运动伪影以及高衰减伪影',
'{"type": "opencv_check", "method": "checkIMAGE_ARTIFACTS", "params": {"motionThreshold": 30.0, "beamHardeningThreshold": 50.0}, "isVeto": true, "description": "没有运动伪影以及高衰减伪影"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.2 颌面部CT增强 - 因子8: 图像清晰度
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLO_5_4_2_2_8', 'CT_MAXILLO_5_4_2_2_8', '图像清晰度', 3, 'boolean',
'能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构',
'{"type": "opencv_check", "method": "checkIMAGE_CLARITY", "params": {"sharpnessThreshold": 100.0, "contrastThreshold": 50.0}, "isVeto": false, "description": "能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.2 颌面部CT增强 - 质控标准
INSERT INTO `qc_standard` (`id`, `standard_code`, `standard_name`, `modality`, `body_part`, `scan_type`, `exam_item`, `pass_score`, `description`, `status`, `create_time`, `update_time`) VALUES
('STD_CT_5_4_2_2', 'CT_5_4_2_2', '颌面部CT增强质控标准', 'CT', '口腔颌面', '增强', '颌面部CT增强', 80,
'颌面部CT增强质控标准，包含8个质控因子',
1, NOW(), NOW());

-- 5.4.2.2 颌面部CT增强 - 标准-因子关联
INSERT INTO `qc_standard_factor` (`id`, `standard_id`, `factor_id`, `weight`, `is_required`, `sort_order`, `create_time`, `update_time`) VALUES
('SF_CT_5_4_2_2_1', 'STD_CT_5_4_2_2', 'CT_MAXILLO_5_4_2_2_1', 10.00, 1, 1, NOW(), NOW()),
('SF_CT_5_4_2_2_2', 'STD_CT_5_4_2_2', 'CT_MAXILLO_5_4_2_2_2', 8.00, 1, 2, NOW(), NOW()),
('SF_CT_5_4_2_2_3', 'STD_CT_5_4_2_2', 'CT_MAXILLO_5_4_2_2_3', 10.00, 1, 3, NOW(), NOW()),
('SF_CT_5_4_2_2_4', 'STD_CT_5_4_2_2', 'CT_MAXILLO_5_4_2_2_4', 18.00, 1, 4, NOW(), NOW()),
('SF_CT_5_4_2_2_5', 'STD_CT_5_4_2_2', 'CT_MAXILLO_5_4_2_2_5', 8.00, 1, 5, NOW(), NOW()),
('SF_CT_5_4_2_2_6', 'STD_CT_5_4_2_2', 'CT_MAXILLO_5_4_2_2_6', 18.00, 1, 6, NOW(), NOW()),
('SF_CT_5_4_2_2_7', 'STD_CT_5_4_2_2', 'CT_MAXILLO_5_4_2_2_7', 16.00, 1, 7, NOW(), NOW()),
('SF_CT_5_4_2_2_8', 'STD_CT_5_4_2_2', 'CT_MAXILLO_5_4_2_2_8', 12.00, 0, 8, NOW(), NOW());


-- 5.4.2.3 上颌骨CT平扫 - 因子1: 检查范围
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLA_5_4_2_3_1', 'CT_MAXILLA_5_4_2_3_1', '检查范围', 3, 'boolean',
'检查范围从眼眶上缘至牙槽突下缘',
'{"type": "dicom_check", "method": "checkSCAN_RANGE", "params": {"minSliceCount": 25, "expectedBodyPart": "口腔颌面", "checkCoverage": true}, "isVeto": false, "description": "检查范围从眼眶上缘至牙槽突下缘"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.3 上颌骨CT平扫 - 因子2: 图像偏中心
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLA_5_4_2_3_2', 'CT_MAXILLA_5_4_2_3_2', '图像偏中心', 3, 'boolean',
'断层位于图像正中',
'{"type": "opencv_check", "method": "checkIMAGE_CENTERING", "params": {"maxOffsetRatio": 0.15}, "isVeto": false, "description": "断层位于图像正中"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.3 上颌骨CT平扫 - 因子3: 重建参数
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLA_5_4_2_3_3', 'CT_MAXILLA_5_4_2_3_3', '重建参数', 3, 'boolean',
'厚层≤3.0mm，薄层≤0.625mm，DFOV：18cm',
'{"type": "dicom_check", "method": "checkRECONSTRUCTION_PARAMS", "params": {"thickSliceMax": 3.0, "thickIntervalMax": 3.0, "thinSliceMax": 0.625, "thinIntervalMax": 0.625, "dfov": 18, "dfovTolerance": 2.0}, "isVeto": false, "description": "厚层≤3.0mm，薄层≤0.625mm，DFOV：18cm"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.3 上颌骨CT平扫 - 因子4: 窗口技术
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLA_5_4_2_3_4', 'CT_MAXILLA_5_4_2_3_4', '窗口技术', 3, 'boolean',
'软组织窗：窗宽350~400HU，窗位35~45HU',
'{"type": "dicom_check", "method": "checkWINDOW_TECHNIQUE", "params": {"softTissueWindow": {"windowWidth": {"min": 350, "max": 400}, "windowCenter": {"min": 35, "max": 45}}}, "isVeto": true, "description": "软组织窗：窗宽350~400HU，窗位35~45HU"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.3 上颌骨CT平扫 - 因子5: 扫描体位
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLA_5_4_2_3_5', 'CT_MAXILLA_5_4_2_3_5', '扫描体位', 3, 'boolean',
'仰卧位',
'{"type": "dicom_check", "method": "checkSCAN_POSITION", "params": {"expectedPosition": ["HFS", "FFS"]}, "isVeto": false, "description": "仰卧位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.3 上颌骨CT平扫 - 因子6: 图像标识
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLA_5_4_2_3_6', 'CT_MAXILLA_5_4_2_3_6', '图像标识', 3, 'boolean',
'影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位',
'{"type": "dicom_check", "method": "checkImageAnnotation", "params": {"requiredFields": ["StudyInstanceUID", "BodyPartExamined", "PatientName", "PatientSex", "PatientAge", "StudyDate", "StudyTime", "KVP", "ScanDirection"]}, "isVeto": true, "description": "影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.3 上颌骨CT平扫 - 因子7: 图像伪影
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLA_5_4_2_3_7', 'CT_MAXILLA_5_4_2_3_7', '图像伪影', 3, 'boolean',
'没有运动伪影以及高衰减伪影',
'{"type": "opencv_check", "method": "checkIMAGE_ARTIFACTS", "params": {"motionThreshold": 30.0, "beamHardeningThreshold": 50.0}, "isVeto": true, "description": "没有运动伪影以及高衰减伪影"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.3 上颌骨CT平扫 - 因子8: 图像清晰度
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLA_5_4_2_3_8', 'CT_MAXILLA_5_4_2_3_8', '图像清晰度', 3, 'boolean',
'能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构',
'{"type": "opencv_check", "method": "checkIMAGE_CLARITY", "params": {"sharpnessThreshold": 100.0, "contrastThreshold": 50.0}, "isVeto": false, "description": "能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.3 上颌骨CT平扫 - 因子9: 对称性要求
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MAXILLA_5_4_2_3_9', 'CT_MAXILLA_5_4_2_3_9', '对称性要求', 3, 'boolean',
'双侧结构对称显示',
'{"type": "opencv_check", "method": "checkSYMMETRY", "params": {"symmetryThreshold": 0.85}, "isVeto": false, "description": "双侧结构对称显示"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.3 上颌骨CT平扫 - 质控标准
INSERT INTO `qc_standard` (`id`, `standard_code`, `standard_name`, `modality`, `body_part`, `scan_type`, `exam_item`, `pass_score`, `description`, `status`, `create_time`, `update_time`) VALUES
('STD_CT_5_4_2_3', 'CT_5_4_2_3', '上颌骨CT平扫质控标准', 'CT', '口腔颌面', '平扫', '上颌骨CT平扫', 80,
'上颌骨CT平扫质控标准，包含9个质控因子',
1, NOW(), NOW());

-- 5.4.2.3 上颌骨CT平扫 - 标准-因子关联
INSERT INTO `qc_standard_factor` (`id`, `standard_id`, `factor_id`, `weight`, `is_required`, `sort_order`, `create_time`, `update_time`) VALUES
('SF_CT_5_4_2_3_1', 'STD_CT_5_4_2_3', 'CT_MAXILLA_5_4_2_3_1', 10.00, 1, 1, NOW(), NOW()),
('SF_CT_5_4_2_3_2', 'STD_CT_5_4_2_3', 'CT_MAXILLA_5_4_2_3_2', 8.00, 1, 2, NOW(), NOW()),
('SF_CT_5_4_2_3_3', 'STD_CT_5_4_2_3', 'CT_MAXILLA_5_4_2_3_3', 10.00, 1, 3, NOW(), NOW()),
('SF_CT_5_4_2_3_4', 'STD_CT_5_4_2_3', 'CT_MAXILLA_5_4_2_3_4', 18.00, 1, 4, NOW(), NOW()),
('SF_CT_5_4_2_3_5', 'STD_CT_5_4_2_3', 'CT_MAXILLA_5_4_2_3_5', 8.00, 1, 5, NOW(), NOW()),
('SF_CT_5_4_2_3_6', 'STD_CT_5_4_2_3', 'CT_MAXILLA_5_4_2_3_6', 18.00, 1, 6, NOW(), NOW()),
('SF_CT_5_4_2_3_7', 'STD_CT_5_4_2_3', 'CT_MAXILLA_5_4_2_3_7', 16.00, 1, 7, NOW(), NOW()),
('SF_CT_5_4_2_3_8', 'STD_CT_5_4_2_3', 'CT_MAXILLA_5_4_2_3_8', 12.00, 1, 8, NOW(), NOW()),
('SF_CT_5_4_2_3_9', 'STD_CT_5_4_2_3', 'CT_MAXILLA_5_4_2_3_9', 10.00, 1, 9, NOW(), NOW());


-- 5.4.2.4 下颌骨CT平扫 - 因子1: 检查范围
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MANDIBLE_5_4_2_4_1', 'CT_MANDIBLE_5_4_2_4_1', '检查范围', 3, 'boolean',
'检查范围从颞下颌关节上缘至舌骨',
'{"type": "dicom_check", "method": "checkSCAN_RANGE", "params": {"minSliceCount": 25, "expectedBodyPart": "口腔颌面", "checkCoverage": true}, "isVeto": false, "description": "检查范围从颞下颌关节上缘至舌骨"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.4 下颌骨CT平扫 - 因子2: 图像偏中心
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MANDIBLE_5_4_2_4_2', 'CT_MANDIBLE_5_4_2_4_2', '图像偏中心', 3, 'boolean',
'断层位于图像正中',
'{"type": "opencv_check", "method": "checkIMAGE_CENTERING", "params": {"maxOffsetRatio": 0.15}, "isVeto": false, "description": "断层位于图像正中"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.4 下颌骨CT平扫 - 因子3: 重建参数
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MANDIBLE_5_4_2_4_3', 'CT_MANDIBLE_5_4_2_4_3', '重建参数', 3, 'boolean',
'厚层≤3.0mm，薄层≤0.625mm，DFOV：18cm',
'{"type": "dicom_check", "method": "checkRECONSTRUCTION_PARAMS", "params": {"thickSliceMax": 3.0, "thickIntervalMax": 3.0, "thinSliceMax": 0.625, "thinIntervalMax": 0.625, "dfov": 18, "dfovTolerance": 2.0}, "isVeto": false, "description": "厚层≤3.0mm，薄层≤0.625mm，DFOV：18cm"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.4 下颌骨CT平扫 - 因子4: 窗口技术
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MANDIBLE_5_4_2_4_4', 'CT_MANDIBLE_5_4_2_4_4', '窗口技术', 3, 'boolean',
'软组织窗：窗宽350~400HU，窗位35~45HU',
'{"type": "dicom_check", "method": "checkWINDOW_TECHNIQUE", "params": {"softTissueWindow": {"windowWidth": {"min": 350, "max": 400}, "windowCenter": {"min": 35, "max": 45}}}, "isVeto": true, "description": "软组织窗：窗宽350~400HU，窗位35~45HU"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.4 下颌骨CT平扫 - 因子5: 扫描体位
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MANDIBLE_5_4_2_4_5', 'CT_MANDIBLE_5_4_2_4_5', '扫描体位', 3, 'boolean',
'仰卧位',
'{"type": "dicom_check", "method": "checkSCAN_POSITION", "params": {"expectedPosition": ["HFS", "FFS"]}, "isVeto": false, "description": "仰卧位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.4 下颌骨CT平扫 - 因子6: 图像标识
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MANDIBLE_5_4_2_4_6', 'CT_MANDIBLE_5_4_2_4_6', '图像标识', 3, 'boolean',
'影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位',
'{"type": "dicom_check", "method": "checkImageAnnotation", "params": {"requiredFields": ["StudyInstanceUID", "BodyPartExamined", "PatientName", "PatientSex", "PatientAge", "StudyDate", "StudyTime", "KVP", "ScanDirection"]}, "isVeto": true, "description": "影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.4 下颌骨CT平扫 - 因子7: 图像伪影
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MANDIBLE_5_4_2_4_7', 'CT_MANDIBLE_5_4_2_4_7', '图像伪影', 3, 'boolean',
'没有运动伪影以及高衰减伪影',
'{"type": "opencv_check", "method": "checkIMAGE_ARTIFACTS", "params": {"motionThreshold": 30.0, "beamHardeningThreshold": 50.0}, "isVeto": true, "description": "没有运动伪影以及高衰减伪影"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.4 下颌骨CT平扫 - 因子8: 图像清晰度
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MANDIBLE_5_4_2_4_8', 'CT_MANDIBLE_5_4_2_4_8', '图像清晰度', 3, 'boolean',
'能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构',
'{"type": "opencv_check", "method": "checkIMAGE_CLARITY", "params": {"sharpnessThreshold": 100.0, "contrastThreshold": 50.0}, "isVeto": false, "description": "能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.4 下颌骨CT平扫 - 因子9: 对称性要求
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_MANDIBLE_5_4_2_4_9', 'CT_MANDIBLE_5_4_2_4_9', '对称性要求', 3, 'boolean',
'双侧结构对称显示',
'{"type": "opencv_check", "method": "checkSYMMETRY", "params": {"symmetryThreshold": 0.85}, "isVeto": false, "description": "双侧结构对称显示"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.4 下颌骨CT平扫 - 质控标准
INSERT INTO `qc_standard` (`id`, `standard_code`, `standard_name`, `modality`, `body_part`, `scan_type`, `exam_item`, `pass_score`, `description`, `status`, `create_time`, `update_time`) VALUES
('STD_CT_5_4_2_4', 'CT_5_4_2_4', '下颌骨CT平扫质控标准', 'CT', '口腔颌面', '平扫', '下颌骨CT平扫', 80,
'下颌骨CT平扫质控标准，包含9个质控因子',
1, NOW(), NOW());

-- 5.4.2.4 下颌骨CT平扫 - 标准-因子关联
INSERT INTO `qc_standard_factor` (`id`, `standard_id`, `factor_id`, `weight`, `is_required`, `sort_order`, `create_time`, `update_time`) VALUES
('SF_CT_5_4_2_4_1', 'STD_CT_5_4_2_4', 'CT_MANDIBLE_5_4_2_4_1', 10.00, 1, 1, NOW(), NOW()),
('SF_CT_5_4_2_4_2', 'STD_CT_5_4_2_4', 'CT_MANDIBLE_5_4_2_4_2', 8.00, 1, 2, NOW(), NOW()),
('SF_CT_5_4_2_4_3', 'STD_CT_5_4_2_4', 'CT_MANDIBLE_5_4_2_4_3', 10.00, 1, 3, NOW(), NOW()),
('SF_CT_5_4_2_4_4', 'STD_CT_5_4_2_4', 'CT_MANDIBLE_5_4_2_4_4', 18.00, 1, 4, NOW(), NOW()),
('SF_CT_5_4_2_4_5', 'STD_CT_5_4_2_4', 'CT_MANDIBLE_5_4_2_4_5', 8.00, 1, 5, NOW(), NOW()),
('SF_CT_5_4_2_4_6', 'STD_CT_5_4_2_4', 'CT_MANDIBLE_5_4_2_4_6', 18.00, 1, 6, NOW(), NOW()),
('SF_CT_5_4_2_4_7', 'STD_CT_5_4_2_4', 'CT_MANDIBLE_5_4_2_4_7', 16.00, 1, 7, NOW(), NOW()),
('SF_CT_5_4_2_4_8', 'STD_CT_5_4_2_4', 'CT_MANDIBLE_5_4_2_4_8', 12.00, 1, 8, NOW(), NOW()),
('SF_CT_5_4_2_4_9', 'STD_CT_5_4_2_4', 'CT_MANDIBLE_5_4_2_4_9', 10.00, 1, 9, NOW(), NOW());


-- 5.4.2.5 腮腺CT平扫 - 因子1: 检查范围
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_PAROTID_5_4_2_5_1', 'CT_PAROTID_5_4_2_5_1', '检查范围', 3, 'boolean',
'检查范围从外耳道上缘至下颌角',
'{"type": "dicom_check", "method": "checkSCAN_RANGE", "params": {"minSliceCount": 25, "expectedBodyPart": "口腔颌面", "checkCoverage": true}, "isVeto": false, "description": "检查范围从外耳道上缘至下颌角"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.5 腮腺CT平扫 - 因子2: 图像偏中心
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_PAROTID_5_4_2_5_2', 'CT_PAROTID_5_4_2_5_2', '图像偏中心', 3, 'boolean',
'断层位于图像正中',
'{"type": "opencv_check", "method": "checkIMAGE_CENTERING", "params": {"maxOffsetRatio": 0.15}, "isVeto": false, "description": "断层位于图像正中"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.5 腮腺CT平扫 - 因子3: 重建参数
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_PAROTID_5_4_2_5_3', 'CT_PAROTID_5_4_2_5_3', '重建参数', 3, 'boolean',
'厚层≤3.0mm，薄层≤0.625mm，DFOV：18cm',
'{"type": "dicom_check", "method": "checkRECONSTRUCTION_PARAMS", "params": {"thickSliceMax": 3.0, "thickIntervalMax": 3.0, "thinSliceMax": 0.625, "thinIntervalMax": 0.625, "dfov": 18, "dfovTolerance": 2.0}, "isVeto": false, "description": "厚层≤3.0mm，薄层≤0.625mm，DFOV：18cm"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.5 腮腺CT平扫 - 因子4: 窗口技术
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_PAROTID_5_4_2_5_4', 'CT_PAROTID_5_4_2_5_4', '窗口技术', 3, 'boolean',
'软组织窗：窗宽350~400HU，窗位35~45HU',
'{"type": "dicom_check", "method": "checkWINDOW_TECHNIQUE", "params": {"softTissueWindow": {"windowWidth": {"min": 350, "max": 400}, "windowCenter": {"min": 35, "max": 45}}}, "isVeto": true, "description": "软组织窗：窗宽350~400HU，窗位35~45HU"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.5 腮腺CT平扫 - 因子5: 扫描体位
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_PAROTID_5_4_2_5_5', 'CT_PAROTID_5_4_2_5_5', '扫描体位', 3, 'boolean',
'仰卧位',
'{"type": "dicom_check", "method": "checkSCAN_POSITION", "params": {"expectedPosition": ["HFS", "FFS"]}, "isVeto": false, "description": "仰卧位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.5 腮腺CT平扫 - 因子6: 图像标识
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_PAROTID_5_4_2_5_6', 'CT_PAROTID_5_4_2_5_6', '图像标识', 3, 'boolean',
'影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位',
'{"type": "dicom_check", "method": "checkImageAnnotation", "params": {"requiredFields": ["StudyInstanceUID", "BodyPartExamined", "PatientName", "PatientSex", "PatientAge", "StudyDate", "StudyTime", "KVP", "ScanDirection"]}, "isVeto": true, "description": "影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.5 腮腺CT平扫 - 因子7: 图像伪影
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_PAROTID_5_4_2_5_7', 'CT_PAROTID_5_4_2_5_7', '图像伪影', 3, 'boolean',
'没有运动伪影以及高衰减伪影',
'{"type": "opencv_check", "method": "checkIMAGE_ARTIFACTS", "params": {"motionThreshold": 30.0, "beamHardeningThreshold": 50.0}, "isVeto": true, "description": "没有运动伪影以及高衰减伪影"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.5 腮腺CT平扫 - 因子8: 图像清晰度
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_PAROTID_5_4_2_5_8', 'CT_PAROTID_5_4_2_5_8', '图像清晰度', 3, 'boolean',
'能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构',
'{"type": "opencv_check", "method": "checkIMAGE_CLARITY", "params": {"sharpnessThreshold": 100.0, "contrastThreshold": 50.0}, "isVeto": false, "description": "能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.5 腮腺CT平扫 - 因子9: 对称性要求
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_PAROTID_5_4_2_5_9', 'CT_PAROTID_5_4_2_5_9', '对称性要求', 3, 'boolean',
'双侧结构对称显示',
'{"type": "opencv_check", "method": "checkSYMMETRY", "params": {"symmetryThreshold": 0.85}, "isVeto": false, "description": "双侧结构对称显示"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.5 腮腺CT平扫 - 质控标准
INSERT INTO `qc_standard` (`id`, `standard_code`, `standard_name`, `modality`, `body_part`, `scan_type`, `exam_item`, `pass_score`, `description`, `status`, `create_time`, `update_time`) VALUES
('STD_CT_5_4_2_5', 'CT_5_4_2_5', '腮腺CT平扫质控标准', 'CT', '口腔颌面', '平扫', '腮腺CT平扫', 80,
'腮腺CT平扫质控标准，包含9个质控因子',
1, NOW(), NOW());

-- 5.4.2.5 腮腺CT平扫 - 标准-因子关联
INSERT INTO `qc_standard_factor` (`id`, `standard_id`, `factor_id`, `weight`, `is_required`, `sort_order`, `create_time`, `update_time`) VALUES
('SF_CT_5_4_2_5_1', 'STD_CT_5_4_2_5', 'CT_PAROTID_5_4_2_5_1', 10.00, 1, 1, NOW(), NOW()),
('SF_CT_5_4_2_5_2', 'STD_CT_5_4_2_5', 'CT_PAROTID_5_4_2_5_2', 8.00, 1, 2, NOW(), NOW()),
('SF_CT_5_4_2_5_3', 'STD_CT_5_4_2_5', 'CT_PAROTID_5_4_2_5_3', 10.00, 1, 3, NOW(), NOW()),
('SF_CT_5_4_2_5_4', 'STD_CT_5_4_2_5', 'CT_PAROTID_5_4_2_5_4', 18.00, 1, 4, NOW(), NOW()),
('SF_CT_5_4_2_5_5', 'STD_CT_5_4_2_5', 'CT_PAROTID_5_4_2_5_5', 8.00, 1, 5, NOW(), NOW()),
('SF_CT_5_4_2_5_6', 'STD_CT_5_4_2_5', 'CT_PAROTID_5_4_2_5_6', 18.00, 1, 6, NOW(), NOW()),
('SF_CT_5_4_2_5_7', 'STD_CT_5_4_2_5', 'CT_PAROTID_5_4_2_5_7', 16.00, 1, 7, NOW(), NOW()),
('SF_CT_5_4_2_5_8', 'STD_CT_5_4_2_5', 'CT_PAROTID_5_4_2_5_8', 12.00, 1, 8, NOW(), NOW()),
('SF_CT_5_4_2_5_9', 'STD_CT_5_4_2_5', 'CT_PAROTID_5_4_2_5_9', 10.00, 1, 9, NOW(), NOW());


-- 5.4.2.6 腮腺CT增强 - 因子1: 检查范围
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_PAROTID_5_4_2_6_1', 'CT_PAROTID_5_4_2_6_1', '检查范围', 3, 'boolean',
'检查范围从外耳道上缘至下颌角',
'{"type": "dicom_check", "method": "checkSCAN_RANGE", "params": {"minSliceCount": 25, "expectedBodyPart": "口腔颌面", "checkCoverage": true}, "isVeto": false, "description": "检查范围从外耳道上缘至下颌角"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.6 腮腺CT增强 - 因子2: 图像偏中心
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_PAROTID_5_4_2_6_2', 'CT_PAROTID_5_4_2_6_2', '图像偏中心', 3, 'boolean',
'断层位于图像正中',
'{"type": "opencv_check", "method": "checkIMAGE_CENTERING", "params": {"maxOffsetRatio": 0.15}, "isVeto": false, "description": "断层位于图像正中"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.6 腮腺CT增强 - 因子3: 重建参数
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_PAROTID_5_4_2_6_3', 'CT_PAROTID_5_4_2_6_3', '重建参数', 3, 'boolean',
'厚层≤3.0mm，薄层≤0.625mm，DFOV：18cm',
'{"type": "dicom_check", "method": "checkRECONSTRUCTION_PARAMS", "params": {"thickSliceMax": 3.0, "thickIntervalMax": 3.0, "thinSliceMax": 0.625, "thinIntervalMax": 0.625, "dfov": 18, "dfovTolerance": 2.0}, "isVeto": false, "description": "厚层≤3.0mm，薄层≤0.625mm，DFOV：18cm"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.6 腮腺CT增强 - 因子4: 窗口技术
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_PAROTID_5_4_2_6_4', 'CT_PAROTID_5_4_2_6_4', '窗口技术', 3, 'boolean',
'软组织窗：窗宽350~400HU，窗位35~45HU',
'{"type": "dicom_check", "method": "checkWINDOW_TECHNIQUE", "params": {"softTissueWindow": {"windowWidth": {"min": 350, "max": 400}, "windowCenter": {"min": 35, "max": 45}}}, "isVeto": true, "description": "软组织窗：窗宽350~400HU，窗位35~45HU"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.6 腮腺CT增强 - 因子5: 扫描体位
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_PAROTID_5_4_2_6_5', 'CT_PAROTID_5_4_2_6_5', '扫描体位', 3, 'boolean',
'仰卧位',
'{"type": "dicom_check", "method": "checkSCAN_POSITION", "params": {"expectedPosition": ["HFS", "FFS"]}, "isVeto": false, "description": "仰卧位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.6 腮腺CT增强 - 因子6: 图像标识
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_PAROTID_5_4_2_6_6', 'CT_PAROTID_5_4_2_6_6', '图像标识', 3, 'boolean',
'影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位',
'{"type": "dicom_check", "method": "checkImageAnnotation", "params": {"requiredFields": ["StudyInstanceUID", "BodyPartExamined", "PatientName", "PatientSex", "PatientAge", "StudyDate", "StudyTime", "KVP", "ScanDirection"]}, "isVeto": true, "description": "影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.6 腮腺CT增强 - 因子7: 图像伪影
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_PAROTID_5_4_2_6_7', 'CT_PAROTID_5_4_2_6_7', '图像伪影', 3, 'boolean',
'没有运动伪影以及高衰减伪影',
'{"type": "opencv_check", "method": "checkIMAGE_ARTIFACTS", "params": {"motionThreshold": 30.0, "beamHardeningThreshold": 50.0}, "isVeto": true, "description": "没有运动伪影以及高衰减伪影"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.6 腮腺CT增强 - 因子8: 图像清晰度
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_PAROTID_5_4_2_6_8', 'CT_PAROTID_5_4_2_6_8', '图像清晰度', 3, 'boolean',
'能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构',
'{"type": "opencv_check", "method": "checkIMAGE_CLARITY", "params": {"sharpnessThreshold": 100.0, "contrastThreshold": 50.0}, "isVeto": false, "description": "能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.6 腮腺CT增强 - 质控标准
INSERT INTO `qc_standard` (`id`, `standard_code`, `standard_name`, `modality`, `body_part`, `scan_type`, `exam_item`, `pass_score`, `description`, `status`, `create_time`, `update_time`) VALUES
('STD_CT_5_4_2_6', 'CT_5_4_2_6', '腮腺CT增强质控标准', 'CT', '口腔颌面', '增强', '腮腺CT增强', 80,
'腮腺CT增强质控标准，包含8个质控因子',
1, NOW(), NOW());

-- 5.4.2.6 腮腺CT增强 - 标准-因子关联
INSERT INTO `qc_standard_factor` (`id`, `standard_id`, `factor_id`, `weight`, `is_required`, `sort_order`, `create_time`, `update_time`) VALUES
('SF_CT_5_4_2_6_1', 'STD_CT_5_4_2_6', 'CT_PAROTID_5_4_2_6_1', 10.00, 1, 1, NOW(), NOW()),
('SF_CT_5_4_2_6_2', 'STD_CT_5_4_2_6', 'CT_PAROTID_5_4_2_6_2', 8.00, 1, 2, NOW(), NOW()),
('SF_CT_5_4_2_6_3', 'STD_CT_5_4_2_6', 'CT_PAROTID_5_4_2_6_3', 10.00, 1, 3, NOW(), NOW()),
('SF_CT_5_4_2_6_4', 'STD_CT_5_4_2_6', 'CT_PAROTID_5_4_2_6_4', 18.00, 1, 4, NOW(), NOW()),
('SF_CT_5_4_2_6_5', 'STD_CT_5_4_2_6', 'CT_PAROTID_5_4_2_6_5', 8.00, 1, 5, NOW(), NOW()),
('SF_CT_5_4_2_6_6', 'STD_CT_5_4_2_6', 'CT_PAROTID_5_4_2_6_6', 18.00, 1, 6, NOW(), NOW()),
('SF_CT_5_4_2_6_7', 'STD_CT_5_4_2_6', 'CT_PAROTID_5_4_2_6_7', 16.00, 1, 7, NOW(), NOW()),
('SF_CT_5_4_2_6_8', 'STD_CT_5_4_2_6', 'CT_PAROTID_5_4_2_6_8', 12.00, 0, 8, NOW(), NOW());


-- 5.4.2.7 鼻窦CT平扫 - 因子1: 检查范围
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_SINUS_5_4_2_7_1', 'CT_SINUS_5_4_2_7_1', '检查范围', 3, 'boolean',
'检查范围从额窦上缘至上颌骨下缘',
'{"type": "dicom_check", "method": "checkSCAN_RANGE", "params": {"minSliceCount": 25, "expectedBodyPart": "口腔颌面", "checkCoverage": true}, "isVeto": false, "description": "检查范围从额窦上缘至上颌骨下缘"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.7 鼻窦CT平扫 - 因子2: 图像偏中心
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_SINUS_5_4_2_7_2', 'CT_SINUS_5_4_2_7_2', '图像偏中心', 3, 'boolean',
'断层位于图像正中',
'{"type": "opencv_check", "method": "checkIMAGE_CENTERING", "params": {"maxOffsetRatio": 0.15}, "isVeto": false, "description": "断层位于图像正中"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.7 鼻窦CT平扫 - 因子3: 重建参数
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_SINUS_5_4_2_7_3', 'CT_SINUS_5_4_2_7_3', '重建参数', 3, 'boolean',
'厚层≤3.0mm，薄层≤0.625mm，DFOV：18cm',
'{"type": "dicom_check", "method": "checkRECONSTRUCTION_PARAMS", "params": {"thickSliceMax": 3.0, "thickIntervalMax": 3.0, "thinSliceMax": 0.625, "thinIntervalMax": 0.625, "dfov": 18, "dfovTolerance": 2.0}, "isVeto": false, "description": "厚层≤3.0mm，薄层≤0.625mm，DFOV：18cm"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.7 鼻窦CT平扫 - 因子4: 窗口技术
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_SINUS_5_4_2_7_4', 'CT_SINUS_5_4_2_7_4', '窗口技术', 3, 'boolean',
'软组织窗：窗宽350~400HU，窗位35~45HU',
'{"type": "dicom_check", "method": "checkWINDOW_TECHNIQUE", "params": {"softTissueWindow": {"windowWidth": {"min": 350, "max": 400}, "windowCenter": {"min": 35, "max": 45}}}, "isVeto": true, "description": "软组织窗：窗宽350~400HU，窗位35~45HU"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.7 鼻窦CT平扫 - 因子5: 扫描体位
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_SINUS_5_4_2_7_5', 'CT_SINUS_5_4_2_7_5', '扫描体位', 3, 'boolean',
'仰卧位',
'{"type": "dicom_check", "method": "checkSCAN_POSITION", "params": {"expectedPosition": ["HFS", "FFS"]}, "isVeto": false, "description": "仰卧位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.7 鼻窦CT平扫 - 因子6: 图像标识
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_SINUS_5_4_2_7_6', 'CT_SINUS_5_4_2_7_6', '图像标识', 3, 'boolean',
'影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位',
'{"type": "dicom_check", "method": "checkImageAnnotation", "params": {"requiredFields": ["StudyInstanceUID", "BodyPartExamined", "PatientName", "PatientSex", "PatientAge", "StudyDate", "StudyTime", "KVP", "ScanDirection"]}, "isVeto": true, "description": "影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.7 鼻窦CT平扫 - 因子7: 图像伪影
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_SINUS_5_4_2_7_7', 'CT_SINUS_5_4_2_7_7', '图像伪影', 3, 'boolean',
'没有运动伪影以及高衰减伪影',
'{"type": "opencv_check", "method": "checkIMAGE_ARTIFACTS", "params": {"motionThreshold": 30.0, "beamHardeningThreshold": 50.0}, "isVeto": true, "description": "没有运动伪影以及高衰减伪影"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.7 鼻窦CT平扫 - 因子8: 图像清晰度
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_SINUS_5_4_2_7_8', 'CT_SINUS_5_4_2_7_8', '图像清晰度', 3, 'boolean',
'能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构',
'{"type": "opencv_check", "method": "checkIMAGE_CLARITY", "params": {"sharpnessThreshold": 100.0, "contrastThreshold": 50.0}, "isVeto": false, "description": "能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.7 鼻窦CT平扫 - 因子9: 对称性要求
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_SINUS_5_4_2_7_9', 'CT_SINUS_5_4_2_7_9', '对称性要求', 3, 'boolean',
'双侧结构对称显示',
'{"type": "opencv_check", "method": "checkSYMMETRY", "params": {"symmetryThreshold": 0.85}, "isVeto": false, "description": "双侧结构对称显示"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.7 鼻窦CT平扫 - 质控标准
INSERT INTO `qc_standard` (`id`, `standard_code`, `standard_name`, `modality`, `body_part`, `scan_type`, `exam_item`, `pass_score`, `description`, `status`, `create_time`, `update_time`) VALUES
('STD_CT_5_4_2_7', 'CT_5_4_2_7', '鼻窦CT平扫质控标准', 'CT', '口腔颌面', '平扫', '鼻窦CT平扫', 80,
'鼻窦CT平扫质控标准，包含9个质控因子',
1, NOW(), NOW());

-- 5.4.2.7 鼻窦CT平扫 - 标准-因子关联
INSERT INTO `qc_standard_factor` (`id`, `standard_id`, `factor_id`, `weight`, `is_required`, `sort_order`, `create_time`, `update_time`) VALUES
('SF_CT_5_4_2_7_1', 'STD_CT_5_4_2_7', 'CT_SINUS_5_4_2_7_1', 10.00, 1, 1, NOW(), NOW()),
('SF_CT_5_4_2_7_2', 'STD_CT_5_4_2_7', 'CT_SINUS_5_4_2_7_2', 8.00, 1, 2, NOW(), NOW()),
('SF_CT_5_4_2_7_3', 'STD_CT_5_4_2_7', 'CT_SINUS_5_4_2_7_3', 10.00, 1, 3, NOW(), NOW()),
('SF_CT_5_4_2_7_4', 'STD_CT_5_4_2_7', 'CT_SINUS_5_4_2_7_4', 18.00, 1, 4, NOW(), NOW()),
('SF_CT_5_4_2_7_5', 'STD_CT_5_4_2_7', 'CT_SINUS_5_4_2_7_5', 8.00, 1, 5, NOW(), NOW()),
('SF_CT_5_4_2_7_6', 'STD_CT_5_4_2_7', 'CT_SINUS_5_4_2_7_6', 18.00, 1, 6, NOW(), NOW()),
('SF_CT_5_4_2_7_7', 'STD_CT_5_4_2_7', 'CT_SINUS_5_4_2_7_7', 16.00, 1, 7, NOW(), NOW()),
('SF_CT_5_4_2_7_8', 'STD_CT_5_4_2_7', 'CT_SINUS_5_4_2_7_8', 12.00, 1, 8, NOW(), NOW()),
('SF_CT_5_4_2_7_9', 'STD_CT_5_4_2_7', 'CT_SINUS_5_4_2_7_9', 10.00, 1, 9, NOW(), NOW());


-- 5.4.2.8 鼻窦CT增强 - 因子1: 检查范围
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_SINUS_5_4_2_8_1', 'CT_SINUS_5_4_2_8_1', '检查范围', 3, 'boolean',
'检查范围从额窦上缘至上颌骨下缘',
'{"type": "dicom_check", "method": "checkSCAN_RANGE", "params": {"minSliceCount": 25, "expectedBodyPart": "口腔颌面", "checkCoverage": true}, "isVeto": false, "description": "检查范围从额窦上缘至上颌骨下缘"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.8 鼻窦CT增强 - 因子2: 图像偏中心
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_SINUS_5_4_2_8_2', 'CT_SINUS_5_4_2_8_2', '图像偏中心', 3, 'boolean',
'断层位于图像正中',
'{"type": "opencv_check", "method": "checkIMAGE_CENTERING", "params": {"maxOffsetRatio": 0.15}, "isVeto": false, "description": "断层位于图像正中"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.8 鼻窦CT增强 - 因子3: 重建参数
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_SINUS_5_4_2_8_3', 'CT_SINUS_5_4_2_8_3', '重建参数', 3, 'boolean',
'厚层≤3.0mm，薄层≤0.625mm，DFOV：18cm',
'{"type": "dicom_check", "method": "checkRECONSTRUCTION_PARAMS", "params": {"thickSliceMax": 3.0, "thickIntervalMax": 3.0, "thinSliceMax": 0.625, "thinIntervalMax": 0.625, "dfov": 18, "dfovTolerance": 2.0}, "isVeto": false, "description": "厚层≤3.0mm，薄层≤0.625mm，DFOV：18cm"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.8 鼻窦CT增强 - 因子4: 窗口技术
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_SINUS_5_4_2_8_4', 'CT_SINUS_5_4_2_8_4', '窗口技术', 3, 'boolean',
'软组织窗：窗宽350~400HU，窗位35~45HU',
'{"type": "dicom_check", "method": "checkWINDOW_TECHNIQUE", "params": {"softTissueWindow": {"windowWidth": {"min": 350, "max": 400}, "windowCenter": {"min": 35, "max": 45}}}, "isVeto": true, "description": "软组织窗：窗宽350~400HU，窗位35~45HU"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.8 鼻窦CT增强 - 因子5: 扫描体位
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_SINUS_5_4_2_8_5', 'CT_SINUS_5_4_2_8_5', '扫描体位', 3, 'boolean',
'仰卧位',
'{"type": "dicom_check", "method": "checkSCAN_POSITION", "params": {"expectedPosition": ["HFS", "FFS"]}, "isVeto": false, "description": "仰卧位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.8 鼻窦CT增强 - 因子6: 图像标识
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_SINUS_5_4_2_8_6', 'CT_SINUS_5_4_2_8_6', '图像标识', 3, 'boolean',
'影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位',
'{"type": "dicom_check", "method": "checkImageAnnotation", "params": {"requiredFields": ["StudyInstanceUID", "BodyPartExamined", "PatientName", "PatientSex", "PatientAge", "StudyDate", "StudyTime", "KVP", "ScanDirection"]}, "isVeto": true, "description": "影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.8 鼻窦CT增强 - 因子7: 图像伪影
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_SINUS_5_4_2_8_7', 'CT_SINUS_5_4_2_8_7', '图像伪影', 3, 'boolean',
'没有运动伪影以及高衰减伪影',
'{"type": "opencv_check", "method": "checkIMAGE_ARTIFACTS", "params": {"motionThreshold": 30.0, "beamHardeningThreshold": 50.0}, "isVeto": true, "description": "没有运动伪影以及高衰减伪影"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.8 鼻窦CT增强 - 因子8: 图像清晰度
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_SINUS_5_4_2_8_8', 'CT_SINUS_5_4_2_8_8', '图像清晰度', 3, 'boolean',
'能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构',
'{"type": "opencv_check", "method": "checkIMAGE_CLARITY", "params": {"sharpnessThreshold": 100.0, "contrastThreshold": 50.0}, "isVeto": false, "description": "能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.8 鼻窦CT增强 - 质控标准
INSERT INTO `qc_standard` (`id`, `standard_code`, `standard_name`, `modality`, `body_part`, `scan_type`, `exam_item`, `pass_score`, `description`, `status`, `create_time`, `update_time`) VALUES
('STD_CT_5_4_2_8', 'CT_5_4_2_8', '鼻窦CT增强质控标准', 'CT', '口腔颌面', '增强', '鼻窦CT增强', 80,
'鼻窦CT增强质控标准，包含8个质控因子',
1, NOW(), NOW());

-- 5.4.2.8 鼻窦CT增强 - 标准-因子关联
INSERT INTO `qc_standard_factor` (`id`, `standard_id`, `factor_id`, `weight`, `is_required`, `sort_order`, `create_time`, `update_time`) VALUES
('SF_CT_5_4_2_8_1', 'STD_CT_5_4_2_8', 'CT_SINUS_5_4_2_8_1', 10.00, 1, 1, NOW(), NOW()),
('SF_CT_5_4_2_8_2', 'STD_CT_5_4_2_8', 'CT_SINUS_5_4_2_8_2', 8.00, 1, 2, NOW(), NOW()),
('SF_CT_5_4_2_8_3', 'STD_CT_5_4_2_8', 'CT_SINUS_5_4_2_8_3', 10.00, 1, 3, NOW(), NOW()),
('SF_CT_5_4_2_8_4', 'STD_CT_5_4_2_8', 'CT_SINUS_5_4_2_8_4', 18.00, 1, 4, NOW(), NOW()),
('SF_CT_5_4_2_8_5', 'STD_CT_5_4_2_8', 'CT_SINUS_5_4_2_8_5', 8.00, 1, 5, NOW(), NOW()),
('SF_CT_5_4_2_8_6', 'STD_CT_5_4_2_8', 'CT_SINUS_5_4_2_8_6', 18.00, 1, 6, NOW(), NOW()),
('SF_CT_5_4_2_8_7', 'STD_CT_5_4_2_8', 'CT_SINUS_5_4_2_8_7', 16.00, 1, 7, NOW(), NOW()),
('SF_CT_5_4_2_8_8', 'STD_CT_5_4_2_8', 'CT_SINUS_5_4_2_8_8', 12.00, 0, 8, NOW(), NOW());


-- 5.4.2.9 鼻骨CT平扫 - 因子1: 检查范围
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_NASAL_5_4_2_9_1', 'CT_NASAL_5_4_2_9_1', '检查范围', 3, 'boolean',
'检查范围从鼻骨根上方1cm至上颌骨额突',
'{"type": "dicom_check", "method": "checkSCAN_RANGE", "params": {"minSliceCount": 25, "expectedBodyPart": "口腔颌面", "checkCoverage": true}, "isVeto": false, "description": "检查范围从鼻骨根上方1cm至上颌骨额突"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.9 鼻骨CT平扫 - 因子2: 图像偏中心
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_NASAL_5_4_2_9_2', 'CT_NASAL_5_4_2_9_2', '图像偏中心', 3, 'boolean',
'断层位于图像正中',
'{"type": "opencv_check", "method": "checkIMAGE_CENTERING", "params": {"maxOffsetRatio": 0.15}, "isVeto": false, "description": "断层位于图像正中"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.9 鼻骨CT平扫 - 因子3: 重建参数
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_NASAL_5_4_2_9_3', 'CT_NASAL_5_4_2_9_3', '重建参数', 3, 'boolean',
'厚层≤2.0mm，薄层≤0.625mm，DFOV：18cm',
'{"type": "dicom_check", "method": "checkRECONSTRUCTION_PARAMS", "params": {"thickSliceMax": 2.0, "thickIntervalMax": 2.0, "thinSliceMax": 0.625, "thinIntervalMax": 0.625, "dfov": 18, "dfovTolerance": 2.0}, "isVeto": false, "description": "厚层≤2.0mm，薄层≤0.625mm，DFOV：18cm"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.9 鼻骨CT平扫 - 因子4: 窗口技术
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_NASAL_5_4_2_9_4', 'CT_NASAL_5_4_2_9_4', '窗口技术', 3, 'boolean',
'软组织窗：窗宽350~400HU，窗位35~45HU',
'{"type": "dicom_check", "method": "checkWINDOW_TECHNIQUE", "params": {"softTissueWindow": {"windowWidth": {"min": 350, "max": 400}, "windowCenter": {"min": 35, "max": 45}}}, "isVeto": true, "description": "软组织窗：窗宽350~400HU，窗位35~45HU"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.9 鼻骨CT平扫 - 因子5: 扫描体位
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_NASAL_5_4_2_9_5', 'CT_NASAL_5_4_2_9_5', '扫描体位', 3, 'boolean',
'仰卧位',
'{"type": "dicom_check", "method": "checkSCAN_POSITION", "params": {"expectedPosition": ["HFS", "FFS"]}, "isVeto": false, "description": "仰卧位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.9 鼻骨CT平扫 - 因子6: 图像标识
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_NASAL_5_4_2_9_6', 'CT_NASAL_5_4_2_9_6', '图像标识', 3, 'boolean',
'影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位',
'{"type": "dicom_check", "method": "checkImageAnnotation", "params": {"requiredFields": ["StudyInstanceUID", "BodyPartExamined", "PatientName", "PatientSex", "PatientAge", "StudyDate", "StudyTime", "KVP", "ScanDirection"]}, "isVeto": true, "description": "影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.9 鼻骨CT平扫 - 因子7: 图像伪影
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_NASAL_5_4_2_9_7', 'CT_NASAL_5_4_2_9_7', '图像伪影', 3, 'boolean',
'没有运动伪影以及高衰减伪影',
'{"type": "opencv_check", "method": "checkIMAGE_ARTIFACTS", "params": {"motionThreshold": 30.0, "beamHardeningThreshold": 50.0}, "isVeto": true, "description": "没有运动伪影以及高衰减伪影"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.9 鼻骨CT平扫 - 因子8: 图像清晰度
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_NASAL_5_4_2_9_8', 'CT_NASAL_5_4_2_9_8', '图像清晰度', 3, 'boolean',
'能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构',
'{"type": "opencv_check", "method": "checkIMAGE_CLARITY", "params": {"sharpnessThreshold": 100.0, "contrastThreshold": 50.0}, "isVeto": false, "description": "能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.2.9 鼻骨CT平扫 - 质控标准
INSERT INTO `qc_standard` (`id`, `standard_code`, `standard_name`, `modality`, `body_part`, `scan_type`, `exam_item`, `pass_score`, `description`, `status`, `create_time`, `update_time`) VALUES
('STD_CT_5_4_2_9', 'CT_5_4_2_9', '鼻骨CT平扫质控标准', 'CT', '口腔颌面', '平扫', '鼻骨CT平扫', 80,
'鼻骨CT平扫质控标准，包含8个质控因子',
1, NOW(), NOW());

-- 5.4.2.9 鼻骨CT平扫 - 标准-因子关联
INSERT INTO `qc_standard_factor` (`id`, `standard_id`, `factor_id`, `weight`, `is_required`, `sort_order`, `create_time`, `update_time`) VALUES
('SF_CT_5_4_2_9_1', 'STD_CT_5_4_2_9', 'CT_NASAL_5_4_2_9_1', 10.00, 1, 1, NOW(), NOW()),
('SF_CT_5_4_2_9_2', 'STD_CT_5_4_2_9', 'CT_NASAL_5_4_2_9_2', 8.00, 1, 2, NOW(), NOW()),
('SF_CT_5_4_2_9_3', 'STD_CT_5_4_2_9', 'CT_NASAL_5_4_2_9_3', 10.00, 1, 3, NOW(), NOW()),
('SF_CT_5_4_2_9_4', 'STD_CT_5_4_2_9', 'CT_NASAL_5_4_2_9_4', 18.00, 1, 4, NOW(), NOW()),
('SF_CT_5_4_2_9_5', 'STD_CT_5_4_2_9', 'CT_NASAL_5_4_2_9_5', 8.00, 1, 5, NOW(), NOW()),
('SF_CT_5_4_2_9_6', 'STD_CT_5_4_2_9', 'CT_NASAL_5_4_2_9_6', 18.00, 1, 6, NOW(), NOW()),
('SF_CT_5_4_2_9_7', 'STD_CT_5_4_2_9', 'CT_NASAL_5_4_2_9_7', 16.00, 1, 7, NOW(), NOW()),
('SF_CT_5_4_2_9_8', 'STD_CT_5_4_2_9', 'CT_NASAL_5_4_2_9_8', 12.00, 0, 8, NOW(), NOW());


-- 5.4.3.1 眼眶CT平扫 - 因子1: 检查范围
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_ORBIT_5_4_3_1_1', 'CT_ORBIT_5_4_3_1_1', '检查范围', 3, 'boolean',
'检查范围从眼眶上缘1cm至眼眶下缘1cm',
'{"type": "dicom_check", "method": "checkSCAN_RANGE", "params": {"minSliceCount": 25, "expectedBodyPart": "眼部", "checkCoverage": true}, "isVeto": false, "description": "检查范围从眼眶上缘1cm至眼眶下缘1cm"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.3.1 眼眶CT平扫 - 因子2: 图像偏中心
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_ORBIT_5_4_3_1_2', 'CT_ORBIT_5_4_3_1_2', '图像偏中心', 3, 'boolean',
'断层位于图像正中',
'{"type": "opencv_check", "method": "checkIMAGE_CENTERING", "params": {"maxOffsetRatio": 0.15}, "isVeto": false, "description": "断层位于图像正中"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.3.1 眼眶CT平扫 - 因子3: 重建参数
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_ORBIT_5_4_3_1_3', 'CT_ORBIT_5_4_3_1_3', '重建参数', 3, 'boolean',
'厚层≤2.0mm，薄层≤0.625mm，DFOV：18cm',
'{"type": "dicom_check", "method": "checkRECONSTRUCTION_PARAMS", "params": {"thickSliceMax": 2.0, "thickIntervalMax": 2.0, "thinSliceMax": 0.625, "thinIntervalMax": 0.625, "dfov": 18, "dfovTolerance": 2.0}, "isVeto": false, "description": "厚层≤2.0mm，薄层≤0.625mm，DFOV：18cm"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.3.1 眼眶CT平扫 - 因子4: 窗口技术
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_ORBIT_5_4_3_1_4', 'CT_ORBIT_5_4_3_1_4', '窗口技术', 3, 'boolean',
'软组织窗：窗宽350~400HU，窗位35~45HU',
'{"type": "dicom_check", "method": "checkWINDOW_TECHNIQUE", "params": {"softTissueWindow": {"windowWidth": {"min": 350, "max": 400}, "windowCenter": {"min": 35, "max": 45}}}, "isVeto": true, "description": "软组织窗：窗宽350~400HU，窗位35~45HU"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.3.1 眼眶CT平扫 - 因子5: 扫描体位
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_ORBIT_5_4_3_1_5', 'CT_ORBIT_5_4_3_1_5', '扫描体位', 3, 'boolean',
'仰卧位',
'{"type": "dicom_check", "method": "checkSCAN_POSITION", "params": {"expectedPosition": ["HFS", "FFS"]}, "isVeto": false, "description": "仰卧位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.3.1 眼眶CT平扫 - 因子6: 图像标识
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_ORBIT_5_4_3_1_6', 'CT_ORBIT_5_4_3_1_6', '图像标识', 3, 'boolean',
'影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位',
'{"type": "dicom_check", "method": "checkImageAnnotation", "params": {"requiredFields": ["StudyInstanceUID", "BodyPartExamined", "PatientName", "PatientSex", "PatientAge", "StudyDate", "StudyTime", "KVP", "ScanDirection"]}, "isVeto": true, "description": "影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.3.1 眼眶CT平扫 - 因子7: 图像伪影
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_ORBIT_5_4_3_1_7', 'CT_ORBIT_5_4_3_1_7', '图像伪影', 3, 'boolean',
'没有运动伪影以及高衰减伪影',
'{"type": "opencv_check", "method": "checkIMAGE_ARTIFACTS", "params": {"motionThreshold": 30.0, "beamHardeningThreshold": 50.0}, "isVeto": true, "description": "没有运动伪影以及高衰减伪影"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.3.1 眼眶CT平扫 - 因子8: 图像清晰度
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_ORBIT_5_4_3_1_8', 'CT_ORBIT_5_4_3_1_8', '图像清晰度', 3, 'boolean',
'能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构',
'{"type": "opencv_check", "method": "checkIMAGE_CLARITY", "params": {"sharpnessThreshold": 100.0, "contrastThreshold": 50.0}, "isVeto": false, "description": "能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.3.1 眼眶CT平扫 - 因子9: 对称性要求
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_ORBIT_5_4_3_1_9', 'CT_ORBIT_5_4_3_1_9', '对称性要求', 3, 'boolean',
'双侧结构对称显示',
'{"type": "opencv_check", "method": "checkSYMMETRY", "params": {"symmetryThreshold": 0.85}, "isVeto": false, "description": "双侧结构对称显示"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.3.1 眼眶CT平扫 - 质控标准
INSERT INTO `qc_standard` (`id`, `standard_code`, `standard_name`, `modality`, `body_part`, `scan_type`, `exam_item`, `pass_score`, `description`, `status`, `create_time`, `update_time`) VALUES
('STD_CT_5_4_3_1', 'CT_5_4_3_1', '眼眶CT平扫质控标准', 'CT', '眼部', '平扫', '眼眶CT平扫', 80,
'眼眶CT平扫质控标准，包含9个质控因子',
1, NOW(), NOW());

-- 5.4.3.1 眼眶CT平扫 - 标准-因子关联
INSERT INTO `qc_standard_factor` (`id`, `standard_id`, `factor_id`, `weight`, `is_required`, `sort_order`, `create_time`, `update_time`) VALUES
('SF_CT_5_4_3_1_1', 'STD_CT_5_4_3_1', 'CT_ORBIT_5_4_3_1_1', 10.00, 1, 1, NOW(), NOW()),
('SF_CT_5_4_3_1_2', 'STD_CT_5_4_3_1', 'CT_ORBIT_5_4_3_1_2', 8.00, 1, 2, NOW(), NOW()),
('SF_CT_5_4_3_1_3', 'STD_CT_5_4_3_1', 'CT_ORBIT_5_4_3_1_3', 10.00, 1, 3, NOW(), NOW()),
('SF_CT_5_4_3_1_4', 'STD_CT_5_4_3_1', 'CT_ORBIT_5_4_3_1_4', 18.00, 1, 4, NOW(), NOW()),
('SF_CT_5_4_3_1_5', 'STD_CT_5_4_3_1', 'CT_ORBIT_5_4_3_1_5', 8.00, 1, 5, NOW(), NOW()),
('SF_CT_5_4_3_1_6', 'STD_CT_5_4_3_1', 'CT_ORBIT_5_4_3_1_6', 18.00, 1, 6, NOW(), NOW()),
('SF_CT_5_4_3_1_7', 'STD_CT_5_4_3_1', 'CT_ORBIT_5_4_3_1_7', 16.00, 1, 7, NOW(), NOW()),
('SF_CT_5_4_3_1_8', 'STD_CT_5_4_3_1', 'CT_ORBIT_5_4_3_1_8', 12.00, 1, 8, NOW(), NOW()),
('SF_CT_5_4_3_1_9', 'STD_CT_5_4_3_1', 'CT_ORBIT_5_4_3_1_9', 10.00, 1, 9, NOW(), NOW());


-- 5.4.3.2 眼眶CT增强 - 因子1: 检查范围
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_ORBIT_5_4_3_2_1', 'CT_ORBIT_5_4_3_2_1', '检查范围', 3, 'boolean',
'检查范围从眼眶上缘1cm至眼眶下缘1cm',
'{"type": "dicom_check", "method": "checkSCAN_RANGE", "params": {"minSliceCount": 25, "expectedBodyPart": "眼部", "checkCoverage": true}, "isVeto": false, "description": "检查范围从眼眶上缘1cm至眼眶下缘1cm"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.3.2 眼眶CT增强 - 因子2: 图像偏中心
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_ORBIT_5_4_3_2_2', 'CT_ORBIT_5_4_3_2_2', '图像偏中心', 3, 'boolean',
'断层位于图像正中',
'{"type": "opencv_check", "method": "checkIMAGE_CENTERING", "params": {"maxOffsetRatio": 0.15}, "isVeto": false, "description": "断层位于图像正中"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.3.2 眼眶CT增强 - 因子3: 重建参数
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_ORBIT_5_4_3_2_3', 'CT_ORBIT_5_4_3_2_3', '重建参数', 3, 'boolean',
'厚层≤3.0mm，薄层≤0.625mm，DFOV：18cm',
'{"type": "dicom_check", "method": "checkRECONSTRUCTION_PARAMS", "params": {"thickSliceMax": 3.0, "thickIntervalMax": 3.0, "thinSliceMax": 0.625, "thinIntervalMax": 0.625, "dfov": 18, "dfovTolerance": 2.0}, "isVeto": false, "description": "厚层≤3.0mm，薄层≤0.625mm，DFOV：18cm"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.3.2 眼眶CT增强 - 因子4: 窗口技术
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_ORBIT_5_4_3_2_4', 'CT_ORBIT_5_4_3_2_4', '窗口技术', 3, 'boolean',
'软组织窗：窗宽350~400HU，窗位35~45HU',
'{"type": "dicom_check", "method": "checkWINDOW_TECHNIQUE", "params": {"softTissueWindow": {"windowWidth": {"min": 350, "max": 400}, "windowCenter": {"min": 35, "max": 45}}}, "isVeto": true, "description": "软组织窗：窗宽350~400HU，窗位35~45HU"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.3.2 眼眶CT增强 - 因子5: 扫描体位
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_ORBIT_5_4_3_2_5', 'CT_ORBIT_5_4_3_2_5', '扫描体位', 3, 'boolean',
'仰卧位',
'{"type": "dicom_check", "method": "checkSCAN_POSITION", "params": {"expectedPosition": ["HFS", "FFS"]}, "isVeto": false, "description": "仰卧位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.3.2 眼眶CT增强 - 因子6: 图像标识
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_ORBIT_5_4_3_2_6', 'CT_ORBIT_5_4_3_2_6', '图像标识', 3, 'boolean',
'影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位',
'{"type": "dicom_check", "method": "checkImageAnnotation", "params": {"requiredFields": ["StudyInstanceUID", "BodyPartExamined", "PatientName", "PatientSex", "PatientAge", "StudyDate", "StudyTime", "KVP", "ScanDirection"]}, "isVeto": true, "description": "影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.3.2 眼眶CT增强 - 因子7: 图像伪影
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_ORBIT_5_4_3_2_7', 'CT_ORBIT_5_4_3_2_7', '图像伪影', 3, 'boolean',
'没有运动伪影以及高衰减伪影',
'{"type": "opencv_check", "method": "checkIMAGE_ARTIFACTS", "params": {"motionThreshold": 30.0, "beamHardeningThreshold": 50.0}, "isVeto": true, "description": "没有运动伪影以及高衰减伪影"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.3.2 眼眶CT增强 - 因子8: 图像清晰度
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_ORBIT_5_4_3_2_8', 'CT_ORBIT_5_4_3_2_8', '图像清晰度', 3, 'boolean',
'能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构',
'{"type": "opencv_check", "method": "checkIMAGE_CLARITY", "params": {"sharpnessThreshold": 100.0, "contrastThreshold": 50.0}, "isVeto": false, "description": "能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.3.2 眼眶CT增强 - 质控标准
INSERT INTO `qc_standard` (`id`, `standard_code`, `standard_name`, `modality`, `body_part`, `scan_type`, `exam_item`, `pass_score`, `description`, `status`, `create_time`, `update_time`) VALUES
('STD_CT_5_4_3_2', 'CT_5_4_3_2', '眼眶CT增强质控标准', 'CT', '眼部', '增强', '眼眶CT增强', 80,
'眼眶CT增强质控标准，包含8个质控因子',
1, NOW(), NOW());

-- 5.4.3.2 眼眶CT增强 - 标准-因子关联
INSERT INTO `qc_standard_factor` (`id`, `standard_id`, `factor_id`, `weight`, `is_required`, `sort_order`, `create_time`, `update_time`) VALUES
('SF_CT_5_4_3_2_1', 'STD_CT_5_4_3_2', 'CT_ORBIT_5_4_3_2_1', 10.00, 1, 1, NOW(), NOW()),
('SF_CT_5_4_3_2_2', 'STD_CT_5_4_3_2', 'CT_ORBIT_5_4_3_2_2', 8.00, 1, 2, NOW(), NOW()),
('SF_CT_5_4_3_2_3', 'STD_CT_5_4_3_2', 'CT_ORBIT_5_4_3_2_3', 10.00, 1, 3, NOW(), NOW()),
('SF_CT_5_4_3_2_4', 'STD_CT_5_4_3_2', 'CT_ORBIT_5_4_3_2_4', 18.00, 1, 4, NOW(), NOW()),
('SF_CT_5_4_3_2_5', 'STD_CT_5_4_3_2', 'CT_ORBIT_5_4_3_2_5', 8.00, 1, 5, NOW(), NOW()),
('SF_CT_5_4_3_2_6', 'STD_CT_5_4_3_2', 'CT_ORBIT_5_4_3_2_6', 18.00, 1, 6, NOW(), NOW()),
('SF_CT_5_4_3_2_7', 'STD_CT_5_4_3_2', 'CT_ORBIT_5_4_3_2_7', 16.00, 1, 7, NOW(), NOW()),
('SF_CT_5_4_3_2_8', 'STD_CT_5_4_3_2', 'CT_ORBIT_5_4_3_2_8', 12.00, 0, 8, NOW(), NOW());


-- 5.4.4.1 鼻咽CT平扫 - 因子1: 检查范围
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_NASOPHARYNX_5_4_4_1_1', 'CT_NASOPHARYNX_5_4_4_1_1', '检查范围', 3, 'boolean',
'检查范围从海绵窦上缘至软腭游离缘',
'{"type": "dicom_check", "method": "checkSCAN_RANGE", "params": {"minSliceCount": 25, "expectedBodyPart": "鼻咽部", "checkCoverage": true}, "isVeto": false, "description": "检查范围从海绵窦上缘至软腭游离缘"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.4.1 鼻咽CT平扫 - 因子2: 图像偏中心
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_NASOPHARYNX_5_4_4_1_2', 'CT_NASOPHARYNX_5_4_4_1_2', '图像偏中心', 3, 'boolean',
'断层位于图像正中',
'{"type": "opencv_check", "method": "checkIMAGE_CENTERING", "params": {"maxOffsetRatio": 0.15}, "isVeto": false, "description": "断层位于图像正中"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.4.1 鼻咽CT平扫 - 因子3: 重建参数
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_NASOPHARYNX_5_4_4_1_3', 'CT_NASOPHARYNX_5_4_4_1_3', '重建参数', 3, 'boolean',
'厚层≤3.0mm，薄层≤0.625mm，DFOV：18cm',
'{"type": "dicom_check", "method": "checkRECONSTRUCTION_PARAMS", "params": {"thickSliceMax": 3.0, "thickIntervalMax": 3.0, "thinSliceMax": 0.625, "thinIntervalMax": 0.625, "dfov": 18, "dfovTolerance": 2.0}, "isVeto": false, "description": "厚层≤3.0mm，薄层≤0.625mm，DFOV：18cm"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.4.1 鼻咽CT平扫 - 因子4: 窗口技术
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_NASOPHARYNX_5_4_4_1_4', 'CT_NASOPHARYNX_5_4_4_1_4', '窗口技术', 3, 'boolean',
'软组织窗：窗宽350~400HU，窗位35~45HU',
'{"type": "dicom_check", "method": "checkWINDOW_TECHNIQUE", "params": {"softTissueWindow": {"windowWidth": {"min": 350, "max": 400}, "windowCenter": {"min": 35, "max": 45}}}, "isVeto": true, "description": "软组织窗：窗宽350~400HU，窗位35~45HU"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.4.1 鼻咽CT平扫 - 因子5: 扫描体位
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_NASOPHARYNX_5_4_4_1_5', 'CT_NASOPHARYNX_5_4_4_1_5', '扫描体位', 3, 'boolean',
'仰卧位',
'{"type": "dicom_check", "method": "checkSCAN_POSITION", "params": {"expectedPosition": ["HFS", "FFS"]}, "isVeto": false, "description": "仰卧位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.4.1 鼻咽CT平扫 - 因子6: 图像标识
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_NASOPHARYNX_5_4_4_1_6', 'CT_NASOPHARYNX_5_4_4_1_6', '图像标识', 3, 'boolean',
'影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位',
'{"type": "dicom_check", "method": "checkImageAnnotation", "params": {"requiredFields": ["StudyInstanceUID", "BodyPartExamined", "PatientName", "PatientSex", "PatientAge", "StudyDate", "StudyTime", "KVP", "ScanDirection"]}, "isVeto": true, "description": "影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.4.1 鼻咽CT平扫 - 因子7: 图像伪影
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_NASOPHARYNX_5_4_4_1_7', 'CT_NASOPHARYNX_5_4_4_1_7', '图像伪影', 3, 'boolean',
'没有运动伪影以及高衰减伪影',
'{"type": "opencv_check", "method": "checkIMAGE_ARTIFACTS", "params": {"motionThreshold": 30.0, "beamHardeningThreshold": 50.0}, "isVeto": true, "description": "没有运动伪影以及高衰减伪影"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.4.1 鼻咽CT平扫 - 因子8: 图像清晰度
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_NASOPHARYNX_5_4_4_1_8', 'CT_NASOPHARYNX_5_4_4_1_8', '图像清晰度', 3, 'boolean',
'能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构',
'{"type": "opencv_check", "method": "checkIMAGE_CLARITY", "params": {"sharpnessThreshold": 100.0, "contrastThreshold": 50.0}, "isVeto": false, "description": "能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.4.1 鼻咽CT平扫 - 质控标准
INSERT INTO `qc_standard` (`id`, `standard_code`, `standard_name`, `modality`, `body_part`, `scan_type`, `exam_item`, `pass_score`, `description`, `status`, `create_time`, `update_time`) VALUES
('STD_CT_5_4_4_1', 'CT_5_4_4_1', '鼻咽CT平扫质控标准', 'CT', '鼻咽部', '平扫', '鼻咽CT平扫', 80,
'鼻咽CT平扫质控标准，包含8个质控因子',
1, NOW(), NOW());

-- 5.4.4.1 鼻咽CT平扫 - 标准-因子关联
INSERT INTO `qc_standard_factor` (`id`, `standard_id`, `factor_id`, `weight`, `is_required`, `sort_order`, `create_time`, `update_time`) VALUES
('SF_CT_5_4_4_1_1', 'STD_CT_5_4_4_1', 'CT_NASOPHARYNX_5_4_4_1_1', 10.00, 1, 1, NOW(), NOW()),
('SF_CT_5_4_4_1_2', 'STD_CT_5_4_4_1', 'CT_NASOPHARYNX_5_4_4_1_2', 8.00, 1, 2, NOW(), NOW()),
('SF_CT_5_4_4_1_3', 'STD_CT_5_4_4_1', 'CT_NASOPHARYNX_5_4_4_1_3', 10.00, 1, 3, NOW(), NOW()),
('SF_CT_5_4_4_1_4', 'STD_CT_5_4_4_1', 'CT_NASOPHARYNX_5_4_4_1_4', 18.00, 1, 4, NOW(), NOW()),
('SF_CT_5_4_4_1_5', 'STD_CT_5_4_4_1', 'CT_NASOPHARYNX_5_4_4_1_5', 8.00, 1, 5, NOW(), NOW()),
('SF_CT_5_4_4_1_6', 'STD_CT_5_4_4_1', 'CT_NASOPHARYNX_5_4_4_1_6', 18.00, 1, 6, NOW(), NOW()),
('SF_CT_5_4_4_1_7', 'STD_CT_5_4_4_1', 'CT_NASOPHARYNX_5_4_4_1_7', 16.00, 1, 7, NOW(), NOW()),
('SF_CT_5_4_4_1_8', 'STD_CT_5_4_4_1', 'CT_NASOPHARYNX_5_4_4_1_8', 12.00, 0, 8, NOW(), NOW());


-- 5.4.4.2 鼻咽CT增强 - 因子1: 检查范围
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_NASOPHARYNX_5_4_4_2_1', 'CT_NASOPHARYNX_5_4_4_2_1', '检查范围', 3, 'boolean',
'检查范围从海绵窦上缘至软腭游离缘',
'{"type": "dicom_check", "method": "checkSCAN_RANGE", "params": {"minSliceCount": 25, "expectedBodyPart": "鼻咽部", "checkCoverage": true}, "isVeto": false, "description": "检查范围从海绵窦上缘至软腭游离缘"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.4.2 鼻咽CT增强 - 因子2: 图像偏中心
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_NASOPHARYNX_5_4_4_2_2', 'CT_NASOPHARYNX_5_4_4_2_2', '图像偏中心', 3, 'boolean',
'断层位于图像正中',
'{"type": "opencv_check", "method": "checkIMAGE_CENTERING", "params": {"maxOffsetRatio": 0.15}, "isVeto": false, "description": "断层位于图像正中"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.4.2 鼻咽CT增强 - 因子3: 重建参数
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_NASOPHARYNX_5_4_4_2_3', 'CT_NASOPHARYNX_5_4_4_2_3', '重建参数', 3, 'boolean',
'厚层≤3.0mm，薄层≤0.625mm，DFOV：18cm',
'{"type": "dicom_check", "method": "checkRECONSTRUCTION_PARAMS", "params": {"thickSliceMax": 3.0, "thickIntervalMax": 3.0, "thinSliceMax": 0.625, "thinIntervalMax": 0.625, "dfov": 18, "dfovTolerance": 2.0}, "isVeto": false, "description": "厚层≤3.0mm，薄层≤0.625mm，DFOV：18cm"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.4.2 鼻咽CT增强 - 因子4: 窗口技术
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_NASOPHARYNX_5_4_4_2_4', 'CT_NASOPHARYNX_5_4_4_2_4', '窗口技术', 3, 'boolean',
'软组织窗：窗宽350~400HU，窗位35~45HU',
'{"type": "dicom_check", "method": "checkWINDOW_TECHNIQUE", "params": {"softTissueWindow": {"windowWidth": {"min": 350, "max": 400}, "windowCenter": {"min": 35, "max": 45}}}, "isVeto": true, "description": "软组织窗：窗宽350~400HU，窗位35~45HU"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.4.2 鼻咽CT增强 - 因子5: 扫描体位
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_NASOPHARYNX_5_4_4_2_5', 'CT_NASOPHARYNX_5_4_4_2_5', '扫描体位', 3, 'boolean',
'仰卧位',
'{"type": "dicom_check", "method": "checkSCAN_POSITION", "params": {"expectedPosition": ["HFS", "FFS"]}, "isVeto": false, "description": "仰卧位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.4.2 鼻咽CT增强 - 因子6: 图像标识
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_NASOPHARYNX_5_4_4_2_6', 'CT_NASOPHARYNX_5_4_4_2_6', '图像标识', 3, 'boolean',
'影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位',
'{"type": "dicom_check", "method": "checkImageAnnotation", "params": {"requiredFields": ["StudyInstanceUID", "BodyPartExamined", "PatientName", "PatientSex", "PatientAge", "StudyDate", "StudyTime", "KVP", "ScanDirection"]}, "isVeto": true, "description": "影像号、检查部位、姓名、性别、年龄、日期、时间、kV、mAs值、扫描方位"}',
'dicom_metadata', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.4.2 鼻咽CT增强 - 因子7: 图像伪影
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_NASOPHARYNX_5_4_4_2_7', 'CT_NASOPHARYNX_5_4_4_2_7', '图像伪影', 3, 'boolean',
'没有运动伪影以及高衰减伪影',
'{"type": "opencv_check", "method": "checkIMAGE_ARTIFACTS", "params": {"motionThreshold": 30.0, "beamHardeningThreshold": 50.0}, "isVeto": true, "description": "没有运动伪影以及高衰减伪影"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.4.2 鼻咽CT增强 - 因子8: 图像清晰度
INSERT INTO `qc_factor` (`id`, `factor_code`, `factor_name`, `factor_category`, `factor_type`, `description`, `check_rule`, `data_source`, `status`, `create_time`, `update_time`, `modality`, `body_part`, `scan_type`) VALUES
('CT_NASOPHARYNX_5_4_4_2_8', 'CT_NASOPHARYNX_5_4_4_2_8', '图像清晰度', 3, 'boolean',
'能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构',
'{"type": "opencv_check", "method": "checkIMAGE_CLARITY", "params": {"sharpnessThreshold": 100.0, "contrastThreshold": 50.0}, "isVeto": false, "description": "能够显示软组织病变与周围组织的关系，骨窗显示诸骨内部结构"}',
'opencv_analysis', 1, NOW(), NOW(), NULL, NULL, NULL);

-- 5.4.4.2 鼻咽CT增强 - 质控标准
INSERT INTO `qc_standard` (`id`, `standard_code`, `standard_name`, `modality`, `body_part`, `scan_type`, `exam_item`, `pass_score`, `description`, `status`, `create_time`, `update_time`) VALUES
('STD_CT_5_4_4_2', 'CT_5_4_4_2', '鼻咽CT增强质控标准', 'CT', '鼻咽部', '增强', '鼻咽CT增强', 80,
'鼻咽CT增强质控标准，包含8个质控因子',
1, NOW(), NOW());

-- 5.4.4.2 鼻咽CT增强 - 标准-因子关联
INSERT INTO `qc_standard_factor` (`id`, `standard_id`, `factor_id`, `weight`, `is_required`, `sort_order`, `create_time`, `update_time`) VALUES
('SF_CT_5_4_4_2_1', 'STD_CT_5_4_4_2', 'CT_NASOPHARYNX_5_4_4_2_1', 10.00, 1, 1, NOW(), NOW()),
('SF_CT_5_4_4_2_2', 'STD_CT_5_4_4_2', 'CT_NASOPHARYNX_5_4_4_2_2', 8.00, 1, 2, NOW(), NOW()),
('SF_CT_5_4_4_2_3', 'STD_CT_5_4_4_2', 'CT_NASOPHARYNX_5_4_4_2_3', 10.00, 1, 3, NOW(), NOW()),
('SF_CT_5_4_4_2_4', 'STD_CT_5_4_4_2', 'CT_NASOPHARYNX_5_4_4_2_4', 18.00, 1, 4, NOW(), NOW()),
('SF_CT_5_4_4_2_5', 'STD_CT_5_4_4_2', 'CT_NASOPHARYNX_5_4_4_2_5', 8.00, 1, 5, NOW(), NOW()),
('SF_CT_5_4_4_2_6', 'STD_CT_5_4_4_2', 'CT_NASOPHARYNX_5_4_4_2_6', 18.00, 1, 6, NOW(), NOW()),
('SF_CT_5_4_4_2_7', 'STD_CT_5_4_4_2', 'CT_NASOPHARYNX_5_4_4_2_7', 16.00, 1, 7, NOW(), NOW()),
('SF_CT_5_4_4_2_8', 'STD_CT_5_4_4_2', 'CT_NASOPHARYNX_5_4_4_2_8', 12.00, 0, 8, NOW(), NOW());

