-- 添加剂量单位和剂数字段到处方业务订单表
-- 用于记录订单的剂量单位和剂数信息

ALTER TABLE `zyt_tcm_prescription_order`
ADD COLUMN `dose_unit` varchar(20) NOT NULL DEFAULT '剂' COMMENT '剂量单位：剂、丸、袋、盒、瓶、膏、贴' AFTER `medication_days`,
ADD COLUMN `dose_count` int(11) NOT NULL DEFAULT 1 COMMENT '剂数' AFTER `dose_unit`;

-- 验证字段是否添加成功
SELECT COLUMN_NAME, DATA_TYPE, COLUMN_DEFAULT, COLUMN_COMMENT 
FROM information_schema.COLUMNS 
WHERE TABLE_SCHEMA = DATABASE() 
  AND TABLE_NAME = 'zyt_tcm_prescription_order' 
  AND COLUMN_NAME IN ('dose_unit', 'dose_count');
