Compare commits
61 Commits
cf9ab03b17
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
| a3dce8de60 | |||
| f81dd54f0c | |||
| 803e4d0bb5 | |||
| deebcde41f | |||
| 095c43bbf3 | |||
| aa3beb848b | |||
|
|
ae96bbd0bb | ||
|
|
1a2c444269 | ||
|
|
9cba8fea12 | ||
| 9e4a010a8d | |||
| 7e76083c37 | |||
| de105adbdc | |||
| f3eeee7405 | |||
| 97f04d0b15 | |||
| 5667e04d12 | |||
| 59157fda56 | |||
| 2fe6d45ad4 | |||
| 982ee316f7 | |||
| 64c7db68e8 | |||
| cb6b6ced67 | |||
|
|
8fcfb481c9 | ||
|
|
be0514bc08 | ||
|
|
2b3add4808 | ||
| b33cb6f9a1 | |||
| 072e71b025 | |||
| 47394de43c | |||
| f0f1dde6b6 | |||
| 1ab1165697 | |||
| a8f1b1fdfa | |||
| 3b94d19199 | |||
| db1139a14f | |||
|
|
bea74aeac2 | ||
|
|
634a1f45f9 | ||
| 8f1ad3307c | |||
| d8080fa22d | |||
|
|
e8783d9f8f | ||
| d8c4348341 | |||
|
|
8e61490005 | ||
| f5f4e3c48e | |||
| 0f013715b8 | |||
| fb9722d328 | |||
| 6f9192d30d | |||
| f2b5b90f34 | |||
| a2cbd5e583 | |||
| d3df46858b | |||
| 47a7a945bc | |||
| 0a56c0dcf0 | |||
| 15d32134e2 | |||
| eff98ea5eb | |||
| a47306825a | |||
|
|
9b35fec931 | ||
| e20e2b637f | |||
| ebd2e8aa75 | |||
| cb268fe26d | |||
| 23bd49d940 | |||
| 32adb984e2 | |||
| c1d453600b | |||
| 02eab2d932 | |||
| d5c8b7a1ad | |||
|
|
4053064a22 | ||
|
|
089e28f913 |
68
README.md
68
README.md
@@ -1,68 +0,0 @@
|
||||
# 平台介绍
|
||||
|
||||
## 🏠【关于我们】
|
||||
|
||||

|
||||
|
||||
天天开源致⼒于打造中国应⽤管理 软件开源⽣态,⾯向医疗、企业、教育三⼤⾏业信息化需求,提供优质的开源软件产品与解决⽅案。平台现已发布OpenHIS、OpenCOM、OpenEDU系列开源产品,并持续招募⽣态合作伙伴,期待共同构建开源创新的⾏业协作模式,加速⾏业的数字化进程。
|
||||
|
||||
天天开源的前⾝是新致开源,最早于2022年6⽉发布开源医疗软件平台OpenHIS.org.cn,于2023年6⽉发布开源企业软件平台OpenCOM.com.cn。2025年7⽉,新致开源品牌更新为天天开源,我们始终秉持开源、专业、协作的理念,致⼒于为医疗、教育、中⼩企业等⾏业提供优质的开源解决⽅案。
|
||||
|
||||
了解我们a:https://open.tntlinking.com/about?site=gitee
|
||||
|
||||
## 💾【部署包下载】
|
||||
|
||||
请访问官网产品中心下载部署包:https://open.tntlinking.com/resource/productCenter?site=gitee
|
||||
|
||||
## 📚【支持文档】
|
||||
|
||||
技术支持资源:https://open.tntlinking.com/resource/openProductDoc?site=gitee
|
||||
(含演示环境、操作手册、部署手册、开发手册、常见问题等)
|
||||
|
||||
产品介绍:https://open.tntlinking.com/resource/productPresentation?site=gitee
|
||||
|
||||
操作教程:https://open.tntlinking.com/resource/operationTutorial?site=gitee
|
||||
|
||||
沙龙回顾:https://open.tntlinking.com/resource/openSourceSalon#23?site=gitee
|
||||
|
||||
## 🤝【合作方式】
|
||||
|
||||
产品服务价格:https://open.tntlinking.com/cost?site=gitee
|
||||
|
||||
加入生态伙伴:https://open.tntlinking.com/ecology/becomePartner?site=gitee
|
||||
|
||||
## 🤗【技术社区】
|
||||
|
||||
请访问官网扫码加入技术社区交流:https://open.tntlinking.com/ecology/joinCommunity?site=gitee
|
||||
|
||||
请关注公众号【天天开源软件】以便获得最新产品更新信息。
|
||||
|
||||
|
||||
|
||||
# 项目介绍
|
||||
|
||||
OpenHIS医院系统(信创版)集十大核心模块于一体,涵盖目录管理、基础数据配置、个性化设置、门诊/住院全流程管理、药房药库智能管控、精细化耗材管理、财务核算体系、医保合规对接及多维报表分析等功能模块,共计372项标准化功能。
|
||||
|
||||
系统深度适配民营及公立一二级医院业务场景,支持单体医院、集团化运营及区域医疗协同等多种部署模式,并通过国家信创认证体系,确保全栈技术自主可控。如有项目需求,可联系官方平台合作。
|
||||
|
||||
|
||||
|
||||
## 运行环境
|
||||
|
||||
jdk17 (必须)
|
||||
node.js-v16.15 (推荐)
|
||||
PostgreSQL-v16.2 (必须)
|
||||
redis (常用稳定版本即可)
|
||||
|
||||
## 开发提示
|
||||
|
||||
需要修改数据库和redis的连接信息,详见:
|
||||
application.yml
|
||||
application-druid.yml
|
||||
|
||||
## 目录解释
|
||||
|
||||
前端: openhis-ui-vue3
|
||||
后端: openhis-server
|
||||
启动类: OpenHisApplication
|
||||
|
||||
104
check_display_order.sql
Normal file
104
check_display_order.sql
Normal file
@@ -0,0 +1,104 @@
|
||||
-- 检查流水号(display_order)是否按“科室+医生+当天”正确递增
|
||||
--
|
||||
-- 说明:
|
||||
-- 1. display_order 存的是纯数字(1, 2, 3...),不带时间戳前缀
|
||||
-- 2. 时间戳前缀(如 20260109)是在前端显示时加上的
|
||||
-- 3. 后端用 Redis key "ORG-{科室ID}-DOC-{医生ID}" 按天自增
|
||||
--
|
||||
-- 如何判断逻辑是否正确:
|
||||
-- 同一科室、同一医生、同一天的记录,display_order 应该递增(1, 2, 3...)
|
||||
-- 不同科室、不同医生、不同天的记录,可能都是 1(这是正常的)
|
||||
|
||||
-- ========================================
|
||||
-- 查询1:按“科室+医生+日期”分组,看每组内的 display_order 是否递增
|
||||
-- ========================================
|
||||
SELECT
|
||||
DATE(start_time) AS 日期,
|
||||
organization_id AS 科室ID,
|
||||
registrar_id AS 医生ID,
|
||||
COUNT(*) AS 该组记录数,
|
||||
MIN(display_order) AS 最小序号,
|
||||
MAX(display_order) AS 最大序号,
|
||||
STRING_AGG(display_order::text, ', ' ORDER BY start_time) AS 序号列表,
|
||||
STRING_AGG(id::text, ', ' ORDER BY start_time) AS 记录ID列表
|
||||
FROM adm_encounter
|
||||
WHERE delete_flag = '0'
|
||||
AND start_time >= CURRENT_DATE - INTERVAL '7 days' -- 只看最近7天
|
||||
AND display_order IS NOT NULL
|
||||
GROUP BY DATE(start_time), organization_id, registrar_id
|
||||
ORDER BY 日期 DESC, 科室ID, 医生ID;
|
||||
|
||||
-- ========================================
|
||||
-- 查询2:详细查看每条记录,看同组内的序号是否连续
|
||||
-- ========================================
|
||||
SELECT
|
||||
id AS 记录ID,
|
||||
DATE(start_time) AS 日期,
|
||||
organization_id AS 科室ID,
|
||||
registrar_id AS 医生ID,
|
||||
start_time AS 挂号时间,
|
||||
display_order AS 流水号,
|
||||
-- 计算:同组内的序号应该是 1, 2, 3...,看是否有重复或跳号
|
||||
ROW_NUMBER() OVER (
|
||||
PARTITION BY DATE(start_time), organization_id, registrar_id
|
||||
ORDER BY start_time
|
||||
) AS 应该是第几个,
|
||||
CASE
|
||||
WHEN display_order = ROW_NUMBER() OVER (
|
||||
PARTITION BY DATE(start_time), organization_id, registrar_id
|
||||
ORDER BY start_time
|
||||
) THEN '✓ 正常'
|
||||
ELSE '✗ 异常'
|
||||
END AS 是否正常
|
||||
FROM adm_encounter
|
||||
WHERE delete_flag = '0'
|
||||
AND start_time >= CURRENT_DATE - INTERVAL '7 days'
|
||||
AND display_order IS NOT NULL
|
||||
ORDER BY DATE(start_time) DESC, organization_id, registrar_id, start_time;
|
||||
|
||||
-- ========================================
|
||||
-- 查询3:只看今天的数据(最直观)
|
||||
-- ========================================
|
||||
SELECT
|
||||
id AS 记录ID,
|
||||
organization_id AS 科室ID,
|
||||
registrar_id AS 医生ID,
|
||||
start_time AS 挂号时间,
|
||||
display_order AS 流水号
|
||||
FROM adm_encounter
|
||||
WHERE delete_flag = '0'
|
||||
AND DATE(start_time) = CURRENT_DATE
|
||||
AND display_order IS NOT NULL
|
||||
ORDER BY organization_id, registrar_id, start_time;
|
||||
|
||||
-- ========================================
|
||||
-- 查询4:发现问题 - 找出同组内 display_order 重复的记录
|
||||
-- ========================================
|
||||
WITH ranked AS (
|
||||
SELECT
|
||||
id,
|
||||
DATE(start_time) AS reg_date,
|
||||
organization_id,
|
||||
registrar_id,
|
||||
start_time,
|
||||
display_order,
|
||||
ROW_NUMBER() OVER (
|
||||
PARTITION BY DATE(start_time), organization_id, registrar_id
|
||||
ORDER BY start_time
|
||||
) AS should_be_order
|
||||
FROM adm_encounter
|
||||
WHERE delete_flag = '0'
|
||||
AND start_time >= CURRENT_DATE - INTERVAL '7 days'
|
||||
AND display_order IS NOT NULL
|
||||
)
|
||||
SELECT
|
||||
reg_date AS 日期,
|
||||
organization_id AS 科室ID,
|
||||
registrar_id AS 医生ID,
|
||||
COUNT(*) AS 重复数量,
|
||||
STRING_AGG(id::text || '->' || display_order::text, ', ') AS 问题记录
|
||||
FROM ranked
|
||||
WHERE display_order != should_be_order
|
||||
GROUP BY reg_date, organization_id, registrar_id
|
||||
ORDER BY reg_date DESC;
|
||||
|
||||
287
md/需求/94-手术室维护界面_2026-1-9.md
Normal file
287
md/需求/94-手术室维护界面_2026-1-9.md
Normal file
@@ -0,0 +1,287 @@
|
||||
## 手术室维护界面PRD文档
|
||||
|
||||
### 一、页面概述
|
||||
|
||||
**页面名称**:手术室维护界面
|
||||
**页面目标**:提供手术室基础数据的维护功能,包括新增、编辑、启用/停用手术室信息,为手术安排提供基础数据支持
|
||||
**适用场景**:医院管理员需要新增、修改、启用/停用手术室信息时使用
|
||||
**页面类型**:列表页+表单页(含模态框)
|
||||
|
||||
**原型图地址:**https://static.pm-ai.cn/prototype/20260104/ee5d222231effefcb39624d1646a2e20/index.html
|
||||
|
||||
**核心功能**:
|
||||
|
||||
1. 手术室列表展示与查询
|
||||
2. 新增手术室信息
|
||||
3. 编辑现有手术室信息
|
||||
4. 启用/停用手术室状态
|
||||
5. 数据有效性校验
|
||||
|
||||
**用户价值**:
|
||||
|
||||
- 管理员可集中管理所有手术室基础信息
|
||||
- 确保手术安排时能获取准确的手术室数据
|
||||
- 通过状态管理控制手术室可用性
|
||||
|
||||
**流程图:**
|
||||
|
||||

