医院运营决策之门急诊工作量仪表盘——大模型写代码实现仪表系统开发教程 \* { margin: 0; padding: 0; outline: 0; } body { font-family: "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif; line-height: 1.6; } .\_\_page\_content\_\_ { max-width: 667px; margin: 0 auto; padding: 20px; text-size-adjust: 100%; color: rgba(0, 0, 0, 0.9); padding-bottom: 64px; } .title { user-select: text; font-size: 22px; line-height: 1.4; margin-bottom: 14px; font-weight: 500; } .\_\_meta\_\_ { color: rgba(0, 0, 0, 0.3); font-size: 15px; line-height: 20px; hyphens: auto; word-break: break-word; margin-bottom: 50px; } .\_\_meta\_\_ .nick\_name { color: #576B95; } .\_\_meta\_\_ .copyright { color: rgba(0, 0, 0, 0.3); background-color: rgba(0, 0, 0, 0.05); padding: 0 4px; margin: 0 10px 10px 0; } blockquote.source { padding: 10px; margin: 30px 0; border-left: 5px solid #ccc; color: #333; font-style: italic; word-wrap: break-word; } blockquote.source a { cursor: pointer; text-decoration: underline; } .item\_show\_type\_0 > section { margin-top: 0; margin-bottom: 24px; } a { color: #576B95; text-decoration: none; cursor: default; } .text\_content { margin-bottom: 50px; user-select: text; font-size: 17px; white-space: pre-wrap; word-wrap: break-word; line-height: 28px; hyphens: auto; } .picture\_content .picture\_item { margin-bottom: 30px; } .picture\_content .picture\_item .picture\_item\_label { text-align: center; } img { max-width: 100%; } .pay\_subscribe\_notice { margin: 30px 0; padding: 20px; background: #fffbe6; border: 1px solid #ffe58f; border-radius: 8px; } .pay\_subscribe\_badge { display: inline-block; padding: 4px 12px; background: #faad14; color: #fff; border-radius: 4px; font-size: 14px; font-weight: 500; margin-bottom: 12px; } .pay\_subscribe\_desc { font-size: 15px; line-height: 1.8; color: rgba(0, 0, 0, 0.7); margin-bottom: 12px; } .pay\_subscribe\_hint { font-size: 13px; color: rgba(0, 0, 0, 0.4); } .\_\_bottom-bar\_\_ { display: flex; justify-content: space-between; align-items: center; position: fixed; bottom: 0; left: 0; right: 0; height: 64px; padding: 8px 20px; background: white; box-sizing: border-box; border-top: 1px solid rgba(0, 0, 0, 0.2); } .\_\_bottom-bar\_\_ .left { display: flex; align-items: center; font-size: 15px; white-space: nowrap; } .\_\_bottom-bar\_\_ .right { display: flex; } .\_\_bottom-bar\_\_ .sns\_opr\_btn { display: flex; align-items: center; user-select: none; background: transparent; border: 0; color: rgba(0, 0, 0, 0.9); font-size: 14px; } .\_\_bottom-bar\_\_ .sns\_opr\_btn:not(:last-child) { margin-right: 16px; } .\_\_bottom-bar\_\_ .sns\_opr\_btn > img { margin-right: 4px; }
医院运营决策之门急诊工作量仪表盘——大模型写代码实现仪表系统开发教程
原创 Hi您好 恒健知行 2026-03-03 00:00 安徽
基于大模型的手术分析仪表盘设计文章之后,有朋友让录个视频,为了赶公众号产量,这里以新的门急诊工作量分析的仪表盘设计为例,搭配视频一步步来看如何通过Deepseek大模型写代码完成系统开发的。首先声明,仪表盘是基于统计软件R的shiny包完成的。所以下面的工作前提是你的本地已经安装了统计软件R(现在应该是4.5.2版),还有Rstudio(R编辑器,方便预览效果),以及相关的R包(Deepseek会提示需要安装的R包)。确保已安装所有依赖包:
install.packages(c("shiny", "shinydashboard", "tidyverse", "plotly", "DT", "lubridate", "scales"))
第一步:与Deepseek沟通需求
1.你的提问:
将要统计的指标、分析的维度,系统的设想等发给Deepseek,让Deepseek给出系统设计。
2.Deepseek输出
如果Deepseek给的设计不满意,可以多轮对话,直至符合你的期望。
第二步:让Deepseek根据设计方案写代码
1.你的提问:
上述思路很好,请给出一家年度门急诊量在150万的三级医院的门急诊工作量分析仪表盘设计代码,要求:
2.Deepseek写的代码
第三步:反复测试代码
这个过程是反复的过程,遇到问题通过与Deepseek多轮对话的方式修复代码。关于写代码和测试代码的过程,可以考虑关掉“深度思考”,这样反应会快一点,这个看情况。
这里假设你已经在电脑上安装了R,Rstudio这两个软件,关于这两个软件的介绍可以参考这几篇文章:
Part1-医院运营管理之工具篇《R、Rstudio和Deepseek》
1.在Rstudio编辑器里面测试代码,即将Deepseek生成的代码黏贴到Rstudio中进行执行:
如果出现报错,将报错信息贴到Deepseek中,Deepseek会给出修复后的代码,持续测试,反复修改,直至正确执行。
例如错误信息:
Deesseek,修复示例:
最后:Rstudio中最终效果
最后,补一个简单的录屏
系列相关文章:
恒健知行
 阅读 赞  分享 ’%3E %3Cg transform=‘translate(0 -2.349)’%3E %3Cpath d=‘M0 2.349h24v24H0z’/%3E %3Cpath fill=’%23576B95’ d=‘M16.45 7.68c-.954 0-1.94.362-2.77 1.113l-1.676 1.676-1.853-1.838a3.787 3.787 0 0 0-2.63-.971 3.785 3.785 0 0 0-2.596 1.112 3.786 3.786 0 0 0-1.113 2.687c0 .97.368 1.938 1.105 2.679l7.082 6.527 7.226-6.678a3.787 3.787 0 0 0 .962-2.618 3.785 3.785 0 0 0-1.112-2.597A3.687 3.687 0 0 0 16.45 7.68zm3.473.243a4.985 4.985 0 0 1 1.464 3.418 4.98 4.98 0 0 1-1.29 3.47l-.017.02-7.47 6.903a.9.9 0 0 1-1.22 0l-7.305-6.73-.008-.01a4.986 4.986 0 0 1-1.465-3.535c0-1.279.488-2.56 1.465-3.536A4.985 4.985 0 0 1 7.494 6.46c1.24-.029 2.49.4 3.472 1.29l.01.01L12 8.774l.851-.85.01-.01c1.046-.951 2.322-1.434 3.59-1.434 1.273 0 2.52.49 3.472 1.442z’/%3E %3C/g%3E %3C/g%3E %3C/g%3E%3C/svg%3E) 推荐 ’ fill=’%23000’ fill-opacity=’.9’/%3E%3C/svg%3E) 留言