以下是完整可运行的PPT生成代码,覆盖“PCI手术介入耗材详解”的全部章节(含概述、各耗材系统、辅助装置、术后护理及发展趋势),运行后可直接生成成品PPT,且预留了图片插入位置(可根据需求替换图片路径)。
python
from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.enum.text import PP_ALIGN
from pptx.dml.color import RGBColor
from pptx.enum.shapes import MSO_SHAPE
# 1. 初始化PPT(16:9比例)
prs = Presentation()
prs.slide_width = Inches(13.33)
prs.slide_height = Inches(7.5)
bg_color = RGBColor(245, 245, 245) # 浅灰背景,提升可读性
# 通用函数:添加标题和内容框(统一格式)
def add_title(slide, title_text):
# 标题框
title_box = slide.shapes.add_textbox(Inches(0.5), Inches(0.5), Inches(12), Inches(0.8))
title_frame = title_box.text_frame
title_frame.text = title_text
title_para = title_frame.paragraphs[0]
title_para.font.size = Pt(40)
title_para.font.bold = True
title_para.alignment = PP_ALIGN.CENTER
title_para.font.color.rgb = RGBColor(30, 144, 255) # 蓝色标题
def add_content(slide, content_list, start_y=Inches(1.8)):
# 内容列表(每行一个要点)
for i, content in enumerate(content_list):
content_box = slide.shapes.add_textbox(Inches(1), start_y + i * 0.6, Inches(11), Inches(0.5))
content_frame = content_box.text_frame
content_frame.text = content
content_para = content_frame.paragraphs[0]
content_para.font.size = Pt(24)
content_para.font.color.rgb = RGBColor(50, 50, 50) # 深灰文字
# 2. 第1页:封面
slide1 = prs.slides.add_slide(prs.slide_layouts[6]) # 空白布局
# 封面标题
title_box1 = slide1.shapes.add_textbox(Inches(2), Inches(2.2), Inches(9), Inches(2))
title_frame1 = title_box1.text_frame
title_frame1.text = "PCI手术介入耗材详解"
title_para1 = title_frame1.paragraphs[0]
title_para1.font.size = Pt(56)
title_para1.font.bold = True
title_para1.alignment = PP_ALIGN.CENTER
title_para1.font.color.rgb = RGBColor(30, 144, 255)
# 副标题
sub_box1 = slide1.shapes.add_textbox(Inches(3), Inches(4.2), Inches(7), Inches(1))
sub_frame1 = sub_box1.text_frame
sub_frame1.text = "经皮冠状动脉介入治疗(PCI)耗材系统全解析"
sub_para1 = sub_frame1.paragraphs[0]
sub_para1.font.size = Pt(28)
sub_para1.alignment = PP_ALIGN.CENTER
sub_para1.font.color.rgb = RGBColor(100, 100, 100)
# 3. 第2页:目录
slide2 = prs.slides.add_slide(prs.slide_layouts[6])
add_title(slide2, "目录")
content_list2 = [
"1. PCI手术核心概述",
"2. 介入耗材整体分类",
"3. 引导与穿刺系统(基础耗材)",
"4. 导丝与导管系统(核心传导耗材)",
"5. 球囊扩张导管(关键治疗耗材)",
"6. 冠状动脉支架(核心植入耗材)",
"7. 辅助治疗装置(特殊场景耗材)",
"8. 术后护理相关耗材",
"9. 耗材技术发展趋势"
]
add_content(slide2, content_list2)
# 4. 第3页:PCI手术核心概述
slide3 = prs.slides.add_slide(prs.slide_layouts[6])
add_title(slide3, "1. PCI手术核心概述")
# 左侧内容
content_list3 = [
"定义:经皮冠状动脉介入治疗,俗称“冠脉支架手术”",
"目的:通过介入手段扩张狭窄/堵塞的冠脉,恢复心肌供血",
"适用场景:冠心病、心绞痛、急性心肌梗死等",
"核心逻辑:“通路建立→病变处理→器械植入→术后保障”"
]
add_content(slide3, content_list3)
# 右侧图片占位(可替换为PCI手术示意图)
img_box3 = slide3.shapes.add_picture("PCI示意图.jpg", Inches(7.5), Inches(2), width=Inches(4.5), height=Inches(4))
# 若没有图片,可注释上一行,或替换为实际图片路径
# 5. 第4页:介入耗材整体分类
slide4 = prs.slides.add_slide(prs.slide_layouts[6])
add_title(slide4, "2. 介入耗材整体分类")
# 分4类展示(并列布局)
# 第一类:引导穿刺类
box4_1 = slide4.shapes.add_textbox(Inches(1), Inches(1.8), Inches(3), Inches(4))
frame4_1 = box4_1.text_frame
frame4_1.text = "一、引导穿刺类\n(建立手术通路)\n• 穿刺针\n• 动脉鞘管\n• 导丝(初始)"
for para in frame4_1.paragraphs:
para.font.size = Pt(22)
para.font.color.rgb = RGBColor(50, 50, 50)
# 第二类:传导类
box4_2 = slide4.shapes.add_textbox(Inches(4.5), Inches(1.8), Inches(3), Inches(4))
frame4_2 = box4_2.text_frame
frame4_2.text = "二、传导类\n(输送治疗器械)\n• 冠脉导丝\n• 指引导管\n• 微导管"
for para in frame4_2.paragraphs:
para.font.size = Pt(22)
para.font.color.rgb = RGBColor(50, 50, 50)
# 第三类:治疗类
box4_3 = slide4.shapes.add_textbox(Inches(8), Inches(1.8), Inches(3), Inches(4))
frame4_3 = box4_3.text_frame
frame4_3.text = "三、治疗类\n(直接处理病变)\n• 球囊扩张导管\n• 冠脉支架\n• 切割/旋磨球囊"
for para in frame4_3.paragraphs:
para.font.size = Pt(22)
para.font.color.rgb = RGBColor(50, 50, 50)
# 第四类:辅助/术后类
box4_4 = slide4.shapes.add_textbox(Inches(11.5), Inches(1.8), Inches(1), Inches(4))
frame4_4 = box4_4.text_frame
frame4_4.text = "四、辅助/术后类\n• 血栓抽吸导管\n• 血管闭合器\n• 压迫止血器"
for para in frame4_4.paragraphs:
para.font.size = Pt(22)
para.font.color.rgb = RGBColor(50, 50, 50)
# 6. 第5页:引导与穿刺系统
slide5 = prs.slides.add_slide(prs.slide_layouts[6])
add_title(slide5, "3. 引导与穿刺系统(基础耗材)")
# 内容+图片组合
content_list5 = [
"1. 穿刺针:",
" - 作用:穿刺动脉(常用桡动脉/股动脉),建立初始入口",
" - 特点:细径、锋利针尖,减少血管损伤",
"",
"2. 动脉鞘管:",
" - 作用:穿刺后留置在动脉内,作为后续器械的“通道”",
" - 规格:直径5-8F(F=French,1F≈0.33mm),匹配后续导管"
]
add_content(slide5, content_list5, start_y=Inches(1.5))
# 图片占位(鞘管示意图)
img_box5 = slide5.shapes.add_picture("动脉鞘管示意图.jpg", Inches(7), Inches(3.5), width=Inches(4.5), height=Inches(3))
# 7. 第6页:导丝与导管系统
slide6 = prs.slides.add_slide(prs.slide_layouts[6])
add_title(slide6, "4. 导丝与导管系统(核心传导耗材)")
# 左侧:导丝;右侧:导管
# 导丝内容
box6_1 = slide6.shapes.add_textbox(Inches(1), Inches(1.8), Inches(5), Inches(4.5))
frame6_1 = box6_1.text_frame
frame6_1.text = "【冠脉导丝】\n• 核心作用:“引路”——先到达狭窄冠脉病变处,引导后续器械\n• 关键特性:\n - 柔韧性:通过弯曲血管\n - 支撑力:推送球囊/支架\n - 可视性:含显影标记,X光下可见\n• 类型:普通导丝、亲水涂层导丝(复杂病变用)"
for para in frame6_1.paragraphs:
para.font.size = Pt(22)
para.font.color.rgb = RGBColor(50, 50, 50)
# 导管内容
box6_2 = slide6.shapes.add_textbox(Inches(7.5), Inches(1.8), Inches(5), Inches(4.5))
frame6_2 = box6_2.text_frame
frame6_2.text = "【指引导管】\n• 核心作用:“输送通道”——连接体外与冠脉口,推送球囊/支架\n• 关键特性:\n - 固定性:卡在冠脉开口,防止移位\n - 兼容性:内径匹配球囊/支架尺寸\n• 类型:根据冠脉解剖选型号(如JL、JR系列)"
for para in frame6_2.paragraphs:
para.font.size = Pt(22)
para.font.color.rgb = RGBColor(50, 50, 50)
# 图片占位(导丝+导管组合图)
img_box6 = slide6.shapes.add_picture("导丝导管组合图.jpg", Inches(4.5), Inches(4.5), width=Inches(4), height=Inches(2))
# 8. 第7页:球囊扩张导管
slide7 = prs.slides.add_slide(prs.slide_layouts[6])
add_title(slide7, "5. 球囊扩张导管(关键治疗耗材)")
content_list7 = [
"核心作用:到达狭窄病变处,充气扩张,撑开狭窄血管壁",
"结构组成:",
" - 球囊(高分子材料,如尼龙):充气后膨胀,直径2.0-4.0mm",
" - 导管杆:连接球囊与体外充气装置",
" - 显影标记:定位病变位置",
"主要类型:",
" - 普通球囊:常规狭窄扩张",
" - 切割球囊:钙化严重病变(带微型刀片,切开钙化层)",
" - 药物涂层球囊:预防术后再狭窄(球囊带抗增殖药物)"
]
add_content(slide7, content_list7)
# 图片占位(球囊扩张示意图)
img_box7 = slide7.shapes.add_picture("球囊扩张示意图.jpg", Inches(7.5), Inches(3), width=Inches(4.5), height=Inches(3.5))
# 9. 第8页:冠状动脉支架
slide8 = prs.slides.add_slide(prs.slide_layouts[6])
add_title(slide8, "6. 冠状动脉支架(核心植入耗材)")
content_list8 = [
"核心作用:球囊扩张后,植入支架并膨胀,“支撑”血管壁,防止血管回缩",
"发展历程:",
" 1. 裸金属支架(BMS):早期产品,易发生再狭窄",
" 2. 药物涂层支架(DES):目前主流——支架表面涂抗增殖药物(如雷帕霉素),显著降低再狭窄率",
"关键特性:",
" - 生物相容性:避免血管排斥",
" - 径向支撑力:维持血管通畅",
" - 可膨胀性:匹配血管直径(2.5-4.0mm常用)"
]
add_content(slide8, content_list8)
# 图片占位(药物涂层支架结构图)
img_box8 = slide8.shapes.add_picture("药物涂层支架图.jpg", Inches(7.5), Inches(3.5), width=Inches(4.5), height=Inches(3))
# 10. 第9页:辅助治疗装置
slide9 = prs.slides.add_slide(prs.slide_layouts[6])
add_title(slide9, "7. 辅助治疗装置(特殊场景耗材)")
# 分3类展示
box9_1 = slide9.shapes.add_textbox(Inches(1), Inches(1.8), Inches(4), Inches(4))
frame9_1 = box9_1.text_frame
frame9_1.text = "1. 血栓抽吸导管\n• 适用场景:急性心梗(血管内有血栓)\n• 作用:通过负压抽吸血栓,恢复血流"
for para in frame9_1.paragraphs:
para.font.size = Pt(22)
para.font.color.rgb = RGBColor(50, 50, 50)
box9_2 = slide9.shapes.add_textbox(Inches(5.5), Inches(1.8), Inches(4), Inches(4))
frame9_2 = box9_2.text_frame
frame9_2.text = "2. 旋磨导管\n• 适用场景:严重钙化病变(普通球囊无法撑开)\n• 作用:前端钻石颗粒高速旋转,磨碎钙化斑块"
for para in frame9_2.paragraphs:
para.font.size = Pt(22)
para.font.color.rgb = RGBColor(50, 50, 50)
box9_3 = slide9.shapes.add_textbox(Inches(10), Inches(1.8), Inches(2.5), Inches(4))
frame9_3 = box9_3.text_frame
frame9_3.text = "3. 血管闭合器\n• 适用场景:股动脉穿刺后止血\n• 作用:替代手工压迫,快速止血,减少血肿"
for para in frame9_3.paragraphs:
para.font.size = Pt(22)
para.font.color.rgb = RGBColor(50, 50, 50)
# 11. 第10页:术后护理相关耗材
slide10 = prs.slides.add_slide(prs.slide_layouts[6])
add_title(slide10, "8. 术后护理相关耗材")
content_list10 = [
"1. 止血耗材:",
" - 压迫止血器(桡动脉穿刺用):弹性压迫,维持止血,可调节松紧",
" - 无菌敷料:覆盖穿刺点,预防感染",
"",
"2. 监测/给药耗材:",
" - 静脉留置针:术后输注药物(如抗凝药)",
" - 心电监护电极片:监测心率、心律,评估术后心脏功能"
]
add_content(slide10, content_list10, start_y=Inches(1.5))
# 图片占位(桡动脉压迫止血器图)
img_box10 = slide10.shapes.add_picture("压迫止血器图.jpg", Inches(7.5), Inches(3.5), width=Inches(4.5), height=Inches(3))
# 12. 第11页:发展趋势
slide11 = prs.slides.add_slide(prs.slide_layouts[6])
add_title(slide11, "9. 耗材技术发展趋势")
content_list11 = [
"1. 更小创伤:",
" - 小口径鞘管(如4F鞘管):减少穿刺部位并发症,适合外周血管细的患者",
"",
"2. 生物可吸收支架(BRS):",
" - 特点:植入后2-3年逐渐降解,避免终身携带金属支架,恢复血管自然弹性",
"",
"3. 精准化耗材:",
" - 个性化支架:根据患者血管解剖、病变特点定制尺寸/药物涂层",
" - 影像引导耗材:结合IVUS(血管内超声),实时评估病变,优化植入效果"
]
add_content(slide11, content_list11)
# 13. 第12页:总结
slide12 = prs.slides.add_slide(prs.slide_layouts[6])
add_title(slide12, "总结:PCI耗材的“协同作用”")
content_list12 = [
"• 核心逻辑:从“通路建立”到“病变治疗”,再到“术后保障”,各耗材环环相扣",
"• 关键耗材:导丝(引路)→ 球囊(扩张)→ 支架(支撑),构成治疗核心链",
"• 技术方向:向“微创化、可吸收化、精准化”发展,进一步提升PCI安全性和有效性"
]
add_content(slide12, content_list12, start_y=Inches(2.5))
# 图片占位(PCI耗材全流程示意图)
img_box12 = slide12.shapes.add_textbox(Inches(2), Inches(4.5), Inches(9), Inches(2))
img_frame12 = img_box12.text_frame
img_frame12.text = "(此处可插入:PCI耗材全流程示意图)"
img_para12 = img_frame12.paragraphs[0]
img_para12.font.size = Pt(22)
img_para12.alignment = PP_ALIGN.CENTER
img_para12.font.color.rgb = RGBColor(150, 150, 150)
# 14. 保存PPT文件
prs.save("PCI手术介入耗材详解.pptx")
print("PPT生成完成!文件名为:PCI手术介入耗材详解.pptx")
使用步骤:
1. 安装依赖库:打开电脑的“命令提示符(CMD)”或“终端”,输入命令并回车:
pip install python-pptx
2. 准备图片(可选):若有PCI相关示意图(如手术图、耗材图),将图片放在与代码同一文件夹,并重命名为代码中标注的名称(如“PCI示意图.jpg”);若无图片,可直接注释掉含 add_picture 的代码行(不影响文字内容)。
3. 运行代码:
- 将上述代码复制到记事本,保存为“generate_pci_ppt.py”(注意后缀是 .py ,不是 .txt );
- 双击运行该 .py 文件,或在终端输入 python generate_pci_ppt.py ,即可生成 PCI手术介入耗材详解.pptx 文件。
生成的PPT包含12页完整内容,文字格式统一、逻辑清晰,可直接在PowerPoint中打开编辑(如修改文字、替换图片、调整配色)。
最新发布