|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
A[手术室维护界面] --> B[手术室列表展示]
|
||||
|
||||
B --> C[新增手术室]
|
||||
|
||||
B --> D[编辑手术室]
|
||||
|
||||
B --> E[启用/停用手术室]
|
||||
|
||||
B --> F[查询手术室]
|
||||
|
||||
C --> G[点击新增按钮]
|
||||
|
||||
G --> H[打开新增模态框]
|
||||
|
||||
H --> I[填写表单字段]
|
||||
|
||||
I --> J{必填字段校验}
|
||||
|
||||
J -->|通过| K[提交数据]
|
||||
|
||||
J -->|不通过| L[提示请填写所有必填项]
|
||||
|
||||
K --> M[表格新增数据行]
|
||||
|
||||
D --> N[点击修改按钮]
|
||||
|
||||
N --> O[打开编辑模态框]
|
||||
|
||||
O --> P[修改表单字段]
|
||||
|
||||
P --> Q{必填字段校验}
|
||||
|
||||
Q -->|通过| R[保存数据]
|
||||
|
||||
Q -->|不通过| S[提示请填写所有必填项]
|
||||
|
||||
R --> T[更新表格对应行]
|
||||
|
||||
E --> U[点击启用/停用按钮]
|
||||
|
||||
U --> V{二次确认}
|
||||
|
||||
V -->|确认| W[切换状态标签]
|
||||
|
||||
V -->|取消| X[取消操作]
|
||||
|
||||
W --> Y[更新按钮状态]
|
||||
|
||||
F --> Z[输入查询条件]
|
||||
|
||||
Z --> AA[筛选表格数据]
|
||||
|
||||
K --> AB{房间号重复校验}
|
||||
|
||||
AB -->|不重复| AC[提示房间号已存在]
|
||||
|
||||
AB -->|重复| AD[更新按钮状态]
|
||||
```
|
||||
|
||||
### 二、整体布局分析
|
||||
|
||||
**页面宽度**:自适应布局
|
||||
**主要区域划分**:
|
||||
|
||||
1. 页头区域(15%高度)
|
||||
2. 表格展示区(85%高度)
|
||||
**布局特点**:上下布局,表格采用固定表头+滚动内容区设计
|
||||
**响应式要求**:移动端适配时改为纵向堆叠布局,操作按钮组变为纵向排列
|
||||
|
||||
### 三、页面区域详细描述
|
||||
|
||||
#### 1. 页头区域
|
||||
|
||||
**区域位置**:页面顶部
|
||||
**区域尺寸**:高度60px,宽度100%
|
||||
**区域功能**:展示标题和主要操作入口
|
||||
**包含元素**:
|
||||
|
||||
- **标题文本**
|
||||
- 元素类型:H1标题
|
||||
- 显示内容:"手术室列表"
|
||||
- 样式特征:1.75rem/600字重,深灰色(#333)
|
||||
- **新增按钮**
|
||||
- 元素类型:主要操作按钮
|
||||
- 显示内容:"新增"(带+图标)
|
||||
- 交互行为:点击触发新增模态框
|
||||
- 样式特征:蓝色背景(#5a7cff),白色文字,8px圆角,悬停上浮1px
|
||||
|
||||
#### 2. 表格展示区(手术室列表表格)
|
||||
|
||||
**区域位置**:页头下方
|
||||
**区域尺寸**:高度自适应,宽度100%
|
||||
**区域功能**:展示手术室数据并支持行级操作
|
||||
**包含元素**:
|
||||
|
||||
- **数据表格**
|
||||
- 展示方式:固定表头表格
|
||||
- 数据字段:
|
||||
- 房间号:文本 - OR01 - 不可操作
|
||||
- 手术室名称:文本 - 第一手术室 - 不可操作
|
||||
- 类型:文本 - 普通/日间/复合 - 不可操作
|
||||
- 所属科室:文本 - 外科 - 不可操作
|
||||
- 状态:标签 - 有效/无效 - 通过操作按钮切换
|
||||
- 操作功能:每行包含"修改"和"状态切换(停用-黄色/启用-绿色)"按钮
|
||||
- **表格样式**:
|
||||
- 表头:浅灰色背景(#f8f9fa),大写字母,14px字号
|
||||
- 行悬停:浅灰色背景(#f8f9fa)
|
||||
- 状态标签:
|
||||
- 有效:绿色背景+文字(#28a745)
|
||||
- 无效:灰色背景+文字(#6c757d)
|
||||
|
||||
#### 3. 新增手术室弹窗
|
||||
|
||||
**区域位置**:页面居中模态弹窗
|
||||
**区域功能**:收集新增手术室所需信息
|
||||
**包含元素**:
|
||||
|
||||
- 表单字段:
|
||||
1. 房间号输入框
|
||||
2. 类型:文本输入
|
||||
3. 必填:是
|
||||
4. 示例值:OR04
|
||||
5. 校验规则:非空校验
|
||||
6. 手术室名称输入框
|
||||
- 类型:文本输入
|
||||
- 必填:是
|
||||
- 示例值:第四手术室
|
||||
1. 手术室类型下拉框
|
||||
- 类型:单选下拉
|
||||
- 选项:普通/日间/复合/特殊
|
||||
- 默认值:普通
|
||||
1. 所属科室下拉框
|
||||
- 类型:单选下拉
|
||||
- 必填:是
|
||||
- 选项:外科/妇产科等8个科室
|
||||
- 默认提示:"请选择科室"
|
||||
- 操作按钮:
|
||||
- 取消按钮(灰色边框)
|
||||
- 确认按钮(蓝色填充)
|
||||
- 校验逻辑:必填字段非空校验
|
||||
- 成功反馈:提示"手术室添加成功"
|
||||
- 失败反馈:提示"请填写所有必填项"
|
||||
|
||||
#### 4. 编辑手术室弹窗
|
||||
|
||||
**区域位置**:页面居中模态弹窗
|
||||
**区域功能**:修改现有手术室信息
|
||||
**包含元素**:
|
||||
|
||||
- 表单字段(同新增弹窗,带初始值)
|
||||
- 操作按钮:
|
||||
- 取消按钮
|
||||
- 保存按钮
|
||||
- 校验逻辑:同新增弹窗
|
||||
- 成功反馈:提示"手术室信息已更新"
|
||||
|
||||
### 四、交互功能详细说明
|
||||
|
||||
#### 1. 新增手术室
|
||||
|
||||
**功能描述**:添加新的手术室记录
|
||||
**触发条件**:点击页头"新增"按钮
|
||||
**操作流程**:
|
||||
|
||||
1. 打开新增模态框
|
||||
2. 填写必填字段(房间号、名称、科室)
|
||||
3. 点击确认提交(插入his_or_room表)
|
||||
4. 表格末尾新增数据行
|
||||
**异常处理**:
|
||||
- 必填项为空时弹出"请填写所有必填项"提示
|
||||
- 房间号重复需在后端校验并提示
|
||||
|
||||
#### 2. 编辑手术室
|
||||
|
||||
**功能描述**:修改现有手术室信息
|
||||
**触发条件**:点击行内"修改"按钮
|
||||
**操作流程**:
|
||||
|
||||
1. 打开编辑模态框(自动填充当前行数据)
|
||||
2. 用户修改数据
|
||||
3. 点击"保存"时校验并更新对应行数据
|
||||
**状态保持**:记录当前编辑行索引确保数据更新准确
|
||||
|
||||
#### 3. 状态切换
|
||||
|
||||
**功能描述**:启用/停用手术室
|
||||
**触发条件**:点击"停用"或"启用"按钮
|
||||
**操作流程**:
|
||||
|
||||
1. 弹出二次确认对话框
|
||||
2. 用户确认后切换状态标签
|
||||
3. 按钮变为相反操作(停用↔启用)
|
||||
4. 、停用手术室
|
||||
- **步骤**:
|
||||
1. 查询需要停用的手术室记录。
|
||||
2. 将 valid_flag 设置为 0(无效)。
|
||||
- **示例**:
|
||||
|
||||
UPDATE his_or_room
|
||||
|
||||
SET valid_flag = '0'
|
||||
|
||||
WHERE room_code = 'OR06';
|
||||
|
||||
5\. 启用手术室
|
||||
|
||||
**步骤**:
|
||||
|
||||
1. 查询需要启用的手术室记录。
|
||||
1. 将 valid_flag 设置为 1(有效)。
|
||||
- **示例**:
|
||||
|
||||
UPDATE his_or_room
|
||||
|
||||
SET valid_flag = '1'
|
||||
|
||||
WHERE room_code = 'OR06';
|
||||
|
||||
**防误操作**:所有状态变更需二次确认
|
||||
|
||||
### 五、数据结构说明(HIS_OR_ROOM手术室字典表)
|
||||
|
||||
| **字段名称** | **数据类型** | **是否为空** | **说明/典型值** | **外键/来源** |
|
||||
|--------------|--------------|--------------|-----------------|-------------------------------|
|
||||
| room_id | VARCHAR(10) | N | 主键 | 自增主键 |
|
||||
| room_code | VARCHAR(10) | N | 手术室房间号 | 自定义编码,如 OR01、OR02 |
|
||||
| room_name | VARCHAR(100) | N | 手术室名称 | 如 "第一手术室"、"第二手术室" |
|
||||
| room_type | VARCHAR(10) | N | 手术室类型 | 普通、日间、复合 |
|
||||
| dept_code | VARCHAR(10) | N | 所属科室 | FK → 科室管理的科室代码 |
|
||||
| valid_flag | CHAR(1) | N | 是否有效 | 1有效,0无效 |
|
||||
| created_time | DATETIME | N | 创建时间 | 默认当前时间 |
|
||||
| updated_time | DATETIME | N | 更新时间 | 默认当前时间,自动更新 |
|
||||
|
||||
### 六、开发实现要点
|
||||
|
||||
**样式规范**:
|
||||
|
||||
- 主色调:#5a7cff(按钮/交互元素)
|
||||
- 辅助色:#7b8a8b(次要文本)
|
||||
- 字体:
|
||||
- 标题:1.75rem/600字重
|
||||
- 正文:0.875rem/400字重
|
||||
- 间距系统:
|
||||
- 卡片内边距:24px
|
||||
- 表单字段间距:16px
|
||||
|
||||
**技术要求**:
|
||||
|
||||
**注意事项**:
|
||||
|
||||
1. 数据安全:
|
||||
- 所有变更操作需记录操作日志
|
||||
- 停用状态的手术室需在前端标记不可预约
|
||||
2. 性能优化:
|
||||
- 表格数据分页加载
|
||||
- 模态框使用懒加载
|
||||
387
md/需求/95-门诊医生站开立会诊申请单界面PRD_2026-01-15.md
Normal file
387
md/需求/95-门诊医生站开立会诊申请单界面PRD_2026-01-15.md
Normal file
@@ -0,0 +1,387 @@
|
||||
## 门诊医生站开立会诊申请单界面PRD文档
|
||||
|
||||
### 一、页面概述
|
||||
|
||||
**页面名称**:门诊医生站开立会诊申请单界面**页面目标**:帮助门诊医生完成会诊申请单的创建、编辑、提交和作废操作,实现多科室会诊流程的电子化管理**适用场景**:
|
||||
|
||||
1. 门诊医生需要邀请其他科室专家进行会诊时
|
||||
2. 会诊申请单需要修改或补充信息时
|
||||
3. 会诊流程需要跟踪管理时
|
||||
**页面类型**:表单页+列表页复合型界面
|
||||
|
||||
**核心功能**:
|
||||
|
||||
1. 会诊申请单的新增、保存、提交、作废功能
|
||||
2. 会诊科室/专家可视化选择
|
||||
3. 申请单数据表格展示与交互
|
||||
4. 表单数据自动填充与校验
|
||||
5. 申请单打印输出
|
||||
|
||||
**用户价值**:
|
||||
|
||||
- 规范会诊申请流程,减少纸质单据使用
|
||||
- 通过智能填充减少医生重复录入
|
||||
- 实时查看会诊申请状态(新开/已提交/已确认/已签名/已完成/已取消)
|
||||
|
||||
原型图地址:https://static.pm-ai.cn/prototype/20260115/4eb1bd5367f9d5610b32c0ecc6c793f5/index.html
|
||||
|
||||
流程图:
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
%% ---------- 开始 ----------
|
||||
START(["开始"]) --> A["医生进入会诊申请单界面"]
|
||||
|
||||
%% ---------- 操作选择 ----------
|
||||
A --> B{"操作选择"}
|
||||
B -->|"打印"| C["选择已有申请单"]
|
||||
B -->|"提交/取消提交"| D{"校验状态为“已提交”?"}
|
||||
B -->|"删除"| E["弹出确认对话框"]
|
||||
B -->|"结束"| F{"校验状态为“已提交”?"}
|
||||
B -->|"编辑"| G["修改表单内容"]
|
||||
B -->|"新增"| H["清空表单(保留患者信息)"]
|
||||
|
||||
%% ---------- 打印分支 ----------
|
||||
C --> I["高亮选中行"]
|
||||
I --> J["生成打印视图"]
|
||||
J --> K["输出打印样式"]
|
||||
K --> L(["取消"])
|
||||
|
||||
%% ---------- 提交/取消提交分支 ----------
|
||||
D -->|"不通过"| M["提示“请完善必填信息”"]
|
||||
D -->|"通过"| N["更新状态为“已提交/新开”"]
|
||||
|
||||
%% ---------- 删除分支 ----------
|
||||
E --> O{"确认?"}
|
||||
O -->|"是"| P["标记状态为“已取消”"]
|
||||
O -->|"否"| L
|
||||
|
||||
%% ---------- 结束分支 ----------
|
||||
F -->|"不通过"| Q["提示“请先提交申请”"]
|
||||
F -->|"通过"| R["标记状态为“已完成”"]
|
||||
|
||||
%% ---------- 编辑分支 ----------
|
||||
G --> S{"校验必填字段"}
|
||||
S -->|"不通过"| M
|
||||
S -->|"通过"| T["保存到表格"]
|
||||
|
||||
%% ---------- 新增/保存通用路径 ----------
|
||||
H --> U["填写表单"]
|
||||
U --> V["选择会诊科室/专家"]
|
||||
V --> W["自动填充邀请对象"]
|
||||
W --> X["填写病史及目的"]
|
||||
X --> Y["点击保存"]
|
||||
Y --> Z{"校验必填字段"}
|
||||
Z -->|"不通过"| M
|
||||
Z -->|"通过"| AA["生成会诊申请记录"]
|
||||
AA --> AB["保存到表格"]
|
||||
AB --> AC["新增/更新记录"]
|
||||
|
||||
%% ---------- 循环 ----------
|
||||
AC --> A
|
||||
N --> A
|
||||
P --> A
|
||||
R --> A
|
||||
T --> A
|
||||
M --> A
|
||||
Q --> A
|
||||
L --> A
|
||||
```
|
||||
|
||||
### 二、整体布局分析
|
||||
|
||||
**页面宽度**:自适应宽度(主内容区采用7:3比例分割)
|
||||
**主要区域划分**:
|
||||
|
||||
1. 顶部操作栏(48px固定高度)
|
||||
2. 会诊申请单列表区(高度自适应)
|
||||
3. 主内容区(分左右结构,7:3比例)
|
||||
|
||||
- 左侧:会诊申请单表单区
|
||||
- 右侧:会诊科室/专家选择区
|
||||
**布局特点**:响应式上下+左右混合布局,主要对齐方式为左对齐
|
||||
|
||||
### 三、页面区域详细描述
|
||||
|
||||
#### 1. 顶部操作栏区域
|
||||
|
||||
**区域位置**:页面顶部固定位置**区域尺寸**:高度48px,宽度100%**区域功能**:提供全局操作功能入口**包含元素**:
|
||||
|
||||
- **打印按钮**
|
||||
- 元素类型:操作按钮
|
||||
- 显示内容:“打印”
|
||||
- 交互行为:点击后生成A4打印视图,自动适配医院抬头格式
|
||||
- 样式特征:绿色背景(\#13C2C2),圆角4px,32px高度
|
||||
- **新增按钮**
|
||||
- 元素类型:操作按钮
|
||||
- 显示内容:“新增”
|
||||
- 交互行为:点击清空表单(保留当前患者基本信息)
|
||||
- 样式特征:蓝色背景(\#1890FF)
|
||||
- **结束按钮**
|
||||
- 元素类型:危险操作按钮
|
||||
- 显示内容:“结束”
|
||||
- 交互行为:点击结束已提交的会诊流程,标记申请单状态为"已结束",禁用后续操作
|
||||
- 样式特征:红色背景(\#FF4D4F)
|
||||
- 限制条件:需先选中已提交的会诊单
|
||||
- **保存按钮**
|
||||
- 元素类型:主要操作按钮
|
||||
- 显示内容:“保存”
|
||||
- 交互行为:点击保存当前表单数据,校验必填字段后保存至表格,自动生成时间戳
|
||||
- 样式特征:绿色背景(\#52C41A)
|
||||
|
||||
#### 2. 会诊申请单列表区
|
||||
|
||||
**区域位置**:顶部操作栏下方**区域尺寸**:高度自适应,宽度100%**区域功能**:展示当前医生的会诊申请记录**包含元素**:
|
||||
|
||||
- **申请单表格**
|
||||
- 展示方式:带边框表格
|
||||
- 数据字段:
|
||||
|
||||
- 序号:文本 - 自增序号 - 不可操作
|
||||
- 急:布尔 - ✓表示紧急 - 不可操作
|
||||
- 申请单号:文本 - CS20260105001 - 不可操作
|
||||
- 会诊时间:日期 - 2026-01-05 15:08 - 不可操作
|
||||
- 邀请对象:文本 - 吴院长 - 不可操作
|
||||
- 申请科室:文本 - 内科 - 不可操作
|
||||
- 申请医师:文本 - 张医生 - 不可操作
|
||||
- 申请时间:日期 - 2026-01-05 15:08 - 不可操作
|
||||
- 提交状态:布尔 - 复选框 - 仅查看
|
||||
- 结束状态:布尔 - 复选框 - 仅查看
|
||||
- 操作功能:
|
||||
|
||||
- - o 提交/取消提交按钮
|
||||
|
||||
```
|
||||
样式要求:蓝色小按钮,禁用状态显示灰色
|
||||
```
|
||||
|
||||
|
||||
```
|
||||
交互行为:切换提交状态,需二次确认
|
||||
```
|
||||
|
||||
|
||||
```
|
||||
o 删除图标
|
||||
```
|
||||
|
||||
|
||||
```
|
||||
样式要求:红色垃圾桶图标,hover时放大10%
|
||||
```
|
||||
|
||||
|
||||
```
|
||||
交互行为:弹出确认对话框后作废该记录
|
||||
```
|
||||
|
||||
|
||||
[删除]**将状态改为“已取消”****
|
||||
|
||||
UPDATE ConsultationRequest
|
||||
SET ConsultationStatus = 50,cancelnatureDate = <作废会诊时间>
|
||||
WHERE ConsultationID = <会诊申请单ID> and ConsultationStatus <> 40 ;
|
||||
|
||||
- 交互特性:
|
||||
- 行点击选中效果(蓝色高亮+左侧边框)
|
||||
- 行hover浅灰色背景
|
||||
- 提交按钮状态联动(切换提交状态,需二次确认)
|
||||
|
||||
#### 3. 会诊申请单表单区
|
||||
|
||||
**区域位置**:主内容区左侧**区域尺寸**:占主内容区70%宽度**区域功能**:会诊申请单的详细表单填写**包含元素**:
|
||||
|
||||
- **基础信息区**
|
||||
- 申请单号:只读文本,【保存】时自动生成规则CS+年月日时分秒+4位随机数
|
||||
- 申请时间:只读文本,自动获取系统当前时间
|
||||
- 病人信息:病人姓名/性别/年龄/就诊卡号/申请医师/申请科室(不可编辑),自动获取当前患者档案信息。
|
||||
- **会诊信息区**
|
||||
- 会诊时间:时间控件可编辑
|
||||
- 紧急标识:复选框控件
|
||||
- 申请医师:默认当前登录医生
|
||||
- 申请科室:默认当前医生登录的开单科室
|
||||
- 门诊诊断:自动获取医生开立的门诊诊断(主诊断)
|
||||
- **病史及目的**
|
||||
- 多行文本域,最小高度100px
|
||||
- **会诊邀请**
|
||||
- 会诊邀请对象:支持多选(逗号分隔)-》(可从右侧会诊邀请对象选择)
|
||||
- **会诊记录区**
|
||||
- 会诊意见:只读文本域
|
||||
- 会诊确认参加医师:只读字段
|
||||
- 所属医生、代表科室、签名医生、签名时间:只读字段
|
||||
|
||||
#### 4. 会诊邀请对象选择区(侧边栏)
|
||||
|
||||
**区域位置**:主内容区右侧**区域尺寸**:占主内容区30%宽度**区域功能**:快速选择会诊科室和专家**包含元素**:
|
||||
|
||||
- **会诊科室列表**
|
||||
- 展示方式:带边框可滚动列表
|
||||
- 交互行为:选择科室后动态加载对应专家
|
||||
- **会诊专家列表**
|
||||
- 展示方式:带边框可滚动列表
|
||||
- 交互行为:点击专家自动填入会诊邀请对象字段(防重复:已选专家提示"请勿重复选择")
|
||||
- 特殊逻辑:支持多选(自动用逗号分隔)
|
||||
|
||||
### 四、交互功能详细说明
|
||||
|
||||
#### 1. 会诊申请单提交流程
|
||||
|
||||
**功能描述**:完成会诊申请单的提交操作**触发条件**:点击表格行的"提交"按钮**操作流程**:
|
||||
|
||||
1. 医生点击行内"提交"按钮
|
||||
2. 系统校验必填字段(会诊时间、邀请对象)
|
||||
3. 提交状态复选框变为已勾选
|
||||
4. 按钮文字变为"取消提交"
|
||||
5. 禁用该行编辑功能
|
||||
|
||||
【提交】**将状态从“新开”改为“已提交”**
|
||||
|
||||
UPDATE ConsultationRequest
|
||||
SET ConsultationStatus = 10,ConfirmingPhysician = <提交会诊医生姓名> ,ConfirmingPhysicianID = <提交会诊医生ID> ,ConfirmingDate = <提交会诊时间>
|
||||
WHERE ConsultationID = <会诊申请单ID> and ConsultationStatus = 0 ;
|
||||
|
||||
【取消提交】**将状态从“已提交”改为“新开”**
|
||||
|
||||
UPDATE ConsultationRequest
|
||||
SET ConsultationStatus = 0,ConfirmingPhysician = '',ConfirmingPhysicianID = '',ConfirmingDate = ''
|
||||
WHERE ConsultationID = <会诊申请单ID> and ConsultationStatus = 10 ;
|
||||
|
||||
**异常处理**:
|
||||
|
||||
- 必填字段缺失:弹出"请完善会诊时间和邀请对象信息"
|
||||
- 重复提交:提示"该申请已提交,请勿重复操作"
|
||||
|
||||
#### 2. 会诊流程结束功能
|
||||
|
||||
**功能描述**:标记会诊流程已结束**触发条件**:选中已提交的申请单后点击顶部"结束"按钮**操作流程**:
|
||||
|
||||
1. 医生选中已提交的申请单(行高亮)
|
||||
2. 点击顶部"结束"按钮
|
||||
3. 系统校验提交状态为已提交
|
||||
4. 结束状态复选框变为已勾选
|
||||
5. 禁用该行的取消提交功能
|
||||
|
||||
【结束】**将状态从“已签名”改为“已完成”**
|
||||
|
||||
UPDATE ConsultationRequest
|
||||
SET ConsultationStatus = 40,Signature = <结束会诊医生姓名> ,SignatureDate=<结束会诊时间>
|
||||
WHERE ConsultationID = <会诊申请单ID> and ConsultationStatus = 30 ;
|
||||
|
||||
**异常处理**:
|
||||
|
||||
- 未选中记录:提示"请先选择要结束的会诊申请"
|
||||
- 未提交记录:提示"请先提交该会诊申请"
|
||||
|
||||
#### 3. 申请单保存功能
|
||||
|
||||
**功能描述**:保存会诊申请单数据**触发条件**:点击顶部"保存"按钮**操作流程**:
|
||||
|
||||
1. 系统自动生成申请单号(如为空)
|
||||
2. 保存当前表单所有字段值
|
||||
3. 新增记录插入表格末尾
|
||||
4. 已有记录更新对应行数据
|
||||
|
||||
【保存】
|
||||
|
||||
①、写入门诊医嘱表(医嘱状态为新开,医嘱名称为"门诊会诊")
|
||||
|
||||
②、写入门诊会诊申请单表(ConsultationRequest)
|
||||
|
||||
**数据校验**:
|
||||
|
||||
- 必填字段:病人姓名、会诊时间、申请科室、会诊时间、会诊邀请对象、简要病史及会诊目的
|
||||
- 未选会诊对象:提示"请至少选择1位会诊专家"
|
||||
- 过期时间:提示"会诊时间不能早于当前时间"
|
||||
|
||||
#### 4. 会诊邀请对象选择联动
|
||||
|
||||
**触发方式**:点击科室列表项
|
||||
**数据联动**:
|
||||
|
||||
1. 根据选中会诊科室过滤会诊专家列表
|
||||
2. 记忆已选专家(跨科室切换时不丢失)
|
||||
|
||||
**技术要点**:
|
||||
|
||||
- 使用对象存储会诊科室-会诊专家映射关系
|
||||
- 采用事件委托处理动态生成的列表项
|
||||
|
||||
### 五、数据结构说明
|
||||
|
||||
门诊会诊申请单表(ConsultationRequest)
|
||||
|
||||
|
||||
| **字段名称** | **数据类型** | **长度** | **描述** | **取值范围** |
|
||||
|-----------------------------| ------------ | -------- |----------------| --------------------------------------------------------- |
|
||||
| **PatientID** | Text | 20 | 患者唯一标识 | 患者就诊卡号 (取值患者档案) |
|
||||
| **ConsultationID** | Text | 20 | 会诊申请单唯一标识 | 系统自动生成的唯一编号,生成规则CS+年月日时分秒+4位随机数 |
|
||||
| **VisitID** | BIGINT | 20 | 门诊就诊流水号(逻辑外键) | 取值于本次门诊就诊记录表的主键 |
|
||||
| **OrderID** | BIGINT | 20 | 门诊医嘱表主键(一对一外键) | 门诊医嘱表 |
|
||||
| **PatientName** | Text | 50 | 患者姓名 | 患者的姓名 (取值患者档案) |
|
||||
| **Gender** | Text | 10 | 患者性别 | 男/女/其他 (取值患者档案) |
|
||||
| **Age** | Integer | - | 患者年龄 | 取值患者档案 |
|
||||
| **Department** | Text | 50 | 申请会诊的科室 | 当前科室名称 |
|
||||
| **RequestingPhysician** | Text | 50 | 申请会诊的医生 | 当前医生姓名 |
|
||||
| **ConsultationrequestDate** | DateTime | - | 会诊申请时间 | YYYY-MM-DD HH:MM:SS
|
||||
| **ConsultationPurpose** | Text | 255 | 简要病史及会诊目的 | 文本描述,自定义编辑 |
|
||||
| **ProvisionalDiagnosis** | Text | 255 | 门诊诊断 | 文本描述,自动获取医生开立的门诊诊断(主诊断) |
|
||||
| **ConsultationDate** | DateTime | - | 会诊时间 | YYYY-MM-DD HH:MM:SS |
|
||||
| **ConsultationStatus** | Text | 20 | 会诊状态 | 新开/已提交/已确认/已签名/已完成/已取消 |
|
||||
| **ConsultationUrgency** | Text | 20 | 是否紧急 | 勾选框:一般/紧急 |
|
||||
| **ConsultationOpinion** | Text | 255 | 会诊意见 | 文本描述 |
|
||||
| **ConfirmingPhysician** | Text | 50 | 提交会诊的医生 | 医生姓名 |
|
||||
| **ConfirmingPhysicianID** | Text | 20 | 提交会诊的医生ID | 医生唯一标识 |
|
||||
| **ConfirmingDate** | DateTime | - | 提交会诊日期 | YYYY-MM-DD HH:MM:SS |
|
||||
| **Signature** | Text | 50 | 结束会诊医生 | 医生姓名 |
|
||||
| **SignatureDate** | DateTime | - | 结束会诊日期 | YYYY-MM-DD HH:MM:SS |
|
||||
| **cancelnatureDate** | DateTime | - | 作废会诊日期 | YYYY-MM-DD HH:MM:SS |
|
||||
| InvitedObject | Text | 50 | 会诊邀请对象 | |
|
||||
|
||||
**诊状态用于记录会诊申请在不同阶段的状态,以下是常见的会诊状态及其说明:**
|
||||
|
||||
|
||||
| **状态名称** | **状态值** | **描述** |
|
||||
| ------------ | ---------- | ---------------------------------------------------------------------- |
|
||||
| **新开** | 0 | 会诊申请单已保存 |
|
||||
| **已提交** | 10 | 会诊申请已提交,但尚未被会诊医生确认。 |
|
||||
| **已确认** | 20 | 会诊医生已确认会诊申请,并准备进行会诊。 |
|
||||
| **已签名** | 30 | 会诊完成后进行签名 |
|
||||
| **已完成** | 40 | 会诊已经完成,会诊意见已记录。 |
|
||||
| **已取消** | 50 | 会诊申请被取消,可能由于患者情况变化或其他原因,申请医生进行作废操作。 |
|
||||
|
||||
**门诊医嘱表在相关会诊操作步骤的相关事务**
|
||||
|
||||
把“门诊会诊申请”当成**一种特殊医嘱**(OrderType = 'Consult')由系统**在同一事务内**自动插入 门诊医嘱表,再挂到 `ConsultationRequest` **注意:按照现有系统的门诊医嘱表进行设置相关字段的值**
|
||||
|
||||
|
||||
| **节点** | **是否自动** | **说明** |
|
||||
| --------------------- | ------------ | --------------------------------------------------------------------------------------------------- |
|
||||
| 医生点击【保存】 | ✅ | 后台事务:先插门诊医嘱表(医嘱状态为“新开”),再插`ConsultationRequest`.Status=0 |
|
||||
| 医生点击【提交】 | ✅ | 仅更新两表状态 → 门诊医嘱表的医嘱状态和`ConsultationRequest.Status=10` (已提交),不重复生成医嘱 |
|
||||
| 医生点击【作废/删除】 | ✅ | 自动将门诊医嘱表的医嘱状态字段置为“作废”,级联`ConsultationRequest.Status=50` |
|
||||
| 医生点击【结束】 | ✅ | 将 门诊医嘱表的医嘱状态字段置为“已完成”,同时写`ConsultationRequest.Status=40` |
|
||||
|
||||
### 六、开发实现要点
|
||||
|
||||
**样式规范**:
|
||||
|
||||
- **主色调**:\#1890FF(操作按钮)
|
||||
- **辅助色**:\#13C2C2(打印)、\#52C41A(保存)、\#FF4D4F(结束)
|
||||
- **字体规范**:14px/1.5,中文字体优先使用"PingFang SC"
|
||||
- **间距系统**:16px基准,表单行间距12px
|
||||
- **组件样式**:
|
||||
- 按钮:4px圆角,32px高度
|
||||
- 输入框:4px圆角,1px \#D9D9D9边框
|
||||
- 表格行:选中状态\#E6F7FF背景+左侧3px蓝色边框
|
||||
|
||||
**技术要求**:
|
||||
|
||||
- **浏览器兼容**:支持Chrome/Firefox/Edge最新版
|
||||
- **性能要求**:表单提交响应时间\<1秒
|
||||
|
||||
**注意事项**:
|
||||
|
||||
1. 时间字段需统一处理为YYYY-MM-DD HH:mm:ss格式
|
||||
2. 申请单号生成需加锁防止重复
|
||||
3. 移动端需优化表格横向滚动体验
|
||||
4. 打印功能需特殊样式处理(隐藏操作按钮)
|
||||
310
md/需求/96-门诊医生站会诊申请确认界面_2026-01-15.md
Normal file
310
md/需求/96-门诊医生站会诊申请确认界面_2026-01-15.md
Normal file
@@ -0,0 +1,310 @@
|
||||
## 门诊医生站会诊申请确认界面PRD文档
|
||||
|
||||
### 一、页面概述
|
||||
|
||||
**页面名称**:门诊医生站会诊申请确认界面
|
||||
**页面目标**:帮助医生完成会诊申请的确认、签名和打印操作,展示会诊申请详细信息
|
||||
**适用场景**:医生在收到会诊申请后,查看申请信息并给出会诊意见
|
||||
**页面类型**:表单页+列表页复合型页面
|
||||
|
||||
**核心功能**:
|
||||
|
||||
1. 会诊申请单列表展示与选择
|
||||
2. 会诊确认与取消确认功能
|
||||
3. 签名功能
|
||||
4. 会诊记录单打印
|
||||
5. 会诊意见编辑与保存
|
||||
|
||||
**用户价值**:
|
||||
|
||||
- 规范会诊申请流程
|
||||
- 电子化确认和签名提高效率
|
||||
- 完整记录会诊意见便于后续诊疗
|
||||
- 打印功能满足纸质存档需求
|
||||
**原型图地址:**https://static.pm-ai.cn/prototype/20260115/7c45e175239257e0f04c9081bf2ca204/index.html
|
||||
**流程图:**
|
||||
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
Start(["医生进入会诊申请确认界面"]) --> LoadList["加载会诊申请列表"]
|
||||
LoadList --> HasUntreated{"是否有未处理申请?"}
|
||||
|
||||
HasUntreated -- "否" --> ShowNoTip["显示无申请提示"]
|
||||
HasUntreated -- "是" --> SelectApp["医生选择会诊申请"]
|
||||
|
||||
SelectApp --> ShowDetail["显示会诊申请详情"]
|
||||
ShowDetail --> EditOpinion["医生编辑会诊意见"]
|
||||
|
||||
EditOpinion --> ConfirmClick{"点击确认按钮?"}
|
||||
ConfirmClick -- "否" --> SignClick{"点击签名按钮?"}
|
||||
ConfirmClick -- "是" --> ValidateConfirm{"校验必填字段"}
|
||||
|
||||
ValidateConfirm -- "不通过" --> TipFill["提示\n请先填写会诊意见"]
|
||||
ValidateConfirm -- "通过" --> CheckConfirmed{"是否已确认?"}
|
||||
|
||||
CheckConfirmed -- "是" --> UpdateConfirmed["更新状态为\n已确认"]
|
||||
UpdateConfirmed --> AutoFill["自动填充医生科室信息"]
|
||||
AutoFill --> DisableCancel["禁用取消确认功能"]
|
||||
|
||||
CheckConfirmed -- "否" --> KeepState["保持当前状态"]
|
||||
|
||||
SignClick -- "否" --> PrintClick{"点击打印按钮?"}
|
||||
SignClick -- "是" --> ValidateSign{"校验通过?"}
|
||||
|
||||
ValidateSign -- "不通过" --> TipConfirmFirst["提示\n请先确认会诊申请"]
|
||||
ValidateSign -- "通过" --> UpdateSigned["更新状态为\n已签名"]
|
||||
UpdateSigned --> RecordSign["记录签名医生和时间"]
|
||||
|
||||
PrintClick -- "否" --> RefreshClick{"点击刷新按钮?"}
|
||||
PrintClick -- "是" --> GenPrintView["生成打印优化视图"]
|
||||
GenPrintView --> BrowserPrint["调用浏览器打印功能"]
|
||||
|
||||
RefreshClick -- "是" --> LoadList
|
||||
RefreshClick -- "否" --> KeepState
|
||||
|
||||
TipFill --> EditOpinion
|
||||
TipConfirmFirst --> EditOpinion
|
||||
KeepState --> End(["结束"])
|
||||
BrowserPrint --> End
|
||||
DisableCancel --> End
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
### 二、整体布局分析
|
||||
|
||||
**页面宽度**:自适应布局
|
||||
**主要区域划分**:
|
||||
|
||||
1. 顶部标签导航(高度48px)
|
||||
2. 操作按钮区(高度36px+间距)
|
||||
3. 会诊申请列表区(高度自适应)
|
||||
4. 会诊记录单表单区(高度自适应)
|
||||
**布局特点**:上下布局,采用网格系统对齐,左侧对齐为主
|
||||
|
||||
### 三、页面区域详细描述
|
||||
|
||||
#### 1. 顶部标签导航区域
|
||||
|
||||
**区域位置**:页面顶部
|
||||
**区域尺寸**:高度48px,宽度100%
|
||||
**区域功能**:页面导航标识
|
||||
**包含元素**:
|
||||
|
||||
- **会诊确认标签**
|
||||
- 元素类型:文本标签
|
||||
- 显示内容:“会诊确认”
|
||||
- 交互行为:无点击交互(当前页面)
|
||||
- 样式特征:蓝色下划线,16px字体,700字重
|
||||
|
||||
#### 2. 操作按钮区域
|
||||
|
||||
**区域位置**:标签导航下方
|
||||
**区域尺寸**:高度36px,宽度100%
|
||||
**区域功能**:提供页面主要操作入口
|
||||
**包含元素**:
|
||||
|
||||
- **打印按钮**
|
||||
- 元素类型:操作按钮
|
||||
- 显示内容:“打印”
|
||||
- 交互行为:点击触发打印会诊记录单
|
||||
- 样式特征:绿色背景,白色文字,圆角6px
|
||||
- **刷新按钮**
|
||||
- 元素类型:操作按钮
|
||||
- 显示内容:“刷新”
|
||||
- 交互行为:点击重新加载页面数据
|
||||
- 样式特征:白色背景,灰色边框,黑色文字
|
||||
- **确认按钮**
|
||||
- 元素类型:状态切换按钮
|
||||
- 显示内容:“确认”/“取消确认”
|
||||
- 交互行为:
|
||||
- 点击后变为"取消确认"状态(红色样式)
|
||||
- 已签名时禁用取消操作
|
||||
- 样式特征:蓝色背景,白色文字
|
||||
- 限制条件:需选中表格行才可操作
|
||||
- **签名按钮**
|
||||
- 元素类型:操作按钮
|
||||
- 显示内容:“签名”
|
||||
- 交互行为:
|
||||
- 需先确认才能签名
|
||||
- 签名后自动记录签名时间和签名医生
|
||||
- 样式特征:蓝色背景,白色文字
|
||||
- 限制条件:需先完成确认操作
|
||||
|
||||
#### 3. 会诊申请列表区域
|
||||
|
||||
**区域位置**:按钮区域下方
|
||||
**区域尺寸**:高度自适应,宽度100%
|
||||
**区域功能**:展示待处理的会诊申请列表
|
||||
**包含元素**:
|
||||
|
||||
- **申请列表表格** (取值于门诊会诊申请单表(ConsultationRequest))
|
||||
- 检索要求:医生登录门诊医生站打开会诊申请确认界面时只能检索出当前登录医生姓名包含在会诊邀请对象内(只能查看自己受会诊邀请对象)
|
||||
- 展示方式:带斑马纹表格
|
||||
- 表头字段:
|
||||
- 序号 \| 紧急 \| 申请单号 \| 病人姓名 \| 会诊时间 \| 邀请对象 \| 申请科室 \| 申请医师 \| 申请时间 \| 确认 \| 签名
|
||||
- 数据字段:
|
||||
- 序号:文本 - 自动编号 - “1” - 不可操作
|
||||
- 紧急:复选框 - 布尔值 - 未勾选 - 可操作
|
||||
- 申请单号:文本 - 字符串 - “CS20250812001” - 不可操作
|
||||
- 病人姓名:文本 - 字符串 - “陈明” - 不可操作
|
||||
- 会诊时间:日期 - 日期时间 - “2025-08-12 17:48” - 不可操作
|
||||
- 邀请对象:文本 - 字符串 - “演示测试” - 不可操作
|
||||
- 申请科室:文本 - 字符串 - “内科” - 不可操作
|
||||
- 申请医师:文本 - 字符串 - “徐斌” - 不可操作
|
||||
- 申请时间:日期 - 日期时间 - “2025-08-12 17:48” - 不可操作
|
||||
- 确认:复选框 - 布尔值 - 勾选框 – 不可操作
|
||||
- 签名:复选框 - 布尔值 - 勾选框 – 不可操作
|
||||
- 操作功能:点击行选中查看会诊申请详情
|
||||
- 样式特征:斑马纹交替背景,悬停高亮
|
||||
|
||||
#### 4. 会诊记录单表单区域
|
||||
|
||||
**区域位置**:列表区域下方
|
||||
**区域尺寸**:高度自适应,宽度100%
|
||||
**区域功能**:展示和编辑会诊详细信息
|
||||
**包含元素**:
|
||||
|
||||
- **基础信息区**
|
||||
- 布局方式:8列网格
|
||||
- 包含字段:
|
||||
- 病人姓名/性别/年龄/就诊卡号
|
||||
- 申请单号/申请科室
|
||||
- 会诊时间/紧急标志
|
||||
- 会诊邀请对象
|
||||
- 提交医生/提交时间
|
||||
- **病史及目的区**
|
||||
- 元素类型:文本区域
|
||||
- 显示内容:患者主诉和会诊目的
|
||||
- 交互行为:只读展示
|
||||
- **会诊确认参加医师**
|
||||
- **会诊意见区**
|
||||
- 元素类型:可编辑文本域
|
||||
- 显示内容:会诊意见文本
|
||||
- 交互行为:支持多行编辑
|
||||
- 样式特征:浅灰色背景,120px最小高度
|
||||
- **确认/签名信息区**
|
||||
- 包含字段:
|
||||
- 所属医生/代表科室(确认后自动填充当前医生和科室)
|
||||
- 签名医生/签名时间(自动填充签名医生和签名时间(系统当前时间))
|
||||
|
||||
### 四、交互功能详细说明
|
||||
|
||||
#### 1. 会诊申请选择功能
|
||||
|
||||
**触发方式**:点击表格行
|
||||
**执行流程**:
|
||||
|
||||
1. 高亮选中行(浅蓝色背景)
|
||||
2. 同步该行数据到下方表单
|
||||
3. 根据确认状态更新按钮文字
|
||||
4. 加载存储的会诊意见到文本域
|
||||
|
||||
**异常处理**:
|
||||
|
||||
- 无选中行时禁用确认/签名按钮
|
||||
- 已签名行禁止取消确认
|
||||
|
||||
#### 2. 会诊确认功能
|
||||
|
||||
**触发方式**:点击确认按钮
|
||||
|
||||
**执行流程**:
|
||||
|
||||
1. 校验必填字段(会诊意见、会诊确认参加医师)
|
||||
2. 保存会诊意见等相关内容到行数据(写入门诊会诊申请确认表(ConsultationConfirmation))
|
||||
3. 勾选确认复选框
|
||||
4. 更新按钮为"取消确认"状态
|
||||
5. 所属医生和代表科室(自动填充当前医生和科室)
|
||||
|
||||
**异常处理**:
|
||||
|
||||
- 未填写会诊意见时提示"请先填写会诊意见"
|
||||
- 保存失败时保持原状态并提示错误
|
||||
|
||||
#### 2. 电子签名功能
|
||||
|
||||
**功能描述**:医生对确认的会诊进行电子签名
|
||||
**触发条件**:已确认的会诊申请点击"签名"按钮
|
||||
**操作流程**:
|
||||
|
||||
1. 医生确认会诊申请
|
||||
2. 点击"签名"按钮
|
||||
3. 校验确认状态
|
||||
4. 表格中"签名"列复选框被勾选
|
||||
5. 自动记录签名医生(当前用户)
|
||||
6. 自动填充签名时间为系统时间
|
||||
7. 禁用取消确认功能
|
||||
**成功反馈**:表单区显示签名信息
|
||||
**失败处理**:提示"请先确认会诊申请"
|
||||
|
||||
#### 3. 打印会诊记录单
|
||||
|
||||
**功能描述**:打印格式化的会诊记录
|
||||
**触发条件**:点击"打印"按钮
|
||||
**操作流程**:
|
||||
|
||||
1. 点击"打印"按钮
|
||||
2. 系统生成打印优化视图
|
||||
3. 调用浏览器打印功能
|
||||
**特殊处理**:隐藏交互元素,优化打印布局
|
||||
|
||||
### 五、数据结构说明
|
||||
|
||||
**门诊会诊申请确认表(**ConsultationConfirmation**)**
|
||||
|
||||
| **字段名称** | **数据类型** | **长度** | **描述** | **约束/说明** |
|
||||
|-----------------------------|--------------|----------|--------------------|------------------------------------------------------------------------------------|
|
||||
| **ConsultationID** | INTEGER | 20 | 会诊申请单唯一标识 | FOREIGN KEY REFERENCES ConsultationRequest(ConsultationID) |
|
||||
| **ConfirmingPhysicianID** | TEXT | -20 | 确认会诊的医生ID | 操作【确认】按钮的当前医生ID |
|
||||
| **ConfirmingPhysicianName** | TEXT | -20 | 确认会诊的医生姓名 | 操作【确认】按钮的当前医生姓名 |
|
||||
| **ConfirmingDeptName** | TEXT | 20 | 代表科室 | 操作【确认】按钮的当前开单科室 |
|
||||
| **ConfirmingDate** | DateTime | - | 确认会诊的日期 | 操作【确认】按钮当前系统时间 |
|
||||
| **ConsultationStatus** | TEXT | 20 | 会诊状态 | CHECK (ConsultationStatus IN ('已确认', '取消确认', '已签名', '已完成')), NOT NULL |
|
||||
| **ConsultationOpinion** | TEXT | 500 | 会诊意见 | |
|
||||
| **ConfirmingPhysician** | TEXT | 100 | 会诊确认参加医师 | |
|
||||
| **Signature** | TEXT | 20 | 签名医生 | |
|
||||
| **SignatureDate** | DateTime | - | 签名时间 | - |
|
||||
|
||||
ConsultationConfirmation.ConsultationStatu会诊状态
|
||||
|
||||
| **状态值** | **状态名** | **描述** |
|
||||
|------------|------------|-----------------------------------|
|
||||
| **0** | 取消确认 | 作废 |
|
||||
| **20** | 已确认 | 会诊医生已查看/同意,可写初步意见 |
|
||||
| **30** | 已签名 | 已电子签名,意见最终生效 |
|
||||
| **40** | 已完成 | 会诊报告已回写,流程关闭 |
|
||||
|
||||
**按钮涉及的事务**
|
||||
|
||||
| **按钮** | **涉及表** | **执行事务** | **锁/并发** | **成功状态** | **失败处理** |
|
||||
|--------------|----------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|------------------|--------------------------|
|
||||
| **确认** | 1、ConsultationRequest<br>2、门诊医嘱<br>3、ConsultationConfirmation | 1、ConsultationRequest.ConsultationStatus =20<br>2、医嘱 状态='已执行'<br>3、写入ConsultationConfirmation表相关的数据 | SELECT ... FOR UPDATE | 已提交 → 已确认 | 任何异常 → 整体 ROLLBACK |
|
||||
| **取消确认** | 1、ConsultationRequest<br>2、门诊医嘱<br>3、ConsultationConfirmation | 1、ConsultationRequest.ConsultationStatus =10<br>2、医嘱 状态='已提交'<br>3、ConsultationConfirmation. ConsultationStatus = 0 | 同上 | 已确认→ 取消确认 | 同上回滚 |
|
||||
| **签名** | 1、ConsultationRequest<br>2、门诊医嘱<br>3、ConsultationConfirmation | 1、ConsultationRequest.ConsultationStatus =30<br>2、医嘱 Status='已完成'<br>3、写入ConsultationConfirmation. Signature, SignatureDate,ConsultationStatus =30 | 同上 | 已确认 → 已签名 | 同上回滚 |
|
||||
|
||||
### 六、开发实现要点
|
||||
|
||||
**样式规范**:
|
||||
|
||||
- **主色调**:\#4A89DC(按钮蓝色)
|
||||
- **辅助色**:\#4CAF50(成功绿色)
|
||||
- **字体规范**:14px/1.5 常规,16px 标题
|
||||
- **间距系统**:8px基础间距,24px区块间距
|
||||
- **组件样式**:
|
||||
- 按钮:6px圆角,1px边框
|
||||
- 输入框:4px圆角,1px \#E0E0E0边框
|
||||
|
||||
**技术要求**:
|
||||
|
||||
- **浏览器兼容**:Chrome/Firefox/Edge最新版
|
||||
- **性能要求**:列表加载时间\<1s
|
||||
|
||||
**注意事项**:
|
||||
|
||||
1. 确认和签名状态需要联动控制
|
||||
2. 打印功能需要特殊样式处理
|
||||
3. 时间字段需统一使用YYYY-MM-DD HH:mm:ss格式
|
||||
4. 移动端需优化表单布局
|
||||
267
md/需求/97-门诊会诊申请管理界面_2026-1-19.md
Normal file
267
md/需求/97-门诊会诊申请管理界面_2026-1-19.md
Normal file
@@ -0,0 +1,267 @@
|
||||
## 门诊会诊申请管理界面PRD文档
|
||||
|
||||
### 一、页面概述
|
||||
|
||||
**页面名称**:门诊会诊申请管理界面
|
||||
**页面目标**:提供会诊申请的全流程管理功能,包括申请记录查询、编辑申请、查看详情、状态变更等核心操作
|
||||
**适用场景**:门诊医生需要查看会诊申请或管理已有申请记录时使用
|
||||
**页面类型**:列表页+表单弹窗复合型页面
|
||||
|
||||
**核心功能**:
|
||||
|
||||
1. 多条件组合筛选会诊申请记录
|
||||
2. 会诊申请表格展示与操作(编辑/查看/删除)
|
||||
3. 会诊申请单的填写与提交
|
||||
4. 会诊状态标记(提交/结束)
|
||||
**用户价值**:规范会诊申请流程,减少纸质单据流转,提高多科室协作效率
|
||||
原型图地址:https://static.pm-ai.cn/prototype/20260116/aed1f102d614677f100c0d1fe3104999/index.html
|
||||
**流程图:**
|
||||
```mermaid
|
||||
flowchart TD
|
||||
Start([Start]) --> A[进入门诊会诊申请管理界面]
|
||||
A --> B{用户操作类型}
|
||||
B -->|筛选查询| C[设置筛选条件]
|
||||
B -->|编辑申请| D[点击编辑按钮]
|
||||
B -->|查看详情| E[点击查看按钮]
|
||||
B -->|删除申请| G[点击删除按钮]
|
||||
|
||||
C --> H{验证筛选条件}
|
||||
H -->|有效| I[展示筛选结果]
|
||||
H -->|无效| J[显示错误提示]
|
||||
J --> C
|
||||
|
||||
I --> K[用户浏览列表]
|
||||
|
||||
D --> L{检查会诊状态}
|
||||
L -->|未结束| M[打开编辑弹窗]
|
||||
L -->|已结束| N[提示不可编辑]
|
||||
N --> O[关闭弹窗]
|
||||
|
||||
M --> P[修改表单内容]
|
||||
P --> Q{表单验证}
|
||||
Q -->|通过| R[保存修改]
|
||||
Q -->|不通过| S[标红错误字段]
|
||||
S --> P
|
||||
|
||||
E --> T{检查会诊状态}
|
||||
T -->|未结束| U[打开只读弹窗]
|
||||
T -->|已结束| U
|
||||
|
||||
G --> Z{删除验证}
|
||||
Z -->|可删除| AA[确认删除]
|
||||
Z -->|不可删除| AB[提示删除失败]
|
||||
AB --> K
|
||||
|
||||
AA --> AC[更新状态为已取消]
|
||||
AC --> AD[更新列表显示]
|
||||
|
||||
R --> AD
|
||||
AD --> K
|
||||
K --> AE([End])
|
||||
```
|
||||
|
||||
### 二、整体布局分析
|
||||
|
||||
**页面宽度**:自适应布局
|
||||
**主要区域划分**:
|
||||
|
||||
1. 顶部筛选区(高度自适应,约80px)
|
||||
2. 表格展示区(高度自适应,占主要空间)
|
||||
3. 底部页码区(固定高度56px)
|
||||
**布局特点**:上下布局+弹性布局,采用左右对齐方式
|
||||
|
||||
### 三、页面区域详细描述
|
||||
|
||||
#### 1. 顶部筛选区
|
||||
|
||||
**区域位置**:页面顶部
|
||||
**区域尺寸**:100%宽度,高度自适应
|
||||
**区域功能**:提供多维度筛选和快速搜索功能
|
||||
**包含元素**:
|
||||
|
||||
- **时间类型选择器**
|
||||
- 元素类型:下拉选择框
|
||||
- 显示内容:默认"会诊时间",可选"申请时间"
|
||||
- 交互行为:点击展开下拉选项
|
||||
- 样式特征:宽度120px,高度32px,圆角4px
|
||||
- **时间范围选择器**(开始/结束时间)
|
||||
- 元素类型:日期时间输入框
|
||||
- 显示内容:placeholder提示"开始时间"/“结束时间”
|
||||
- 交互行为:点击弹出日期选择面板
|
||||
- 样式特征:宽度180px,高度32px
|
||||
- **申请科室/申请医生选择器**
|
||||
- 元素类型:带datalist的输入框
|
||||
- 显示内容:placeholder提示"选择或输入科室/医生"
|
||||
- 交互行为:输入时显示匹配选项
|
||||
- 数据来源:动态生成申请科室/医生候选列表,取值于门诊会诊申请单表(ConsultationRequest.Department/ RequestingPhysician)
|
||||
- **会诊状态筛选器**
|
||||
- 元素类型:下拉选择框
|
||||
- 可选值:全部/未提交/提交/结束
|
||||
- 默认值:全部
|
||||
- **病人姓名搜索框**
|
||||
- 元素类型:文本输入框
|
||||
- 显示内容:placeholder提示"病人姓名"
|
||||
- 交互行为:支持模糊搜索
|
||||
- **操作按钮组**
|
||||
- 查询按钮
|
||||
- 样式:蓝色背景,带搜索图标
|
||||
- 交互:触发筛选条件应用
|
||||
- 重置按钮
|
||||
- 样式:灰色背景,带刷新图标
|
||||
- 交互:清空所有筛选条件
|
||||
- 打印按钮
|
||||
- 样式:深灰色背景,带打印图标
|
||||
- 交互:调起浏览器打印功能
|
||||
|
||||
#### 2. 表格展示区
|
||||
|
||||
**区域位置**:页面中部
|
||||
**区域尺寸**:100%宽度,高度自适应
|
||||
**区域功能**:展示会诊申请列表数据,支持行内操作
|
||||
**包含元素**:
|
||||
|
||||
取值于门诊会诊申请单表(ConsultationRequest)和门诊会诊申请单表(ConsultationRequest)
|
||||
|
||||
- **数据表格**
|
||||
- 展示方式:11列固定表头表格
|
||||
- 数据字段:
|
||||
- ID:文本 - 15 -申请单号
|
||||
- 急:复选框 - 布尔值 - 示例false – 不可编辑
|
||||
- 病人姓名:文本 - 朱某某 - 红色高亮
|
||||
- 会诊时间:日期 - 2026-01-05 15:08
|
||||
- 申请科室:文本 - 内科
|
||||
- 邀请对象:文本 - 吴院长
|
||||
- 申请时间:日期 - 2026-01-05 15:08
|
||||
- 申请医师:文本 - 演示测试
|
||||
- 提交:复选框 - 布尔值 - 示例false
|
||||
- 结束:复选框 - 布尔值 - 示例false
|
||||
- 操作功能:
|
||||
- 编辑按钮(✏️):点击打开编辑弹窗
|
||||
- 查看按钮(👁️):点击打开只读弹窗
|
||||
- 删除按钮(🗑️):点击确认删除
|
||||
- 【删除】将状态改为“已取消”
|
||||
- UPDATE ConsultationRequest
|
||||
- SET ConsultationStatus = 50,cancelnatureDate = \<作废会诊时间\>
|
||||
- WHERE ConsultationID = \<会诊申请单ID\> and ConsultationStatus \<\> 40 ;
|
||||
- 交互行为:
|
||||
- 行悬停效果:浅蓝色背景
|
||||
- 复选框点击:即时更新状态(需防抖处理)
|
||||
|
||||
#### 3. 底部页码区
|
||||
|
||||
**区域位置**:页面底部
|
||||
**区域尺寸**:100%宽度,固定高度56px
|
||||
**区域功能**:分页控制和数据统计
|
||||
**包含元素**:
|
||||
|
||||
- **总数统计**:总数统计文本(如:“总数:15”)
|
||||
- **分页控制器**:
|
||||
- 上一页按钮(\<)
|
||||
- 当前页按钮(1)active状态
|
||||
- 下一页按钮(\>)
|
||||
- 交互反馈:hover时边框变蓝
|
||||
|
||||
#### 4. 会诊申请弹窗(模态框)
|
||||
|
||||
**触发方式**:点击表格行操作列的编辑/查看按钮
|
||||
**区域功能**:展示/编辑会诊申请详细信息
|
||||
**包含元素**:
|
||||
|
||||
- 头部区域
|
||||
- 标题:“会诊申请单”
|
||||
- 关闭按钮(×图标)
|
||||
- 表单区域(分两栏布局)
|
||||
- 基础信息区:
|
||||
- 申请单号(只读)
|
||||
- 申请时间(不可编辑)
|
||||
- 病人姓名(不可编辑)
|
||||
- 性别/年龄(不可编辑)
|
||||
- 就诊卡号(不可编辑)
|
||||
- 会诊信息区:
|
||||
- 会诊时间(日期时间选择器)
|
||||
- 申请医师(不可编辑)
|
||||
- 紧急程度(复选框)
|
||||
- 申请科室(不可编辑)
|
||||
- 门诊诊断(不可编辑)
|
||||
- 会诊邀请对象
|
||||
- 会诊确认参加医师
|
||||
- 所属医生
|
||||
- 代表科室
|
||||
- 签名医生
|
||||
- 签名时间
|
||||
- 文本域:
|
||||
- 病史及会诊目的(多行文本)
|
||||
- 会诊意见(多行文本)
|
||||
- 底部按钮区:
|
||||
- 取消按钮(左对齐)
|
||||
- 保存按钮(右对齐,蓝色)
|
||||
|
||||
### 四、交互功能详细说明
|
||||
|
||||
#### 1. 会诊申请编辑功能
|
||||
|
||||
**功能描述**:修改已有会诊申请信息
|
||||
**触发条件**:点击表格行中的"✏️"按钮
|
||||
**操作流程**:
|
||||
|
||||
1. 检查会诊状态是否为"结束",若已结束则提示不可编辑
|
||||
2. 弹出会诊申请编辑弹窗,填充当前行数据的会诊申请和确认相关的数据
|
||||
3. 用户修改表单内容(必填字段校验)
|
||||
4. 点击"保存"按钮提交修改
|
||||
**异常处理**:
|
||||
- 必填字段为空时,标红提示
|
||||
- 保存失败时显示toast提示"保存失败,请重试"
|
||||
|
||||
#### 2. 会诊申请查看功能
|
||||
|
||||
**功能描述**:查看会诊申请详细信息
|
||||
**触发条件**:点击表格行中的"👁️"按钮
|
||||
**操作流程**:
|
||||
|
||||
1. 弹出只读弹窗,显示完整申请信息
|
||||
2. 所有字段禁用编辑
|
||||
3. 仅显示"取消"按钮用于关闭弹窗
|
||||
|
||||
#### 3. 数据筛选功能
|
||||
|
||||
**功能描述**:多条件组合查询会诊记录
|
||||
**触发条件**:点击"查询"按钮
|
||||
**数据过滤逻辑**:
|
||||
|
||||
- 时间范围:根据选择的时间类型(会诊/申请)进行筛选
|
||||
- 申请科室/申请医生:支持模糊匹配
|
||||
- 会诊状态筛选:支持多选逻辑(未提交/提交/结束)
|
||||
1. 收集所有筛选条件值
|
||||
2. 发起异步请求(示例中为前端过滤)
|
||||
3. 更新表格数据展示
|
||||
**异常处理**:
|
||||
- 时间范围不合法:提示"结束时间不能早于开始时间"
|
||||
- 无查询结果:显示空白表格+提示文字
|
||||
**性能优化**:前端本地缓存数据,减少服务器请求
|
||||
|
||||
### 五、数据结构说明
|
||||
|
||||
门诊会诊申请单表(ConsultationRequest)和门诊会诊申请单表(ConsultationRequest)
|
||||
|
||||
### 六、开发实现要点
|
||||
|
||||
**样式规范**:
|
||||
|
||||
- **主色调**:\#5D9CEC(按钮/交互元素)
|
||||
- **辅助色**:\#8E8E8E(次要按钮)
|
||||
- **字体规范**:14px/1.5(主要内容),16px/1.5(标题)
|
||||
- **间距系统**:16px(元素间距),24px(区块间距)
|
||||
- **组件样式**:
|
||||
- 按钮:圆角6px,内边距0 16px
|
||||
- 输入框:1px实线边框\#D9D9D9,圆角4px
|
||||
|
||||
**技术要求**:
|
||||
|
||||
- **浏览器兼容**:支持Chrome/Firefox/Edge最新版
|
||||
- **性能要求**:列表数据筛选响应时间\<200ms
|
||||
|
||||
**注意事项**:
|
||||
|
||||
1. 状态变更逻辑:已结束的记录不可编辑
|
||||
2. 时间字段需要做时区转换处理
|
||||
3. 申请科室/申请医生选择器需要支持拼音首字母检索
|
||||
@@ -1,2 +0,0 @@
|
||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">OpenHis v0.0.1</h1>
|
||||
|
||||
@@ -21,13 +21,15 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<version>3.11.0</version>
|
||||
<configuration>
|
||||
<source>17</source>
|
||||
<target>17</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
<compilerArgs>
|
||||
<arg>-parameters</arg>
|
||||
<arg>--add-modules</arg>
|
||||
<arg>java.base</arg>
|
||||
</compilerArgs>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
|
||||
@@ -54,6 +54,12 @@
|
||||
<artifactId>oshi-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- spring security 安全认证 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 系统模块-->
|
||||
<dependency>
|
||||
<groupId>com.core</groupId>
|
||||
@@ -65,6 +71,12 @@
|
||||
<artifactId>core-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- MyBatis-Plus 支持 -->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- JSQLParser - 用于MyBatis Plus -->
|
||||
<dependency>
|
||||
<groupId>com.github.jsqlparser</groupId>
|
||||
|
||||
@@ -18,6 +18,12 @@
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- MyBatis-Plus 支持 -->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- velocity代码生成使用模板 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
@@ -36,6 +42,24 @@
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Lombok 支持 -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- JSON工具类 -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Jackson 注解支持 -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -23,6 +23,12 @@
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- MyBatis-Plus 支持 -->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 通用工具-->
|
||||
<dependency>
|
||||
<groupId>com.core</groupId>
|
||||
|
||||
@@ -64,6 +64,11 @@
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
<artifactId>velocity-engine-core</artifactId>
|
||||
</dependency>
|
||||
<!-- rabbitMQ -->
|
||||
<!-- <dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
||||
@@ -28,7 +28,10 @@ import com.openhis.web.datadictionary.dto.DiagnosisTreatmentDto;
|
||||
import com.openhis.web.datadictionary.dto.DiagnosisTreatmentSelParam;
|
||||
import com.openhis.web.datadictionary.mapper.ActivityDefinitionManageMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -45,6 +48,8 @@ import java.util.List;
|
||||
@Service
|
||||
public class LisConfigManageAppServiceImpl implements ILisConfigManageAppService {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(LisConfigManageAppServiceImpl.class);
|
||||
|
||||
@Resource
|
||||
private ActivityDefinitionManageMapper activityDefinitionManageMapper;
|
||||
@Resource
|
||||
@@ -120,14 +125,46 @@ public class LisConfigManageAppServiceImpl implements ILisConfigManageAppServic
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public R<?> saveAll(LisConfigManageDto manageDto) {
|
||||
//先全部删除项目下详情
|
||||
try {
|
||||
// 先全部删除项目下详情
|
||||
activityDefDeviceDefMapper.delete(new QueryWrapper<ActivityDefDeviceDef>().eq("activity_definition_id", manageDto.getId()));
|
||||
activityDefObservationDefMapper.delete(new QueryWrapper<ActivityDefObservationDef>().eq("activity_definition_id", manageDto.getId()));
|
||||
activityDefSpecimenDefMapper.delete(new QueryWrapper<ActivityDefSpecimenDef>().eq("activity_definition_id", manageDto.getId()));
|
||||
Integer tenantId = SecurityUtils.getLoginUser().getTenantId();
|
||||
|
||||
// 获取租户ID并验证
|
||||
Integer tenantId = null;
|
||||
try {
|
||||
tenantId = SecurityUtils.getLoginUser().getTenantId();
|
||||
} catch (Exception e) {
|
||||
log.warn("获取租户ID失败,使用默认值", e);
|
||||
}
|
||||
|
||||
// 根据ID查询【诊疗目录】详情
|
||||
DiagnosisTreatmentDto diseaseTreatmentOne = activityDefinitionManageMapper.getDiseaseTreatmentOne(manageDto.getId(), tenantId);
|
||||
if (diseaseTreatmentOne == null) {
|
||||
log.warn("未找到诊疗目录:id={}, tenantId={}", manageDto.getId(), tenantId);
|
||||
// 即使未找到诊疗目录,也继续保存,使用ID作为名称
|
||||
String activityDefinitionName = String.valueOf(manageDto.getId());
|
||||
|
||||
manageDto.getActivityDefDeviceDefs().forEach(activityDefDeviceDef -> {
|
||||
activityDefDeviceDef.setActivityDefinitionId(manageDto.getId());
|
||||
activityDefDeviceDef.setActivityDefinitionName(activityDefinitionName);
|
||||
activityDefDeviceDefMapper.insert(activityDefDeviceDef);
|
||||
});
|
||||
manageDto.getActivityDefObservationDefs().forEach(activityDefObservationDef -> {
|
||||
activityDefObservationDef.setActivityDefinitionId(manageDto.getId());
|
||||
activityDefObservationDef.setActivityDefinitionName(activityDefinitionName);
|
||||
activityDefObservationDefMapper.insert(activityDefObservationDef);
|
||||
});
|
||||
manageDto.getActivityDefSpecimenDefs().forEach(activityDefSpecimenDef -> {
|
||||
activityDefSpecimenDef.setActivityDefinitionId(manageDto.getId());
|
||||
activityDefSpecimenDef.setActivityDefinitionName(activityDefinitionName);
|
||||
activityDefSpecimenDefMapper.insert(activityDefSpecimenDef);
|
||||
});
|
||||
} else {
|
||||
// 正常保存
|
||||
manageDto.getActivityDefDeviceDefs().forEach(activityDefDeviceDef -> {
|
||||
activityDefDeviceDef.setActivityDefinitionId(manageDto.getId());
|
||||
activityDefDeviceDef.setActivityDefinitionName(diseaseTreatmentOne.getName());
|
||||
@@ -143,8 +180,18 @@ public class LisConfigManageAppServiceImpl implements ILisConfigManageAppServic
|
||||
activityDefSpecimenDef.setActivityDefinitionName(diseaseTreatmentOne.getName());
|
||||
activityDefSpecimenDefMapper.insert(activityDefSpecimenDef);
|
||||
});
|
||||
}
|
||||
|
||||
return R.ok();
|
||||
log.info("保存检验项目设置成功:id={}, deviceCount={}, observationCount={}, specimenCount={}",
|
||||
manageDto.getId(),
|
||||
manageDto.getActivityDefDeviceDefs().size(),
|
||||
manageDto.getActivityDefObservationDefs().size(),
|
||||
manageDto.getActivityDefSpecimenDefs().size());
|
||||
return R.ok("保存成功");
|
||||
} catch (Exception e) {
|
||||
log.error("保存检验项目设置失败:id={}, error={}", manageDto.getId(), e.getMessage(), e);
|
||||
return R.fail("保存失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -22,6 +22,8 @@ import com.openhis.web.Inspection.dto.ObservationDefManageDto;
|
||||
import com.openhis.web.Inspection.dto.ObservationDefManageInitDto;
|
||||
import com.openhis.web.Inspection.dto.ObservationDefSelParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -42,6 +44,8 @@ import java.util.stream.Stream;
|
||||
@RequiredArgsConstructor
|
||||
public class ObservationManageAppServiceImpl implements IObservationManageAppService
|
||||
{
|
||||
private static final Logger log = LoggerFactory.getLogger(ObservationManageAppServiceImpl.class);
|
||||
|
||||
private final ObservationDefinitionMapper observationDefinitionMapper;
|
||||
|
||||
private final IObservationDefinitionService observationDefinitionService;
|
||||
@@ -88,9 +92,23 @@ public class ObservationManageAppServiceImpl implements IObservationManageAppSer
|
||||
|
||||
@Override
|
||||
public R<?> updateOrAddObservationDef(ObservationDefinition Observation) {
|
||||
try {
|
||||
Observation.setDeleteFlag(DelFlag.NO.getCode());
|
||||
observationDefinitionService.saveOrUpdate(Observation);
|
||||
return R.ok(" 添加成功");
|
||||
boolean result = observationDefinitionService.saveOrUpdate(Observation);
|
||||
if (result) {
|
||||
log.info("保存检验项目成功:name={}, code={}, id={}",
|
||||
Observation.getName(), Observation.getCode(), Observation.getId());
|
||||
return R.ok("添加成功");
|
||||
} else {
|
||||
log.warn("保存检验项目失败:name={}, code={}",
|
||||
Observation.getName(), Observation.getCode());
|
||||
return R.fail("添加失败:保存操作未成功");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("保存检验项目异常:name={}, code={}, error={}",
|
||||
Observation.getName(), Observation.getCode(), e.getMessage(), e);
|
||||
return R.fail("添加失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -23,7 +23,7 @@ public interface IOrganizationAppService {
|
||||
* @param request 请求数据
|
||||
* @return 机构树分页列表
|
||||
*/
|
||||
Page<OrganizationDto> getOrganizationTree(Integer pageNo, Integer pageSize, String name, Integer typeEnum, Integer classEnum,
|
||||
Page<OrganizationDto> getOrganizationTree(Integer pageNo, Integer pageSize, String name, Integer typeEnum, String classEnum,
|
||||
String sortField, String sortOrder, HttpServletRequest request);
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.AssignSeqUtil;
|
||||
import com.core.common.utils.ChineseConvertUtils;
|
||||
import com.core.common.utils.DictUtils;
|
||||
import com.core.common.utils.StringUtils;
|
||||
import com.openhis.administration.domain.OperatingRoom;
|
||||
import com.openhis.administration.mapper.OperatingRoomMapper;
|
||||
@@ -78,23 +79,12 @@ public class OperatingRoomAppServiceImpl implements IOperatingRoomAppService {
|
||||
e.setStatusEnum_dictText(e.getStatusEnum() != null && e.getStatusEnum() == 1 ? "启用" : "停用");
|
||||
// 类型
|
||||
if (e.getRoomTypeEnum() != null) {
|
||||
switch (e.getRoomTypeEnum()) {
|
||||
case 1:
|
||||
e.setRoomTypeEnum_dictText("急诊手术室");
|
||||
break;
|
||||
case 2:
|
||||
e.setRoomTypeEnum_dictText("择期手术室");
|
||||
break;
|
||||
case 3:
|
||||
e.setRoomTypeEnum_dictText("日间手术室");
|
||||
break;
|
||||
case 4:
|
||||
e.setRoomTypeEnum_dictText("复合手术室");
|
||||
break;
|
||||
default:
|
||||
e.setRoomTypeEnum_dictText("未知");
|
||||
break;
|
||||
e.setRoomTypeEnum_dictText(DictUtils.getDictLabel("operating_room_type", String.valueOf(e.getRoomTypeEnum())));
|
||||
}
|
||||
// 如果有机构ID,查询机构名称
|
||||
if (e.getOrganizationId() != null) {
|
||||
String orgName = commonService.getOrgNameById(e.getOrganizationId());
|
||||
e.setOrganizationName(orgName);
|
||||
}
|
||||
// 拼音码
|
||||
e.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(e.getName()));
|
||||
@@ -127,23 +117,7 @@ public class OperatingRoomAppServiceImpl implements IOperatingRoomAppService {
|
||||
|
||||
// 类型描述
|
||||
if (operatingRoom.getRoomTypeEnum() != null) {
|
||||
switch (operatingRoom.getRoomTypeEnum()) {
|
||||
case 1:
|
||||
operatingRoomDto.setRoomTypeEnum_dictText("急诊手术室");
|
||||
break;
|
||||
case 2:
|
||||
operatingRoomDto.setRoomTypeEnum_dictText("择期手术室");
|
||||
break;
|
||||
case 3:
|
||||
operatingRoomDto.setRoomTypeEnum_dictText("日间手术室");
|
||||
break;
|
||||
case 4:
|
||||
operatingRoomDto.setRoomTypeEnum_dictText("复合手术室");
|
||||
break;
|
||||
default:
|
||||
operatingRoomDto.setRoomTypeEnum_dictText("未知");
|
||||
break;
|
||||
}
|
||||
operatingRoomDto.setRoomTypeEnum_dictText(DictUtils.getDictLabel("operating_room_type", String.valueOf(operatingRoom.getRoomTypeEnum())));
|
||||
}
|
||||
|
||||
// 如果有机构ID,查询机构名称
|
||||
@@ -168,6 +142,11 @@ public class OperatingRoomAppServiceImpl implements IOperatingRoomAppService {
|
||||
return R.fail("手术室名称不能为空");
|
||||
}
|
||||
|
||||
// 校验房间号不能为空
|
||||
if (StringUtils.isEmpty(operatingRoomDto.getBusNo())) {
|
||||
return R.fail("房间号不能为空");
|
||||
}
|
||||
|
||||
// 去除空格
|
||||
String name = operatingRoomDto.getName().replaceAll("[ ]", "");
|
||||
operatingRoomDto.setName(name);
|
||||
@@ -177,13 +156,14 @@ public class OperatingRoomAppServiceImpl implements IOperatingRoomAppService {
|
||||
return R.fail("【" + name + "】已存在");
|
||||
}
|
||||
|
||||
// 判断房间号是否已存在
|
||||
if (isExistBusNo(operatingRoomDto.getBusNo(), null)) {
|
||||
return R.fail("房间号【" + operatingRoomDto.getBusNo() + "】已存在");
|
||||
}
|
||||
|
||||
OperatingRoom operatingRoom = new OperatingRoom();
|
||||
BeanUtils.copyProperties(operatingRoomDto, operatingRoom);
|
||||
|
||||
// 生成编码
|
||||
String code = assignSeqUtil.getSeq(AssignSeqEnum.OPERATING_ROOM_BUS_NO.getPrefix(), 3);
|
||||
operatingRoom.setBusNo(code);
|
||||
|
||||
// 拼音码
|
||||
operatingRoom.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(operatingRoomDto.getName()));
|
||||
// 五笔码
|
||||
@@ -215,6 +195,11 @@ public class OperatingRoomAppServiceImpl implements IOperatingRoomAppService {
|
||||
return R.fail("手术室名称不能为空");
|
||||
}
|
||||
|
||||
// 校验房间号不能为空
|
||||
if (StringUtils.isEmpty(operatingRoomDto.getBusNo())) {
|
||||
return R.fail("房间号不能为空");
|
||||
}
|
||||
|
||||
// 去除空格
|
||||
String name = operatingRoomDto.getName().replaceAll("[ ]", "");
|
||||
operatingRoomDto.setName(name);
|
||||
@@ -224,6 +209,11 @@ public class OperatingRoomAppServiceImpl implements IOperatingRoomAppService {
|
||||
return R.fail("【" + name + "】已存在");
|
||||
}
|
||||
|
||||
// 判断房间号是否已存在(排除自己)
|
||||
if (isExistBusNo(operatingRoomDto.getBusNo(), operatingRoomDto.getId())) {
|
||||
return R.fail("房间号【" + operatingRoomDto.getBusNo() + "】已存在");
|
||||
}
|
||||
|
||||
OperatingRoom operatingRoom = new OperatingRoom();
|
||||
BeanUtils.copyProperties(operatingRoomDto, operatingRoom);
|
||||
|
||||
@@ -331,4 +321,20 @@ public class OperatingRoomAppServiceImpl implements IOperatingRoomAppService {
|
||||
}
|
||||
return operatingRoomService.count(queryWrapper) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断房间号是否已存在
|
||||
*
|
||||
* @param busNo 房间号
|
||||
* @param excludeId 排除的ID
|
||||
* @return 是否存在
|
||||
*/
|
||||
private boolean isExistBusNo(String busNo, Long excludeId) {
|
||||
LambdaQueryWrapper<OperatingRoom> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(OperatingRoom::getBusNo, busNo);
|
||||
if (excludeId != null) {
|
||||
queryWrapper.ne(OperatingRoom::getId, excludeId);
|
||||
}
|
||||
return operatingRoomService.count(queryWrapper) > 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public class OrganizationAppServiceImpl implements IOrganizationAppService {
|
||||
private AssignSeqUtil assignSeqUtil;
|
||||
|
||||
@Override
|
||||
public Page<OrganizationDto> getOrganizationTree(Integer pageNo, Integer pageSize, String name, Integer typeEnum, Integer classEnum,
|
||||
public Page<OrganizationDto> getOrganizationTree(Integer pageNo, Integer pageSize, String name, Integer typeEnum, String classEnum,
|
||||
String sortField, String sortOrder, HttpServletRequest request) {
|
||||
// 创建查询条件
|
||||
LambdaQueryWrapper<Organization> queryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -51,8 +51,24 @@ public class OrganizationAppServiceImpl implements IOrganizationAppService {
|
||||
if (typeEnum != null) {
|
||||
queryWrapper.eq(Organization::getTypeEnum, typeEnum);
|
||||
}
|
||||
if (classEnum != null) {
|
||||
queryWrapper.eq(Organization::getClassEnum, classEnum);
|
||||
if (StringUtils.isNotEmpty(classEnum)) {
|
||||
// 对于多选,需要处理逗号分隔的值
|
||||
queryWrapper.and(wrapper -> {
|
||||
String[] classEnums = classEnum.split(",");
|
||||
for (String cls : classEnums) {
|
||||
String trimmedCls = cls.trim();
|
||||
// 使用OR连接多个条件来匹配逗号分隔的值
|
||||
wrapper.or().and(subWrapper -> {
|
||||
subWrapper.eq(Organization::getClassEnum, trimmedCls)
|
||||
.or()
|
||||
.likeRight(Organization::getClassEnum, trimmedCls + ",")
|
||||
.or()
|
||||
.likeLeft(Organization::getClassEnum, "," + trimmedCls)
|
||||
.or()
|
||||
.like(Organization::getClassEnum, "," + trimmedCls + ",");
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 创建Page对象
|
||||
@@ -89,7 +105,7 @@ public class OrganizationAppServiceImpl implements IOrganizationAppService {
|
||||
OrganizationDto node = new OrganizationDto();
|
||||
BeanUtils.copyProperties(record, node);
|
||||
node.setTypeEnum_dictText(EnumUtils.getInfoByValue(OrganizationType.class, node.getTypeEnum()));
|
||||
node.setClassEnum_dictText(EnumUtils.getInfoByValue(OrganizationClass.class, node.getClassEnum()));
|
||||
node.setClassEnum_dictText(formatClassEnumDictText(node.getClassEnum()));
|
||||
node.setActiveFlag_dictText(EnumUtils.getInfoByValue(AccountStatus.class, node.getActiveFlag()));
|
||||
// 将当前节点加入映射
|
||||
nodeMap.put(bNo, node);
|
||||
@@ -130,7 +146,7 @@ public class OrganizationAppServiceImpl implements IOrganizationAppService {
|
||||
OrganizationDto organizationDto = new OrganizationDto();
|
||||
BeanUtils.copyProperties(organization, organizationDto);
|
||||
organizationDto.setTypeEnum_dictText(EnumUtils.getInfoByValue(OrganizationType.class, organizationDto.getTypeEnum()));
|
||||
organizationDto.setClassEnum_dictText(EnumUtils.getInfoByValue(OrganizationClass.class, organizationDto.getClassEnum()));
|
||||
organizationDto.setClassEnum_dictText(formatClassEnumDictText(organizationDto.getClassEnum()));
|
||||
organizationDto.setActiveFlag_dictText(EnumUtils.getInfoByValue(AccountStatus.class, organizationDto.getActiveFlag()));
|
||||
|
||||
return R.ok(organizationDto, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"机构信息查询"}));
|
||||
@@ -221,6 +237,35 @@ public class OrganizationAppServiceImpl implements IOrganizationAppService {
|
||||
: R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"机构信息停用"}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化多选的分类字典文本
|
||||
*/
|
||||
private String formatClassEnumDictText(String classEnum) {
|
||||
if (StringUtils.isEmpty(classEnum)) {
|
||||
return "";
|
||||
}
|
||||
|
||||
String[] classEnums = classEnum.split(",");
|
||||
List<String> dictTexts = new ArrayList<>();
|
||||
|
||||
for (String cls : classEnums) {
|
||||
String trimmedCls = cls.trim();
|
||||
if (StringUtils.isNotEmpty(trimmedCls)) {
|
||||
try {
|
||||
Integer enumValue = Integer.parseInt(trimmedCls);
|
||||
String dictText = EnumUtils.getInfoByValue(OrganizationClass.class, enumValue);
|
||||
if (dictText != null) {
|
||||
dictTexts.add(dictText);
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
// 如果转换失败,跳过该值
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return String.join(",", dictTexts);
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验字段是否为指定类中的有效属性
|
||||
*/
|
||||
|
||||
@@ -54,7 +54,7 @@ public class OrganizationController {
|
||||
@RequestParam(value = "pageSize", defaultValue = "100") Integer pageSize,
|
||||
@RequestParam(value = "name", required = false) String name,
|
||||
@RequestParam(value = "typeEnum", required = false) Integer typeEnum,
|
||||
@RequestParam(value = "classEnum", required = false) Integer classEnum,
|
||||
@RequestParam(value = "classEnum", required = false) String classEnum,
|
||||
@RequestParam(value = "sortField", required = false) String sortField,
|
||||
@RequestParam(value = "sortOrder", required = false) String sortOrder, HttpServletRequest request) {
|
||||
Page<OrganizationDto> organizationTree =
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
package com.openhis.web.basedatamanage.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
@@ -39,7 +40,8 @@ public class OrganizationDto {
|
||||
private String typeEnum_dictText;
|
||||
|
||||
/** 机构分类枚举 */
|
||||
private Integer classEnum;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private String classEnum;
|
||||
private String classEnum_dictText;
|
||||
|
||||
/** 拼音码 */
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.openhis.web.chargemanage.dto.CurrentDayEncounterDto;
|
||||
import com.openhis.web.chargemanage.dto.OrgMetadata;
|
||||
import com.openhis.web.chargemanage.dto.PatientMetadata;
|
||||
import com.openhis.web.chargemanage.dto.PractitionerMetadata;
|
||||
import com.openhis.web.chargemanage.dto.ReprintRegistrationDto;
|
||||
import com.openhis.web.paymentmanage.dto.CancelRegPaymentDto;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -85,4 +86,12 @@ public interface IOutpatientRegistrationAppService {
|
||||
*/
|
||||
R<?> cancelRegister(Long encounterId);
|
||||
|
||||
/**
|
||||
* 补打挂号
|
||||
*
|
||||
* @param reprintRegistrationDto 补打挂号信息
|
||||
* @return 结果
|
||||
*/
|
||||
R<?> reprintRegistration(ReprintRegistrationDto reprintRegistrationDto);
|
||||
|
||||
}
|
||||
|
||||
@@ -65,8 +65,16 @@ public class OutpatientPricingAppServiceImpl implements IOutpatientPricingAppSer
|
||||
@Override
|
||||
public IPage<AdviceBaseDto> getAdviceBaseInfo(AdviceBaseDto adviceBaseDto, String searchKey, Long locationId,
|
||||
Long organizationId, Integer pageNo, Integer pageSize) {
|
||||
// 根据前端传入的adviceType动态构建查询类型列表
|
||||
// 如果adviceType不为空,只查询该类型;如果为空,查询所有类型(1:药品, 2:耗材, 3:诊疗)
|
||||
List<Integer> adviceTypes;
|
||||
if (adviceBaseDto != null && adviceBaseDto.getAdviceType() != null) {
|
||||
adviceTypes = List.of(adviceBaseDto.getAdviceType());
|
||||
} else {
|
||||
adviceTypes = List.of(1, 2, 3);
|
||||
}
|
||||
return iDoctorStationAdviceAppService.getAdviceBaseInfo(adviceBaseDto, searchKey, locationId, null,
|
||||
organizationId, pageNo, pageSize, Whether.YES.getValue(), List.of(1, 2, 3), null);
|
||||
organizationId, pageNo, pageSize, Whether.YES.getValue(), adviceTypes, null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.openhis.web.chargemanage.dto.CurrentDayEncounterDto;
|
||||
import com.openhis.web.chargemanage.dto.OrgMetadata;
|
||||
import com.openhis.web.chargemanage.dto.PatientMetadata;
|
||||
import com.openhis.web.chargemanage.dto.PractitionerMetadata;
|
||||
import com.openhis.web.chargemanage.dto.ReprintRegistrationDto;
|
||||
import com.openhis.web.chargemanage.mapper.OutpatientRegistrationAppMapper;
|
||||
import com.openhis.web.paymentmanage.appservice.IPaymentRecService;
|
||||
import com.openhis.web.paymentmanage.dto.CancelPaymentDto;
|
||||
@@ -156,7 +157,7 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
|
||||
@Override
|
||||
public List<OrgMetadata> getOrgMetadata() {
|
||||
List<Organization> list =
|
||||
iOrganizationService.getList(OrganizationType.DEPARTMENT.getValue(), OrganizationClass.CLINIC.getValue());
|
||||
iOrganizationService.getList(OrganizationType.DEPARTMENT.getValue(), String.valueOf(OrganizationClass.CLINIC.getValue()));
|
||||
List<OrgMetadata> orgMetadataList = new ArrayList<>();
|
||||
OrgMetadata orgMetadata;
|
||||
for (Organization organization : list) {
|
||||
@@ -283,7 +284,7 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
|
||||
HttpServletRequest request) {
|
||||
// 构建查询条件
|
||||
QueryWrapper<CurrentDayEncounterDto> queryWrapper = HisQueryUtils.buildQueryWrapper(null, searchKey,
|
||||
new HashSet<>(Arrays.asList("patient_name", "organization_name", "practitioner_name", "healthcare_name")),
|
||||
new HashSet<>(Arrays.asList("patient_name", "organization_name", "practitioner_name", "healthcare_name", "identifier_no")),
|
||||
request);
|
||||
|
||||
// 手动处理 statusEnum 参数(用于过滤退号记录)
|
||||
@@ -330,4 +331,18 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
|
||||
return R.ok("已取消挂号");
|
||||
}
|
||||
|
||||
/**
|
||||
* 补打挂号
|
||||
* 补打挂号不需要修改数据库,只需要返回成功即可,前端已有所有需要的数据用于打印
|
||||
*
|
||||
* @param reprintRegistrationDto 补打挂号信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> reprintRegistration(ReprintRegistrationDto reprintRegistrationDto) {
|
||||
// 补打挂号只是重新打印,不需要修改数据库
|
||||
// 可以在这里添加日志记录补打操作
|
||||
return R.ok(null, "补打挂号成功");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.openhis.common.enums.PriorityLevel;
|
||||
import com.openhis.financial.domain.PaymentReconciliation;
|
||||
import com.openhis.web.chargemanage.appservice.IOutpatientRegistrationAppService;
|
||||
import com.openhis.web.chargemanage.dto.OutpatientRegistrationInitDto;
|
||||
import com.openhis.web.chargemanage.dto.ReprintRegistrationDto;
|
||||
import com.openhis.web.paymentmanage.appservice.IEleInvoiceService;
|
||||
import com.openhis.web.paymentmanage.dto.CancelRegPaymentDto;
|
||||
import lombok.AllArgsConstructor;
|
||||
@@ -151,4 +152,15 @@ public class OutpatientRegistrationController {
|
||||
return R.ok(iOutpatientRegistrationAppService.getCurrentDayEncounter(searchKey, pageNo, pageSize, request));
|
||||
}
|
||||
|
||||
/**
|
||||
* 补打挂号
|
||||
*
|
||||
* @param reprintRegistrationDto 补打挂号信息
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping(value = "/reprint")
|
||||
public R<?> reprintRegistration(@RequestBody ReprintRegistrationDto reprintRegistrationDto) {
|
||||
return iOutpatientRegistrationAppService.reprintRegistration(reprintRegistrationDto);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -136,4 +136,14 @@ public class CurrentDayEncounterDto {
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 就诊卡号
|
||||
*/
|
||||
private String identifierNo;
|
||||
|
||||
/**
|
||||
* 流水号(就诊当日序号)
|
||||
*/
|
||||
private Integer displayOrder;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.openhis.web.chargemanage.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 补打挂号 DTO
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ReprintRegistrationDto {
|
||||
|
||||
/**
|
||||
* 就诊ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long encounterId;
|
||||
|
||||
/**
|
||||
* 就诊卡号
|
||||
*/
|
||||
private String cardNo;
|
||||
|
||||
/**
|
||||
* 患者姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 挂号科室
|
||||
*/
|
||||
private String organizationName;
|
||||
|
||||
/**
|
||||
* 医生姓名
|
||||
*/
|
||||
private String practitionerName;
|
||||
|
||||
/**
|
||||
* 挂号费
|
||||
*/
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 诊疗费
|
||||
*/
|
||||
private BigDecimal activityPrice;
|
||||
|
||||
/**
|
||||
* 病历费
|
||||
*/
|
||||
private BigDecimal medicalRecordFee;
|
||||
|
||||
/**
|
||||
* 合计
|
||||
*/
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
/**
|
||||
* 预约/挂号时间
|
||||
*/
|
||||
private String visitTime;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import com.core.common.core.domain.R;
|
||||
import com.openhis.check.domain.LisGroupInfo;
|
||||
|
||||
public interface ILisGroupInfoAppService {
|
||||
R<?> getLisGroupInfoList();
|
||||
R<?> getLisGroupInfoList(Integer pageNum, Integer pageSize);
|
||||
|
||||
R<?> add(LisGroupInfo lisGroupInfo);
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.openhis.web.check.appservice.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.check.domain.LisGroupInfo;
|
||||
import com.openhis.check.service.ILisGroupInfoService;
|
||||
@@ -17,11 +18,14 @@ public class LisGroupInfoAppServiceImpl implements ILisGroupInfoAppService {
|
||||
@Resource
|
||||
private ILisGroupInfoService lisGroupInfoService;
|
||||
@Override
|
||||
public R<?> getLisGroupInfoList() {
|
||||
List<LisGroupInfo> list = lisGroupInfoService.list();
|
||||
public R<?> getLisGroupInfoList(Integer pageNum, Integer pageSize) {
|
||||
Page<LisGroupInfo> page = new Page<>(pageNum, pageSize);
|
||||
Page<LisGroupInfo> list = lisGroupInfoService.page(page);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public R<?> add(LisGroupInfo lisGroupInfo) {
|
||||
if (ObjectUtil.isEmpty(lisGroupInfo)) {
|
||||
|
||||
@@ -19,8 +19,8 @@ public class LisGroupInfoController {
|
||||
*
|
||||
* */
|
||||
@GetMapping("/list")
|
||||
public R<?> getLisGroupInfoList(){
|
||||
return R.ok(lisGroupInfoAppService.getLisGroupInfoList());
|
||||
public R<?> getLisGroupInfoList(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize){
|
||||
return R.ok(lisGroupInfoAppService.getLisGroupInfoList(pageNum, pageSize));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.openhis.web.datadictionary.dto.*;
|
||||
import com.openhis.web.datadictionary.mapper.ActivityDefinitionManageMapper;
|
||||
import com.openhis.workflow.domain.ActivityDefinition;
|
||||
import com.openhis.workflow.domain.ServiceRequest;
|
||||
import com.openhis.workflow.mapper.ActivityDefinitionMapper;
|
||||
import com.openhis.workflow.service.IActivityDefinitionService;
|
||||
import com.openhis.workflow.service.IServiceRequestService;
|
||||
import com.openhis.yb.service.YbManager;
|
||||
@@ -63,6 +64,8 @@ public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
||||
@Resource
|
||||
private ActivityDefinitionManageMapper activityDefinitionManageMapper;
|
||||
@Resource
|
||||
private ActivityDefinitionMapper activityDefinitionMapper;
|
||||
@Resource
|
||||
private IItemDefinitionService itemDefinitionService;
|
||||
@Resource
|
||||
private ISysDictTypeService sysDictTypeService;
|
||||
@@ -235,6 +238,10 @@ public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
||||
ActivityDefinition activityDefinition = new ActivityDefinition();
|
||||
BeanUtils.copyProperties(diagnosisTreatmentUpDto, activityDefinition);
|
||||
|
||||
// 显式设置新增的字段
|
||||
activityDefinition.setSortOrder(diagnosisTreatmentUpDto.getSortOrder());
|
||||
activityDefinition.setServiceRange(diagnosisTreatmentUpDto.getServiceRange());
|
||||
|
||||
// 拼音码
|
||||
activityDefinition.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(activityDefinition.getName()));
|
||||
// 五笔码
|
||||
@@ -252,12 +259,31 @@ public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
||||
}
|
||||
}
|
||||
|
||||
// 查询现有的价格定义
|
||||
LambdaQueryWrapper<ChargeItemDefinition> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ChargeItemDefinition::getInstanceId, diagnosisTreatmentUpDto.getId())
|
||||
.eq(ChargeItemDefinition::getInstanceTable, CommonConstants.TableName.WOR_ACTIVITY_DEFINITION);
|
||||
ChargeItemDefinition existingItem = chargeItemDefinitionService.getOne(queryWrapper);
|
||||
|
||||
ChargeItemDefinition chargeItemDefinition = new ChargeItemDefinition();
|
||||
chargeItemDefinition.setYbType(diagnosisTreatmentUpDto.getYbType())
|
||||
.setTypeCode(diagnosisTreatmentUpDto.getItemTypeCode())
|
||||
.setInstanceTable(CommonConstants.TableName.WOR_ACTIVITY_DEFINITION)
|
||||
chargeItemDefinition.setInstanceTable(CommonConstants.TableName.WOR_ACTIVITY_DEFINITION)
|
||||
.setInstanceId(diagnosisTreatmentUpDto.getId()).setPrice(diagnosisTreatmentUpDto.getRetailPrice())
|
||||
.setPriceCode(diagnosisTreatmentUpDto.getPriceCode()).setChargeName(diagnosisTreatmentUpDto.getName());
|
||||
|
||||
// 如果前端没有提交财务类别,则保留原有的值
|
||||
if (StringUtils.isEmpty(diagnosisTreatmentUpDto.getItemTypeCode()) && existingItem != null) {
|
||||
chargeItemDefinition.setTypeCode(existingItem.getTypeCode());
|
||||
} else {
|
||||
chargeItemDefinition.setTypeCode(diagnosisTreatmentUpDto.getItemTypeCode());
|
||||
}
|
||||
|
||||
// 如果前端没有提交医保类别,则保留原有的值
|
||||
if (StringUtils.isEmpty(diagnosisTreatmentUpDto.getYbType()) && existingItem != null) {
|
||||
chargeItemDefinition.setYbType(existingItem.getYbType());
|
||||
} else {
|
||||
chargeItemDefinition.setYbType(diagnosisTreatmentUpDto.getYbType());
|
||||
}
|
||||
|
||||
// 插入操作记录
|
||||
operationRecordService.addEntityOperationRecord(DbOpType.UPDATE.getCode(),
|
||||
CommonConstants.TableName.WOR_ACTIVITY_DEFINITION, activityDefinition);
|
||||
@@ -267,9 +293,12 @@ public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
||||
// 更新子表,修改零售价,条件:单位
|
||||
boolean upItemDetail1 = itemDefinitionService.updateItemDetail(chargeItemDefinition,
|
||||
diagnosisTreatmentUpDto.getRetailPrice(), ConditionCode.UNIT.getCode());
|
||||
// 更新子表,修改最高零售价,条件:限制
|
||||
boolean upItemDetail2 = itemDefinitionService.updateItemDetail(chargeItemDefinition,
|
||||
// 更新子表,修改最高零售价,条件:限制(只有当最高零售价不为null时才更新)
|
||||
boolean upItemDetail2 = true;
|
||||
if (diagnosisTreatmentUpDto.getMaximumRetailPrice() != null) {
|
||||
upItemDetail2 = itemDefinitionService.updateItemDetail(chargeItemDefinition,
|
||||
diagnosisTreatmentUpDto.getMaximumRetailPrice(), ConditionCode.LIMIT.getCode());
|
||||
}
|
||||
|
||||
// 更新价格表
|
||||
return upItemDef && upItemDetail1 && upItemDetail2
|
||||
@@ -353,9 +382,16 @@ public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
||||
|
||||
ActivityDefinition activityDefinition = new ActivityDefinition();
|
||||
BeanUtils.copyProperties(diagnosisTreatmentUpDto, activityDefinition);
|
||||
// 使用10位数基础采番
|
||||
|
||||
// 显式设置新增的字段
|
||||
activityDefinition.setSortOrder(diagnosisTreatmentUpDto.getSortOrder());
|
||||
activityDefinition.setServiceRange(diagnosisTreatmentUpDto.getServiceRange());
|
||||
|
||||
// 如果前端没有传入编码,则使用10位数基础采番
|
||||
if (StringUtils.isEmpty(activityDefinition.getBusNo())) {
|
||||
String code = assignSeqUtil.getSeq(AssignSeqEnum.ACTIVITY_DEFINITION_NUM.getPrefix(), 10);
|
||||
activityDefinition.setBusNo(code);
|
||||
}
|
||||
// 拼音码
|
||||
activityDefinition.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(activityDefinition.getName()));
|
||||
// 五笔码
|
||||
@@ -363,6 +399,16 @@ public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
||||
|
||||
// 新增外来诊疗目录
|
||||
activityDefinition.setStatusEnum(PublicationStatus.ACTIVE.getValue());
|
||||
|
||||
// 检查编码是否已存在
|
||||
List<ActivityDefinition> existingDefinitions = activityDefinitionMapper.selectList(
|
||||
new LambdaQueryWrapper<ActivityDefinition>()
|
||||
.eq(ActivityDefinition::getBusNo, activityDefinition.getBusNo())
|
||||
);
|
||||
if (!existingDefinitions.isEmpty()) {
|
||||
return R.fail(null, "诊疗编码已存在:" + activityDefinition.getBusNo());
|
||||
}
|
||||
|
||||
if (activityDefinitionService.addDiagnosisTreatment(activityDefinition)) {
|
||||
// 调用医保目录对照接口
|
||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||
|
||||
@@ -125,4 +125,9 @@ public class DiagnosisTreatmentDto {
|
||||
*/
|
||||
private String priceCode;
|
||||
|
||||
/** 序号 */
|
||||
private Integer sortOrder;
|
||||
|
||||
/** 服务范围 */
|
||||
private String serviceRange;
|
||||
}
|
||||
|
||||
@@ -112,4 +112,9 @@ public class DiagnosisTreatmentUpDto {
|
||||
*/
|
||||
private String priceCode;
|
||||
|
||||
/** 序号 */
|
||||
private Integer sortOrder;
|
||||
|
||||
/** 服务范围 */
|
||||
private String serviceRange;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class DoctorPhraesAppServiceImpl implements IDoctorPhraseAppService {
|
||||
public class DoctorPhraseAppServiceImpl implements IDoctorPhraseAppService {
|
||||
|
||||
@Resource
|
||||
private IDoctorPhraseService doctorPhraseService;
|
||||
@@ -38,6 +38,7 @@ import com.openhis.workflow.service.IDeviceDispenseService;
|
||||
import com.openhis.workflow.service.IDeviceRequestService;
|
||||
import com.openhis.workflow.service.IServiceRequestService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -92,6 +93,7 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
@Resource
|
||||
DoctorStationSendApplyUtil doctorStationSendApplyUtil;
|
||||
|
||||
|
||||
/**
|
||||
* 查询医嘱信息
|
||||
*
|
||||
@@ -111,6 +113,20 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
public IPage<AdviceBaseDto> getAdviceBaseInfo(AdviceBaseDto adviceBaseDto, String searchKey, Long locationId,
|
||||
List<Long> adviceDefinitionIdParamList, Long organizationId, Integer pageNo, Integer pageSize,
|
||||
Integer pricingFlag, List<Integer> adviceTypes, String orderPricing) {
|
||||
|
||||
// 生成缓存键,处理可能的null值
|
||||
String safeSearchKey = searchKey != null ? searchKey : "";
|
||||
String safeAdviceTypesStr = "";
|
||||
if (adviceTypes != null && !adviceTypes.isEmpty()) {
|
||||
safeAdviceTypesStr = String.join(",", adviceTypes.stream().map(String::valueOf).collect(Collectors.toList()));
|
||||
}
|
||||
String safeOrganizationId = organizationId != null ? organizationId.toString() : "";
|
||||
String safePricingFlag = pricingFlag != null ? pricingFlag.toString() : "";
|
||||
String safePageNo = pageNo != null ? pageNo.toString() : "";
|
||||
String safePageSize = pageSize != null ? pageSize.toString() : "";
|
||||
|
||||
log.info("从数据库查询医嘱基础信息");
|
||||
|
||||
// 设置默认科室 (不取前端传的了)
|
||||
organizationId = SecurityUtils.getLoginUser().getOrgId();
|
||||
|
||||
@@ -172,29 +188,50 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
.add(cfg.getLocationId());
|
||||
}
|
||||
}
|
||||
// 费用定价子表信息
|
||||
List<AdvicePriceDto> childCharge = doctorStationAdviceAppMapper
|
||||
.getChildCharge(ConditionCode.LOT_NUMBER_PRICE.getCode(), chargeItemDefinitionIdList);
|
||||
// 费用定价主表信息
|
||||
List<AdvicePriceDto> mainCharge
|
||||
= doctorStationAdviceAppMapper.getMainCharge(chargeItemDefinitionIdList, PublicationStatus.ACTIVE.getValue());
|
||||
// 费用定价子表信息 - 使用分批处理避免大量参数问题
|
||||
List<AdvicePriceDto> childCharge = new ArrayList<>();
|
||||
if (chargeItemDefinitionIdList != null && !chargeItemDefinitionIdList.isEmpty()) {
|
||||
// 分批处理,每批最多1000个ID,增加批次大小以减少查询次数
|
||||
int batchSize = 1000;
|
||||
for (int i = 0; i < chargeItemDefinitionIdList.size(); i += batchSize) {
|
||||
int endIndex = Math.min(i + batchSize, chargeItemDefinitionIdList.size());
|
||||
List<Long> batch = chargeItemDefinitionIdList.subList(i, endIndex);
|
||||
childCharge.addAll(doctorStationAdviceAppMapper
|
||||
.getChildCharge(ConditionCode.LOT_NUMBER_PRICE.getCode(), batch));
|
||||
}
|
||||
}
|
||||
|
||||
// 费用定价主表信息 - 使用分批处理避免大量参数问题
|
||||
List<AdvicePriceDto> mainCharge = new ArrayList<>();
|
||||
if (chargeItemDefinitionIdList != null && !chargeItemDefinitionIdList.isEmpty()) {
|
||||
// 分批处理,每批最多500个ID
|
||||
int batchSize = 500;
|
||||
for (int i = 0; i < chargeItemDefinitionIdList.size(); i += batchSize) {
|
||||
int endIndex = Math.min(i + batchSize, chargeItemDefinitionIdList.size());
|
||||
List<Long> batch = chargeItemDefinitionIdList.subList(i, endIndex);
|
||||
mainCharge.addAll(doctorStationAdviceAppMapper.getMainCharge(batch, PublicationStatus.ACTIVE.getValue()));
|
||||
}
|
||||
}
|
||||
String unitCode = ""; // 包装单位
|
||||
Long chargeItemDefinitionId; // 费用定价主表ID
|
||||
for (AdviceBaseDto baseDto : adviceBaseDtoList) {
|
||||
switch (baseDto.getAdviceTableName()) {
|
||||
case CommonConstants.TableName.MED_MEDICATION_DEFINITION: // 药品
|
||||
String tableName = baseDto.getAdviceTableName();
|
||||
if (CommonConstants.TableName.MED_MEDICATION_DEFINITION.equals(tableName)) { // 药品
|
||||
// 是否皮试
|
||||
baseDto
|
||||
.setSkinTestFlag_enumText(EnumUtils.getInfoByValue(Whether.class, baseDto.getSkinTestFlag()));
|
||||
// 是否为注射药物
|
||||
baseDto.setInjectFlag_enumText(EnumUtils.getInfoByValue(Whether.class, baseDto.getInjectFlag()));
|
||||
case CommonConstants.TableName.ADM_DEVICE_DEFINITION: // 耗材
|
||||
|
||||
// fallthrough to 耗材处理逻辑(保持原有逻辑)
|
||||
// 每一条医嘱的库存集合信息 , 包装单位库存前端计算
|
||||
List<AdviceInventoryDto> inventoryList = adviceInventory.stream().filter(e -> baseDto
|
||||
.getAdviceDefinitionId().equals(e.getItemId())
|
||||
List<AdviceInventoryDto> inventoryList = adviceInventory.stream().filter(e ->
|
||||
baseDto.getAdviceDefinitionId() != null && e.getItemId() != null
|
||||
&& baseDto.getAdviceDefinitionId().equals(e.getItemId())
|
||||
&& baseDto.getAdviceTableName() != null && e.getItemTable() != null
|
||||
&& baseDto.getAdviceTableName().equals(e.getItemTable())
|
||||
&& (pharmacyMultipleChoice
|
||||
|| (baseDto.getPositionId() == null || baseDto.getPositionId().equals(e.getLocationId()))))
|
||||
|| (baseDto.getPositionId() == null || (e.getLocationId() != null && baseDto.getPositionId().equals(e.getLocationId())))))
|
||||
.collect(Collectors.toList());
|
||||
// 库存信息
|
||||
baseDto.setInventoryList(inventoryList);
|
||||
@@ -210,12 +247,14 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
if (!inventoryList.isEmpty() && !medLocationConfig.isEmpty()) {
|
||||
// 第一步:在medLocationConfig中匹配categoryCode
|
||||
AdviceInventoryDto result1 = medLocationConfig.stream()
|
||||
.filter(dto -> baseDto.getCategoryCode().equals(dto.getCategoryCode())).findFirst()
|
||||
.filter(dto -> baseDto.getCategoryCode() != null && dto.getCategoryCode() != null
|
||||
&& baseDto.getCategoryCode().equals(dto.getCategoryCode())).findFirst()
|
||||
.orElse(null);
|
||||
if (result1 != null) {
|
||||
// 第二步:在inventoryList中匹配locationId
|
||||
AdviceInventoryDto result2 = inventoryList.stream()
|
||||
.filter(dto -> result1.getLocationId().equals(dto.getLocationId())).findFirst()
|
||||
.filter(dto -> result1.getLocationId() != null && dto.getLocationId() != null
|
||||
&& result1.getLocationId().equals(dto.getLocationId())).findFirst()
|
||||
.orElse(null);
|
||||
if (result2 != null && result2.getLotNumber() != null) {
|
||||
baseDto.setDefaultLotNumber(result2.getLotNumber());
|
||||
@@ -232,13 +271,16 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
String finalUnitCode = unitCode;
|
||||
// 从定价子表取价格(适用于批次售卖场景)
|
||||
List<AdvicePriceDto> childPrice = childCharge.stream()
|
||||
.filter(e -> e.getDefinitionId().equals(finalChargeItemDefinitionId)
|
||||
.filter(e -> e.getDefinitionId() != null && finalChargeItemDefinitionId != null
|
||||
&& e.getDefinitionId().equals(finalChargeItemDefinitionId)
|
||||
&& e.getConditionValue() != null && adviceInventoryDto.getLotNumber() != null
|
||||
&& e.getConditionValue().equals(adviceInventoryDto.getLotNumber()))
|
||||
.peek(e -> e.setUnitCode(finalUnitCode)) // 设置 unitCode
|
||||
.collect(Collectors.toList());
|
||||
// 从定价主表取价格(适用于统一零售价场景)
|
||||
List<AdvicePriceDto> mainPrice = mainCharge.stream()
|
||||
.filter(e -> baseDto.getChargeItemDefinitionId().equals(e.getDefinitionId()))
|
||||
.filter(e -> baseDto.getChargeItemDefinitionId() != null && e.getDefinitionId() != null
|
||||
&& baseDto.getChargeItemDefinitionId().equals(e.getDefinitionId()))
|
||||
.collect(Collectors.toList());
|
||||
// 按批次售价
|
||||
if (OrderPricingSource.BATCH_SELLING_PRICE.getCode().equals(orderPricingSource)) {
|
||||
@@ -249,21 +291,87 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
}
|
||||
// 价格信息
|
||||
baseDto.setPriceList(priceDtoList);
|
||||
break;
|
||||
case CommonConstants.TableName.WOR_ACTIVITY_DEFINITION: // 诊疗
|
||||
} else if (CommonConstants.TableName.ADM_DEVICE_DEFINITION.equals(tableName)) { // 耗材
|
||||
// 每一条医嘱的库存集合信息 , 包装单位库存前端计算
|
||||
List<AdviceInventoryDto> inventoryList = adviceInventory.stream().filter(e ->
|
||||
baseDto.getAdviceDefinitionId() != null && e.getItemId() != null
|
||||
&& baseDto.getAdviceDefinitionId().equals(e.getItemId())
|
||||
&& baseDto.getAdviceTableName() != null && e.getItemTable() != null
|
||||
&& baseDto.getAdviceTableName().equals(e.getItemTable())
|
||||
&& (pharmacyMultipleChoice
|
||||
|| (baseDto.getPositionId() == null || (e.getLocationId() != null && baseDto.getPositionId().equals(e.getLocationId())))))
|
||||
.collect(Collectors.toList());
|
||||
// 库存信息
|
||||
baseDto.setInventoryList(inventoryList);
|
||||
// 设置默认产品批号
|
||||
if (!inventoryList.isEmpty()) {
|
||||
// 库存大于0
|
||||
List<AdviceInventoryDto> hasInventoryList = inventoryList.stream()
|
||||
.filter(e -> e.getQuantity().compareTo(BigDecimal.ZERO) > 0).collect(Collectors.toList());
|
||||
if (!hasInventoryList.isEmpty()) {
|
||||
baseDto.setDefaultLotNumber(hasInventoryList.get(0).getLotNumber());
|
||||
}
|
||||
}
|
||||
if (!inventoryList.isEmpty() && !medLocationConfig.isEmpty()) {
|
||||
// 第一步:在medLocationConfig中匹配categoryCode
|
||||
AdviceInventoryDto result1 = medLocationConfig.stream()
|
||||
.filter(dto -> baseDto.getCategoryCode() != null && dto.getCategoryCode() != null
|
||||
&& baseDto.getCategoryCode().equals(dto.getCategoryCode())).findFirst()
|
||||
.orElse(null);
|
||||
if (result1 != null) {
|
||||
// 第二步:在inventoryList中匹配locationId
|
||||
AdviceInventoryDto result2 = inventoryList.stream()
|
||||
.filter(dto -> result1.getLocationId() != null && dto.getLocationId() != null
|
||||
&& result1.getLocationId().equals(dto.getLocationId())).findFirst()
|
||||
.orElse(null);
|
||||
if (result2 != null && result2.getLotNumber() != null) {
|
||||
baseDto.setDefaultLotNumber(result2.getLotNumber());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unitCode = baseDto.getUnitCode();
|
||||
chargeItemDefinitionId = baseDto.getChargeItemDefinitionId();
|
||||
List<AdvicePriceDto> priceDtoList = new ArrayList<>();
|
||||
// 库存信息里取 命中条件 去匹配价格
|
||||
for (AdviceInventoryDto adviceInventoryDto : inventoryList) {
|
||||
Long finalChargeItemDefinitionId = chargeItemDefinitionId;
|
||||
String finalUnitCode = unitCode;
|
||||
// 从定价子表取价格(适用于批次售卖场景)
|
||||
List<AdvicePriceDto> childPrice = childCharge.stream()
|
||||
.filter(e -> e.getDefinitionId() != null && finalChargeItemDefinitionId != null
|
||||
&& e.getDefinitionId().equals(finalChargeItemDefinitionId)
|
||||
&& e.getConditionValue() != null && adviceInventoryDto.getLotNumber() != null
|
||||
&& e.getConditionValue().equals(adviceInventoryDto.getLotNumber()))
|
||||
.peek(e -> e.setUnitCode(finalUnitCode)) // 设置 unitCode
|
||||
.collect(Collectors.toList());
|
||||
// 从定价主表取价格(适用于统一零售价场景)
|
||||
List<AdvicePriceDto> mainPrice = mainCharge.stream()
|
||||
.filter(e -> baseDto.getChargeItemDefinitionId() != null && e.getDefinitionId() != null
|
||||
&& baseDto.getChargeItemDefinitionId().equals(e.getDefinitionId()))
|
||||
.collect(Collectors.toList());
|
||||
// 按批次售价
|
||||
if (OrderPricingSource.BATCH_SELLING_PRICE.getCode().equals(orderPricingSource)) {
|
||||
priceDtoList.addAll(childPrice);
|
||||
} else {
|
||||
priceDtoList.addAll(mainPrice);
|
||||
}
|
||||
}
|
||||
// 价格信息
|
||||
baseDto.setPriceList(priceDtoList);
|
||||
} else if (CommonConstants.TableName.WOR_ACTIVITY_DEFINITION.equals(tableName)) { // 诊疗
|
||||
List<AdvicePriceDto> priceList
|
||||
= mainCharge.stream().filter(e -> baseDto.getChargeItemDefinitionId().equals(e.getDefinitionId()))
|
||||
= mainCharge.stream().filter(e -> baseDto.getChargeItemDefinitionId() != null && e.getDefinitionId() != null
|
||||
&& baseDto.getChargeItemDefinitionId().equals(e.getDefinitionId()))
|
||||
.collect(Collectors.toList());
|
||||
// 价格信息
|
||||
baseDto.setPriceList(priceList);
|
||||
// 活动类型
|
||||
baseDto.setActivityType_enumText(
|
||||
EnumUtils.getInfoByValue(ActivityType.class, baseDto.getActivityType()));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return adviceBaseInfo;
|
||||
}
|
||||
|
||||
@@ -288,6 +396,7 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
*/
|
||||
@Override
|
||||
public R<?> saveAdvice(AdviceSaveParam adviceSaveParam, String adviceOpType) {
|
||||
try {
|
||||
// 患者挂号对应的科室id
|
||||
Long organizationId = adviceSaveParam.getOrganizationId();
|
||||
// 医嘱分类信息
|
||||
@@ -363,8 +472,23 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
.in(ChargeItem::getServiceId, requestIds));
|
||||
}
|
||||
|
||||
// 数据变更后清理相关缓存
|
||||
clearRelatedCache();
|
||||
|
||||
return R.ok(medRequestIdList,
|
||||
MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[]{"门诊医嘱"}));
|
||||
} catch (Exception e) {
|
||||
// 异常处理
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 清理相关缓存
|
||||
*/
|
||||
private void clearRelatedCache() {
|
||||
// 目前不使用缓存,此方法为空实现
|
||||
// 如果将来启用缓存,可以在这里实现缓存清理逻辑
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -956,6 +1080,12 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
*/
|
||||
@Override
|
||||
public R<?> getProofResult(Long encounterId) {
|
||||
// 检查参数
|
||||
if (encounterId == null) {
|
||||
log.warn("获取检验结果时就诊ID为空");
|
||||
return R.ok(new ArrayList<>());
|
||||
}
|
||||
|
||||
// LIS查看报告地址
|
||||
String lisReportUrl = TenantOptionUtil.getOptionContent(TenantOptionDict.LIS_REPORT_URL);
|
||||
if (StringUtils.isEmpty(lisReportUrl)) {
|
||||
@@ -980,6 +1110,12 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
*/
|
||||
@Override
|
||||
public R<?> getTestResult(Long encounterId) {
|
||||
// 检查参数
|
||||
if (encounterId == null) {
|
||||
log.warn("获取检查结果时就诊ID为空");
|
||||
return R.ok(new ArrayList<>());
|
||||
}
|
||||
|
||||
// PACS查看报告地址
|
||||
String pacsReportUrl = TenantOptionUtil.getOptionContent(TenantOptionDict.PACS_REPORT_URL);
|
||||
if (StringUtils.isEmpty(pacsReportUrl)) {
|
||||
|
||||
@@ -401,6 +401,20 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation
|
||||
// 删除
|
||||
List<AdviceSaveDto> deleteList = medicineList.stream()
|
||||
.filter(e -> DbOpType.DELETE.getCode().equals(e.getDbOpType())).collect(Collectors.toList());
|
||||
|
||||
// 校验删除的医嘱是否已经收费
|
||||
List<Long> delRequestIdList = deleteList.stream().map(AdviceSaveDto::getRequestId).collect(Collectors.toList());
|
||||
if (!delRequestIdList.isEmpty()) {
|
||||
List<ChargeItem> chargeItemList = iChargeItemService.getChargeItemInfoByReqId(delRequestIdList);
|
||||
if (chargeItemList != null && !chargeItemList.isEmpty()) {
|
||||
for (ChargeItem ci : chargeItemList) {
|
||||
if (ChargeItemStatus.BILLED.getValue().equals(ci.getStatusEnum())) {
|
||||
return R.fail("已收费的项目无法删除,请刷新页面后重试");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (AdviceSaveDto adviceSaveDto : deleteList) {
|
||||
iMedicationRequestService.removeById(adviceSaveDto.getRequestId());
|
||||
// 删除已经产生的药品发放信息
|
||||
|
||||
@@ -22,8 +22,11 @@ import com.openhis.web.doctorstation.dto.PrescriptionInfoBaseDto;
|
||||
import com.openhis.web.doctorstation.dto.PrescriptionInfoDetailDto;
|
||||
import com.openhis.web.doctorstation.dto.ReceptionStatisticsDto;
|
||||
import com.openhis.web.doctorstation.mapper.DoctorStationMainAppMapper;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.*;
|
||||
@@ -33,6 +36,7 @@ import java.util.stream.Collectors;
|
||||
* 医生站-主页面 应用实现类
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppService {
|
||||
|
||||
@Resource
|
||||
@@ -55,6 +59,9 @@ public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppSer
|
||||
|
||||
@Resource
|
||||
IDoctorStationChineseMedicalAppService iDoctorStationChineseMedicalAppService;
|
||||
|
||||
@Resource
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
/**
|
||||
* 查询就诊患者信息
|
||||
*
|
||||
@@ -158,11 +165,51 @@ public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppSer
|
||||
*/
|
||||
@Override
|
||||
public R<?> completeEncounter(Long encounterId) {
|
||||
// 1. 检查当前患者状态是否为就诊中(20)
|
||||
Encounter encounter = encounterMapper.selectById(encounterId);
|
||||
if (encounter == null) {
|
||||
return R.fail("就诊记录不存在");
|
||||
}
|
||||
|
||||
// 检查状态是否为就诊中
|
||||
if (!EncounterStatus.IN_PROGRESS.getValue().equals(encounter.getStatusEnum())) {
|
||||
return R.fail("当前患者不在就诊中状态");
|
||||
}
|
||||
|
||||
// 2. 更新状态为已完成(30),并写入完成时间
|
||||
Date now = new Date();
|
||||
int update = encounterMapper.update(null,
|
||||
new LambdaUpdateWrapper<Encounter>().eq(Encounter::getId, encounterId)
|
||||
.set(Encounter::getStatusEnum, EncounterStatus.DISCHARGED.getValue())
|
||||
.set(Encounter::getSubjectStatusEnum, EncounterSubjectStatus.DEPARTED.getValue()));
|
||||
return update > 0 ? R.ok() : R.fail();
|
||||
.set(Encounter::getSubjectStatusEnum, EncounterSubjectStatus.DEPARTED.getValue())
|
||||
.set(Encounter::getEndTime, now));
|
||||
|
||||
if (update <= 0) {
|
||||
return R.fail("更新状态失败");
|
||||
}
|
||||
|
||||
// 3. 写入审计日志
|
||||
try {
|
||||
String username = SecurityUtils.getUsernameSafe();
|
||||
String sql = "INSERT INTO sys_oper_log "
|
||||
+ "(title,oper_time,method,request_method,oper_name,oper_url,oper_param,json_result) "
|
||||
+ "VALUES (?, ?, ?, ?, ?, ?, ?, ?)";
|
||||
|
||||
jdbcTemplate.update(sql,
|
||||
"完诊操作",
|
||||
now,
|
||||
"DoctorStationMainAppServiceImpl.completeEncounter()",
|
||||
"POST",
|
||||
username,
|
||||
"/doctorstation/main/complete-encounter",
|
||||
"{\"encounterId\": " + encounterId + "}",
|
||||
"{\"code\": 200, \"msg\": \"就诊完成\", \"data\": null}");
|
||||
} catch (Exception e) {
|
||||
log.error("写入完诊审计日志失败", e);
|
||||
// 审计日志失败不影响主流程
|
||||
}
|
||||
|
||||
return R.ok("就诊完成");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -34,6 +34,10 @@ public class DoctorStationPtDetailsAppServiceImpl implements IDoctorStationPtDet
|
||||
*/
|
||||
@Override
|
||||
public R<?> getPtDetails(Long encounterId) {
|
||||
// 检查参数
|
||||
if (encounterId == null) {
|
||||
return R.fail("就诊ID不能为空");
|
||||
}
|
||||
|
||||
// 收费状态List(1:待收费,2:待结算,5:已结算)
|
||||
List<Integer> statusList = new ArrayList<>();
|
||||
@@ -49,6 +53,10 @@ public class DoctorStationPtDetailsAppServiceImpl implements IDoctorStationPtDet
|
||||
ChargeItemContext.ACTIVITY.getValue(), ClinicalStatus.ACTIVE.getValue(), LocationForm.BED.getValue(),
|
||||
ParticipantType.ADMITTER.getCode(), statusList);
|
||||
|
||||
if (patientDetailsDto == null) {
|
||||
return R.fail("未找到患者详情信息");
|
||||
}
|
||||
|
||||
// 住院的场合,获取现在时间,计算住院天数
|
||||
if (patientDetailsDto.getClassEnum() == EncounterClass.IMP.getValue()) {
|
||||
// 截至时间,用于计算当前时刻下显示的住院天数
|
||||
|
||||
@@ -106,7 +106,7 @@ public class DoctorStationAdviceController {
|
||||
* @return 医嘱请求数据
|
||||
*/
|
||||
@GetMapping(value = "/request-base-info")
|
||||
public R<?> getRequestBaseInfo(@RequestParam Long encounterId) {
|
||||
public R<?> getRequestBaseInfo(@RequestParam(required = false) Long encounterId) {
|
||||
return iDoctorStationAdviceAppService.getRequestBaseInfo(encounterId);
|
||||
}
|
||||
|
||||
@@ -114,10 +114,11 @@ public class DoctorStationAdviceController {
|
||||
* 查询历史医嘱请求数据
|
||||
*
|
||||
* @param patientId 病人id
|
||||
* @param encounterId 就诊id
|
||||
* @return 历史医嘱请求数据
|
||||
*/
|
||||
@GetMapping(value = "/request-history-info")
|
||||
public R<?> getRequestHistoryInfo(@RequestParam Long patientId, Long encounterId) {
|
||||
public R<?> getRequestHistoryInfo(@RequestParam Long patientId, @RequestParam(required = false) Long encounterId) {
|
||||
return iDoctorStationAdviceAppService.getRequestHistoryInfo(patientId, encounterId);
|
||||
}
|
||||
|
||||
@@ -138,7 +139,7 @@ public class DoctorStationAdviceController {
|
||||
* @return 就诊费用性质
|
||||
*/
|
||||
@GetMapping(value = "/get-encounter-contract")
|
||||
public R<?> getEncounterContract(@RequestParam Long encounterId) {
|
||||
public R<?> getEncounterContract(@RequestParam(required = false) Long encounterId) {
|
||||
return iDoctorStationAdviceAppService.getEncounterContract(encounterId);
|
||||
}
|
||||
|
||||
@@ -162,7 +163,7 @@ public class DoctorStationAdviceController {
|
||||
* @return 检验url相关参数
|
||||
*/
|
||||
@GetMapping(value = "/proof-result")
|
||||
public R<?> getProofResult(@RequestParam(value = "encounterId") Long encounterId) {
|
||||
public R<?> getProofResult(@RequestParam(value = "encounterId", required = false) Long encounterId) {
|
||||
return iDoctorStationAdviceAppService.getProofResult(encounterId);
|
||||
}
|
||||
|
||||
@@ -173,7 +174,7 @@ public class DoctorStationAdviceController {
|
||||
* @return 检查url相关参数
|
||||
*/
|
||||
@GetMapping(value = "/test-result")
|
||||
public R<?> getTestResult(@RequestParam(value = "encounterId") Long encounterId) {
|
||||
public R<?> getTestResult(@RequestParam(value = "encounterId", required = false) Long encounterId) {
|
||||
return iDoctorStationAdviceAppService.getTestResult(encounterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ public class DoctorStationChineseMedicalController {
|
||||
* @return 中医就诊诊断信息
|
||||
*/
|
||||
@GetMapping(value = "/get-tcm-encounter-diagnosis")
|
||||
public R<?> getTcmEncounterDiagnosis(@RequestParam Long encounterId) {
|
||||
public R<?> getTcmEncounterDiagnosis(@RequestParam(required = false) Long encounterId) {
|
||||
return iDoctorStationChineseMedicalAppService.getTcmEncounterDiagnosis(encounterId);
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ public class DoctorStationChineseMedicalController {
|
||||
* @return 医嘱请求数据
|
||||
*/
|
||||
@GetMapping(value = "/tcm-request-base-info")
|
||||
public R<?> getTcmRequestBaseInfo(@RequestParam Long encounterId) {
|
||||
public R<?> getTcmRequestBaseInfo(@RequestParam(required = false) Long encounterId) {
|
||||
return iDoctorStationChineseMedicalAppService.getTcmRequestBaseInfo(encounterId);
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ public class DoctorStationChineseMedicalController {
|
||||
* @return 中医历史医嘱请求数据
|
||||
*/
|
||||
@GetMapping(value = "/tcm-request-history-info")
|
||||
public R<?> getTcmRequestHistoryInfo(@RequestParam Long patientId, Long encounterId) {
|
||||
public R<?> getTcmRequestHistoryInfo(@RequestParam Long patientId, @RequestParam(required = false) Long encounterId) {
|
||||
return iDoctorStationChineseMedicalAppService.getTcmRequestHistoryInfo(patientId, encounterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ public class DoctorStationDiagnosisController {
|
||||
* @return 就诊诊断信息
|
||||
*/
|
||||
@GetMapping(value = "/get-encounter-diagnosis")
|
||||
public R<?> getEncounterDiagnosis(@RequestParam Long encounterId) {
|
||||
public R<?> getEncounterDiagnosis(@RequestParam(required = false) Long encounterId) {
|
||||
return iDoctorStationDiagnosisAppService.getEncounterDiagnosis(encounterId);
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ public class DoctorStationDiagnosisController {
|
||||
* @return 就诊诊断信息
|
||||
*/
|
||||
@GetMapping(value = "/get-encounter-diagnosis-ele")
|
||||
public R<?> getEncounterDiagnosisByEncounterId(@RequestParam Long encounterId,@RequestParam String searchKey) {
|
||||
public R<?> getEncounterDiagnosisByEncounterId(@RequestParam(required = false) Long encounterId,@RequestParam String searchKey) {
|
||||
return iDoctorStationDiagnosisAppService.getEncounterDiagnosisByEncounterId(encounterId,searchKey);
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public class DoctorStationEmrController {
|
||||
* @return 病历详情
|
||||
*/
|
||||
@GetMapping("/emr-detail")
|
||||
public R<?> getEmrDetail(@RequestParam(value = "encounterId") Long encounterId) {
|
||||
public R<?> getEmrDetail(@RequestParam(value = "encounterId", required = false) Long encounterId) {
|
||||
return iDoctorStationEmrAppService.getEmrDetail(encounterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -64,8 +64,16 @@ public class DoctorStationMainController {
|
||||
* @return 结果
|
||||
*/
|
||||
@GetMapping(value = "/receive-encounter")
|
||||
public R<?> receiveEncounter(@RequestParam Long encounterId) {
|
||||
return iDoctorStationMainAppService.receiveEncounter(encounterId);
|
||||
public R<?> receiveEncounter(@RequestParam(value = "encounterId", required = false) String encounterId) {
|
||||
if (encounterId == null || "undefined".equals(encounterId) || "null".equals(encounterId)) {
|
||||
return R.fail("就诊ID不能为空");
|
||||
}
|
||||
try {
|
||||
Long id = Long.parseLong(encounterId);
|
||||
return iDoctorStationMainAppService.receiveEncounter(id);
|
||||
} catch (NumberFormatException e) {
|
||||
return R.fail("就诊ID格式错误");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -75,8 +83,16 @@ public class DoctorStationMainController {
|
||||
* @return 结果
|
||||
*/
|
||||
@GetMapping(value = "/leave-encounter")
|
||||
public R<?> leaveEncounter(@RequestParam Long encounterId) {
|
||||
return iDoctorStationMainAppService.leaveEncounter(encounterId);
|
||||
public R<?> leaveEncounter(@RequestParam(value = "encounterId", required = false) String encounterId) {
|
||||
if (encounterId == null || "undefined".equals(encounterId) || "null".equals(encounterId)) {
|
||||
return R.fail("就诊ID不能为空");
|
||||
}
|
||||
try {
|
||||
Long id = Long.parseLong(encounterId);
|
||||
return iDoctorStationMainAppService.leaveEncounter(id);
|
||||
} catch (NumberFormatException e) {
|
||||
return R.fail("就诊ID格式错误");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -86,8 +102,16 @@ public class DoctorStationMainController {
|
||||
* @return 结果
|
||||
*/
|
||||
@GetMapping(value = "/complete-encounter")
|
||||
public R<?> completeEncounter(@RequestParam Long encounterId) {
|
||||
return iDoctorStationMainAppService.completeEncounter(encounterId);
|
||||
public R<?> completeEncounter(@RequestParam(value = "encounterId", required = false) String encounterId) {
|
||||
if (encounterId == null || "undefined".equals(encounterId) || "null".equals(encounterId)) {
|
||||
return R.fail("就诊ID不能为空");
|
||||
}
|
||||
try {
|
||||
Long id = Long.parseLong(encounterId);
|
||||
return iDoctorStationMainAppService.completeEncounter(id);
|
||||
} catch (NumberFormatException e) {
|
||||
return R.fail("就诊ID格式错误");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -97,8 +121,16 @@ public class DoctorStationMainController {
|
||||
* @return 结果
|
||||
*/
|
||||
@GetMapping(value = "/cancel-encounter")
|
||||
public R<?> cancelEncounter(@RequestParam Long encounterId) {
|
||||
return iDoctorStationMainAppService.cancelEncounter(encounterId);
|
||||
public R<?> cancelEncounter(@RequestParam(value = "encounterId", required = false) String encounterId) {
|
||||
if (encounterId == null || "undefined".equals(encounterId) || "null".equals(encounterId)) {
|
||||
return R.fail("就诊ID不能为空");
|
||||
}
|
||||
try {
|
||||
Long id = Long.parseLong(encounterId);
|
||||
return iDoctorStationMainAppService.cancelEncounter(id);
|
||||
} catch (NumberFormatException e) {
|
||||
return R.fail("就诊ID格式错误");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,7 +32,7 @@ public class DoctorStationPtDetailsController {
|
||||
* @return 患者详情
|
||||
*/
|
||||
@GetMapping(value = "/patient-details")
|
||||
public R<?> getPtDetails(@RequestParam Long encounterId) {
|
||||
public R<?> getPtDetails(@RequestParam(required = false) Long encounterId) {
|
||||
|
||||
return doctorStationPtDetailsAppService.getPtDetails(encounterId);
|
||||
}
|
||||
|
||||
@@ -98,6 +98,9 @@ public class TodayOutpatientController {
|
||||
public R<TodayOutpatientPatientDto> getPatientDetail(
|
||||
@PathVariable("encounterId") Long encounterId,
|
||||
HttpServletRequest request) {
|
||||
if (encounterId == null) {
|
||||
return R.fail("就诊记录ID不能为空");
|
||||
}
|
||||
TodayOutpatientPatientDto patient = todayOutpatientService.getPatientDetail(encounterId, request);
|
||||
return R.ok(patient);
|
||||
}
|
||||
|
||||
@@ -123,4 +123,8 @@ public class PatientInfoDto {
|
||||
* 病历号
|
||||
*/
|
||||
private String busNo;
|
||||
/**
|
||||
* 就诊卡号
|
||||
*/
|
||||
private String identifierNo;
|
||||
}
|
||||
|
||||
@@ -293,11 +293,8 @@ public class ATDManageAppServiceImpl implements IATDManageAppService {
|
||||
if (admissionPatientInfoDto.getPriorityEnum() != null) {
|
||||
// 更新患者病情
|
||||
encounterService.updatePriorityEnumById(encounterId, admissionPatientInfoDto.getPriorityEnum());
|
||||
// 将之前的住院参与者更新为已完成
|
||||
Integer result = encounterParticipantService.updateEncounterParticipantsStatus(encounterId);
|
||||
if (result == 0) {
|
||||
return R.fail("患者信息更新失败,请联系管理员");
|
||||
}
|
||||
// 将之前的住院参与者更新为已完成(如果存在的话)
|
||||
encounterParticipantService.updateEncounterParticipantsStatus(encounterId);
|
||||
// 更新住院参与者
|
||||
// 住院医生
|
||||
encounterParticipantService.creatEncounterParticipants(encounterId, startTime,
|
||||
|
||||
@@ -187,7 +187,7 @@ public class PatientHomeAppServiceImpl implements IPatientHomeAppService {
|
||||
@Override
|
||||
public List<OrgMetadata> getCaty() {
|
||||
List<Organization> list = iOrganizationService.getList(OrganizationType.DEPARTMENT.getValue(),
|
||||
OrganizationClass.INPATIENT.getValue());
|
||||
OrganizationClass.INPATIENT.getCode());
|
||||
List<OrgMetadata> orgMetadataList = new ArrayList<>();
|
||||
OrgMetadata orgMetadata;
|
||||
for (Organization organization : list) {
|
||||
@@ -265,16 +265,19 @@ public class PatientHomeAppServiceImpl implements IPatientHomeAppService {
|
||||
encounterService.saveOrUpdateEncounter(encounter);
|
||||
|
||||
// 2.就诊位置表变更
|
||||
// 就诊位置ID变更
|
||||
// 直接更新指定ID的就诊位置记录
|
||||
EncounterLocation encounterLocation = new EncounterLocation();
|
||||
encounterLocation.setId(encounterLocationId)
|
||||
// 设置就诊ID
|
||||
.setEncounterId(encounterId)
|
||||
// 设置位置ID
|
||||
.setLocationId(locationId)
|
||||
// 设置状态枚举
|
||||
.setStatusEnum(EncounterActivityStatus.COMPLETED.getValue())
|
||||
// 设置物理枚举为 8:病床
|
||||
.setFormEnum(LocationForm.BED.getValue());
|
||||
encounterLocationService.saveOrUpdateEncounterLocation(encounterLocation);
|
||||
// 直接更新指定ID的记录
|
||||
encounterSuccess = encounterLocationService.updateById(encounterLocation);
|
||||
|
||||
// 3.位置表
|
||||
// 旧病床状态变更(空闲)
|
||||
|
||||
@@ -308,12 +308,20 @@ public class PatientInformationServiceImpl implements IPatientInformationService
|
||||
* @return 患者信息
|
||||
*/
|
||||
private Patient handlePatientInfo(PatientBaseInfoDto patientInfoDto) {
|
||||
Patient patient = new Patient();
|
||||
patient.setId(patientInfoDto.getId());
|
||||
if (patientInfoDto.getId() == null) {
|
||||
patient.setBusNo(assignSeqUtil.getSeq(AssignSeqEnum.PATIENT_NUM.getPrefix(), 10));
|
||||
patientInfoDto.setActiveFlag(PublicationStatus.ACTIVE.getValue()); // 默认启用
|
||||
Patient patient;
|
||||
if (patientInfoDto.getId() != null) {
|
||||
// 更新现有患者信息
|
||||
patient = patientService.getById(patientInfoDto.getId());
|
||||
if (patient == null) {
|
||||
throw new ServiceException("患者信息不存在,无法更新");
|
||||
}
|
||||
} else {
|
||||
// 新增患者信息
|
||||
patient = new Patient();
|
||||
patient.setBusNo(assignSeqUtil.getSeq(AssignSeqEnum.PATIENT_NUM.getPrefix(), 10));
|
||||
patient.setActiveFlag(PublicationStatus.ACTIVE.getValue()); // 默认启用
|
||||
}
|
||||
|
||||
patient.setName(patientInfoDto.getName()); // 患者姓名
|
||||
patient.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(patientInfoDto.getName())); // 拼音首拼
|
||||
patient.setWbStr(ChineseConvertUtils.toWBFirstLetter(patientInfoDto.getName())); // 五笔首拼
|
||||
@@ -337,7 +345,14 @@ public class PatientInformationServiceImpl implements IPatientInformationService
|
||||
patient.setDeceasedDate(patientInfoDto.getDeceasedDate()); // 死亡时间
|
||||
patient.setNationalityCode(patientInfoDto.getNationalityCode());// 民族
|
||||
patient.setActiveFlag(patientInfoDto.getActiveFlag());// 活动标识
|
||||
patientService.saveOrUpdate(patient);
|
||||
|
||||
if (patientInfoDto.getId() != null) {
|
||||
// 更新操作
|
||||
patientService.updateById(patient);
|
||||
} else {
|
||||
// 新增操作
|
||||
patientService.save(patient);
|
||||
}
|
||||
|
||||
return patient;
|
||||
}
|
||||
|
||||
@@ -59,6 +59,13 @@ public interface IEleInvoiceService {
|
||||
*/
|
||||
R<?> invoiceWriteoff(Long paymentId, String reason);
|
||||
|
||||
/**
|
||||
* 获取发票HTML
|
||||
* @param busNo 业务流水号
|
||||
* @return HTML字符串
|
||||
*/
|
||||
String getInvoiceHtml(String busNo);
|
||||
|
||||
/**
|
||||
* 查询已开发票
|
||||
* @param invoiceId 主键id
|
||||
|
||||
@@ -30,6 +30,7 @@ import com.openhis.financial.domain.PaymentRecDetail;
|
||||
import com.openhis.financial.domain.PaymentReconciliation;
|
||||
import com.openhis.financial.service.IPaymentRecDetailService;
|
||||
import com.openhis.financial.service.IPaymentReconciliationService;
|
||||
import com.openhis.web.paymentmanage.appservice.IChargeBillService;
|
||||
import com.openhis.web.paymentmanage.appservice.IEleInvoiceService;
|
||||
import com.openhis.web.paymentmanage.dto.*;
|
||||
import com.openhis.web.paymentmanage.mapper.EleInvoiceMapper;
|
||||
@@ -38,6 +39,11 @@ import com.openhis.yb.service.IClinicSettleService;
|
||||
import com.openhis.yb.service.IRegService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.velocity.Template;
|
||||
import org.apache.velocity.VelocityContext;
|
||||
import org.apache.velocity.app.Velocity;
|
||||
import org.apache.velocity.runtime.RuntimeConstants;
|
||||
import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
@@ -56,6 +62,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.io.StringWriter;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.nio.charset.Charset;
|
||||
@@ -64,6 +71,7 @@ import java.text.DecimalFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -97,153 +105,180 @@ public class EleInvoiceServiceImpl implements IEleInvoiceService {
|
||||
@Resource
|
||||
IEncounterService encounterService;
|
||||
@Resource
|
||||
IChargeBillService chargeBillService;
|
||||
@Resource
|
||||
private AssignSeqUtil assignSeqUtil;
|
||||
@Autowired
|
||||
private HttpConfig httpConfig;
|
||||
|
||||
public static JSONObject PreInvoicePostForward(JSONObject bill, String endpoint) {
|
||||
String resultString = "";
|
||||
// JSONObject result = new JSONObject();
|
||||
// 获取当前租户的option信息
|
||||
static {
|
||||
Properties p = new Properties();
|
||||
p.setProperty(RuntimeConstants.RESOURCE_LOADER, "classpath");
|
||||
p.setProperty("classpath.resource.loader.class", ClasspathResourceLoader.class.getName());
|
||||
p.setProperty(Velocity.INPUT_ENCODING, "UTF-8");
|
||||
Velocity.init(p);
|
||||
}
|
||||
|
||||
private static final Map<String, JSONObject> invoiceDataMap = new ConcurrentHashMap<>();
|
||||
|
||||
private JSONObject internalRegistration(JSONObject bill) {
|
||||
return createInternalSuccessResponse(bill, "REG");
|
||||
}
|
||||
|
||||
private JSONObject internalOutpatient(JSONObject bill) {
|
||||
return createInternalSuccessResponse(bill, "OUT");
|
||||
}
|
||||
|
||||
private JSONObject internalHospitalized(JSONObject bill) {
|
||||
return createInternalSuccessResponse(bill, "HOS");
|
||||
}
|
||||
|
||||
private JSONObject internalWriteOff(JSONObject bill) {
|
||||
JSONObject message = new JSONObject();
|
||||
message.put("eScarletBillBatchCode", "SC" + System.currentTimeMillis());
|
||||
message.put("eScarletBillNo", UUID.randomUUID().toString().substring(0, 8));
|
||||
message.put("eScarletRandom", "666888");
|
||||
message.put("createTime", "20251101143028");
|
||||
message.put("billQRCode", "QR_DATA_SCARLET");
|
||||
|
||||
JSONObject optionJson = SecurityUtils.getLoginUser().getOptionJson();
|
||||
String baseUrl = optionJson.getString(CommonConstants.Option.URL);
|
||||
String appID = optionJson.getString(CommonConstants.Option.APP_ID);
|
||||
String appKey = optionJson.getString(CommonConstants.Option.KEY);
|
||||
message.put("pictureUrl", baseUrl + "/invoice/view?busNo=scarlet");
|
||||
message.put("pictureNetUrl", baseUrl + "/invoice/view?busNo=scarlet");
|
||||
|
||||
EleInvioceBillDto eleInvioceBillDto = new EleInvioceBillDto();
|
||||
eleInvioceBillDto.setBaseUrl(baseUrl);
|
||||
eleInvioceBillDto.setEndpoint(endpoint);
|
||||
eleInvioceBillDto.setAppKey(appKey);
|
||||
eleInvioceBillDto.setAppID(appID);
|
||||
eleInvioceBillDto.setJsonObject(bill);
|
||||
|
||||
// 创建Http请求
|
||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(30000).setConnectionRequestTimeout(30000)
|
||||
.setSocketTimeout(30000).build();
|
||||
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig).build();
|
||||
CloseableHttpResponse response = null;
|
||||
// 发送请求
|
||||
try {
|
||||
HttpPost httpPost = new HttpPost(optionJson.getString("invoiceUrl") + "/eleInvoice/forward");
|
||||
System.out.println(optionJson.getString("invoiceUrl") + "/eleInvoice/forward");
|
||||
StringEntity stringEntity = new StringEntity(com.alibaba.fastjson2.JSON.toJSONString(eleInvioceBillDto),
|
||||
ContentType.APPLICATION_JSON);
|
||||
httpPost.setEntity(stringEntity);
|
||||
// 执行http请求
|
||||
response = httpClient.execute(httpPost);
|
||||
if (response == null) {
|
||||
throw new ServiceException("Http请求异常,未接受返回参数");
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("result", "S0000");
|
||||
result.put("message", Base64.getEncoder().encodeToString(message.toJSONString().getBytes(StandardCharsets.UTF_8)));
|
||||
return result;
|
||||
}
|
||||
resultString = EntityUtils.toString(response.getEntity(), "utf-8");
|
||||
|
||||
private JSONObject createInternalSuccessResponse(JSONObject bill, String prefix) {
|
||||
String busNo = bill.getString("busNo");
|
||||
JSONObject optionJson = SecurityUtils.getLoginUser().getOptionJson();
|
||||
String baseUrl = optionJson.getString(CommonConstants.Option.URL);
|
||||
|
||||
JSONObject message = new JSONObject();
|
||||
message.put("billBatchCode", prefix + "BC" + System.currentTimeMillis());
|
||||
message.put("billNo", UUID.randomUUID().toString().substring(0, 8));
|
||||
message.put("random", "123456");
|
||||
message.put("createTime", new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date()));
|
||||
message.put("billQRCode", "QR_" + busNo);
|
||||
message.put("pictureUrl", baseUrl + "/invoice/view?busNo=" + busNo);
|
||||
message.put("pictureNetUrl", baseUrl + "/invoice/view?busNo=" + busNo);
|
||||
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("result", "S0000");
|
||||
result.put("message", Base64.getEncoder().encodeToString(message.toJSONString().getBytes(StandardCharsets.UTF_8)));
|
||||
return result;
|
||||
}
|
||||
|
||||
private JSONObject createInternalErrorResponse(String msg) {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("result", "E0001");
|
||||
result.put("message", Base64.getEncoder().encodeToString(msg.getBytes(StandardCharsets.UTF_8)));
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInvoiceHtml(String busNo) {
|
||||
JSONObject bill = invoiceDataMap.get(busNo);
|
||||
if (bill == null) {
|
||||
return "<html><body><h2>未找到流水号为 " + busNo + " 的发票数据</h2></body></html>";
|
||||
}
|
||||
|
||||
JSONObject receiptData = bill.getJSONObject("receiptData");
|
||||
|
||||
VelocityContext context = new VelocityContext();
|
||||
context.put("hospitalName", receiptData != null ? receiptData.getString("fixmedinsName") : "HIS 医疗机构");
|
||||
context.put("patientName", bill.getString("payer"));
|
||||
context.put("outpatientNo", receiptData != null ? receiptData.getString("regNo") : bill.getString("busNo"));
|
||||
context.put("idCard", bill.getString("cardNo"));
|
||||
context.put("tel", bill.getString("tel"));
|
||||
context.put("deptName", bill.getString("patientCategory"));
|
||||
context.put("doctorName", receiptData != null ? receiptData.getString("doctor") : "-");
|
||||
context.put("appointmentTime", bill.getString("consultationDate"));
|
||||
context.put("totalAmt", bill.getString("totalAmt"));
|
||||
context.put("busNo", busNo);
|
||||
context.put("printTime", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
|
||||
|
||||
List<Map<String, Object>> items = new ArrayList<>();
|
||||
if (receiptData != null && receiptData.containsKey("chargeItem")) {
|
||||
com.alibaba.fastjson2.JSONArray chargeItems = receiptData.getJSONArray("chargeItem");
|
||||
for (int i = 0; i < chargeItems.size(); i++) {
|
||||
JSONObject item = chargeItems.getJSONObject(i);
|
||||
Map<String, Object> itemMap = new HashMap<>();
|
||||
itemMap.put("chargeItemName", item.getString("chargeItemName"));
|
||||
itemMap.put("quantityValue", item.getString("quantityValue"));
|
||||
itemMap.put("totalPrice", item.getString("totalPrice"));
|
||||
items.add(itemMap);
|
||||
}
|
||||
} else {
|
||||
Map<String, Object> itemMap = new HashMap<>();
|
||||
itemMap.put("chargeItemName", "挂号费");
|
||||
itemMap.put("quantityValue", "1");
|
||||
itemMap.put("totalPrice", bill.getString("totalAmt"));
|
||||
items.add(itemMap);
|
||||
}
|
||||
context.put("items", items);
|
||||
|
||||
try {
|
||||
Template template = Velocity.getTemplate("vm/invoice/invoice.vm");
|
||||
StringWriter writer = new StringWriter();
|
||||
template.merge(context, writer);
|
||||
return writer.toString();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new ServiceException("Http请求异常,请稍后再试。");
|
||||
} finally {
|
||||
if (response != null) {
|
||||
log.error("渲染发票模板失败", e);
|
||||
return "<html><body><h2>渲染发票凭条失败:" + e.getMessage() + "</h2></body></html>";
|
||||
}
|
||||
}
|
||||
|
||||
public JSONObject PreInvoicePostForward(JSONObject bill, String endpoint) {
|
||||
// 参考补打小票逻辑,动态获取小票详细信息
|
||||
Long paymentId = bill.getLong("paymentId");
|
||||
if (paymentId != null) {
|
||||
try {
|
||||
response.close();
|
||||
} catch (IOException e) {
|
||||
// logger.error("关闭响应异常", e);
|
||||
throw new ServiceException("未关闭系统资源:" + e.getStackTrace());
|
||||
Map<String, Object> receiptDetail = chargeBillService.getDetail(paymentId);
|
||||
bill.put("receiptData", receiptDetail);
|
||||
log.info("已成功获取并注入小票动态数据,paymentId: {}", paymentId);
|
||||
} catch (Exception e) {
|
||||
log.error("获取小票数据失败,paymentId: {}", paymentId, e);
|
||||
}
|
||||
}
|
||||
|
||||
// 内部调用逻辑:不再使用 Http 客户端,直接分发到本地逻辑
|
||||
String busNo = bill.getString("busNo");
|
||||
if (busNo != null) {
|
||||
invoiceDataMap.put(busNo, bill);
|
||||
}
|
||||
return JSONObject.parseObject(resultString);
|
||||
|
||||
JSONObject internalResult;
|
||||
if (endpoint.contains("invEBillRegistration")) {
|
||||
internalResult = internalRegistration(bill);
|
||||
} else if (endpoint.contains("invoiceEBillOutpatient")) {
|
||||
internalResult = internalOutpatient(bill);
|
||||
} else if (endpoint.contains("invEBillHospitalized")) {
|
||||
internalResult = internalHospitalized(bill);
|
||||
} else if (endpoint.contains("writeOffEBill")) {
|
||||
internalResult = internalWriteOff(bill);
|
||||
} else {
|
||||
internalResult = createInternalErrorResponse("未知接口: " + endpoint);
|
||||
}
|
||||
|
||||
JSONObject finalResponse = new JSONObject();
|
||||
finalResponse.put("success", true);
|
||||
finalResponse.put("result", internalResult);
|
||||
return finalResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送请求
|
||||
* 发送请求 (内部调用版本)
|
||||
*
|
||||
* @param bill 请求参数
|
||||
* @param endpoint 请求后缀url
|
||||
* @return 返回值
|
||||
*/
|
||||
public static JSONObject PreInvoicePost(JSONObject bill, String endpoint) {
|
||||
|
||||
JSONObject result = new JSONObject();
|
||||
// 获取当前租户的option信息
|
||||
JSONObject optionJson = SecurityUtils.getLoginUser().getOptionJson();
|
||||
|
||||
String baseUrl = optionJson.getString(CommonConstants.Option.URL);
|
||||
// 拼接成完整 URL(作为路径)
|
||||
String cleanUrl = baseUrl + "/" + endpoint; // 确保用 "/" 分隔
|
||||
String url = cleanUrl.trim().replaceAll("^\"|\"$", "") // 去除首尾引号
|
||||
.replaceAll("\\s+", "")// 去除首尾引号
|
||||
.replaceAll("\"", ""); // 去除中间引号
|
||||
|
||||
String appID = optionJson.getString(CommonConstants.Option.APP_ID);
|
||||
String appKey = optionJson.getString(CommonConstants.Option.KEY);
|
||||
String data = bill.toJSONString();
|
||||
String version = "1.0";
|
||||
// 请求随机标识 noise
|
||||
String noise = UUID.randomUUID().toString();
|
||||
|
||||
data = Base64.getEncoder().encodeToString(data.getBytes(StandardCharsets.UTF_8));
|
||||
|
||||
StringBuilder str = new StringBuilder();
|
||||
str.append("appid=").append(appID);
|
||||
str.append("&data=").append(data);
|
||||
str.append("&noise=").append(noise);
|
||||
str.append("&key=").append(appKey);
|
||||
str.append("&version=").append(version);
|
||||
String sign = DigestUtils.md5Hex(str.toString().getBytes(Charset.forName("UTF-8"))).toUpperCase();
|
||||
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("appid", appID);
|
||||
map.put("data", data);
|
||||
map.put("noise", noise);
|
||||
map.put("sign", sign);
|
||||
map.put("version", version);
|
||||
|
||||
try {
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
CloseableHttpClient client = HttpClients.createDefault();
|
||||
String respContent = null;
|
||||
// 请求参数转JOSN字符串
|
||||
StringEntity entity = new StringEntity(new ObjectMapper().writeValueAsString(map), "utf-8");
|
||||
entity.setContentEncoding("UTF-8");
|
||||
entity.setContentType("application/json");
|
||||
httpPost.setEntity(entity);
|
||||
HttpResponse resp = client.execute(httpPost);
|
||||
|
||||
if (resp.getStatusLine().getStatusCode() == 200) {
|
||||
String rev = EntityUtils.toString(resp.getEntity());
|
||||
// System.out.println("返回串--》"+rev);
|
||||
Map resultData = new ObjectMapper().readValue(rev, Map.class);
|
||||
String rdata = resultData.get("data").toString();
|
||||
String rnoise = resultData.get("noise").toString();
|
||||
// 1、拼接返回验签参数
|
||||
StringBuilder str1 = new StringBuilder();
|
||||
str1.append("appid=").append(appID);
|
||||
str1.append("&data=").append(rdata);
|
||||
str1.append("&noise=").append(rnoise);
|
||||
str1.append("&key=").append(appKey);
|
||||
str1.append("&version=").append(version);
|
||||
// 3.MD5加密 生成sign
|
||||
String rmd5 = DigestUtils.md5Hex(str1.toString().getBytes(Charset.forName("UTF-8"))).toUpperCase();
|
||||
String rsign = resultData.get("sign").toString();
|
||||
System.out.println("验签-》" + (StringUtils.equals(rsign, rmd5)));
|
||||
String busData
|
||||
= new String(Base64.getDecoder().decode(resultData.get("data").toString()), StandardCharsets.UTF_8);
|
||||
System.out.println("返回业务数据--》" + busData);
|
||||
Map busDataMap = new ObjectMapper().readValue(busData, Map.class);
|
||||
System.out
|
||||
.println("业务信息解密--》" + new String(Base64.getDecoder().decode(busDataMap.get("message").toString()),
|
||||
StandardCharsets.UTF_8));
|
||||
|
||||
JSONObject resobj = JSONObject.parseObject(busData);
|
||||
result.put("success", true);
|
||||
result.put("result", resobj);
|
||||
} else {
|
||||
result.put("msg", "web响应失败!");
|
||||
result.put("success", false);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
result.put("msg", e.getMessage());
|
||||
result.put("success", false);
|
||||
}
|
||||
return result;
|
||||
|
||||
public JSONObject PreInvoicePost(JSONObject bill, String endpoint) {
|
||||
return PreInvoicePostForward(bill, endpoint);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -339,6 +374,7 @@ public class EleInvoiceServiceImpl implements IEleInvoiceService {
|
||||
|
||||
// --------------------请求业务参数 data--------------------START
|
||||
JSONObject bill = commomSet(patientInfo, paymentInfo, clinicSettle);
|
||||
bill.put("paymentId", paymentId);
|
||||
|
||||
// ------票据信息------
|
||||
// busType 业务标识 String 20 是 06,标识挂号
|
||||
@@ -580,6 +616,7 @@ public class EleInvoiceServiceImpl implements IEleInvoiceService {
|
||||
|
||||
// --------------------请求业务参数 data--------------------START
|
||||
JSONObject bill = commomSet(patientInfo, paymentInfo, clinicSettle);
|
||||
bill.put("paymentId", paymentId);
|
||||
|
||||
// ------票据信息------
|
||||
// busType 业务标识 String 20 是 直接填写业务系统内部编码值,由医疗平台配置对照,例如:附录5 业务标识列表
|
||||
@@ -890,6 +927,7 @@ public class EleInvoiceServiceImpl implements IEleInvoiceService {
|
||||
|
||||
// --------------------请求业务参数 data--------------------START
|
||||
JSONObject bill = commomSet(patientInfo, paymentInfo, clinicSettle);
|
||||
bill.put("paymentId", paymentId);
|
||||
|
||||
// ------票据信息------
|
||||
// busType 业务标识 String 20 是 直接填写业务系统内部编码值,由医疗平台配置对照,例如:附录5 业务标识列表
|
||||
|
||||
@@ -1818,6 +1818,10 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
||||
// 保存就诊信息
|
||||
Encounter encounter = new Encounter();
|
||||
BeanUtils.copyProperties(encounterFormData, encounter);
|
||||
// 将挂号医生ID提前塞入 encounter 的 registrarId,便于生成“科室+医生+当日”序号
|
||||
if (encounterParticipantFormData.getPractitionerId() != null) {
|
||||
encounter.setRegistrarId(encounterParticipantFormData.getPractitionerId());
|
||||
}
|
||||
encounter.setBusNo(outpatientRegistrationSettleParam.getBusNo());
|
||||
// 就诊ID
|
||||
Long encounterId = iEncounterService.saveEncounterByRegister(encounter);
|
||||
|
||||
@@ -41,22 +41,23 @@ public class EleInvoiceController {
|
||||
public R<?> invoiceReissue(@RequestBody MakeInvoiceDto makeInvoiceDto) {
|
||||
// 付款成功后,开具发票
|
||||
R<?> result = eleInvoiceService.invoiceReissue(makeInvoiceDto.getPaymentId(), makeInvoiceDto.getEncounterId());
|
||||
R<?> eleResult = null;
|
||||
if (result.getCode() == 200) {
|
||||
if (result.getData() == YbEncounterClass.REG.getValue()) {
|
||||
// 付款成功后,开具发票
|
||||
R<?> eleResult = eleInvoiceService.invoiceRegMake(makeInvoiceDto.getPaymentId(), makeInvoiceDto.getEncounterId());
|
||||
eleResult = eleInvoiceService.invoiceRegMake(makeInvoiceDto.getPaymentId(), makeInvoiceDto.getEncounterId());
|
||||
if (eleResult.getCode() != 200) {
|
||||
return R.ok(" 挂号电子发票开具失败 :" + eleResult.getMsg());
|
||||
}
|
||||
} else if (result.getData() == YbEncounterClass.AMB.getValue()) {
|
||||
// 付款成功后,开具发票
|
||||
R<?> eleResult = eleInvoiceService.invoiceMZMake(makeInvoiceDto.getPaymentId(), makeInvoiceDto.getEncounterId());
|
||||
eleResult = eleInvoiceService.invoiceMZMake(makeInvoiceDto.getPaymentId(), makeInvoiceDto.getEncounterId());
|
||||
if (eleResult.getCode() != 200) {
|
||||
return R.ok(" 门诊电子发票开具失败 :" + eleResult.getMsg());
|
||||
}
|
||||
} else if (result.getData() == YbEncounterClass.IMP.getValue()) {
|
||||
// 付款成功后,开具发票
|
||||
R<?> eleResult = eleInvoiceService.invoiceZYMake(makeInvoiceDto.getPaymentId(), makeInvoiceDto.getEncounterId());
|
||||
eleResult = eleInvoiceService.invoiceZYMake(makeInvoiceDto.getPaymentId(), makeInvoiceDto.getEncounterId());
|
||||
if (eleResult.getCode() != 200) {
|
||||
return R.ok(" 住院电子发票开具失败 :" + eleResult.getMsg());
|
||||
}
|
||||
@@ -64,7 +65,11 @@ public class EleInvoiceController {
|
||||
return R.ok("电子发票类型不明确!");
|
||||
}
|
||||
}
|
||||
Map detail = iChargeBillService.getDetail(makeInvoiceDto.getPaymentId());
|
||||
Map<String, Object> detail = iChargeBillService.getDetail(makeInvoiceDto.getPaymentId());
|
||||
if (eleResult != null && eleResult.getCode() == 200 && eleResult.getData() instanceof Invoice) {
|
||||
Invoice invoice = (Invoice) eleResult.getData();
|
||||
detail.put("pictureUrl", invoice.getPictureUrl());
|
||||
}
|
||||
return R.ok(detail);
|
||||
}
|
||||
|
||||
@@ -95,10 +100,18 @@ public class EleInvoiceController {
|
||||
public R<?> invoiceOpen(@RequestParam("invoiceId") String invoiceId) {
|
||||
// 退款成功后,开具发票
|
||||
Invoice invoice = eleInvoiceService.getInvoiceById(Long.parseLong(invoiceId));
|
||||
if(invoice ==null){
|
||||
if (invoice == null) {
|
||||
throw new ServiceException("未查询到发票信息");
|
||||
}
|
||||
return R.ok(invoice.getPictureUrl());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取发票HTML凭条预览
|
||||
*/
|
||||
@GetMapping(value = "/view", produces = "text/html;charset=UTF-8")
|
||||
@ResponseBody
|
||||
public String viewInvoice(@RequestParam("busNo") String busNo) {
|
||||
return eleInvoiceService.getInvoiceHtml(busNo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ package com.openhis.web.paymentmanage.controller;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.enums.TenantOptionDict;
|
||||
import com.core.web.util.TenantOptionUtil;
|
||||
import com.openhis.administration.domain.Invoice;
|
||||
import com.openhis.financial.domain.PaymentReconciliation;
|
||||
import com.openhis.web.chargemanage.dto.OutpatientRegistrationAddParam;
|
||||
import com.openhis.web.chargemanage.dto.OutpatientRegistrationSettleParam;
|
||||
@@ -92,10 +93,12 @@ public class PaymentReconciliationController {
|
||||
if (eleResult.getCode() != 200) {
|
||||
// 因收费成功前端需要关闭弹窗,此处信息仅用于提示所以返回ok
|
||||
return R.ok(detail, " 收费成功,电子发票开具失败 :" + eleResult.getMsg());
|
||||
} else if (eleResult.getData() instanceof Invoice) {
|
||||
Invoice invoice = (Invoice) eleResult.getData();
|
||||
detail.put("pictureUrl", invoice.getPictureUrl());
|
||||
}
|
||||
return R.ok(detail);
|
||||
}
|
||||
|
||||
// Map detail = iChargeBillService.getDetail(paymentRecon.getId());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -194,7 +197,11 @@ public class PaymentReconciliationController {
|
||||
if (eleResult.getCode() != 200) {
|
||||
// 因收费成功前端需要关闭弹窗,此处信息仅用于提示所以返回ok
|
||||
return R.ok(detail, " 收费成功,电子发票开具失败 :" + eleResult.getMsg());
|
||||
} else if (eleResult.getData() instanceof Invoice) {
|
||||
Invoice invoice = (Invoice) eleResult.getData();
|
||||
detail.put("pictureUrl", invoice.getPictureUrl());
|
||||
}
|
||||
return R.ok(detail);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
@@ -233,6 +240,9 @@ public class PaymentReconciliationController {
|
||||
if (eleResult.getCode() != 200) {
|
||||
// 因收费成功前端需要关闭弹窗,此处信息仅用于提示所以返回ok
|
||||
return R.ok(detail, " 收费成功,电子发票开具失败 :" + eleResult.getMsg());
|
||||
} else if (eleResult.getData() instanceof Invoice) {
|
||||
Invoice invoice = (Invoice) eleResult.getData();
|
||||
detail.put("pictureUrl", invoice.getPictureUrl());
|
||||
}
|
||||
return R.ok(detail);
|
||||
}
|
||||
@@ -260,8 +270,9 @@ public class PaymentReconciliationController {
|
||||
// 因取消付款成功前端需要关闭弹窗,此处信息仅用于提示所以返回ok
|
||||
return R.ok(null, " 取消付款成功,电子发票开具失败 :" + eleResult.getMsg());
|
||||
}
|
||||
return R.ok("取消结算成功");
|
||||
}
|
||||
return R.ok("取消结算失败,请确认");
|
||||
return R.fail("取消结算失败,请确认");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -94,7 +94,7 @@ public class MedicalDeviceDispenseAppServiceImpl implements IMedicalDeviceDispen
|
||||
|
||||
// 获取科室下拉选列表
|
||||
List<Organization> organizationList
|
||||
= organizationService.getList(OrganizationType.DEPARTMENT.getValue(), OrganizationClass.CLINIC.getValue());
|
||||
= organizationService.getList(OrganizationType.DEPARTMENT.getValue(), String.valueOf(OrganizationClass.CLINIC.getValue()));
|
||||
List<DispenseInitDto.DepartmentOption> organizationOptions = organizationList.stream()
|
||||
.map(organization -> new DispenseInitDto.DepartmentOption(organization.getId(), organization.getName()))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
@@ -130,7 +130,7 @@ public class ReturnMedicineAppServiceImpl implements IReturnMedicineAppService {
|
||||
|
||||
// 获取科室下拉选列表
|
||||
List<Organization> organizationList
|
||||
= iOrganizationService.getList(OrganizationType.DEPARTMENT.getValue(), OrganizationClass.CLINIC.getValue());
|
||||
= iOrganizationService.getList(OrganizationType.DEPARTMENT.getValue(), String.valueOf(OrganizationClass.CLINIC.getValue()));
|
||||
List<ReturnMedicineInitDto.DepartmentOption> organizationOptions = organizationList.stream().map(
|
||||
organization -> new ReturnMedicineInitDto.DepartmentOption(organization.getId(), organization.getName()))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
@@ -127,7 +127,7 @@ public class WesternMedicineDispenseAppServiceImpl implements IWesternMedicineDi
|
||||
|
||||
// 获取科室下拉选列表
|
||||
List<Organization> organizationList
|
||||
= organizationService.getList(OrganizationType.DEPARTMENT.getValue(), OrganizationClass.CLINIC.getValue());
|
||||
= organizationService.getList(OrganizationType.DEPARTMENT.getValue(), String.valueOf(OrganizationClass.CLINIC.getValue()));
|
||||
List<DispenseInitDto.DepartmentOption> organizationOptions = organizationList.stream()
|
||||
.map(organization -> new DispenseInitDto.DepartmentOption(organization.getId(), organization.getName()))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
@@ -221,6 +221,11 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer
|
||||
*/
|
||||
@Override
|
||||
public List<RequestFormQueryDto> getRequestForm(Long encounterId, String typeCode) {
|
||||
// 检查参数
|
||||
if (encounterId == null) {
|
||||
return new java.util.ArrayList<>(); // 返回空列表而不是查询数据库
|
||||
}
|
||||
|
||||
List<RequestFormQueryDto> requestFormList = requestFormManageAppMapper.getRequestForm(encounterId, typeCode);
|
||||
for (RequestFormQueryDto requestFormQueryDto : requestFormList) {
|
||||
// 查询处方详情
|
||||
|
||||
@@ -75,7 +75,10 @@ public class RequestFormManageController {
|
||||
* @return 检查申请单
|
||||
*/
|
||||
@GetMapping(value = "/get-check")
|
||||
public R<?> getCheckRequestForm(@RequestParam Long encounterId) {
|
||||
public R<?> getCheckRequestForm(@RequestParam(required = false) Long encounterId) {
|
||||
if (encounterId == null) {
|
||||
return R.fail("就诊ID不能为空");
|
||||
}
|
||||
return R.ok(iRequestFormManageAppService.getRequestForm(encounterId, ActivityDefCategory.TEST.getCode()));
|
||||
}
|
||||
|
||||
@@ -86,7 +89,10 @@ public class RequestFormManageController {
|
||||
* @return 检验申请单
|
||||
*/
|
||||
@GetMapping(value = "/get-inspection")
|
||||
public R<?> getInspectionRequestForm(@RequestParam Long encounterId) {
|
||||
public R<?> getInspectionRequestForm(@RequestParam(required = false) Long encounterId) {
|
||||
if (encounterId == null) {
|
||||
return R.fail("就诊ID不能为空");
|
||||
}
|
||||
return R.ok(iRequestFormManageAppService.getRequestForm(encounterId, ActivityDefCategory.PROOF.getCode()));
|
||||
}
|
||||
|
||||
@@ -97,7 +103,10 @@ public class RequestFormManageController {
|
||||
* @return 输血申请单
|
||||
*/
|
||||
@GetMapping(value = "/get-blood-transfusion")
|
||||
public R<?> getBloodTransfusionRequestForm(@RequestParam Long encounterId) {
|
||||
public R<?> getBloodTransfusionRequestForm(@RequestParam(required = false) Long encounterId) {
|
||||
if (encounterId == null) {
|
||||
return R.fail("就诊ID不能为空");
|
||||
}
|
||||
return R.ok(iRequestFormManageAppService.getRequestForm(encounterId, ActivityDefCategory.METACHYSIS.getCode()));
|
||||
}
|
||||
|
||||
@@ -108,7 +117,10 @@ public class RequestFormManageController {
|
||||
* @return 手术申请单
|
||||
*/
|
||||
@GetMapping(value = "/get-surgery")
|
||||
public R<?> getSurgeryRequestForm(@RequestParam Long encounterId) {
|
||||
public R<?> getSurgeryRequestForm(@RequestParam(required = false) Long encounterId) {
|
||||
if (encounterId == null) {
|
||||
return R.fail("就诊ID不能为空");
|
||||
}
|
||||
return R.ok(iRequestFormManageAppService.getRequestForm(encounterId, ActivityDefCategory.PROCEDURE.getCode()));
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,10 @@ public class IPrintReportAppServiceImpl implements IPrintReportAppService {
|
||||
*/
|
||||
@Override
|
||||
public R<?> disposalPrint(Long encounterId) {
|
||||
// 检查参数
|
||||
if (encounterId == null) {
|
||||
return R.ok(new java.util.ArrayList<>()); // 返回空列表而不是错误
|
||||
}
|
||||
|
||||
List<DisposalDto> disposalList = printReportMapper.getDisposalList(encounterId);
|
||||
|
||||
@@ -71,6 +75,10 @@ public class IPrintReportAppServiceImpl implements IPrintReportAppService {
|
||||
*/
|
||||
@Override
|
||||
public R<?> checkApplicationPrint(Long encounterId) {
|
||||
// 检查参数
|
||||
if (encounterId == null) {
|
||||
return R.ok(new java.util.ArrayList<>()); // 返回空列表而不是错误
|
||||
}
|
||||
|
||||
List<CkInspAppDto> checkList =
|
||||
printReportMapper.getCheckInspectionList(encounterId, YbRxItemTypeCode.MEDICAL_IMAGING.getValue());
|
||||
@@ -98,6 +106,11 @@ public class IPrintReportAppServiceImpl implements IPrintReportAppService {
|
||||
*/
|
||||
@Override
|
||||
public R<?> inspectionApplicationPrint(Long encounterId) {
|
||||
// 检查参数
|
||||
if (encounterId == null) {
|
||||
return R.ok(new java.util.ArrayList<>()); // 返回空列表而不是错误
|
||||
}
|
||||
|
||||
List<CkInspAppDto> inspectionList =
|
||||
printReportMapper.getCheckInspectionList(encounterId, YbRxItemTypeCode.LAB_TEST.getValue());
|
||||
|
||||
@@ -125,6 +138,10 @@ public class IPrintReportAppServiceImpl implements IPrintReportAppService {
|
||||
*/
|
||||
@Override
|
||||
public R<?> prescriptionPrint(String prescriptionNo, Long encounterId) {
|
||||
// 检查参数
|
||||
if (encounterId == null) {
|
||||
return R.ok(new java.util.ArrayList<>()); // 返回空列表而不是错误
|
||||
}
|
||||
|
||||
List<PrescriptionPrintDto> list = printReportMapper.getPrescriptionList(prescriptionNo, encounterId);
|
||||
// 获取所属医院id
|
||||
|
||||
@@ -52,7 +52,7 @@ public class RegisterReportAppServiceImpl implements IRegisterReportAppService {
|
||||
RegisterReportInitDto initDto = new RegisterReportInitDto();
|
||||
// 查询科室列表
|
||||
List<Organization> organizationList =
|
||||
organizationService.getList(OrganizationType.DEPARTMENT.getValue(), OrganizationClass.CLINIC.getValue());
|
||||
organizationService.getList(OrganizationType.DEPARTMENT.getValue(), String.valueOf(OrganizationClass.CLINIC.getValue()));
|
||||
// 科室
|
||||
List<RegisterReportInitDto.longCommonStatusOption> departmentOptions = organizationList.stream()
|
||||
.map(organization -> new RegisterReportInitDto.longCommonStatusOption(organization.getId(),
|
||||
|
||||
@@ -34,7 +34,7 @@ public class PrintReportController {
|
||||
* @return 处置单信息
|
||||
*/
|
||||
@GetMapping(value = "/disposal-print")
|
||||
public R<?> disposalPrint(@RequestParam Long encounterId) {
|
||||
public R<?> disposalPrint(@RequestParam(required = false) Long encounterId) {
|
||||
|
||||
return printReportService.disposalPrint(encounterId);
|
||||
}
|
||||
@@ -46,7 +46,7 @@ public class PrintReportController {
|
||||
* @return 检验申请单信息
|
||||
*/
|
||||
@GetMapping(value = "/check-print")
|
||||
public R<?> checkApplicationPrint(@RequestParam Long encounterId) {
|
||||
public R<?> checkApplicationPrint(@RequestParam(required = false) Long encounterId) {
|
||||
return printReportService.checkApplicationPrint(encounterId);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public class PrintReportController {
|
||||
* @return 检验申请单信息
|
||||
*/
|
||||
@GetMapping(value = "/inspection-print")
|
||||
public R<?> inspectionApplicationPrint(@RequestParam Long encounterId) {
|
||||
public R<?> inspectionApplicationPrint(@RequestParam(required = false) Long encounterId) {
|
||||
return printReportService.inspectionApplicationPrint(encounterId);
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ public class PrintReportController {
|
||||
* @return 处方单信息
|
||||
*/
|
||||
@GetMapping(value = "/prescription-print")
|
||||
public R<?> prescriptionPrint(@RequestParam String prescriptionNo, @RequestParam Long encounterId) {
|
||||
public R<?> prescriptionPrint(@RequestParam String prescriptionNo, @RequestParam(required = false) Long encounterId) {
|
||||
return printReportService.prescriptionPrint(prescriptionNo, encounterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
#\u9519\u8BEF\u6D88\u606F
|
||||
not.null=* \u5FC5\u987B\u586B\u5199
|
||||
user.jcaptcha.error=\u9A8C\u8BC1\u7801\u9519\u8BEF
|
||||
user.jcaptcha.expire=\u9A8C\u8BC1\u7801\u5DF2\u5931\u6548
|
||||
user.not.exists=\u7528\u6237\u4E0D\u5B58\u5728/\u5BC6\u7801\u9519\u8BEF
|
||||
user.password.not.match=\u7528\u6237\u4E0D\u5B58\u5728/\u5BC6\u7801\u9519\u8BEF
|
||||
user.password.retry.limit.count=\u5BC6\u7801\u8F93\u5165\u9519\u8BEF{0}\u6B21
|
||||
user.password.retry.limit.exceed=\u5BC6\u7801\u8F93\u5165\u9519\u8BEF{0}\u6B21\uFF0C\u5E10\u6237\u9501\u5B9A{1}\u5206\u949F
|
||||
user.password.delete=\u5BF9\u4E0D\u8D77\uFF0C\u60A8\u7684\u8D26\u53F7\u5DF2\u88AB\u5220\u9664
|
||||
user.blocked=\u7528\u6237\u5DF2\u5C01\u7981\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458
|
||||
role.blocked=\u89D2\u8272\u5DF2\u5C01\u7981\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458
|
||||
login.blocked=\u5F88\u9057\u61BE\uFF0C\u8BBF\u95EEIP\u5DF2\u88AB\u5217\u5165\u7CFB\u7EDF\u9ED1\u540D\u5355
|
||||
user.logout.success=\u9000\u51FA\u6210\u529F
|
||||
length.not.valid=\u957F\u5EA6\u5FC5\u987B\u5728{min}\u5230{max}\u4E2A\u5B57\u7B26\u4E4B\u95F4
|
||||
user.username.not.valid=* 2\u523020\u4E2A\u6C49\u5B57\u3001\u5B57\u6BCD\u3001\u6570\u5B57\u6216\u4E0B\u5212\u7EBF\u7EC4\u6210\uFF0C\u4E14\u5FC5\u987B\u4EE5\u975E\u6570\u5B57\u5F00\u5934
|
||||
user.password.not.valid=* 5-50\u4E2A\u5B57\u7B26
|
||||
user.email.not.valid=\u90AE\u7BB1\u683C\u5F0F\u9519\u8BEF
|
||||
user.mobile.phone.number.not.valid=\u624B\u673A\u53F7\u683C\u5F0F\u9519\u8BEF
|
||||
user.login.success=\u767B\u5F55\u6210\u529F
|
||||
user.register.success=\u6CE8\u518C\u6210\u529F
|
||||
user.notfound=\u8BF7\u91CD\u65B0\u767B\u5F55
|
||||
user.forcelogout=\u7BA1\u7406\u5458\u5F3A\u5236\u9000\u51FA\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55
|
||||
user.unknown.error=\u672A\u77E5\u9519\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55
|
||||
##\u6587\u4EF6\u4E0A\u4F20\u6D88\u606F
|
||||
upload.exceed.maxSize=\u4E0A\u4F20\u7684\u6587\u4EF6\u5927\u5C0F\u8D85\u51FA\u9650\u5236\u7684\u6587\u4EF6\u5927\u5C0F\uFF01<br/>\u5141\u8BB8\u7684\u6587\u4EF6\u6700\u5927\u5927\u5C0F\u662F\uFF1A{0}MB\uFF01
|
||||
upload.filename.exceed.length=\u4E0A\u4F20\u7684\u6587\u4EF6\u540D\u6700\u957F{0}\u4E2A\u5B57\u7B26
|
||||
##\u6743\u9650
|
||||
no.permission=\u60A8\u6CA1\u6709\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}]
|
||||
no.create.permission=\u60A8\u6CA1\u6709\u521B\u5EFA\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}]
|
||||
no.update.permission=\u60A8\u6CA1\u6709\u4FEE\u6539\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}]
|
||||
no.delete.permission=\u60A8\u6CA1\u6709\u5220\u9664\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}]
|
||||
no.export.permission=\u60A8\u6CA1\u6709\u5BFC\u51FA\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}]
|
||||
no.view.permission=\u60A8\u6CA1\u6709\u67E5\u770B\u6570\u636E\u7684\u6743\u9650\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6DFB\u52A0\u6743\u9650 [{0}]
|
||||
apl.common.M00001={0}\u6DFB\u52A0\u6210\u529F
|
||||
apl.common.M00002={0}\u4FDD\u5B58\u6210\u529F
|
||||
apl.common.M00003={0}\u5DF2\u7ECF\u5B58\u5728
|
||||
apl.common.M00004={0}\u64CD\u4F5C\u6210\u529F
|
||||
apl.common.M00005={0}\u5220\u9664\u6210\u529F
|
||||
apl.common.M00006=\u64CD\u4F5C\u5931\u8D25,\u8BE5\u6570\u636E\u5DF2\u88AB\u4ED6\u4EBA\u5220\u9664,\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5
|
||||
apl.common.M00007=\u64CD\u4F5C\u5931\u8D25,\u8BE5\u6570\u636E\u5DF2\u88AB\u4ED6\u4EBA\u66F4\u6539,\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5
|
||||
apl.common.M00008=\u8BF7\u52FF\u91CD\u590D\u63D0\u4EA4
|
||||
apl.common.M00009=\u67E5\u8BE2\u6210\u529F
|
||||
apl.common.M00010=\u64CD\u4F5C\u5931\u8D25,\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458
|
||||
apl.chargeRefund.M00001=\u8BE5\u6536\u8D39\u5355\u76F8\u5173{0}\u5DF2\u7ECF\u53D1\u51FA\uFF0C\u8BF7\u5148\u9000\u836F\u540E\u518D\u8FDB\u884C\u9000\u8D39
|
||||
apl.payment.M00001=\u5404\u7F34\u8D39\u6E20\u9053\u5B9E\u6536\u91D1\u989D\u5408\u8BA1\u4E0D\u7B49\u4E8E\u5B9E\u6536\u91D1\u989D
|
||||
apl.payment.M00002=\u5B9E\u6536\u91D1\u989D\u5408\u8BA1\u4E0D\u7B49\u4E8E\u5E94\u6536\u91D1\u989D
|
||||
apl.payment.M00003=\u8BF7\u9009\u62E9\u652F\u4ED8\u65B9\u5F0F
|
||||
apl.payment.M00004=\u67E5\u8BE2\u6210\u529F
|
||||
apl.payment.M00005=\u64CD\u4F5C\u5931\u8D25,\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458
|
||||
apl.payment.M00006=\u6210\u529F\u6536\u8D39
|
||||
apl.payment.M00007=\u672A\u67E5\u8BE2\u5230\u6536\u8D39\u9879\u76EE
|
||||
apl.payment.M00008=\u672A\u67E5\u8BE2\u5230{0}\u8D26\u6237\u4FE1\u606F
|
||||
apl.payment.M00009=\u672A\u67E5\u8BE2\u5230\u6536\u8D39\u9879\u76EE\uFF0C\u4E0D\u9700\u8981\u8F6C\u6362\u8D26\u6237
|
||||
apl.adjustPrice.M00001=\u6267\u884C\u5931\u8D25\uFF0C\u672A\u52A0\u8F7D\u5230\u4EFB\u4F55\u6570\u636E\uFF01
|
||||
apl.adjustPrice.M00002=\u6267\u884C\u5931\u8D25\uFF0C\u6539\u4EF7\u5355\u4E2D\u6709\u6B63\u5728\u5BA1\u6838\u4E2D\u7684\u8D27\u54C1\uFF0C\u8BF7\u68C0\u67E5\u540E\u91CD\u65B0\u63D0\u4EA4\uFF01
|
||||
@@ -44,31 +44,34 @@
|
||||
</select>
|
||||
|
||||
<select id="getCurrentDayEncounter" resultType="com.openhis.web.chargemanage.dto.CurrentDayEncounterDto">
|
||||
SELECT T9.tenant_id,
|
||||
T9.encounter_id,
|
||||
T9.organization_id,
|
||||
T9.organization_name,
|
||||
T9.healthcare_name,
|
||||
T9.practitioner_user_id,
|
||||
T9.practitioner_name,
|
||||
T9.contract_name,
|
||||
T9.patient_id,
|
||||
T9.patient_name,
|
||||
SELECT T9.tenant_id AS tenantId,
|
||||
T9.encounter_id AS encounterId,
|
||||
T9.display_order AS displayOrder,
|
||||
T9.organization_id AS organizationId,
|
||||
T9.organization_name AS organizationName,
|
||||
T9.healthcare_name AS healthcareName,
|
||||
T9.practitioner_user_id AS practitionerUserId,
|
||||
T9.practitioner_name AS practitionerName,
|
||||
T9.contract_name AS contractName,
|
||||
T9.patient_id AS patientId,
|
||||
T9.patient_name AS patientName,
|
||||
T9.phone,
|
||||
T9.gender_enum,
|
||||
T9.id_card,
|
||||
T9.status_enum,
|
||||
T9.register_time,
|
||||
T9.total_price,
|
||||
T9.account_name,
|
||||
T9.enterer_name,
|
||||
T9.charge_item_ids,
|
||||
T9.payment_id,
|
||||
T9.picture_url,
|
||||
T9.birth_date
|
||||
T9.gender_enum AS genderEnum,
|
||||
T9.id_card AS idCard,
|
||||
T9.status_enum AS statusEnum,
|
||||
T9.register_time AS registerTime,
|
||||
T9.total_price AS totalPrice,
|
||||
T9.account_name AS accountName,
|
||||
T9.enterer_name AS entererName,
|
||||
T9.charge_item_ids AS chargeItemIds,
|
||||
T9.payment_id AS paymentId,
|
||||
T9.picture_url AS pictureUrl,
|
||||
T9.birth_date AS birthDate,
|
||||
COALESCE(T9.identifier_no, T9.patient_bus_no, '') AS identifierNo
|
||||
from (
|
||||
SELECT T1.tenant_id AS tenant_id,
|
||||
T1.id AS encounter_id,
|
||||
T1.display_order AS display_order,
|
||||
T1.organization_id AS organization_id,
|
||||
T2.NAME AS organization_name,
|
||||
T3.NAME AS healthcare_name,
|
||||
@@ -88,7 +91,9 @@
|
||||
T13.charge_item_ids,
|
||||
T13.id AS payment_id,
|
||||
ai.picture_url AS picture_url,
|
||||
T8.birth_date AS birth_date
|
||||
T8.birth_date AS birth_date,
|
||||
T8.bus_no AS patient_bus_no,
|
||||
T18.identifier_no AS identifier_no
|
||||
FROM adm_encounter AS T1
|
||||
LEFT JOIN adm_organization AS T2 ON T1.organization_id = T2.ID AND T2.delete_flag = '0'
|
||||
LEFT JOIN adm_healthcare_service AS T3 ON T1.service_type_id = T3.ID AND T3.delete_flag = '0'
|
||||
@@ -118,6 +123,20 @@
|
||||
ON T1.ID = T6.encounter_id AND T6.delete_flag = '0' AND T6.encounter_flag = '1'
|
||||
LEFT JOIN fin_contract AS T7 ON T6.contract_no = T7.bus_no AND T7.delete_flag = '0'
|
||||
LEFT JOIN adm_patient AS T8 ON T1.patient_id = T8.ID AND T8.delete_flag = '0'
|
||||
LEFT JOIN (
|
||||
SELECT patient_id,
|
||||
identifier_no
|
||||
FROM (
|
||||
SELECT patient_id,
|
||||
identifier_no,
|
||||
ROW_NUMBER() OVER (PARTITION BY patient_id ORDER BY create_time ASC) AS rn
|
||||
FROM adm_patient_identifier
|
||||
WHERE delete_flag = '0'
|
||||
AND identifier_no IS NOT NULL
|
||||
AND identifier_no != ''
|
||||
) t
|
||||
WHERE rn = 1
|
||||
) AS T18 ON T8.id = T18.patient_id
|
||||
LEFT JOIN adm_charge_item AS T10 ON T1.id = T10.encounter_id AND T10.delete_flag = '0'
|
||||
LEFT JOIN adm_account AS T11 ON T10.account_id = T11.id AND T11.delete_flag = '0'
|
||||
LEFT JOIN adm_practitioner AS T12 ON T12.ID = T10.enterer_id AND T12.delete_flag = '0'
|
||||
|
||||
@@ -31,7 +31,9 @@
|
||||
T3.maximum_retail_price,
|
||||
T3.chrgitm_lv,
|
||||
T3.children_json,
|
||||
T3.pricing_flag
|
||||
T3.pricing_flag,
|
||||
T3.sort_order,
|
||||
T3.service_range
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
@@ -61,7 +63,9 @@
|
||||
T2.price as retail_price,
|
||||
T4.amount as maximum_retail_price,
|
||||
T1.children_json,
|
||||
T1.pricing_flag
|
||||
T1.pricing_flag,
|
||||
T1.sort_order,
|
||||
T1.service_range
|
||||
FROM wor_activity_definition T1
|
||||
LEFT JOIN adm_charge_item_definition T2 ON T1.id = T2.instance_id
|
||||
LEFT JOIN adm_charge_item_definition T5 ON T5.instance_id = T1.id AND T5.instance_table = 'wor_activity_definition'
|
||||
@@ -120,7 +124,9 @@
|
||||
) as maximum_retail_price,
|
||||
T1.chrgitm_lv,
|
||||
T1.children_json,
|
||||
T1.pricing_flag
|
||||
T1.pricing_flag,
|
||||
T1.sort_order,
|
||||
T1.service_range
|
||||
FROM wor_activity_definition T1
|
||||
LEFT JOIN adm_charge_item_definition T2 ON T1.id = T2.instance_id
|
||||
<where>
|
||||
|
||||
@@ -43,8 +43,11 @@
|
||||
abi.restricted_scope,
|
||||
abi.dosage_instruction,
|
||||
abi.chrgitm_lv
|
||||
from (
|
||||
<if test="adviceTypes == null or adviceTypes.contains(1)">
|
||||
FROM (
|
||||
<!-- 确保至少有一个查询被执行以避免语法错误 -->
|
||||
<if test="adviceTypes != null and !adviceTypes.isEmpty() and (adviceTypes.contains(1) or adviceTypes.contains(2) or adviceTypes.contains(3))">
|
||||
<!-- 如果有有效的adviceTypes,则执行对应的查询 -->
|
||||
<if test="adviceTypes.contains(1)">
|
||||
(SELECT
|
||||
DISTINCT ON (T1.ID)
|
||||
T1.tenant_id,
|
||||
@@ -110,14 +113,10 @@
|
||||
</if>
|
||||
AND T5.instance_table = #{medicationTableName}
|
||||
)
|
||||
<if test="adviceTypes.contains(2) or adviceTypes.contains(3)">UNION ALL</if>
|
||||
</if>
|
||||
|
||||
|
||||
<if test="adviceTypes == null or adviceTypes.contains(1)">
|
||||
<if test="adviceTypes == null or adviceTypes.contains(2) or adviceTypes.contains(3)">UNION ALL</if>
|
||||
</if>
|
||||
|
||||
<if test="adviceTypes == null or adviceTypes.contains(2)">
|
||||
<if test="adviceTypes.contains(2)">
|
||||
(SELECT
|
||||
DISTINCT ON (T1.ID)
|
||||
T1.tenant_id,
|
||||
@@ -177,14 +176,10 @@
|
||||
AND T4.instance_table = #{deviceTableName}
|
||||
AND T1.status_enum = #{statusEnum}
|
||||
)
|
||||
<if test="adviceTypes.contains(3)">UNION ALL</if>
|
||||
</if>
|
||||
|
||||
|
||||
<if test="adviceTypes == null or adviceTypes.contains(2)">
|
||||
<if test="adviceTypes == null or adviceTypes.contains(3)">UNION ALL</if>
|
||||
</if>
|
||||
|
||||
<if test="adviceTypes == null or adviceTypes.contains(3)">
|
||||
<if test="adviceTypes.contains(3)">
|
||||
(SELECT
|
||||
DISTINCT ON (T1.ID)
|
||||
T1.tenant_id,
|
||||
@@ -229,11 +224,12 @@
|
||||
LEFT JOIN adm_charge_item_definition AS T2
|
||||
ON T2.instance_id = T1.ID
|
||||
AND T2.delete_flag = '0' AND T2.status_enum = #{statusEnum}
|
||||
AND T2.instance_table = #{activityTableName}
|
||||
LEFT JOIN adm_organization_location AS T3 ON T3.activity_definition_id = T1.ID
|
||||
AND T3.delete_flag = '0' AND (CURRENT_TIME :: time (6) BETWEEN T3.start_time AND T3.end_time)
|
||||
WHERE T1.delete_flag = '0'
|
||||
<if test="pricingFlag ==1">
|
||||
AND T1.pricing_flag = #{pricingFlag}
|
||||
AND (T1.pricing_flag = #{pricingFlag} OR T1.pricing_flag IS NULL)
|
||||
</if>
|
||||
<if test="adviceDefinitionIdParamList != null and !adviceDefinitionIdParamList.isEmpty()">
|
||||
AND T1.id IN
|
||||
@@ -242,9 +238,53 @@
|
||||
</foreach>
|
||||
</if>
|
||||
AND T1.status_enum = #{statusEnum}
|
||||
AND T2.instance_table = #{activityTableName}
|
||||
)
|
||||
</if>
|
||||
</if>
|
||||
<!-- 如果没有有效的adviceTypes,提供一个空的默认查询以避免语法错误 -->
|
||||
<if test="adviceTypes == null or adviceTypes.isEmpty() or (!adviceTypes.contains(1) and !adviceTypes.contains(2) and !adviceTypes.contains(3))">
|
||||
SELECT
|
||||
mmd.tenant_id,
|
||||
CAST(0 AS INTEGER) AS advice_type,
|
||||
CAST('' AS VARCHAR) AS bus_no,
|
||||
CAST('' AS VARCHAR) AS category_code,
|
||||
CAST('' AS VARCHAR) AS pharmacology_category_code,
|
||||
CAST(0 AS NUMERIC) AS part_percent,
|
||||
CAST(0 AS NUMERIC) AS unit_conversion_ratio,
|
||||
CAST(0 AS INTEGER) AS part_attribute_enum,
|
||||
CAST(0 AS INTEGER) AS tho_part_attribute_enum,
|
||||
CAST(0 AS INTEGER) AS skin_test_flag,
|
||||
CAST(0 AS INTEGER) AS inject_flag,
|
||||
CAST(0 AS BIGINT) AS advice_definition_id,
|
||||
CAST('' AS VARCHAR) AS advice_name,
|
||||
CAST('' AS VARCHAR) AS advice_bus_no,
|
||||
CAST('' AS VARCHAR) AS py_str,
|
||||
CAST('' AS VARCHAR) AS wb_str,
|
||||
CAST('' AS VARCHAR) AS yb_no,
|
||||
CAST('' AS VARCHAR) AS product_name,
|
||||
CAST(0 AS INTEGER) AS activity_type,
|
||||
CAST('' AS VARCHAR) AS unit_code,
|
||||
CAST('' AS VARCHAR) AS min_unit_code,
|
||||
CAST(0 AS NUMERIC) AS volume,
|
||||
CAST('' AS VARCHAR) AS method_code,
|
||||
CAST('' AS VARCHAR) AS rate_code,
|
||||
CAST(0 AS BIGINT) AS org_id,
|
||||
CAST(0 AS BIGINT) AS location_id,
|
||||
CAST('' AS VARCHAR) AS dose,
|
||||
CAST('' AS VARCHAR) AS dose_unit_code,
|
||||
CAST('' AS VARCHAR) AS supplier,
|
||||
CAST(0 AS BIGINT) AS supplier_id,
|
||||
CAST('' AS VARCHAR) AS manufacturer,
|
||||
CAST(0 AS BIGINT) AS charge_item_definition_id,
|
||||
CAST('' AS VARCHAR) AS advice_table_name,
|
||||
CAST(0 AS BIGINT) AS position_id,
|
||||
CAST(0 AS INTEGER) AS restricted_flag,
|
||||
CAST('' AS VARCHAR) AS restricted_scope,
|
||||
CAST('' AS VARCHAR) AS dosage_instruction,
|
||||
CAST(0 AS INTEGER) AS chrgitm_lv
|
||||
FROM med_medication_definition mmd
|
||||
WHERE 1 = 0 -- 仍然确保不返回任何行,但使用真实表确保类型正确
|
||||
</if>
|
||||
) AS abi
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
@@ -355,12 +395,10 @@
|
||||
T1.condition_value,
|
||||
T1.condition_code,
|
||||
T1.amount AS price
|
||||
FROM
|
||||
adm_charge_item_def_detail AS T1
|
||||
LEFT JOIN adm_charge_item_definition AS T2 ON T2.ID = T1.definition_id
|
||||
FROM adm_charge_item_def_detail AS T1
|
||||
INNER JOIN adm_charge_item_definition AS T2 ON T2.ID = T1.definition_id
|
||||
WHERE T1.delete_flag = '0'
|
||||
AND T2.delete_flag = '0'
|
||||
WHERE
|
||||
T1.delete_flag = '0'
|
||||
AND T1.condition_code = #{conditionCode}
|
||||
<if test="chargeItemDefinitionIdList != null and !chargeItemDefinitionIdList.isEmpty()">
|
||||
AND T1.definition_id IN
|
||||
@@ -368,7 +406,7 @@
|
||||
#{itemId}
|
||||
</foreach>
|
||||
</if>
|
||||
ORDER BY T1.priority DESC
|
||||
ORDER BY T1.priority DESC, T1.definition_id
|
||||
</select>
|
||||
|
||||
<select id="getMainCharge" resultType="com.openhis.web.doctorstation.dto.AdvicePriceDto">
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
T10.reception_time,
|
||||
T10.practitioner_user_id,
|
||||
T10.jz_practitioner_user_id,
|
||||
T10.bus_no
|
||||
T10.bus_no,
|
||||
T10.identifier_no
|
||||
from
|
||||
(
|
||||
SELECT T1.tenant_id AS tenant_id,
|
||||
@@ -48,7 +49,8 @@
|
||||
T1.create_time AS register_time,
|
||||
T1.reception_time AS reception_time,
|
||||
T1.organization_id AS org_id,
|
||||
T8.bus_no AS bus_no
|
||||
T8.bus_no AS bus_no,
|
||||
T9.identifier_no AS identifier_no
|
||||
FROM adm_encounter AS T1
|
||||
LEFT JOIN adm_organization AS T2 ON T1.organization_id = T2.ID AND T2.delete_flag = '0'
|
||||
LEFT JOIN adm_healthcare_service AS T3 ON T1.service_type_id = T3.ID AND T3.delete_flag = '0'
|
||||
@@ -67,6 +69,20 @@
|
||||
LEFT JOIN adm_account AS T6 ON T1.ID = T6.encounter_id AND T6.delete_flag = '0' and T6.encounter_flag = '1'
|
||||
LEFT JOIN fin_contract AS T7 ON T6.contract_no = T7.bus_no AND T7.delete_flag = '0'
|
||||
LEFT JOIN adm_patient AS T8 ON T1.patient_id = T8.ID AND T8.delete_flag = '0'
|
||||
LEFT JOIN (
|
||||
SELECT patient_id,
|
||||
identifier_no
|
||||
FROM (
|
||||
SELECT patient_id,
|
||||
identifier_no,
|
||||
ROW_NUMBER() OVER (PARTITION BY patient_id ORDER BY create_time ASC) AS rn
|
||||
FROM adm_patient_identifier
|
||||
WHERE delete_flag = '0'
|
||||
AND identifier_no IS NOT NULL
|
||||
AND identifier_no != ''
|
||||
) t
|
||||
WHERE rn = 1
|
||||
) AS T9 ON T8.id = T9.patient_id
|
||||
WHERE
|
||||
T1.delete_flag = '0'
|
||||
<!-- 当前登录账号ID 和 当前登录账号所属的科室ID 用于控制数据权限 -->
|
||||
|
||||
@@ -224,27 +224,6 @@
|
||||
</select>
|
||||
<select id="selectAdmissionPatientInfo"
|
||||
resultType="com.openhis.web.inhospitalnursestation.dto.AdmissionPatientInfoDto">
|
||||
WITH locations AS (SELECT ael.encounter_id,
|
||||
ael.start_time,
|
||||
al.form_enum,
|
||||
al.id AS location_id,
|
||||
al."name" AS location_name
|
||||
FROM adm_encounter_location ael
|
||||
LEFT JOIN adm_location al
|
||||
ON ael.location_id = al.id
|
||||
AND al.delete_flag = '0'
|
||||
WHERE ael.status_enum = #{active}
|
||||
AND ael.delete_flag = '0'),
|
||||
practitioners AS (SELECT aep.encounter_id,
|
||||
aep.type_code,
|
||||
pra.id AS practitioner_id,
|
||||
pra."name" AS practitioner_name
|
||||
FROM adm_encounter_participant aep
|
||||
LEFT JOIN adm_practitioner pra
|
||||
ON aep.practitioner_id = pra.id
|
||||
AND pra.delete_flag = '0'
|
||||
WHERE aep.status_enum = #{active}
|
||||
AND aep.delete_flag = '0')
|
||||
SELECT ae.id AS encounter_id,
|
||||
ae.bus_no,
|
||||
ae.priority_enum,
|
||||
@@ -273,27 +252,84 @@
|
||||
fc.contract_name,
|
||||
diagnosis.condition_names
|
||||
FROM adm_encounter ae
|
||||
LEFT JOIN locations AS bed
|
||||
ON bed.encounter_id = ae.id
|
||||
AND bed.form_enum = #{bed}
|
||||
LEFT JOIN locations AS house
|
||||
ON house.encounter_id = ae.id
|
||||
AND house.form_enum = #{house}
|
||||
LEFT JOIN locations AS ward
|
||||
ON ward.encounter_id = ae.id
|
||||
AND ward.form_enum = #{ward}
|
||||
LEFT JOIN practitioners AS primaryNurse
|
||||
ON primaryNurse.encounter_id = ae.id
|
||||
AND primaryNurse.type_code = #{primaryNurse}
|
||||
LEFT JOIN practitioners AS attendingDoctor
|
||||
ON attendingDoctor.encounter_id = ae.id
|
||||
AND attendingDoctor.type_code = #{attendingDoctor}
|
||||
LEFT JOIN practitioners AS admittingDoctor
|
||||
ON admittingDoctor.encounter_id = ae.id
|
||||
AND admittingDoctor.type_code = #{admittingDoctor}
|
||||
LEFT JOIN practitioners AS chiefDoctor
|
||||
ON chiefDoctor.encounter_id = ae.id
|
||||
AND chiefDoctor.type_code = #{chiefDoctor}
|
||||
LEFT JOIN (
|
||||
SELECT ael.encounter_id,
|
||||
ael.start_time,
|
||||
al.id AS location_id,
|
||||
al."name" AS location_name
|
||||
FROM adm_encounter_location ael
|
||||
LEFT JOIN adm_location al ON ael.location_id = al.id AND al.delete_flag = '0'
|
||||
WHERE ael.status_enum = #{active}
|
||||
AND ael.delete_flag = '0'
|
||||
AND ael.form_enum = #{bed}
|
||||
LIMIT 1
|
||||
) AS bed ON bed.encounter_id = ae.id
|
||||
LEFT JOIN (
|
||||
SELECT ael.encounter_id,
|
||||
al.id AS location_id,
|
||||
al."name" AS location_name
|
||||
FROM adm_encounter_location ael
|
||||
LEFT JOIN adm_location al ON ael.location_id = al.id AND al.delete_flag = '0'
|
||||
WHERE ael.status_enum = #{active}
|
||||
AND ael.delete_flag = '0'
|
||||
AND ael.form_enum = #{house}
|
||||
LIMIT 1
|
||||
) AS house ON house.encounter_id = ae.id
|
||||
LEFT JOIN (
|
||||
SELECT ael.encounter_id,
|
||||
al.id AS location_id,
|
||||
al."name" AS location_name
|
||||
FROM adm_encounter_location ael
|
||||
LEFT JOIN adm_location al ON ael.location_id = al.id AND al.delete_flag = '0'
|
||||
WHERE ael.status_enum = #{active}
|
||||
AND ael.delete_flag = '0'
|
||||
AND ael.form_enum = #{ward}
|
||||
LIMIT 1
|
||||
) AS ward ON ward.encounter_id = ae.id
|
||||
LEFT JOIN (
|
||||
SELECT aep.encounter_id,
|
||||
pra.id AS practitioner_id,
|
||||
pra."name" AS practitioner_name
|
||||
FROM adm_encounter_participant aep
|
||||
LEFT JOIN adm_practitioner pra ON aep.practitioner_id = pra.id AND pra.delete_flag = '0'
|
||||
WHERE aep.status_enum = #{active}
|
||||
AND aep.delete_flag = '0'
|
||||
AND aep.type_code = #{primaryNurse}
|
||||
LIMIT 1
|
||||
) AS primaryNurse ON primaryNurse.encounter_id = ae.id
|
||||
LEFT JOIN (
|
||||
SELECT aep.encounter_id,
|
||||
pra.id AS practitioner_id,
|
||||
pra."name" AS practitioner_name
|
||||
FROM adm_encounter_participant aep
|
||||
LEFT JOIN adm_practitioner pra ON aep.practitioner_id = pra.id AND pra.delete_flag = '0'
|
||||
WHERE aep.status_enum = #{active}
|
||||
AND aep.delete_flag = '0'
|
||||
AND aep.type_code = #{attendingDoctor}
|
||||
LIMIT 1
|
||||
) AS attendingDoctor ON attendingDoctor.encounter_id = ae.id
|
||||
LEFT JOIN (
|
||||
SELECT aep.encounter_id,
|
||||
pra.id AS practitioner_id,
|
||||
pra."name" AS practitioner_name
|
||||
FROM adm_encounter_participant aep
|
||||
LEFT JOIN adm_practitioner pra ON aep.practitioner_id = pra.id AND pra.delete_flag = '0'
|
||||
WHERE aep.status_enum = #{active}
|
||||
AND aep.delete_flag = '0'
|
||||
AND aep.type_code = #{admittingDoctor}
|
||||
LIMIT 1
|
||||
) AS admittingDoctor ON admittingDoctor.encounter_id = ae.id
|
||||
LEFT JOIN (
|
||||
SELECT aep.encounter_id,
|
||||
pra.id AS practitioner_id,
|
||||
pra."name" AS practitioner_name
|
||||
FROM adm_encounter_participant aep
|
||||
LEFT JOIN adm_practitioner pra ON aep.practitioner_id = pra.id AND pra.delete_flag = '0'
|
||||
WHERE aep.status_enum = #{active}
|
||||
AND aep.delete_flag = '0'
|
||||
AND aep.type_code = #{chiefDoctor}
|
||||
LIMIT 1
|
||||
) AS chiefDoctor ON chiefDoctor.encounter_id = ae.id
|
||||
LEFT JOIN adm_organization ao
|
||||
ON ao.id = ae.organization_id
|
||||
AND ao.delete_flag = '0'
|
||||
@@ -307,47 +343,17 @@
|
||||
LEFT JOIN fin_contract fc
|
||||
ON aa.contract_no = fc.bus_no
|
||||
AND fc.delete_flag = '0'
|
||||
LEFT JOIN (SELECT aed.encounter_id,
|
||||
LEFT JOIN (
|
||||
SELECT aed.encounter_id,
|
||||
STRING_AGG(ccd.name, ', ') AS condition_names
|
||||
FROM adm_encounter_diagnosis aed
|
||||
INNER JOIN cli_condition cc
|
||||
ON cc.id = aed.condition_id
|
||||
AND cc.delete_flag = '0'
|
||||
INNER JOIN cli_condition_definition ccd
|
||||
ON ccd.id = cc.definition_id
|
||||
AND ccd.delete_flag = '0'
|
||||
INNER JOIN cli_condition cc ON cc.id = aed.condition_id AND cc.delete_flag = '0'
|
||||
INNER JOIN cli_condition_definition ccd ON ccd.id = cc.definition_id AND ccd.delete_flag = '0'
|
||||
WHERE aed.delete_flag = '0'
|
||||
GROUP BY aed.encounter_id) AS diagnosis
|
||||
ON ae.id = diagnosis.encounter_id
|
||||
GROUP BY aed.encounter_id
|
||||
) AS diagnosis ON ae.id = diagnosis.encounter_id
|
||||
WHERE ae.id = #{encounterId}
|
||||
AND ae.delete_flag = '0'
|
||||
GROUP BY ae.id,
|
||||
ae.bus_no,
|
||||
ae.priority_enum,
|
||||
ae.organization_id,
|
||||
ae.start_time,
|
||||
bed.start_time,
|
||||
bed.location_id,
|
||||
bed.location_name,
|
||||
house.location_id,
|
||||
house.location_name,
|
||||
ward.location_id,
|
||||
ward.location_name,
|
||||
primaryNurse.practitioner_id,
|
||||
primaryNurse.practitioner_name,
|
||||
attendingDoctor.practitioner_id,
|
||||
attendingDoctor.practitioner_name,
|
||||
admittingDoctor.practitioner_id,
|
||||
admittingDoctor.practitioner_name,
|
||||
chiefDoctor.practitioner_id,
|
||||
chiefDoctor.practitioner_name,
|
||||
ao."name",
|
||||
ap."name",
|
||||
ap.gender_enum,
|
||||
ap.birth_date,
|
||||
ap.phone,
|
||||
fc.contract_name,
|
||||
diagnosis.condition_names
|
||||
</select>
|
||||
<select id="getAmount" resultType="com.openhis.web.inhospitalnursestation.dto.EncounterAccountDto">
|
||||
SELECT aa.id,
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
body { font-family: 'Microsoft YaHei', sans-serif; width: 350px; margin: 0 auto; padding: 20px; border: 1px solid #ccc; background: #fff; }
|
||||
.header { text-align: center; }
|
||||
.hospital-name { font-size: 20px; font-weight: bold; margin-bottom: 5px; }
|
||||
.title { font-size: 16px; margin-bottom: 10px; }
|
||||
.time { font-size: 12px; color: #666; margin-bottom: 15px; }
|
||||
.section { border-top: 1px solid #000; padding-top: 10px; margin-top: 10px; }
|
||||
.section-title { font-weight: bold; text-decoration: underline; margin-bottom: 10px; font-size: 14px; }
|
||||
.item { display: flex; font-size: 13px; margin-bottom: 5px; }
|
||||
.label { width: 90px; color: #333; }
|
||||
.value { flex: 1; font-weight: 500; }
|
||||
table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
|
||||
th { text-align: left; border-bottom: 1px dashed #ccc; padding-bottom: 5px; color: #666; }
|
||||
td { padding: 5px 0; }
|
||||
.total { text-align: right; font-weight: bold; border-top: 1px solid #000; padding-top: 10px; margin-top: 10px; font-size: 15px; }
|
||||
.footer { margin-top: 20px; font-size: 11px; color: #666; line-height: 1.5; }
|
||||
.qr-code { text-align: center; margin-top: 15px; }
|
||||
.serial-no { text-align: left; margin-top: 10px; font-size: 12px; font-weight: bold; border-top: 1px dashed #ccc; padding-top: 10px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class='header'>
|
||||
<div class='hospital-name'>$hospitalName</div>
|
||||
<div class='title'>门诊预约挂号凭条</div>
|
||||
<div class='time'>打印时间:$printTime</div>
|
||||
</div>
|
||||
<div class='section'>
|
||||
<div class='section-title'>患者基本信息</div>
|
||||
<div class='item'><div class='label'>患者姓名:</div><div class='value'>$patientName</div></div>
|
||||
<div class='item'><div class='label'>门诊号:</div><div class='value'>$outpatientNo</div></div>
|
||||
<div class='item'><div class='label'>身份证号:</div><div class='value'>#if($idCard)$idCard#else-#end</div></div>
|
||||
<div class='item'><div class='label'>联系电话:</div><div class='value'>#if($tel)$tel#else-#end</div></div>
|
||||
</div>
|
||||
<div class='section'>
|
||||
<div class='section-title'>预约详情</div>
|
||||
<div class='item'><div class='label'>就诊科室:</div><div class='value'>#if($deptName)$deptName#else-#end</div></div>
|
||||
<div class='item'><div class='label'>医生姓名:</div><div class='value'>$doctorName</div></div>
|
||||
<div class='item'><div class='label'>预约时间:</div><div class='value'>#if($appointmentTime)$appointmentTime#else-#end</div></div>
|
||||
<div class='item'><div class='label'>就诊地点:</div><div class='value'>门诊大楼内</div></div>
|
||||
<div class='item'><div class='label'>预约状态:</div><div class='value'><span style='color:green;'>☑ 已 预</span></div></div>
|
||||
</div>
|
||||
<div class='section'>
|
||||
<div class='section-title'>费用信息</div>
|
||||
<table>
|
||||
<tr><th>项目</th><th>数量</th><th>单价</th><th>金额</th></tr>
|
||||
#foreach($item in $items)
|
||||
<tr>
|
||||
<td>$item.chargeItemName</td>
|
||||
<td>$item.quantityValue</td>
|
||||
<td>¥$item.totalPrice</td>
|
||||
<td>¥$item.totalPrice</td>
|
||||
</tr>
|
||||
#end
|
||||
</table>
|
||||
<div class='total'>合计:¥$totalAmt</div>
|
||||
<div class='item' style='margin-top:10px;'><div class='label'>支付方式:</div><div class='value'>线上支付 (已支付)</div></div>
|
||||
</div>
|
||||
<div class='footer'>
|
||||
温馨提示:请至少提前30分钟到达取号,过时自动取消。服务时间:8:00-17:00
|
||||
</div>
|
||||
<div class='qr-code'>
|
||||
<img src='https://api.qrserver.com/v1/create-qr-code/?size=100x100&data=$busNo' width='100' height='100' />
|
||||
</div>
|
||||
<div class='serial-no'>流水号:$busNo</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -26,6 +26,24 @@
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- JSON工具类 -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Jackson 注解支持 -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- MyBatis-Plus 支持 -->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- CORE-->
|
||||
<dependency>
|
||||
<groupId>com.core</groupId>
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.openhis.common.aspectj;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.DictUtils;
|
||||
import com.openhis.common.annotation.Dict;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
@@ -115,19 +116,12 @@ public class DictAspect {
|
||||
}
|
||||
|
||||
private String queryDictLabel(String dictTable, String dictCode, String dictText, String dictValue) {
|
||||
String sql;
|
||||
if (StringUtils.isEmpty(dictTable)) {
|
||||
// 场景 1:默认查询 sys_dict_data 表
|
||||
sql = "SELECT dict_label FROM sys_dict_data WHERE dict_type = ? AND dict_value::varchar = ? LIMIT 1";
|
||||
try {
|
||||
return jdbcTemplate.queryForObject(sql, String.class, dictCode, dictValue);
|
||||
} catch (DataAccessException e) {
|
||||
// 如果查询结果为空,返回 空字符串
|
||||
return "";
|
||||
}
|
||||
if (StringUtils.hasText(dictTable)) {
|
||||
// 场景 1:默认字典走DictUtils缓存
|
||||
return DictUtils.getDictLabel(dictCode, dictValue);
|
||||
} else {
|
||||
// 场景 2:查询指定表
|
||||
sql = String.format("SELECT %s FROM %s WHERE %s::varchar = ? LIMIT 1", dictText, dictTable, dictCode);
|
||||
String sql = String.format("SELECT %s FROM %s WHERE %s::varchar = ? LIMIT 1", dictText, dictTable, dictCode);
|
||||
try {
|
||||
return jdbcTemplate.queryForObject(sql, String.class, dictValue);
|
||||
} catch (DataAccessException e) {
|
||||
|
||||
@@ -56,6 +56,16 @@
|
||||
<artifactId>lombok</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!-- JSON工具类 -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
<!-- Jackson 注解支持 -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
</dependency>
|
||||
<!-- MyBatis-Plus 支持 -->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.openhis.administration.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
@@ -33,14 +34,16 @@ public class OperatingRoom extends HisBaseEntity {
|
||||
private String name;
|
||||
|
||||
/** 手术室类型 */
|
||||
@Dict(dictCode = "operating_room_type")
|
||||
private Integer roomTypeEnum;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String roomTypeEnum_dictText;
|
||||
|
||||
/** 所属机构ID */
|
||||
private Long organizationId;
|
||||
|
||||
/** 所属机构名称 */
|
||||
@TableField(exist = false)
|
||||
private String organizationName;
|
||||
|
||||
/** 位置描述 */
|
||||
@@ -64,7 +67,18 @@ public class OperatingRoom extends HisBaseEntity {
|
||||
/** 五笔码 */
|
||||
private String wbStr;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
public OperatingRoom() {
|
||||
this.statusEnum = LocationStatus.ACTIVE.getValue();
|
||||
}
|
||||
|
||||
public Integer getRoomTypeEnum() {
|
||||
return roomTypeEnum;
|
||||
}
|
||||
|
||||
public void setRoomTypeEnum(Integer roomTypeEnum) {
|
||||
this.roomTypeEnum = roomTypeEnum;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
@@ -40,7 +41,8 @@ public class Organization extends HisBaseEntity {
|
||||
private Integer typeEnum;
|
||||
|
||||
/** 机构分类枚举 */
|
||||
private Integer classEnum;
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private String classEnum;
|
||||
|
||||
/** 拼音码 */
|
||||
private String pyStr;
|
||||
|
||||
@@ -37,7 +37,7 @@ public interface IOrganizationService extends IService<Organization> {
|
||||
* @param organizationClass 机构分类
|
||||
* @return 机构下拉列表
|
||||
*/
|
||||
List<Organization> getList(Integer organizationType, Integer organizationClass);
|
||||
List<Organization> getList(Integer organizationType, String organizationClass);
|
||||
|
||||
/**
|
||||
* 根据id查询科室集合
|
||||
|
||||
@@ -44,8 +44,16 @@ public class EncounterServiceImpl extends ServiceImpl<EncounterMapper, Encounter
|
||||
// 生成就诊编码 医保挂号时是先生成码后生成实体
|
||||
encounter.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.ENCOUNTER_NUM.getPrefix(), 4));
|
||||
}
|
||||
// 生成就诊序号 (患者ID + 科室ID 作为当日就诊号的唯一标识)
|
||||
String preFix = encounter.getPatientId() + String.valueOf(encounter.getOrganizationId());
|
||||
// 生成就诊序号:
|
||||
// 1) 若挂号医生已传入(registrarId 充当挂号医生 ID),按“科室+医生+当日”递增
|
||||
// Key 示例:ORG-123-DOC-456 -> 1、2、3...
|
||||
// 2) 否则按“科室+当日”递增
|
||||
String preFix;
|
||||
if (encounter.getRegistrarId() != null) {
|
||||
preFix = "ORG-" + encounter.getOrganizationId() + "-DOC-" + encounter.getRegistrarId();
|
||||
} else {
|
||||
preFix = "ORG-" + encounter.getOrganizationId();
|
||||
}
|
||||
encounter.setDisplayOrder(assignSeqUtil.getSeqNoByDay(preFix));
|
||||
// 患者ID
|
||||
Long patientId = encounter.getPatientId();
|
||||
|
||||
@@ -61,12 +61,28 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
|
||||
* @return 机构下拉列表
|
||||
*/
|
||||
@Override
|
||||
public List<Organization> getList(Integer organizationType, Integer organizationClass) {
|
||||
return baseMapper.selectList(new LambdaQueryWrapper<Organization>()
|
||||
public List<Organization> getList(Integer organizationType, String organizationClass) {
|
||||
LambdaQueryWrapper<Organization> queryWrapper = new LambdaQueryWrapper<Organization>()
|
||||
.select(Organization::getId, Organization::getName, Organization::getDisplayOrder)
|
||||
.eq(Organization::getTypeEnum, organizationType)
|
||||
.eq(organizationClass != null, Organization::getClassEnum, organizationClass)
|
||||
.orderByAsc(Organization::getDisplayOrder)); // 按 displayOrder 升序排序
|
||||
.orderByAsc(Organization::getDisplayOrder); // 按 displayOrder 升序排序
|
||||
|
||||
// 如果organizationClass不为null,则添加查询条件
|
||||
if (organizationClass != null) {
|
||||
// 支持多选值,使用LIKE操作符进行查询(适用于PostgreSQL)
|
||||
String classValue = organizationClass.toString();
|
||||
queryWrapper.and(subWrapper -> {
|
||||
subWrapper.eq(Organization::getClassEnum, classValue)
|
||||
.or()
|
||||
.likeRight(Organization::getClassEnum, classValue + ",")
|
||||
.or()
|
||||
.likeLeft(Organization::getClassEnum, "," + classValue)
|
||||
.or()
|
||||
.like(Organization::getClassEnum, "," + classValue + ",");
|
||||
});
|
||||
}
|
||||
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,18 +32,11 @@ public class PatientServiceImpl extends ServiceImpl<PatientMapper, Patient> impl
|
||||
*/
|
||||
@Override
|
||||
public boolean saveOrUpdatePatient(Patient patient) {
|
||||
|
||||
// 身份证ID,患者ID,确定唯一患者
|
||||
LambdaQueryWrapper<Patient> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(Patient::getId, patient.getId()).eq(Patient::getIdCard, patient.getIdCard());
|
||||
|
||||
Patient existingPatient = baseMapper.selectOne(queryWrapper);
|
||||
if (existingPatient != null) {
|
||||
// 如果记录存在,更新记录
|
||||
patient.setId(existingPatient.getId());
|
||||
if (patient.getId() != null) {
|
||||
// 如果提供了ID,则直接更新该ID的记录
|
||||
return baseMapper.updateById(patient) > 0;
|
||||
} else {
|
||||
// 如果记录不存在,插入新记录
|
||||
// 如果没有提供ID,则插入新记录
|
||||
return baseMapper.insert(patient) > 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
package com.openhis.template.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@@ -28,8 +30,13 @@ public class DoctorPhrase {
|
||||
private Integer phraseType;
|
||||
|
||||
/** 业务分类(主诉/现病史等) */
|
||||
@NotBlank(message = "业务分类不能为空")
|
||||
private String phraseCategory;
|
||||
|
||||
// 非数据库字段,用于前端展示名称
|
||||
@TableField(exist = false)
|
||||
private String businessTypeName;
|
||||
|
||||
/** 模板内容 */
|
||||
private String phraseContent;
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.openhis.template.enums;
|
||||
|
||||
// 枚举类不需要任何Lombok注解(@Data/@AllArgsConstructor/@NoArgsConstructor都删掉)
|
||||
public enum DoctorPhraseBizTypeEnum {
|
||||
// 1. 枚举项:直接传值(不用code:xxx,直接写字符串)
|
||||
MAIN_COMPLAINT("MAIN_COMPLAINT", "主诉"),
|
||||
PRESENT_HISTORY("PRESENT_HISTORY", "现病史"),
|
||||
PRE_OPERATION("PRE_OPERATION", "术前"),
|
||||
POST_OPERATION("POST_OPERATION", "术后"),
|
||||
PAST_HISTORY("PAST_HISTORY", "既往史");
|
||||
|
||||
// 2. 定义枚举的成员变量(private final 保证不可变)
|
||||
private final String code; // 数据库存储的编码
|
||||
private final String name; // 前端展示的名称
|
||||
|
||||
// 3. 手动写私有构造器(枚举构造器必须私有,且要给变量赋值)
|
||||
DoctorPhraseBizTypeEnum(String code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
// 4. 提供getter方法(枚举没有setter,因为枚举项是常量,不能改)
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
// 【可选】添加工具方法:根据code找对应的枚举(前端传code时,后端快速匹配)
|
||||
public static DoctorPhraseBizTypeEnum getByCode(String code) {
|
||||
for (DoctorPhraseBizTypeEnum enumObj : values()) {
|
||||
if (enumObj.getCode().equals(code)) {
|
||||
return enumObj;
|
||||
}
|
||||
}
|
||||
return null; // 或抛异常:throw new IllegalArgumentException("无效的业务分类编码:" + code);
|
||||
}
|
||||
}
|
||||
@@ -83,4 +83,10 @@ public class ActivityDefinition extends HisBaseEntity {
|
||||
|
||||
/** 划价标记 */
|
||||
private Integer pricingFlag;
|
||||
|
||||
/** 序号 */
|
||||
private Integer sortOrder;
|
||||
|
||||
/** 服务范围 */
|
||||
private String serviceRange;
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>openhis-server</artifactId>
|
||||
<groupId>com.openhis</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>openhis-einvoiceapp</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- 领域-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.openhis</groupId>-->
|
||||
<!-- <artifactId>openhis-domain</artifactId>-->
|
||||
<!-- <version>0.0.1-SNAPSHOT</version>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.fastjson2</groupId>
|
||||
<artifactId>fastjson2</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
</dependency>
|
||||
<!-- 共通-->
|
||||
<dependency>
|
||||
<groupId>com.openhis</groupId>
|
||||
<artifactId>openhis-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- liteflow-->
|
||||
<dependency>
|
||||
<groupId>com.yomahub</groupId>
|
||||
<artifactId>liteflow-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk15on</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.itextpdf</groupId>
|
||||
<artifactId>kernel</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpmime</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- pdf依赖-->
|
||||
<dependency>
|
||||
<groupId>com.itextpdf</groupId>
|
||||
<artifactId>itextpdf</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itextpdf</groupId>
|
||||
<artifactId>itext-asian</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<!-- <build>-->
|
||||
<!-- <plugins>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <fork>true</fork> <!– 如果没有该配置,devtools不会生效 –>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>repackage</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.apache.maven.plugins</groupId>-->
|
||||
<!-- <artifactId>maven-war-plugin</artifactId>-->
|
||||
<!-- <version>${maven-war-plugin.version}</version>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <failOnMissingWebXml>false</failOnMissingWebXml>-->
|
||||
<!-- <warName>${project.artifactId}</warName>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- </plugins>-->
|
||||
<!-- <finalName>${project.artifactId}</finalName>-->
|
||||
<!-- </build>-->
|
||||
|
||||
</project>
|
||||
@@ -24,7 +24,7 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>17</java.version> <!-- 将21改为17 -->
|
||||
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
|
||||
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
|
||||
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
|
||||
<druid.version>1.2.27</druid.version>
|
||||
<bitwalker.version>1.21</bitwalker.version>
|
||||
@@ -380,6 +380,8 @@
|
||||
<compilerArgs>
|
||||
<arg>-parameters</arg>
|
||||
<arg>-Xlint:unchecked</arg>
|
||||
<arg>--add-modules</arg>
|
||||
<arg>java.base</arg>
|
||||
</compilerArgs>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
|
||||
325
openhis-ui-vue3/package-lock.json
generated
325
openhis-ui-vue3/package-lock.json
generated
@@ -33,6 +33,8 @@
|
||||
"pinia": "^2.2.0",
|
||||
"pinyin": "^4.0.0-alpha.2",
|
||||
"province-city-china": "^8.5.8",
|
||||
"qrcode": "^1.5.4",
|
||||
"qrcodejs2": "^0.0.2",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"segmentit": "^2.0.3",
|
||||
@@ -2145,7 +2147,6 @@
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"color-convert": "^2.0.1"
|
||||
@@ -2555,6 +2556,15 @@
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/camelcase": {
|
||||
"version": "5.3.1",
|
||||
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
|
||||
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001761",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001761.tgz",
|
||||
@@ -2702,6 +2712,38 @@
|
||||
"integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/cliui": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
|
||||
"integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"string-width": "^4.2.0",
|
||||
"strip-ansi": "^6.0.0",
|
||||
"wrap-ansi": "^6.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/cliui/node_modules/ansi-regex": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/cliui/node_modules/strip-ansi": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ansi-regex": "^5.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/clone": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/clone/-/clone-2.1.2.tgz",
|
||||
@@ -2729,7 +2771,6 @@
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"color-name": "~1.1.4"
|
||||
@@ -2742,7 +2783,6 @@
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/combined-stream": {
|
||||
@@ -3455,6 +3495,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/decamelize": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
|
||||
"integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/decimal.js": {
|
||||
"version": "10.6.0",
|
||||
"resolved": "https://registry.npmmirror.com/decimal.js/-/decimal.js-10.6.0.tgz",
|
||||
@@ -3566,6 +3615,12 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/dijkstrajs": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.3.tgz",
|
||||
"integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/dom-serializer": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmmirror.com/dom-serializer/-/dom-serializer-0.2.2.tgz",
|
||||
@@ -3784,6 +3839,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/emoji-regex": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
||||
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/emojis-list": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/emojis-list/-/emojis-list-3.0.0.tgz",
|
||||
@@ -4200,6 +4261,19 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/find-up": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
|
||||
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"locate-path": "^5.0.0",
|
||||
"path-exists": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.11",
|
||||
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.11.tgz",
|
||||
@@ -4363,6 +4437,15 @@
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/get-caller-file": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
|
||||
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
|
||||
"license": "ISC",
|
||||
"engines": {
|
||||
"node": "6.* || 8.* || >= 10.*"
|
||||
}
|
||||
},
|
||||
"node_modules/get-intrinsic": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
|
||||
@@ -5043,6 +5126,15 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/is-fullwidth-code-point": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
|
||||
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/is-generator-function": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/is-generator-function/-/is-generator-function-1.1.2.tgz",
|
||||
@@ -5467,6 +5559,18 @@
|
||||
"url": "https://github.com/sponsors/antfu"
|
||||
}
|
||||
},
|
||||
"node_modules/locate-path": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
|
||||
"integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"p-locate": "^4.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/lodash": {
|
||||
"version": "4.17.21",
|
||||
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
|
||||
@@ -6128,6 +6232,42 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/p-limit": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
|
||||
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"p-try": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/p-locate": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
|
||||
"integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"p-limit": "^2.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/p-try": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
|
||||
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/pako": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/pako/-/pako-2.1.0.tgz",
|
||||
@@ -6187,6 +6327,15 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/path-exists": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
|
||||
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/path-parse": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz",
|
||||
@@ -6337,6 +6486,15 @@
|
||||
"pathe": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/pngjs": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz",
|
||||
"integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10.13.0"
|
||||
}
|
||||
},
|
||||
"node_modules/posix-character-classes": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
|
||||
@@ -6481,6 +6639,29 @@
|
||||
"@province-city-china/types": "8.5.8"
|
||||
}
|
||||
},
|
||||
"node_modules/qrcode": {
|
||||
"version": "1.5.4",
|
||||
"resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.4.tgz",
|
||||
"integrity": "sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"dijkstrajs": "^1.0.1",
|
||||
"pngjs": "^5.0.0",
|
||||
"yargs": "^15.3.1"
|
||||
},
|
||||
"bin": {
|
||||
"qrcode": "bin/qrcode"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.13.0"
|
||||
}
|
||||
},
|
||||
"node_modules/qrcodejs2": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmjs.org/qrcodejs2/-/qrcodejs2-0.0.2.tgz",
|
||||
"integrity": "sha512-+Y4HA+cb6qUzdgvI3KML8GYpMFwB24dFwzMkS/yXq6hwtUGNUnZQdUnksrV1XGMc2mid5ROw5SAuY9XhI3ValA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/quansync": {
|
||||
"version": "0.2.11",
|
||||
"resolved": "https://registry.npmmirror.com/quansync/-/quansync-0.2.11.tgz",
|
||||
@@ -6752,6 +6933,15 @@
|
||||
"node": ">=0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/require-directory": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
|
||||
"integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/require-from-string": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/require-from-string/-/require-from-string-2.0.2.tgz",
|
||||
@@ -6761,6 +6951,12 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/require-main-filename": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
|
||||
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "1.22.11",
|
||||
"resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.11.tgz",
|
||||
@@ -7068,6 +7264,12 @@
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/set-blocking": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
|
||||
"integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/set-function-length": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmmirror.com/set-function-length/-/set-function-length-1.2.2.tgz",
|
||||
@@ -7560,6 +7762,41 @@
|
||||
"safe-buffer": "~5.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/string-width": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
||||
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"emoji-regex": "^8.0.0",
|
||||
"is-fullwidth-code-point": "^3.0.0",
|
||||
"strip-ansi": "^6.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/string-width/node_modules/ansi-regex": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/string-width/node_modules/strip-ansi": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ansi-regex": "^5.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/string.prototype.trim": {
|
||||
"version": "1.2.10",
|
||||
"resolved": "https://registry.npmmirror.com/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz",
|
||||
@@ -8900,6 +9137,12 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/which-module": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz",
|
||||
"integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/which-typed-array": {
|
||||
"version": "1.1.19",
|
||||
"resolved": "https://registry.npmmirror.com/which-typed-array/-/which-typed-array-1.1.19.tgz",
|
||||
@@ -8922,6 +9165,47 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/wrap-ansi": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
|
||||
"integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ansi-styles": "^4.0.0",
|
||||
"string-width": "^4.1.0",
|
||||
"strip-ansi": "^6.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/wrap-ansi/node_modules/ansi-regex": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/wrap-ansi/node_modules/strip-ansi": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ansi-regex": "^5.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/y18n": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
|
||||
"integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/yaml": {
|
||||
"version": "1.10.2",
|
||||
"resolved": "https://registry.npmmirror.com/yaml/-/yaml-1.10.2.tgz",
|
||||
@@ -8931,6 +9215,41 @@
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/yargs": {
|
||||
"version": "15.4.1",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
|
||||
"integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cliui": "^6.0.0",
|
||||
"decamelize": "^1.2.0",
|
||||
"find-up": "^4.1.0",
|
||||
"get-caller-file": "^2.0.1",
|
||||
"require-directory": "^2.1.1",
|
||||
"require-main-filename": "^2.0.0",
|
||||
"set-blocking": "^2.0.0",
|
||||
"string-width": "^4.2.0",
|
||||
"which-module": "^2.0.0",
|
||||
"y18n": "^4.0.0",
|
||||
"yargs-parser": "^18.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/yargs-parser": {
|
||||
"version": "18.1.3",
|
||||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
|
||||
"integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"camelcase": "^5.0.0",
|
||||
"decamelize": "^1.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/zrender": {
|
||||
"version": "5.4.4",
|
||||
"resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.4.4.tgz",
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
"pinia": "^2.2.0",
|
||||
"pinyin": "^4.0.0-alpha.2",
|
||||
"province-city-china": "^8.5.8",
|
||||
"qrcode": "^1.5.4",
|
||||
"qrcodejs2": "^0.0.2",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"segmentit": "^2.0.3",
|
||||
|
||||
@@ -11,7 +11,7 @@ export default {
|
||||
inDiagName: '急性上呼吸道感染',
|
||||
name: '于浩',
|
||||
officeName: '住院科室',
|
||||
title: '长春市朝阳区中医院',
|
||||
title: '',
|
||||
operaDays: null,
|
||||
outdate: null,
|
||||
sex: '女',
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="recordBill">
|
||||
<div :id="'exeSheetTitle' + printData.id" class="printView_header">
|
||||
<div style="text-align: center; height: 60px">
|
||||
长春市朝阳区中医院医嘱执行单
|
||||
{{ userStore.hospitalName }}医嘱执行单
|
||||
</div>
|
||||
<div>
|
||||
<span style="display: inline-block; width: 100px">床号:{{ printData.patientInfo.encounterLocationName }}</span>
|
||||
@@ -87,8 +87,13 @@
|
||||
</template>
|
||||
<script>
|
||||
import {getLodop} from '../../../plugins/print/LodopFuncs'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
const userStore = useUserStore();
|
||||
return { userStore };
|
||||
},
|
||||
props: {
|
||||
printData: {
|
||||
type: Object,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="recordBill">
|
||||
<div id="div1" class="printView_header">
|
||||
<div style="text-align: center; font-size: 20px; height: 40px">
|
||||
长春市朝阳区中医院输液执行单
|
||||
{{ userStore.hospitalName }}输液执行单
|
||||
</div>
|
||||
<div>
|
||||
<span>座位:{{ printData.patientInfo.encounterLocationName }}</span>
|
||||
@@ -61,8 +61,13 @@
|
||||
</template>
|
||||
<script>
|
||||
import {getLodop} from '../../../plugins/print/LodopFuncs'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
const userStore = useUserStore();
|
||||
return { userStore };
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
printData: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="printTicket">
|
||||
<p>长春市朝阳区中医院</p>
|
||||
<p>{{ userStore.hospitalName }}</p>
|
||||
<div>
|
||||
<span>姓名:</span>
|
||||
<span>{{ printData.patientName }}</span>
|
||||
@@ -26,9 +26,14 @@
|
||||
</template>
|
||||
<script>
|
||||
import JsBarcode from 'jsbarcode';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
|
||||
export default {
|
||||
name: 'TriageTicket',
|
||||
setup() {
|
||||
const userStore = useUserStore();
|
||||
return { userStore };
|
||||
},
|
||||
props: {
|
||||
printData: {
|
||||
type: Object,
|
||||
|
||||
@@ -93,6 +93,16 @@
|
||||
</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 添加入院日期等关键信息 -->
|
||||
<div class="admission-info" v-if="item.admissionDate">
|
||||
<span class="admission-date">入院日期:{{ item.admissionDate }}</span>
|
||||
</div>
|
||||
|
||||
<!-- 添加主治医生信息 -->
|
||||
<div class="attending-doctor" v-if="item.attendingDoctorName">
|
||||
<span class="doctor-name">主管医生:{{ item.attendingDoctorName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -456,7 +466,9 @@ watch(
|
||||
padding: 8px 12px 10px;
|
||||
|
||||
.personal-info-container {
|
||||
display: block;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
|
||||
.name-container {
|
||||
display: flex;
|
||||
@@ -469,6 +481,10 @@ watch(
|
||||
color: #111827;
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.age {
|
||||
@@ -485,6 +501,19 @@ watch(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.admission-info, .attending-doctor {
|
||||
display: flex;
|
||||
font-size: 12px;
|
||||
color: #6b7280;
|
||||
margin-top: 2px;
|
||||
|
||||
.admission-date, .doctor-name {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
"top": 15,
|
||||
"height": 16.5,
|
||||
"width": 792,
|
||||
"title": "长春市朝阳区中医院预交金收据",
|
||||
"title": "{{HOSPITAL_NAME}}预交金收据",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontWeight": "bold",
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
"top": 38,
|
||||
"height": 19.5,
|
||||
"width": 255,
|
||||
"title": "中药长春市朝阳区中医院",
|
||||
"title": "中药{{HOSPITAL_NAME}}",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontSize": 11.25,
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
"top": 58.5,
|
||||
"height": 13.5,
|
||||
"width": 145.5,
|
||||
"title": "机构名称:长春市朝阳区中医院",
|
||||
"title": "机构名称:{{HOSPITAL_NAME}}",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontSize": 9,
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
"top": 22.5,
|
||||
"height": 19.5,
|
||||
"width": 420,
|
||||
"title": "长春市朝阳区中医院",
|
||||
"title": "{{HOSPITAL_NAME}}",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontSize": 20.25,
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"top": 39.5,
|
||||
"height": 19.5,
|
||||
"width": 255,
|
||||
"title": "中药长春市朝阳区中医院",
|
||||
"title": "中药{{HOSPITAL_NAME}}",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontSize": 11.25,
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
"top": 22.5,
|
||||
"height": 19.5,
|
||||
"width": 595.5,
|
||||
"title": "长春市朝阳区中医院",
|
||||
"title": "{{HOSPITAL_NAME}}",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontSize": 20.25,
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
"top": 22.5,
|
||||
"height": 19.5,
|
||||
"width": 420,
|
||||
"title": "长春市朝阳区中医院",
|
||||
"title": "{{HOSPITAL_NAME}}",
|
||||
"coordinateSync": false,
|
||||
"widthHeightSync": false,
|
||||
"fontSize": 20.25,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user