-- 添加生命体征、地区和婚姻状态字段到诊断表
ALTER TABLE `zyt_tcm_diagnosis` ADD COLUMN `marital_status` tinyint(1) DEFAULT NULL COMMENT '婚姻状态：0-未婚 1-已婚 2-离异' AFTER `age`;
ALTER TABLE `zyt_tcm_diagnosis` ADD COLUMN `height` int(3) DEFAULT NULL COMMENT '身高(cm)' AFTER `marital_status`;
ALTER TABLE `zyt_tcm_diagnosis` ADD COLUMN `weight` decimal(5,2) DEFAULT NULL COMMENT '体重(kg)' AFTER `height`;
ALTER TABLE `zyt_tcm_diagnosis` ADD COLUMN `region` varchar(100) DEFAULT '' COMMENT '地区' AFTER `weight`;
ALTER TABLE `zyt_tcm_diagnosis` ADD COLUMN `systolic_pressure` int(3) DEFAULT NULL COMMENT '收缩压(mmHg)' AFTER `region`;
ALTER TABLE `zyt_tcm_diagnosis` ADD COLUMN `diastolic_pressure` int(3) DEFAULT NULL COMMENT '舒张压(mmHg)' AFTER `systolic_pressure`;
ALTER TABLE `zyt_tcm_diagnosis` ADD COLUMN `fasting_blood_sugar` decimal(5,2) DEFAULT NULL COMMENT '空腹血糖(mmol/L)' AFTER `diastolic_pressure`;

-- 添加索引以提高查询性能
ALTER TABLE `zyt_tcm_diagnosis` ADD KEY `idx_region` (`region`);
ALTER TABLE `zyt_tcm_diagnosis` ADD KEY `idx_marital_status` (`marital_status`);
