Compare commits

226 Commits

Author SHA1 Message Date
6dc6480e64 Merge remote-tracking branch 'origin/develop' into develop 2025-11-27 10:40:12 +08:00
98c263a72b 患者档案和进货单bug 2025-11-27 10:39:56 +08:00
wzk
50a2ef9e00 门诊医生站->医嘱:新增独立的西药处方单补充 2025-11-27 09:41:59 +08:00
wzk
065f7052c6 检查项目设置->套餐设置->套餐管理补充 2025-11-27 09:24:26 +08:00
e23d42404d 患者档案和进货单bug 2025-11-27 08:56:19 +08:00
wzk
4120d4e001 检查项目设置->套餐设置->套餐管理 2025-11-27 08:44:32 +08:00
wzk
1bd2089047 检查项目设置-套餐设置 2025-11-26 16:18:47 +08:00
wzk
6d9ff7dc10 检查项目设置-套餐设置 2025-11-26 16:15:41 +08:00
wzk
ae7ca984f8 检查项目设置-套餐设置 2025-11-26 16:15:11 +08:00
wzk
69b7a4d865 检查项目设置-套餐设置界面 2025-11-26 14:39:57 +08:00
wzk
864bf55025 修复门诊医生站->【处方单】按钮,点击【处方单】按钮无响应问题 2025-11-26 13:34:41 +08:00
wzk
249ef5f87e 门诊挂号-》医生字段,对字段医生进行过滤,让医生和、就诊科室、挂号类型形成对照。 2025-11-26 13:15:42 +08:00
qk123
df3fb6c66c 检查方法、检查部位接口部分细节修改 2025-11-26 10:37:30 +08:00
qk123
10ec9f4c1b 检查方法、检查部位后端接口、实体、数据库表基本完成。 2025-11-26 10:31:30 +08:00
0b98763c05 门诊挂号查询优化 2025-11-25 16:14:03 +08:00
叶锦涛
3d3b21a775 修复操作员的工号的编辑功能 2025-11-25 15:58:17 +08:00
叶锦涛
4ba4f80946 修改发票管理页面 2025-11-25 15:39:29 +08:00
叶锦涛
ed7cb2dab5 修改发票管理页面 2025-11-25 15:30:33 +08:00
wzk
50ef9e6743 修复西药处方单bug 2025-11-25 13:49:38 +08:00
py
250d7dde34 门诊医生站-》开立处方医嘱:完善药品的字典信息 2025-11-25 11:27:58 +08:00
wzk
69f3e066db 门诊医生站-》医嘱:新增独立的西药处方单 2025-11-25 10:17:13 +08:00
叶锦涛
afb0c3933c 删除检查项目设置多余数据 2025-11-24 16:22:43 +08:00
叶锦涛
45ac07e57c 删除检查项目设置多余数据 2025-11-24 16:19:46 +08:00
qk123
262ea97824 同一患者保存病历后判断逻辑问题 2025-11-24 15:13:18 +08:00
ljj
dcfa13f239 系统管理-目录管理-》耗材目录。将该界面的字段标题设置可以手动拉宽每个字段的宽度,有的字段内容看不全,将界面的字段标题设置成可以调节每个字段的长度,使之能看全内容 2025-11-24 15:11:19 +08:00
叶锦涛
27c3c850d6 创建项目检查设置页面 2025-11-24 14:35:54 +08:00
wzk
122a15a73d 修复医嘱保存、签发不成功 2025-11-24 11:40:37 +08:00
wzk
61749aee4d 门诊号码管理修改关闭给予保存提示 2025-11-24 10:45:27 +08:00
97a29a31c5 门诊挂号查询优化 2025-11-24 09:39:23 +08:00
wzk
c3734f921c 用户管理中用户名字替换成用户姓名 2025-11-24 09:34:04 +08:00
c561586cfa 门诊换卡优化 2025-11-24 09:22:11 +08:00
qk123
60593233bc 中医添加医嘱后页面不显示BUG 2025-11-21 15:08:27 +08:00
wzk
992b03f9c2 解决退号记录的退号操作工作取值问题 2025-11-21 13:15:08 +08:00
wzk
36628342dc 用户管理将用户名称改成用户账号、用户昵称改成用户姓名。 2025-11-21 11:32:46 +08:00
qk123
3783e4a872 优化配方名称框、剂量单位框、脚注框 2025-11-21 09:59:09 +08:00
py
584f79294b 13 收费工作站-》门诊挂号1、将医生改成出诊医生。
2、将出诊医生字段选中‘内科医生1’,点击【确认】按钮,重新打开出诊医生字段的内容保存成功
2025-11-21 09:39:22 +08:00
wzk
a5884ec069 修复退号记录的退号操作工作取值问题 2025-11-21 09:25:39 +08:00
wzk
cc2f7db754 Merge remote-tracking branch 'origin/develop' into develop 2025-11-21 09:24:21 +08:00
wzk
fcccfc1959 解决医嘱确定后中成药项目名消失 2025-11-21 09:23:20 +08:00
c5ec91e7d3 新增医嘱中成药显示项目名称1 2025-11-21 09:22:35 +08:00
6b67e25d94 新增医嘱中成药显示项目名称 2025-11-21 09:17:24 +08:00
wzk
6da3b63012 医嘱保存成功 2025-11-20 16:29:14 +08:00
qk123
ea0f0e2294 中医:添加药品”确定“按钮能够正常起作用。 2025-11-20 11:14:37 +08:00
qk123
980f0aeb9c 中医:新增配方名称、煎药方式、脚注字段。 2025-11-20 11:02:55 +08:00
叶锦涛
17b40118ce 修复bug 2025-11-20 10:47:49 +08:00
叶锦涛
d10a78e5e8 修复处方标志保存的不正确 2025-11-20 09:18:54 +08:00
叶锦涛
f7ad010b2a 修复bug 2025-11-20 09:05:06 +08:00
叶锦涛
1a7ff0a686 修复bug 2025-11-20 08:58:26 +08:00
叶锦涛
3ad3f21362 实现药品目录处方标志保存 2025-11-19 16:47:35 +08:00
叶锦涛
c84fc3c236 删除重复函数 2025-11-19 16:43:12 +08:00
叶锦涛
a6561e2ca6 删除重复函数 2025-11-19 16:37:01 +08:00
叶锦涛
dfe35bb7f0 修改耗材/诊疗绑定,耗材项目药品的缺失 2025-11-19 16:33:12 +08:00
py
18c96e006f Merge branch 'develop' of https://gitea.gentronhealth.com/Yajentine/his into develop 2025-11-19 15:54:20 +08:00
py
f5db504363 feat(医生站): 添加处方单删除功能及相关UI
- 新增处方单删除按钮及交互逻辑
- 实现处方单删除前的条件检查(药品数量和收费状态)
- 添加删除按钮的样式和禁用状态
- 完善处方单药品数量和总价的计算方法
2025-11-19 15:54:15 +08:00
wzk
deb31c969a 修复耗材确定后显示成中成药 2025-11-19 14:06:04 +08:00
wzk
e7dac9762d 门诊号码管理编辑员工号 2025-11-19 13:19:48 +08:00
叶锦涛
89862878b5 修改耗材目录地点的缺失 2025-11-18 17:23:39 +08:00
叶锦涛
e105919dab 修改错误提示信息 2025-11-18 11:15:10 +08:00
叶锦涛
e83fc94334 新建发票管理页面 2025-11-18 10:40:57 +08:00
5bf7ab481f 编辑药品tab页面可以不显示数据了 新增之后勾选框还存在 2025-11-18 10:36:15 +08:00
wzk
afa904bd83 医嘱类别耗材项目从耗材目录获取数据 2025-11-18 10:09:30 +08:00
wzk
a343464d8d 门诊医生站-》开立医嘱:增加备注字段 2025-11-18 10:08:46 +08:00
wzk
4a2485e434 门诊医生站-》医嘱:皮试字段做成单选框。当开单医生选中检索出来的药品确认时,如果该药品是皮试药品,系统’药品:该药品名称+需要做皮试,是否做皮试? 2025-11-18 09:25:07 +08:00
Auora
4e2d4d85ec 【bug】解决撤回按钮弹出多余信息 2025-11-17 15:55:59 +08:00
wzk
7ddf6211ee Merge remote-tracking branch 'origin/develop' into develop 2025-11-17 13:29:55 +08:00
wzk
d44600b641 挂号退号 2025-11-17 13:28:33 +08:00
a68c4402de 实现门诊换卡的整体逻辑 2025-11-17 13:24:49 +08:00
wzk
93103f7f40 门诊号码管理维护界面-》优化 2025-11-17 13:09:36 +08:00
wzk
7202151a41 正常挂号消除退款的记录 2025-11-17 11:04:59 +08:00
wzk
491d8f8930 挂号退款加退款记录 2025-11-17 10:59:22 +08:00
wzk
b886726ecc 当就诊状态是非接诊时,操作【退号】系统提示‘该患者医生已接诊,不能退号!’。 2025-11-17 09:55:32 +08:00
qk123
9d0dde6794 门诊医生站移除取消接诊的错误消息提示 2025-11-17 09:46:09 +08:00
qk123
f3578b3202 新增门诊医生站确认取消接诊后移除错误消息提示 2025-11-17 09:42:01 +08:00
Auora
0610ba7cb5 解决门诊挂号退号费用性质不一致的bug 2025-11-14 15:41:30 +08:00
叶锦涛
8b848f787a 修改科室管理主界面科室分类和编辑科室的字典 2025-11-14 09:25:37 +08:00
wzk
a794cd0ce3 门诊医生站开立医嘱中成药的开医嘱录入界面和西药的开医嘱录入界面保持一致 2025-11-14 09:01:48 +08:00
叶锦涛
d97fd0bed1 修复采购入库时选择不同仓库新增药品时仓库的错误 2025-11-13 17:16:12 +08:00
叶锦涛
c0e67722d9 修复门诊医生站诊断删除按钮的错误 2025-11-13 15:40:53 +08:00
qk123
aca7fea69f 新增门诊医生站取消接诊功能 2025-11-13 13:41:48 +08:00
wzk
ce9344f9ce 门诊医生站-》开立医嘱系统根据选中的药品名称
判断医嘱类型。
2025-11-13 10:17:35 +08:00
wzk
991ad61655 1 2025-11-13 08:59:09 +08:00
Auora
e4ac857461 【bug】剂量单位bug 2025-11-12 14:18:51 +08:00
叶锦涛
24ab98ae89 发票号码维护页面 2025-11-12 13:51:34 +08:00
wzk
e79ab9ac4f 医嘱:修改用药天数时,系统自动通过公式自动换算总量 2025-11-12 13:31:11 +08:00
b66c2027d1 换卡处理的分页 2025-11-12 12:08:52 +08:00
09bf895711 维护换卡处理的查询 2025-11-12 10:58:12 +08:00
Auora
825cdd58ae 【bug】 2025-11-12 10:12:12 +08:00
0977eb8145 维护换卡处理的查询bug 2025-11-12 09:59:03 +08:00
Auora
73efeecfc1 解决当日已挂号页面费用性质不一致问题 2025-11-12 09:47:28 +08:00
fe8fb3d321 维护换卡处理的查询 2025-11-12 09:38:47 +08:00
叶锦涛
618fb1e340 修改新增患者的信息样式 2025-11-12 09:15:08 +08:00
叶锦涛
215fe8b889 修改科室管理和新增科室分类的字典 2025-11-11 16:46:36 +08:00
Auora
3e32458b7f 解决医嘱类型选中开单后变成数字问题。 2025-11-11 16:05:18 +08:00
wzk
a8e170ea45 门诊号码管理维护界面-》优化 2025-11-11 13:58:34 +08:00
wzk
1856ae50fd Merge remote-tracking branch 'origin/develop' into develop 2025-11-11 13:58:20 +08:00
wzk
1711e6c115 门诊号码管理维护界面-》优化 2025-11-11 13:57:34 +08:00
叶锦涛
b3f226feab 修改新增患者 2025-11-11 13:28:50 +08:00
wzk
c086dc8c77 修改报表管理-》院内库房情况查询报表-》库存商品明细查询报表,选择库存范围条件检索报错补充 2025-11-11 11:51:52 +08:00
wzk
6762341fbd 修改报表管理-》院内库房情况查询报表-》库存商品明细查询报表,选择库存范围条件检索报错。 2025-11-11 11:36:15 +08:00
d5f8b0f23b 医嘱类型勾选全部之后项目报错的bug 2025-11-11 10:12:40 +08:00
叶锦涛
38233110f2 1、监护人关系要取原来的联系人关系的下拉内容,取值于字典管理-》与患者关系。 2025-11-10 17:11:15 +08:00
6ebb59bc5e 、增加挂号单补打功能(差就诊号查询自动填充) 2025-11-10 17:09:08 +08:00
wzk
69aefab280 库房/药房管理:添加的耗材库 2025-11-10 16:57:05 +08:00
3d3ff82e24 解决医嘱类别选择全部项目报错的问题 2025-11-10 16:53:14 +08:00
69780d204f 1、收费工作站-》门诊挂号:将门诊挂号界面的功能按钮统一摆放在标题页,依次摆放整齐。
2、增加挂号单补打功能(差就诊号查询自动填充)
3.患者档案管理:将【修改】和【查询】按钮调出的界面统一修改成图2的新增患者界面。
2025-11-10 16:35:47 +08:00
Auora
ef52f290fe 解决医嘱类型选中开单后变成数字问题。 2025-11-10 16:17:44 +08:00
wzk
e9d1119777 门诊号码管理维护界面-》优化 2025-11-10 14:41:22 +08:00
qk123
cf182f0e34 修改:初复诊标识系统重新判断->从数据库中读取 2025-11-10 14:32:59 +08:00
qk123
626ae1a459 修改:初复诊标识系统重新判断->从数据库中读取 2025-11-10 10:12:29 +08:00
wzk
3d6977328f 解决系统管理-》基础数据-》库房/药房管理无法添加的耗材库问题的补充 2025-11-07 16:42:19 +08:00
wzk
2dcd7ba1d5 解决系统管理-》基础数据-》库房/药房管理无法添加的耗材库问题 2025-11-07 16:27:56 +08:00
qk123
16a4d38113 修复疾病目录模块下新增病种异常提示请勿重复提交问题 2025-11-07 15:25:28 +08:00
57c98ea39d 解决诊断目录数据展示不全问题 2025-11-07 15:13:41 +08:00
08f7e35042 解决诊断目录数据展示不全问题 2025-11-07 14:08:28 +08:00
wzk
43f3d1ba94 立医嘱的执行科室默认获取诊疗项目维护的所属科室,如果诊疗项目未维护所属科室,默认执行科室为开单科室,然后开单医生又权限操作修改。 2025-11-07 13:41:57 +08:00
wzk
2e45c6c029 开单科室维护的取药药房药在医生开处方药做好过滤限制,没有维护的药房/药库或者药品类型过滤掉。 2025-11-07 13:35:06 +08:00
wzk
945182c6f8 解决报表管理-》院内库房情况查询报表-》库存商品明细查询报表bug 2025-11-07 09:56:50 +08:00
Auora
f7de87860b 1增加挂号收费系统参数维护界面挂号处理的相关参数
2在打印设置tba页面增加是否打印挂号单维护参数
2025-11-06 17:20:42 +08:00
wzk
67e4de0d68 Merge remote-tracking branch 'origin/develop' into develop 2025-11-06 17:13:11 +08:00
qk123
602d521424 修改完诊后再接诊初复诊标识不对问题 2025-11-06 17:12:57 +08:00
叶锦涛
01e14ee084 修改登录界面测试医院的信息 2025-11-06 16:56:41 +08:00
qk123
4a5572de26 修改完诊后再接诊初复诊标识不对问题 2025-11-06 14:00:45 +08:00
88a516d1be 门诊挂号-》【档案】档管理的【新增患者】-患者界面(图1)的内容要与图2的内容一致(门诊挂号-》【新建】-》新增患者界面) 2025-11-06 13:34:59 +08:00
wzk
9ce967002a Merge remote-tracking branch 'origin/develop' into develop 2025-11-06 13:25:41 +08:00
wzk
fd536a035e 修改 2025-11-06 13:25:25 +08:00
wzk
df84a7eefa Merge remote-tracking branch 'origin/develop' into develop 2025-11-06 13:23:55 +08:00
2804703eaa 门诊号码管理维护界面 2025-11-06 13:23:33 +08:00
wzk
e14a0e3d13 Merge remote-tracking branch 'origin/develop' into develop 2025-11-06 13:15:49 +08:00
5a99fe8234 门诊号码管理维护界面 2025-11-06 13:15:22 +08:00
3ad5c5533f 在门诊挂号页面增加档案按钮完成患者档案管理的跳转 2025-11-06 09:11:26 +08:00
Auora
9997f4f7c9 修改医嘱字典 2025-11-06 08:53:57 +08:00
Auora
3d4e4a8119 修改病历不能编辑问题 2025-11-05 16:15:23 +08:00
叶锦涛
3deac74898 在处方打印处增加患者信息 2025-11-05 16:07:37 +08:00
wzk
7bbc50ef47 Merge remote-tracking branch 'origin/develop' into develop 2025-11-05 15:39:48 +08:00
wzk
4ae6765a15 门诊号码管理维护界面 2025-11-05 15:39:39 +08:00
wzk
1292853c5d Merge remote-tracking branch 'origin/develop' into develop 2025-11-05 14:53:46 +08:00
Auora
41791c9ccc 修改门诊挂号和费用支付上的费用性质不一致的问题,并且将解决无法收费的问题 2025-11-05 14:53:34 +08:00
Auora
0674215b53 修改门诊挂号和费用支付上的费用性质不一致的问题,并且将解决无法收费的问题 2025-11-05 14:09:06 +08:00
e42d990304 收费工作站-》门诊挂号:将门诊挂号界面的功能按钮统一摆放在标题页,依次摆放整齐。 2025-11-05 13:32:48 +08:00
0dbe9a57c8 Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	openhis-ui-vue3/src/views/charge/outpatientregistration/index.vue
2025-11-05 11:45:36 +08:00
85ea831a1c 收费工作站-》门诊挂号:将门诊挂号界面的功能按钮统一摆放在标题页,依次摆放整齐。 2025-11-05 11:43:52 +08:00
7ac26cf781 增加监护人信息限制,在门诊挂号页面增加档案按钮完成患者档案管理的跳转 2025-11-05 11:38:47 +08:00
b7412648b4 修改报表格式2 2025-11-04 16:45:41 +08:00
叶锦涛
97571652e5 把新增患者中的联系人替换成监护人 2025-11-04 16:36:26 +08:00
b5d4da97f9 修改报表格式 2025-11-04 16:10:16 +08:00
叶锦涛
e5edb6bda2 跳过了处方打印页面的构建 2025-11-04 15:45:12 +08:00
叶锦涛
0e1ae53194 修改了标题undefined 2025-11-04 14:55:32 +08:00
a1efd3f91b 修复完诊后的初诊复诊错乱 2025-11-04 13:24:07 +08:00
3211553d0d 修复门诊收费报表报错,修复采购入库历史遗留数据问题 2025-11-04 13:10:47 +08:00
wzk
a57a326b83 Merge remote-tracking branch 'origin/develop' into develop 2025-11-04 10:44:14 +08:00
wzk
f77d0a2567 新增用户用户密码系统可以自动赋值一个初始密码,123456。 2025-11-04 10:43:52 +08:00
wzk
72581466aa 新增用户用户密码系统可以自动赋值一个初始密码,123456。 2025-11-03 17:39:05 +08:00
Auora
4b3471df06 门诊挂号的费用性质取值改成取值字典管理-》医疗费用支付方式代码的字典数据
将门诊医生站开立医嘱的医嘱类型字段下拉列表内容做成前台维护
2025-11-03 17:15:00 +08:00
叶锦涛
68c65ae8bd 给登录界面的标题加上了信息管理系统 2025-11-03 17:10:10 +08:00
wzk
1b879addc7 门诊医生开处方单,系统把药品无论是药库或药房有的库存都显示出来了。解决显示只有药房的问题。 2025-11-03 16:14:52 +08:00
叶锦涛
3888859b2b 修复了处方打印不能打印的错误 2025-11-03 13:48:20 +08:00
Auora
f03d2e1633 修改病历格式 2025-11-03 13:38:47 +08:00
bc91eb7cdc 按照采购退货的申请审批流程,完成药品采购申请退货的审批确认, 2025-11-03 11:56:34 +08:00
Auora
93120e973a [bug]解决选中药库或药房对应的源仓库或目的仓库无下拉数据 2025-11-03 11:12:19 +08:00
wzk
c6a27f6276 Merge remote-tracking branch 'origin/develop' into develop 2025-11-03 09:41:36 +08:00
wzk
778704c9dc 药品类别下拉别表内容错误,药品类别应该取值如下图字典管理的药品分类编码 2025-11-03 09:41:28 +08:00
wzk
ff227b40c1 Merge remote-tracking branch 'origin/develop' into develop 2025-11-03 09:38:43 +08:00
wzk
c7d8ab5b48 Merge remote-tracking branch 'origin/develop' into develop 2025-11-03 09:38:36 +08:00
wzk
9c27b2a134 Merge remote-tracking branch 'origin/develop' into develop 2025-11-03 09:31:58 +08:00
叶锦涛
3f919188d2 药品类别下拉别表内容错误,药品类别应该取值如下图字典管理的药品分类编码 2025-11-03 09:31:45 +08:00
wzk
8942058972 Merge remote-tracking branch 'origin/develop' into develop 2025-11-03 09:29:49 +08:00
叶锦涛
6c2dbf0418 药品类别下拉别表内容错误,药品类别应该取值字典管理的药品分类编码 2025-11-03 09:29:30 +08:00
叶锦涛
85e185bab8 修复了全选框 2025-10-31 16:35:47 +08:00
叶锦涛
88aa1517ef Merge branch 'develop' of https://gitea.gentronhealth.com/wangjunping/his into develop 2025-10-31 16:32:53 +08:00
叶锦涛
c05118c427 修复了全选框 2025-10-31 16:32:13 +08:00
Auora
2a7f1326b9 [bug]修改就诊时,就诊时间逻辑 2025-10-31 16:23:12 +08:00
叶锦涛
c07255fe5b 修改了登入界面的xxx医院信息管理系统 2025-10-31 16:13:53 +08:00
叶锦涛
749bfc89dd 修复了打印单据没有响应的错误,修复了新增加诊断诊断类别自动获取11的错误 2025-10-31 16:06:12 +08:00
52cc5e3aae 实现采购入库的供货商字段数据存放到数据库,并且系统在采购入库界面能读取对应的采购入库单的对应供货商名称显示 2025-10-31 13:52:33 +08:00
wzk
642c4a0941 Merge remote-tracking branch 'origin/develop' into develop 2025-10-31 12:38:34 +08:00
wzk
30953d5771 开立医嘱的执行科室默认获取诊疗项目维护的所属科室 2025-10-31 12:38:22 +08:00
wzk
83e0c663c9 在开立好的医嘱名称前增加医嘱类别的显示 2025-10-31 12:32:41 +08:00
b19337e76a 修复初诊和就诊的bug 2025-10-31 12:30:11 +08:00
ba607346bd 修复初诊和就诊的bug 2025-10-31 11:05:40 +08:00
Auora
433c452a40 解决库房/药房管理,操作编辑弹窗问题 2025-10-31 10:08:59 +08:00
Auora
a1be7fdbfd [bug]修改仓库字段下拉别表无内容bug 2025-10-31 09:01:35 +08:00
叶锦涛
87409d0c93 修复了药房/库房的删除的报错 2025-10-30 15:38:51 +08:00
d5c8ae8d45 修复初诊和就诊的bug 2025-10-30 15:28:05 +08:00
bc45e9c8c6 首页页面优化 2025-10-30 11:14:25 +08:00
Auora
42992382c0 增加isFoodDiseasesNew 函数 2025-10-30 10:43:54 +08:00
Auora
22d7eba510 增加getEmrDetail 函数 2025-10-30 09:56:41 +08:00
9728c8a6dd 优化格式问题 2025-10-30 09:45:50 +08:00
c951144ac6 首页页面进行了初步优化 2025-10-30 09:15:27 +08:00
叶锦涛
0b179fffd6 诊断排序 2025-10-29 16:50:39 +08:00
Auora
75374ac5d3 更改.env.production 2025-10-29 15:15:26 +08:00
Auora
2a83719b87 更改prod配置 2025-10-29 14:54:55 +08:00
Auora
e58f2d807b 更改prod配置 2025-10-29 14:03:43 +08:00
Auora
b2884def17 Merge branch 'develop' of https://gitea.gentronhealth.com/wangjunping/his into develop
# Conflicts:
#	openhis-ui-vue3/.env.spug
2025-10-29 13:53:14 +08:00
Auora
064840dd42 删除VITE_OUT_DIR=dist-spug 2025-10-29 13:52:22 +08:00
1aa814c766 更新 openhis-ui-vue3/.env.spug
删除VITE_OUT_DIR=dist-spug
2025-10-29 05:49:44 +00:00
Auora
b9719a51d1 增加build:spug 2025-10-29 13:46:48 +08:00
Auora
03b83aaf7c 增加VITE_APP_ENV = 'spug' 2025-10-29 13:30:25 +08:00
Auora
d93976483b 增加VITE_APP_BASE_API = '/admin-api' 2025-10-29 13:28:13 +08:00
dd0a3a915c 身份证号改为不是必须项只有输入身份证号的时候才会校验格式问题 2025-10-29 09:47:32 +08:00
2f3994c575 身份证号改为不是必须项只有输入身份证号的时候才会校验格式问题 2025-10-29 09:43:54 +08:00
wzk
daa78e128f 修复医嘱请选择项目选完选项框不消失 2025-10-29 09:40:55 +08:00
wzk
2ca594cb39 Merge remote-tracking branch 'origin/develop' into develop 2025-10-29 09:36:01 +08:00
Auora
7805c26f4a Merge remote-tracking branch 'origin/develop' into develop 2025-10-29 09:33:01 +08:00
Auora
b7d34537c2 修改login 2025-10-29 09:32:29 +08:00
wzk
c1213fcf59 Revert "修复医嘱请选择项目选完选项框不消失"
This reverts commit 4afe0d107c.
2025-10-29 09:21:55 +08:00
wzk
a64edace55 Merge remote-tracking branch 'origin/develop' into develop 2025-10-29 09:04:25 +08:00
wzk
4afe0d107c 修复医嘱请选择项目选完选项框不消失 2025-10-29 09:04:01 +08:00
Auora
d8af11412f 修改格式 2025-10-29 08:55:14 +08:00
Auora
00816c9834 修改位置:applicationFormBottomBtn.vue 中的 import 语句。 2025-10-28 17:28:25 +08:00
Auora
4fb7bea80a 修改位置:prescriptionlist.vue 中的 import 语句 2025-10-28 17:21:20 +08:00
Auora
0fc72cb270 修改位置:prescriptionlist.vue 中的 import 语句 2025-10-28 17:14:23 +08:00
Auora
eadf521903 Merge branch 'develop' of https://gitea.gentronhealth.com/wangjunping/his into develop 2025-10-28 17:04:08 +08:00
f786fdbc3f 更新 openhis-ui-vue3/.env.spug
删除NODE_ENV=spug
2025-10-28 09:03:17 +00:00
92c4c938a3 更新 openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionMedicineList.vue 2025-10-28 08:57:06 +00:00
Auora
a94a1b7b69 Merge branch 'develop' of https://gitea.gentronhealth.com/wangjunping/his into develop 2025-10-28 16:34:06 +08:00
Auora
48755c2d9e 删掉多余逗号 2025-10-28 16:32:42 +08:00
叶锦涛
f99f8eb560 系统登入界面的设计 2025-10-28 16:27:42 +08:00
Auora
ddc7ce2fe7 spug测试 2025-10-28 15:56:24 +08:00
Auora
c9899c62d2 Merge branch 'develop' of https://gitea.gentronhealth.com/wangjunping/his 2025-10-28 15:55:04 +08:00
wzk
8b9837d7dc Merge remote-tracking branch 'origin/develop' into develop 2025-10-28 13:35:22 +08:00
wzk
2cba41331a 诊断类别:字典管理中找不到对应的字典数据,字典类别在显示出来的数据和医生开立诊断的数据不一致。 2025-10-28 13:34:56 +08:00
4da5ca427b 在租户管理-》所属用户界面的关闭按钮改为关闭当前的界面,并返回上一级界面, 2025-10-28 13:33:50 +08:00
wzk
f4605b1af7 下拉列表的刷选功能失效,按照下拉选中的医嘱类型能过滤出对应收费项目医生进行开单 2025-10-27 15:08:28 +08:00
叶锦涛
d2babdc9ed 修复已保存病例模板无数据的显示的问题 2025-10-27 14:02:01 +08:00
4d0599eac1 将历史病例中对病例选择的bug修复,现在是单选选中 2025-10-27 13:22:25 +08:00
Auora
35d99df274 test 2025-10-24 17:17:31 +08:00
176 changed files with 17230 additions and 2348 deletions

View File

@@ -8,7 +8,7 @@
天天开源的前⾝是新致开源最早于2022年6⽉发布开源医疗软件平台OpenHIS.org.cn于2023年6⽉发布开源企业软件平台OpenCOM.com.cn。2025年7⽉新致开源品牌更新为天天开源我们始终秉持开源、专业、协作的理念致⼒于为医疗、教育、中⼩企业等⾏业提供优质的开源解决⽅案。
了解我们https://open.tntlinking.com/about?site=gitee
了解我们ahttps://open.tntlinking.com/about?site=gitee
## 💾【部署包下载】

View File

@@ -0,0 +1,45 @@
package com.openhis.tool;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
/**
* Database field adder tool
*/
public class DatabaseFieldAdder {
public static void main(String[] args) {
String url = "jdbc:postgresql://192.168.110.252:15432/postgresql?currentSchema=public";
String username = "postgresql";
String password = "Jchl1528";
try (Connection conn = DriverManager.getConnection(url, username, password);
Statement stmt = conn.createStatement()) {
// Check if field exists
String checkSql = "SELECT column_name FROM information_schema.columns " +
"WHERE table_name = 'adm_healthcare_service' AND column_name = 'practitioner_id'";
boolean fieldExists = stmt.executeQuery(checkSql).next();
if (!fieldExists) {
// Add field
String addSql = "ALTER TABLE \"public\".\"adm_healthcare_service\" " +
"ADD COLUMN \"practitioner_id\" int8";
stmt.execute(addSql);
// Add comment
String commentSql = "COMMENT ON COLUMN \"public\".\"adm_healthcare_service\".\"practitioner_id\" IS 'practitioner_id'";
stmt.execute(commentSql);
System.out.println("Successfully added practitioner_id field to adm_healthcare_service table");
} else {
System.out.println("practitioner_id field already exists");
}
} catch (Exception e) {
System.err.println("Error executing SQL: " + e.getMessage());
e.printStackTrace();
}
}
}

View File

@@ -37,6 +37,10 @@ public final class AgeCalculatorUtil {
* 当前年龄取得(床位列表表示年龄用)
*/
public static String getAge(Date date) {
// 添加空值检查
if (date == null) {
return "";
}
// 将 Date 转换为 LocalDateTime
LocalDateTime dateTime = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
LocalDateTime now = LocalDateTime.now();

View File

@@ -22,10 +22,11 @@ import com.core.common.utils.StringUtils;
*/
@Configuration
public class FilterConfig {
@Value("${xss.excludes}")
// 添加默认值,避免配置不存在时启动失败
@Value("${xss.excludes:/system/notice}")
private String excludes;
@Value("${xss.urlPatterns}")
@Value("${xss.urlPatterns:/system/*,/monitor/*,/tool/*}")
private String urlPatterns;
@SuppressWarnings({"rawtypes", "unchecked"})

View File

@@ -58,6 +58,7 @@ public class GenController extends BaseController {
@GetMapping("/list")
public TableDataInfo genList(GenTable genTable) {
startPage();
List<GenTable> list = genTableService.selectGenTableList(genTable);
return getDataTable(list);
}
@@ -251,12 +252,10 @@ public class GenController extends BaseController {
InputStream is = file.getInputStream();
Workbook wb = WorkbookFactory.create(is);
StringBuilder sb = new StringBuilder();
// 遍历每个sheet页每个表
for (int i = 0; i < wb.getNumberOfSheets(); i++) {
sb.append("-- ----------------------------------------------------------------------------------\n");
Sheet st = wb.getSheetAt(i);
// 从第一行读取表名表注释
Row row0 = st.getRow(0);// 表名
String tableName = row0.getCell(4).toString();// 表名

View File

@@ -16,7 +16,7 @@ import org.springframework.stereotype.Component;
@Component
@ConfigurationProperties(prefix = "http")
@PropertySource(value = {"classpath:http.yml"})
public class HttpConfig {
public class HttpConfig {
private String appId;
private String key;
private String url;

View File

@@ -0,0 +1,53 @@
package com.openhis.web.basicmanage.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.common.core.domain.R;
import com.core.common.utils.SecurityUtils;
import com.openhis.administration.domain.Invoice;
import com.openhis.administration.service.IInvoiceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
/**
* 发票管理控制器
*
* @author system
* @date 2025-02-20
*/
@RestController
@RequestMapping("/basicmanage/invoice")
public class InvoiceController {
@Autowired
private IInvoiceService invoiceService;
/**
* 分页查询发票列表(带用户角色权限过滤)
*
* @param pageNo 页码
* @param pageSize 每页条数
* @param request 请求对象
* @return 发票列表
*/
@GetMapping("/page")
public R<?> selectInvoicePage(
@RequestParam(defaultValue = "1") Integer pageNo,
@RequestParam(defaultValue = "10") Integer pageSize,
HttpServletRequest request) {
// 获取当前用户ID
Long userId = SecurityUtils.getUserId();
// 判断当前用户是否为管理员
boolean isAdmin = SecurityUtils.isAdmin(userId);
// 分页查询发票列表
Page<Invoice> page = new Page<>(pageNo, pageSize);
return R.ok(invoiceService.selectInvoicePage(page, isAdmin, userId));
}
}

View File

@@ -0,0 +1,88 @@
package com.openhis.web.basicmanage.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.common.core.domain.R;
import com.core.common.utils.SecurityUtils;
import com.openhis.administration.domain.InvoiceSegment;
import com.openhis.administration.service.IInvoiceSegmentService;
import com.openhis.web.basicmanage.domain.InvoiceSegmentDeleteRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
/**
* 发票段管理控制器
*
* @author system
* @date 2025-11-18
*/
@RestController
@RequestMapping("/basicmanage/invoice-segment")
public class InvoiceSegmentController {
@Autowired
private IInvoiceSegmentService invoiceSegmentService;
/**
* 分页查询发票段列表(带用户角色权限过滤)
*
* @param pageNo 页码
* @param pageSize 每页条数
* @param request 请求对象
* @return 发票段列表
*/
@GetMapping("/page")
public R<?> selectInvoiceSegmentPage(
@RequestParam(defaultValue = "1") Integer pageNo,
@RequestParam(defaultValue = "100") Integer pageSize,
HttpServletRequest request) {
// 获取当前用户ID
Long userId = SecurityUtils.getUserId();
// 判断当前用户是否为管理员
boolean isAdmin = SecurityUtils.isAdmin(userId);
// 分页查询发票段列表
Page<InvoiceSegment> page = new Page<>(pageNo, pageSize);
return R.ok(invoiceSegmentService.selectInvoiceSegmentPage(page, isAdmin, userId));
}
/**
* 新增发票段
*
* @param invoiceSegment 发票段信息
* @return 操作结果
*/
@PostMapping("/add")
public R<?> addInvoiceSegment(@RequestBody InvoiceSegment invoiceSegment) {
// 设置创建人信息
invoiceSegment.setCreateBy(SecurityUtils.getUsername());
int result = invoiceSegmentService.insertInvoiceSegment(invoiceSegment);
return result > 0 ? R.ok() : R.fail();
}
/**
* 修改发票段
*
* @param invoiceSegment 发票段信息
* @return 操作结果
*/
@PostMapping("/update")
public R<?> updateInvoiceSegment(@RequestBody InvoiceSegment invoiceSegment) {
// 设置更新人信息
invoiceSegment.setUpdateBy(SecurityUtils.getUsername());
int result = invoiceSegmentService.updateInvoiceSegment(invoiceSegment);
return result > 0 ? R.ok() : R.fail();
}
/**
* 删除发票段
*/
@PostMapping("/delete")
public R<?> delete(@RequestBody InvoiceSegmentDeleteRequest request) {
int rows = invoiceSegmentService.deleteInvoiceSegmentByIds(request.getIds());
return rows > 0 ? R.ok("删除成功") : R.fail("删除失败");
}
}

View File

@@ -0,0 +1,23 @@
package com.openhis.web.basicmanage.domain;
import java.io.Serializable;
/**
* 发票段删除请求类
*
* @author system
* @date 2024-06-19
*/
public class InvoiceSegmentDeleteRequest implements Serializable {
private static final long serialVersionUID = 1L;
private Long[] ids;
public Long[] getIds() {
return ids;
}
public void setIds(Long[] ids) {
this.ids = ids;
}
}

View File

@@ -90,6 +90,14 @@ public class HealthcareServiceDto {
private Integer appointmentRequiredFlag;
private String appointmentRequiredFlag_enumText;
/**
* 出诊医生ID
*/
@Dict(dictTable = "adm_practitioner", dictCode = "id", dictText = "name")
@JsonSerialize(using = ToStringSerializer.class)
private Long practitionerId;
private String practitionerId_dictText;
/**
* 费用定价ID
*/

View File

@@ -82,6 +82,11 @@ public class HealthcareServiceFormData {
@NotBlank(message = "预约要求不能为空")
private Integer appointmentRequiredFlag;
/**
* 出诊医生ID
*/
private Long practitionerId;
/** 医保编码 */
private String ybNo;

View File

@@ -0,0 +1,53 @@
package com.openhis.web.charge.patientcardrenewal;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.core.common.core.domain.R;
import lombok.extern.slf4j.Slf4j;
/**
* 患者换卡控制器
*
* @author system
* @date 2024-01-01
*/
@RestController
@RequestMapping("/charge/patientCardRenewal")
@Slf4j
public class PatientCardRenewalController {
@Autowired
private PatientCardRenewalService patientCardRenewalService;
/**
* 执行患者换卡操作
*
* @param request 换卡请求参数
* @return 换卡结果
*/
@PostMapping("/renewCard")
public R<?> renewCard(@RequestBody RenewalRequest request) {
try {
log.info("患者换卡请求: 旧卡号={}, 新卡号={}, 患者ID={}",
request.getOldCardNo(), request.getNewCardNo(), request.getPatientId());
// 执行换卡操作
boolean success = patientCardRenewalService.renewCard(request);
if (success) {
log.info("患者换卡成功: 旧卡号={} -> 新卡号={}",
request.getOldCardNo(), request.getNewCardNo());
return R.ok("换卡成功");
} else {
return R.fail("换卡失败");
}
} catch (Exception e) {
log.error("患者换卡异常: ", e);
return R.fail("换卡操作异常: " + e.getMessage());
}
}
}

View File

@@ -0,0 +1,18 @@
package com.openhis.web.charge.patientcardrenewal;
/**
* 患者换卡服务接口
*
* @author system
* @date 2024-01-01
*/
public interface PatientCardRenewalService {
/**
* 执行患者换卡操作
*
* @param request 换卡请求参数
* @return 是否换卡成功
*/
boolean renewCard(RenewalRequest request);
}

View File

@@ -0,0 +1,73 @@
package com.openhis.web.charge.patientcardrenewal;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import com.openhis.administration.domain.PatientIdentifier;
import com.openhis.administration.service.IPatientIdentifierService;
import com.openhis.common.enums.IdentifierStatusEnum;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.extern.slf4j.Slf4j;
import java.util.List;
/**
* 患者换卡服务实现类
*
* @author system
* @date 2024-01-01
*/
@Service
@Slf4j
public class PatientCardRenewalServiceImpl implements PatientCardRenewalService {
@Autowired
private IPatientIdentifierService patientIdentifierService;
@Override
@Transactional(rollbackFor = Exception.class)
public boolean renewCard(RenewalRequest request) {
log.info("执行患者换卡操作: 患者ID={}, 旧卡号={}, 新卡号={}, 原因={}",
request.getPatientId(), request.getOldCardNo(), request.getNewCardNo(), request.getReason());
// 1. 验证参数合法性
if (StringUtils.isEmpty(request.getPatientId())) {
throw new IllegalArgumentException("患者ID不能为空");
}
if (StringUtils.isEmpty(request.getNewCardNo())) {
throw new IllegalArgumentException("新卡号不能为空");
}
// 2. 检查新卡号是否已被使用
LambdaQueryWrapper<PatientIdentifier> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(PatientIdentifier::getIdentifierNo, request.getNewCardNo());
List<PatientIdentifier> existingIdentifiers = patientIdentifierService.list(queryWrapper);
if (existingIdentifiers != null && !existingIdentifiers.isEmpty()) {
throw new IllegalArgumentException("新卡号已被其他患者使用,请更换新卡号");
}
// 3. 直接使用患者ID作为查询条件
Long patientId = Long.parseLong(request.getPatientId());
// 4. 通过患者ID查询现有标识信息
PatientIdentifier patientIdentifier = patientIdentifierService.selectByPatientId(patientId);
if (patientIdentifier != null) {
// 5. 只更新就诊卡号这一个参数
patientIdentifier.setIdentifierNo(request.getNewCardNo());
patientIdentifierService.updateById(patientIdentifier);
log.info("患者ID={} 换卡成功,已更新就诊卡号", patientId);
} else {
throw new IllegalArgumentException("未找到患者标识信息,无法进行换卡操作");
}
// 4. 记录换卡日志 - 可以根据需要扩展日志记录功能
// 5. 处理相关业务系统的卡号更新 - 可以根据需要扩展
return true;
}
}

View File

@@ -0,0 +1,38 @@
package com.openhis.web.charge.patientcardrenewal;
import lombok.Data;
/**
* 换卡请求参数类
*
* @author system
* @date 2024-01-01
*/
@Data
public class RenewalRequest {
/**
* 旧门诊号码
*/
private String oldCardNo;
/**
* 新门诊号码
*/
private String newCardNo;
/**
* 患者ID
*/
private String patientId;
/**
* 换卡原因
*/
private String reason;
/**
* 备注信息
*/
private String remark;
}

View File

@@ -91,17 +91,27 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
*/
@Override
public Page<PatientMetadata> getPatientMetadataBySearchKey(String searchKey, Integer pageNo, Integer pageSize) {
// 构建查询条件
// 构建查询条件添加phone字段支持手机号搜索
QueryWrapper<Patient> queryWrapper = HisQueryUtils.buildQueryWrapper(null, searchKey,
new HashSet<>(Arrays.asList("id_card", "name", "py_str", "wb_str")), null);
new HashSet<>(Arrays.asList("id_card", "name", "py_str", "wb_str", "phone")), null);
// 设置排序
queryWrapper.orderByDesc("update_time");
// 通过证件号匹配 patient
if (StringUtils.isNotEmpty(searchKey)) {
PatientIdentifier patientIdentifier = patientIdentifierService
.getOne(new LambdaQueryWrapper<PatientIdentifier>().eq(PatientIdentifier::getIdentifierNo, searchKey));
if (patientIdentifier != null) {
queryWrapper.or(q -> q.eq("id", patientIdentifier.getPatientId()));
List<PatientIdentifier> patientIdentifiers = patientIdentifierService
.list(new LambdaQueryWrapper<PatientIdentifier>().eq(PatientIdentifier::getIdentifierNo, searchKey));
if (patientIdentifiers != null && !patientIdentifiers.isEmpty()) {
// 如果有多个匹配结果,将它们全部添加到查询条件中
if (patientIdentifiers.size() == 1) {
// 单个结果时直接添加条件
queryWrapper.or(q -> q.eq("id", patientIdentifiers.get(0).getPatientId()));
} else {
// 多个结果时使用in条件
List<Long> patientIds = patientIdentifiers.stream()
.map(PatientIdentifier::getPatientId)
.collect(Collectors.toList());
queryWrapper.or(q -> q.in("id", patientIds));
}
}
}
// 患者信息
@@ -120,10 +130,11 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
e.setFirstEnum_enumText(patientIdList.contains(e.getId()) ? EncounterType.FOLLOW_UP.getInfo()
: EncounterType.INITIAL.getInfo());
// 患者标识
PatientIdentifier patientIdentifier = patientIdentifierService
.getOne(new LambdaQueryWrapper<PatientIdentifier>().eq(PatientIdentifier::getPatientId, e.getId()));
if (patientIdentifier != null) {
e.setIdentifierNo(patientIdentifier.getIdentifierNo());
List<PatientIdentifier> patientIdentifiers = patientIdentifierService
.list(new LambdaQueryWrapper<PatientIdentifier>().eq(PatientIdentifier::getPatientId, e.getId()));
if (patientIdentifiers != null && !patientIdentifiers.isEmpty()) {
// 取第一个标识号,如果需要可以根据业务需求选择其他逻辑
e.setIdentifierNo(patientIdentifiers.get(0).getIdentifierNo());
}
});
@@ -267,6 +278,23 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
new HashSet<>(Arrays.asList("patient_name", "organization_name", "practitioner_name", "healthcare_name")),
request);
// 手动处理 statusEnum 参数(用于过滤退号记录)
String statusEnumParam = request.getParameter("statusEnum");
if (statusEnumParam != null && !statusEnumParam.isEmpty()) {
try {
Integer statusEnum = Integer.parseInt(statusEnumParam);
if (statusEnum == -1) {
// -1 表示排除退号记录(正常挂号)
queryWrapper.ne("status_enum", 6);
} else {
// 其他值表示精确匹配
queryWrapper.eq("status_enum", statusEnum);
}
} catch (NumberFormatException e) {
// 忽略无效的参数值
}
}
IPage<CurrentDayEncounterDto> currentDayEncounter = outpatientRegistrationAppMapper.getCurrentDayEncounter(
new Page<>(pageNo, pageSize), EncounterClass.AMB.getValue(), ParticipantType.ADMITTER.getCode(),
queryWrapper, ChargeItemContext.REGISTER.getValue(), PaymentStatus.SUCCESS.getValue());

View File

@@ -131,4 +131,39 @@ public class CurrentDayEncounterDto {
*/
private Date birthDate;
/**
* 退号日期/时间
*/
private Date returnDate;
/**
* 退号原因
*/
private String returnReason;
/**
* 退号操作人
*/
private String operatorName;
/**
* 退号操作工号(用户账号)
*/
private String operatorId;
/**
* 退款金额
*/
private BigDecimal refundAmount;
/**
* 合同编码(费用性质代码)
*/
private String contractNo;
/**
* 退款方式(多个支付方式用逗号分隔)
*/
private String refundMethod;
}

View File

@@ -81,5 +81,11 @@ public class RefundItemDto {
/** 项目名 */
private String itemName;
/** 费用支付方式编码 */
private String medfeePaymtdCode;
/** 费用类型 */
private String feeType;
}

View File

@@ -0,0 +1,24 @@
package com.openhis.web.check.appservice;
import com.core.common.core.domain.R;
import com.openhis.web.check.dto.CheckMethodDto;
/**
* 检查方法Service接口
*
* @author system
* @date 2025-07-22
*/
public interface ICheckMethodAppService{
R<?> getCheckMethodList();
R<?> addCheckMethod(CheckMethodDto checkMethodDto);
R<?> updateCheckMethod(CheckMethodDto checkPartDto);
R<?> removeCheckMethod(Long code);
}

View File

@@ -0,0 +1,48 @@
package com.openhis.web.check.appservice;
import com.core.common.core.domain.R;
import com.openhis.web.check.dto.CheckPackageDto;
/**
* 检查套餐AppService接口
*
* @author system
* @date 2025-11-26
*/
public interface ICheckPackageAppService {
/**
* 获取检查套餐列表
* @return 检查套餐列表
*/
R<?> getCheckPackageList();
/**
* 根据ID获取检查套餐详情
* @param id 套餐ID
* @return 套餐详情
*/
R<?> getCheckPackageById(Long id);
/**
* 新增检查套餐
* @param checkPackageDto 套餐信息
* @return 新增结果
*/
R<?> addCheckPackage(CheckPackageDto checkPackageDto);
/**
* 更新检查套餐
* @param checkPackageDto 套餐信息
* @return 更新结果
*/
R<?> updateCheckPackage(CheckPackageDto checkPackageDto);
/**
* 删除检查套餐
* @param id 套餐ID
* @return 删除结果
*/
R<?> deleteCheckPackage(Long id);
}

View File

@@ -0,0 +1,14 @@
package com.openhis.web.check.appservice;
import com.core.common.core.domain.R;
import com.openhis.web.check.dto.CheckPartDto;
public interface ICheckPartAppService {
R<?> getCheckPartList();
R<?> addCheckPart(CheckPartDto checkPartDto);
R<?> removeCheckPart(Long code);
R<?> updateCheckPart(CheckPartDto checkMethodDto);
}

View File

@@ -0,0 +1,84 @@
package com.openhis.web.check.appservice.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.core.common.core.domain.R;
import com.openhis.check.domain.CheckMethod;
import com.openhis.check.service.ICheckMethodService;
import com.openhis.web.check.appservice.ICheckMethodAppService;
import com.openhis.web.check.dto.CheckMethodDto;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service
@Slf4j
public class CheckMethodAppServiceImpl implements ICheckMethodAppService {
@Resource
private ICheckMethodService checkMethodService;
@Override
public R<?> getCheckMethodList() {
List<CheckMethod> list = checkMethodService.list();
return R.ok(list);
}
@Override
public R<?> addCheckMethod(CheckMethodDto checkMethodDto) {
//1.参数校验
if(ObjectUtil.isEmpty(checkMethodDto.getName())){
return R.fail("检查方法名称不能为空");
}
if(ObjectUtil.isEmpty(checkMethodDto.getCheckType())){
return R.fail("检查类型不能为空");
}
if(ObjectUtil.isEmpty(checkMethodDto.getCode())){
return R.fail("代码不能为空");
}
//2.判断是否有重复
LambdaQueryWrapper<CheckMethod> wrapper = new LambdaQueryWrapper<CheckMethod>()
.eq(CheckMethod::getName, checkMethodDto.getName())
.eq(CheckMethod::getCheckType, checkMethodDto.getCheckType())
.eq(CheckMethod::getCode, checkMethodDto.getCode());
if (checkMethodService.getOne(wrapper) != null){
return R.fail("检查方法已存在");
}
//3.封装实体检查方法
CheckMethod checkMethod = new CheckMethod();
checkMethod.setName(checkMethodDto.getName());
//4.保存添加
boolean save = checkMethodService.save(checkMethod);
return R.ok();
}
@Override
public R<?> updateCheckMethod(CheckMethodDto checkMethodDto) {
//1.参数校验
if(ObjectUtil.isEmpty(checkMethodDto.getName())){
return R.fail("检查方法名称不能为空");
}
if(ObjectUtil.isEmpty(checkMethodDto.getCheckType())){
return R.fail("检查类型不能为空");
}
if(ObjectUtil.isEmpty(checkMethodDto.getCode())){
return R.fail("代码不能为空");
}
//2.
return R.ok();
}
@Override
public R<?> removeCheckMethod(Long code) {
if (ObjectUtil.isEmpty(code)){
return R.fail("检查方法代码不能为空");
}
LambdaQueryWrapper<CheckMethod> wrapper = new LambdaQueryWrapper<CheckMethod>().eq(CheckMethod::getCode, code);
boolean remove = checkMethodService.remove(wrapper);
return R.ok(remove);
}
}

View File

@@ -0,0 +1,206 @@
package com.openhis.web.check.appservice.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.core.common.core.domain.R;
import com.openhis.check.domain.CheckPackage;
import com.openhis.check.domain.CheckPackageDetail;
import com.openhis.check.service.ICheckPackageDetailService;
import com.openhis.check.service.ICheckPackageService;
import com.openhis.web.check.appservice.ICheckPackageAppService;
import com.openhis.web.check.dto.CheckPackageDetailDto;
import com.openhis.web.check.dto.CheckPackageDto;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* 检查套餐AppService实现
*
* @author system
* @date 2025-11-26
*/
@Slf4j
@Service
@AllArgsConstructor
public class CheckPackageAppServiceImpl implements ICheckPackageAppService {
private final ICheckPackageService checkPackageService;
private final ICheckPackageDetailService checkPackageDetailService;
@Override
public R<?> getCheckPackageList() {
try {
List<CheckPackage> list = checkPackageService.list();
return R.ok(list);
} catch (Exception e) {
log.error("获取检查套餐列表失败", e);
return R.fail("获取检查套餐列表失败");
}
}
@Override
public R<?> getCheckPackageById(Long id) {
try {
CheckPackage checkPackage = checkPackageService.getById(id);
if (checkPackage == null) {
return R.fail("套餐不存在");
}
// 获取套餐明细
List<CheckPackageDetail> details = checkPackageDetailService.list(
new LambdaQueryWrapper<CheckPackageDetail>()
.eq(CheckPackageDetail::getPackageId, id)
.orderByAsc(CheckPackageDetail::getOrderNum)
);
// 转换为DTO
CheckPackageDto dto = new CheckPackageDto();
BeanUtils.copyProperties(checkPackage, dto);
List<CheckPackageDetailDto> detailDtos = details.stream().map(detail -> {
CheckPackageDetailDto detailDto = new CheckPackageDetailDto();
BeanUtils.copyProperties(detail, detailDto);
return detailDto;
}).collect(Collectors.toList());
dto.setItems(detailDtos);
return R.ok(dto);
} catch (Exception e) {
log.error("获取检查套餐详情失败", e);
return R.fail("获取检查套餐详情失败");
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public R<?> addCheckPackage(CheckPackageDto checkPackageDto) {
try {
// 创建套餐主表数据
CheckPackage checkPackage = new CheckPackage();
BeanUtils.copyProperties(checkPackageDto, checkPackage);
// 设置套餐维护日期为当前系统日期
checkPackage.setMaintainDate(LocalDate.now());
checkPackage.setCreateTime(LocalDateTime.now());
checkPackage.setUpdateTime(LocalDateTime.now());
// 保存套餐主表
boolean saveResult = checkPackageService.save(checkPackage);
if (!saveResult) {
return R.fail("保存套餐失败");
}
// 保存套餐明细
if (checkPackageDto.getItems() != null && !checkPackageDto.getItems().isEmpty()) {
List<CheckPackageDetail> details = new ArrayList<>();
int orderNum = 1;
for (CheckPackageDetailDto detailDto : checkPackageDto.getItems()) {
CheckPackageDetail detail = new CheckPackageDetail();
BeanUtils.copyProperties(detailDto, detail);
detail.setPackageId(checkPackage.getId());
detail.setOrderNum(orderNum++);
detail.setCreateTime(LocalDateTime.now());
detail.setUpdateTime(LocalDateTime.now());
details.add(detail);
}
checkPackageDetailService.saveBatch(details);
}
return R.ok(checkPackage.getId(), "保存成功");
} catch (Exception e) {
log.error("新增检查套餐失败", e);
return R.fail("新增检查套餐失败: " + e.getMessage());
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public R<?> updateCheckPackage(CheckPackageDto checkPackageDto) {
try {
// 检查套餐是否存在
CheckPackage existPackage = checkPackageService.getById(checkPackageDto.getId());
if (existPackage == null) {
return R.fail("套餐不存在");
}
// 更新套餐主表数据
CheckPackage checkPackage = new CheckPackage();
BeanUtils.copyProperties(checkPackageDto, checkPackage);
// 更新套餐维护日期为当前系统日期
checkPackage.setMaintainDate(LocalDate.now());
checkPackage.setUpdateTime(LocalDateTime.now());
boolean updateResult = checkPackageService.updateById(checkPackage);
if (!updateResult) {
return R.fail("更新套餐失败");
}
// 删除原有明细
checkPackageDetailService.remove(
new LambdaQueryWrapper<CheckPackageDetail>()
.eq(CheckPackageDetail::getPackageId, checkPackage.getId())
);
// 保存新的套餐明细
if (checkPackageDto.getItems() != null && !checkPackageDto.getItems().isEmpty()) {
List<CheckPackageDetail> details = new ArrayList<>();
int orderNum = 1;
for (CheckPackageDetailDto detailDto : checkPackageDto.getItems()) {
CheckPackageDetail detail = new CheckPackageDetail();
BeanUtils.copyProperties(detailDto, detail);
detail.setPackageId(checkPackage.getId());
detail.setOrderNum(orderNum++);
detail.setCreateTime(LocalDateTime.now());
detail.setUpdateTime(LocalDateTime.now());
details.add(detail);
}
checkPackageDetailService.saveBatch(details);
}
return R.ok("更新成功");
} catch (Exception e) {
log.error("更新检查套餐失败", e);
return R.fail("更新检查套餐失败: " + e.getMessage());
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public R<?> deleteCheckPackage(Long id) {
try {
// 检查套餐是否存在
CheckPackage existPackage = checkPackageService.getById(id);
if (existPackage == null) {
return R.fail("套餐不存在");
}
// 删除套餐明细
checkPackageDetailService.remove(
new LambdaQueryWrapper<CheckPackageDetail>()
.eq(CheckPackageDetail::getPackageId, id)
);
// 删除套餐主表
boolean deleteResult = checkPackageService.removeById(id);
if (!deleteResult) {
return R.fail("删除套餐失败");
}
return R.ok("删除成功");
} catch (Exception e) {
log.error("删除检查套餐失败", e);
return R.fail("删除检查套餐失败: " + e.getMessage());
}
}
}

View File

@@ -0,0 +1,38 @@
package com.openhis.web.check.appservice.impl;
import com.core.common.core.domain.R;
import com.openhis.check.domain.CheckPart;
import com.openhis.check.service.ICheckPartService;
import com.openhis.web.check.appservice.ICheckPartAppService;
import com.openhis.web.check.dto.CheckPartDto;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service
@Slf4j
public class CheckPartAppServiceImpl implements ICheckPartAppService {
@Resource
private ICheckPartService checkPartService;
@Override
public R<?> getCheckPartList() {
List<CheckPart> list = checkPartService.list();
return R.ok(list);
}
@Override
public R<?> addCheckPart(CheckPartDto checkPartDto) {
return R.ok();
}
@Override
public R<?> removeCheckPart(Long code) {
return R.ok();
}
@Override
public R<?> updateCheckPart(CheckPartDto checkPartDto) {
return R.ok();
}
}

View File

@@ -0,0 +1,54 @@
package com.openhis.web.check.controller;
import com.core.common.core.domain.R;
import com.openhis.web.check.appservice.ICheckMethodAppService;
import com.openhis.web.check.dto.CheckMethodDto;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@RestController
@Slf4j
@RequestMapping("/check/method")
public class CheckMethodController {
@Resource
private ICheckMethodAppService checkMethodAppService;
/*
* 获取检查方法
* @Param检查方法 此处参数注释有问题,完全是按照需求给的图来注释的
*/
@GetMapping("/list")
public R<?> getCheckMethodList(){
return R.ok(checkMethodAppService.getCheckMethodList());
}
/*
* 新增检查方法
* @Param
*/
@PostMapping("/add")
public R<?> addCheckMethod(@RequestBody CheckMethodDto checkMethodDto){
return R.ok(checkMethodAppService.addCheckMethod(checkMethodDto));
}
/*
* 删除检查方法
* @Param code代码
*/
@DeleteMapping("/delete/{code}")
public R<?> deleteCheckMethod(@PathVariable Long code){
return R.ok(checkMethodAppService.removeCheckMethod(code));
}
/*
* 更新检查方法
* @Param
*/
@PutMapping("/update")
public R<?> updateCheckMethod(@RequestBody CheckMethodDto checkMethodDto){
return R.ok(checkMethodAppService.updateCheckMethod(checkMethodDto));
}
}

View File

@@ -0,0 +1,53 @@
package com.openhis.web.check.controller;
import com.core.common.core.domain.R;
import com.openhis.web.check.appservice.ICheckPartAppService;
import com.openhis.web.check.dto.CheckPartDto;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@RestController
@Slf4j
@RequestMapping("/check/part")
public class CheckPartController {
@Resource
private ICheckPartAppService checkPartAppService;
/*
* 获取检查部位
* @Param检查方法 此处参数注释有问题,完全是按照需求给的图来注释的
*/
@GetMapping("/list")
public R<?> getCheckPartList(){
return R.ok(checkPartAppService.getCheckPartList());
}
/*
* 新增检查部位
* @Param
*/
@PostMapping("/add")
public R<?> addCheckPart(@RequestBody CheckPartDto checkPartDto){
return R.ok(checkPartAppService.addCheckPart(checkPartDto));
}
/*
* 删除检查部位
* @Param code代码
*/
@DeleteMapping("/delete/{code}")
public R<?> deleteCheckPart(@PathVariable Long code){
return R.ok(checkPartAppService.removeCheckPart(code));
}
/*
* 更新检查部位
* @Param
*/
@PutMapping("/update")
public R<?> updateCheckPart(@RequestBody CheckPartDto checkPartDto){
return R.ok(checkPartAppService.updateCheckPart(checkPartDto));
}
}

View File

@@ -0,0 +1,186 @@
package com.openhis.web.check.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.core.common.core.controller.BaseController;
import com.core.common.core.domain.AjaxResult;
import com.core.common.core.domain.R;
import com.openhis.check.domain.CheckMethod;
import com.openhis.check.domain.CheckPackage;
import com.openhis.check.domain.CheckPart;
import com.openhis.check.domain.CheckType;
import com.openhis.check.service.ICheckMethodService;
import com.openhis.check.service.ICheckPackageService;
import com.openhis.check.service.ICheckPartService;
import com.openhis.check.service.ICheckTypeService;
import com.openhis.web.check.appservice.ICheckPackageAppService;
import com.openhis.web.check.dto.CheckPackageDto;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.time.LocalDate;
import java.util.List;
/**
* 检查类型管理Controller
*
* @author system
* @date 2025-07-22
* @updated 2025-11-26 - 增加套餐设置相关接口
*/
@RestController
@RequestMapping({"/system/check-type", "/system"})
@Slf4j
@AllArgsConstructor
public class CheckTypeController extends BaseController {
private final ICheckTypeService checkTypeService;
private final ICheckMethodService checkMethodService;
private final ICheckPartService checkPartService;
private final ICheckPackageService checkPackageService;
private final ICheckPackageAppService checkPackageAppService;
/**
* 获取检查类型列表
*/
@GetMapping("/list")
public AjaxResult list() {
List<CheckType> list = checkTypeService.list();
return AjaxResult.success(list);
}
/**
* 获取检查方法列表
*/
@GetMapping({"/method/list", "/check-method/list"})
public AjaxResult methodList() {
List<CheckMethod> list = checkMethodService.list();
return AjaxResult.success(list);
}
/**
* 获取检查部位列表
*/
@GetMapping({"/part/list", "/check-part/list"})
public AjaxResult partList() {
List<CheckPart> list = checkPartService.list();
return AjaxResult.success(list);
}
/**
* 获取检查套餐列表(支持分页和筛选)
*/
@GetMapping({"/package/list", "/check-package/list"})
public AjaxResult packageList(
@RequestParam(required = false) Integer pageNo,
@RequestParam(required = false) Integer pageSize,
@RequestParam(required = false) String organization,
@RequestParam(required = false) String packageName,
@RequestParam(required = false) String packageLevel,
@RequestParam(required = false) String packageType,
@RequestParam(required = false) String department,
@RequestParam(required = false) String user,
@RequestParam(required = false) String startDate,
@RequestParam(required = false) String endDate) {
LambdaQueryWrapper<CheckPackage> wrapper = new LambdaQueryWrapper<>();
// 添加筛选条件
if (organization != null && !organization.isEmpty()) {
wrapper.eq(CheckPackage::getOrganization, organization);
}
if (packageName != null && !packageName.isEmpty()) {
wrapper.like(CheckPackage::getPackageName, packageName);
}
if (packageLevel != null && !packageLevel.isEmpty()) {
wrapper.eq(CheckPackage::getPackageLevel, packageLevel);
}
if (packageType != null && !packageType.isEmpty()) {
wrapper.eq(CheckPackage::getPackageType, packageType);
}
if (department != null && !department.isEmpty()) {
wrapper.like(CheckPackage::getDepartment, department);
}
if (user != null && !user.isEmpty()) {
wrapper.like(CheckPackage::getUser, user);
}
if (startDate != null && !startDate.isEmpty()) {
wrapper.ge(CheckPackage::getMaintainDate, LocalDate.parse(startDate));
}
if (endDate != null && !endDate.isEmpty()) {
wrapper.le(CheckPackage::getMaintainDate, LocalDate.parse(endDate));
}
// 按更新时间倒序排列
wrapper.orderByDesc(CheckPackage::getUpdateTime);
// 如果需要分页
if (pageNo != null && pageSize != null) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<CheckPackage> page =
new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(pageNo, pageSize);
com.baomidou.mybatisplus.extension.plugins.pagination.Page<CheckPackage> result =
checkPackageService.page(page, wrapper);
return AjaxResult.success(result);
} else {
List<CheckPackage> list = checkPackageService.list(wrapper);
return AjaxResult.success(list);
}
}
/**
* 新增检查类型
*/
@PostMapping
public AjaxResult add(@RequestBody CheckType checkType) {
return toAjax(checkTypeService.save(checkType));
}
/**
* 修改检查类型
*/
@PutMapping
public AjaxResult edit(@RequestBody CheckType checkType) {
return toAjax(checkTypeService.updateById(checkType));
}
/**
* 删除检查类型
*/
@DeleteMapping("/{checkTypeId}")
public AjaxResult remove(@PathVariable Long checkTypeId) {
return toAjax(checkTypeService.removeById(checkTypeId));
}
/**
* 根据ID获取检查套餐详情
*/
@GetMapping({"/package/{id}", "/check-package/{id}"})
public R<?> getCheckPackageById(@PathVariable Long id) {
return checkPackageAppService.getCheckPackageById(id);
}
/**
* 新增检查套餐
*/
@PostMapping({"/package", "/check-package"})
public R<?> addCheckPackage(@Valid @RequestBody CheckPackageDto checkPackageDto) {
return checkPackageAppService.addCheckPackage(checkPackageDto);
}
/**
* 更新检查套餐
*/
@PutMapping({"/package", "/check-package"})
public R<?> updateCheckPackage(@Valid @RequestBody CheckPackageDto checkPackageDto) {
return checkPackageAppService.updateCheckPackage(checkPackageDto);
}
/**
* 删除检查套餐
*/
@DeleteMapping({"/package/{id}", "/check-package/{id}"})
public R<?> deleteCheckPackage(@PathVariable Long id) {
return checkPackageAppService.deleteCheckPackage(id);
}
}

View File

@@ -0,0 +1,49 @@
package com.openhis.web.check.dto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
@Data
@Accessors(chain = true)
public class CheckMethodDto {
/**
* 检查方法ID
*/
@TableId(type = IdType.AUTO)
private Long id;
/* 检查类型 */
private String checkType;
/* 方法代码 */
private String code;
/* 方法名称 */
private String name;
/* 套餐名称 */
private String packageName;
/* 曝光次数 */
private Integer exposureNum;
/* 序号 */
private Integer orderNum;
/* 备注 */
private String remark;
/** 创建时间 */
private LocalDateTime createTime;
/** 更新时间 */
private LocalDateTime updateTime;
}

View File

@@ -0,0 +1,71 @@
package com.openhis.web.check.dto;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
/**
* 检查套餐明细DTO
*
* @author system
* @date 2025-11-26
*/
@Data
@Accessors(chain = true)
public class CheckPackageDetailDto {
/** 套餐明细ID */
private Long id;
/** 套餐ID */
private Long packageId;
/** 项目编号 */
private String itemCode;
/** 项目名称/规格 */
@NotBlank(message = "项目名称不能为空")
private String itemName;
/** 检查项目ID(诊疗项目ID) */
private Long checkItemId;
/** 剂量 */
private String dose;
/** 途径 */
private String method;
/** 频次 */
private String frequency;
/** 天数 */
private String days;
/** 数量 */
@NotNull(message = "数量不能为空")
private Integer quantity;
/** 单价 */
@NotNull(message = "单价不能为空")
private BigDecimal unitPrice;
/** 金额 */
private BigDecimal amount;
/** 服务费 */
private BigDecimal serviceCharge;
/** 总金额 */
private BigDecimal total;
/** 产地 */
private String origin;
/** 序号 */
private Integer orderNum;
}

View File

@@ -0,0 +1,86 @@
package com.openhis.web.check.dto;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;
/**
* 检查套餐DTO
*
* @author system
* @date 2025-11-26
*/
@Data
@Accessors(chain = true)
public class CheckPackageDto {
/** 检查套餐ID */
private Long id;
/** 套餐名称 */
@NotBlank(message = "套餐名称不能为空")
private String packageName;
/** 套餐编码 */
private String code;
/** 套餐类别 */
@NotBlank(message = "套餐类别不能为空")
private String packageType;
/** 套餐级别 */
@NotBlank(message = "套餐级别不能为空")
private String packageLevel;
/** 适用科室 */
private String department;
/** 适用用户 */
private String user;
/** 卫生机构 */
private String organization;
/** 套餐金额 */
private BigDecimal packagePrice;
/** 折扣 */
private BigDecimal discount;
/** 制单人 */
private String creator;
/** 是否停用 */
private Integer isDisabled;
/** 显示套餐名 */
private Integer showPackageName;
/** 生成服务费 */
private Integer generateServiceFee;
/** 套餐价格启用状态 */
private Integer packagePriceEnabled;
/** 服务费 */
private BigDecimal serviceFee;
/** 备注 */
private String remark;
/** 描述 */
private String description;
/** 套餐维护日期 */
private LocalDate createDate;
/** 套餐明细列表 */
@NotNull(message = "套餐明细不能为空")
private List<CheckPackageDetailDto> items;
}

View File

@@ -0,0 +1,10 @@
package com.openhis.web.check.dto;
import lombok.Data;
import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
public class CheckPartDto {
}

View File

@@ -0,0 +1,10 @@
package com.openhis.web.check.mapper;
import org.springframework.stereotype.Repository;
@Repository
public interface CheckMethodAppMapper{
}

View File

@@ -0,0 +1,7 @@
package com.openhis.web.check.mapper;
import org.springframework.stereotype.Repository;
@Repository
public interface CheckPartAppMapper {
}

View File

@@ -29,7 +29,7 @@ public interface ICommonService {
/**
* 药房列表(库房用)
*
* @return 药房列表
* @return 药房列表1
*/
List<LocationDto> getInventoryPharmacyList();

View File

@@ -91,7 +91,7 @@ public class CommonAppController {
/**
* 病区列表
*
* @return 病区列表
* @return 病区列表
*/
@GetMapping(value = "/ward-list")
public R<?> getWardList(@RequestParam(value = "orgId", required = false) Long orgId) {
@@ -105,7 +105,7 @@ public class CommonAppController {
*/
@GetMapping(value = "/department-list")
public R<?> getDepartmentList() {
return commonService.getDepartmentList();
return commonService.getDepartmentList();
}
/**

View File

@@ -52,6 +52,14 @@ public interface IDoctorStationMainAppService {
*/
R<?> completeEncounter(Long encounterId);
/**
* 取消完成
*
* @param encounterId 就诊id
* @return 结果
*/
R<?> cancelEncounter(Long encounterId);
/**
* 查询处方号列表信息
*

View File

@@ -140,6 +140,17 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
adviceUtils.subtractInventory(adviceInventoryList, adviceDraftInventoryList);
// 查询取药科室配置
List<AdviceInventoryDto> medLocationConfig = doctorStationAdviceAppMapper.getMedLocationConfig(organizationId);
// 将配置转为 {categoryCode -> 允许的locationId集合}
Map<String, Set<Long>> allowedLocByCategory = new HashMap<>();
if (medLocationConfig != null && !medLocationConfig.isEmpty()) {
for (AdviceInventoryDto cfg : medLocationConfig) {
if (cfg.getCategoryCode() == null || cfg.getLocationId() == null) {
continue;
}
allowedLocByCategory.computeIfAbsent(String.valueOf(cfg.getCategoryCode()), k -> new HashSet<>())
.add(cfg.getLocationId());
}
}
// 费用定价子表信息
List<AdvicePriceDto> childCharge = doctorStationAdviceAppMapper
.getChildCharge(ConditionCode.LOT_NUMBER_COST.getCode(), chargeItemDefinitionIdList);
@@ -163,6 +174,19 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
.filter(e -> baseDto.getAdviceDefinitionId().equals(e.getItemId())
&& baseDto.getAdviceTableName().equals(e.getItemTable()))
.collect(Collectors.toList());
// 当存在按科室配置时:仅保留被允许的药房/药库的库存;
// 若该药品类别未在配置中出现,则视为不可开立(清空库存以便前端过滤掉)
if (!allowedLocByCategory.isEmpty()) {
Set<Long> allowedLoc =
allowedLocByCategory.get(String.valueOf(baseDto.getCategoryCode()));
if (allowedLoc == null || allowedLoc.isEmpty()) {
inventoryList = Collections.emptyList();
} else {
inventoryList = inventoryList.stream()
.filter(inv -> allowedLoc.contains(inv.getLocationId()))
.collect(Collectors.toList());
}
}
// 库存信息
baseDto.setInventoryList(inventoryList);
// 设置默认产品批号
@@ -174,18 +198,15 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
baseDto.setDefaultLotNumber(hasInventoryList.get(0).getLotNumber());
}
}
if (!inventoryList.isEmpty() && !medLocationConfig.isEmpty()) {
// 第一步在medLocationConfig中匹配categoryCode
AdviceInventoryDto result1 = medLocationConfig.stream()
.filter(dto -> 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()
.orElse(null);
if (result2 != null && result2.getLotNumber() != null) {
baseDto.setDefaultLotNumber(result2.getLotNumber());
if (!inventoryList.isEmpty() && !allowedLocByCategory.isEmpty()) {
Set<Long> allowedLoc =
allowedLocByCategory.get(String.valueOf(baseDto.getCategoryCode()));
if (allowedLoc != null && !allowedLoc.isEmpty()) {
AdviceInventoryDto hit = inventoryList.stream()
.filter(inv -> allowedLoc.contains(inv.getLocationId()))
.findFirst().orElse(null);
if (hit != null && hit.getLotNumber() != null) {
baseDto.setDefaultLotNumber(hit.getLotNumber());
}
}
}

View File

@@ -1,14 +1,13 @@
package com.openhis.web.doctorstation.appservice.impl;
import java.util.Arrays;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.*;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import cn.hutool.core.util.ObjectUtil;
import com.openhis.web.doctorstation.appservice.*;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -25,7 +24,6 @@ import com.openhis.administration.service.IEncounterParticipantService;
import com.openhis.common.enums.*;
import com.openhis.common.utils.EnumUtils;
import com.openhis.common.utils.HisQueryUtils;
import com.openhis.web.doctorstation.appservice.IDoctorStationMainAppService;
import com.openhis.web.doctorstation.dto.PatientInfoDto;
import com.openhis.web.doctorstation.dto.PrescriptionInfoBaseDto;
import com.openhis.web.doctorstation.dto.PrescriptionInfoDetailDto;
@@ -46,6 +44,17 @@ public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppSer
@Resource
IEncounterParticipantService iEncounterParticipantService;
@Resource
IDoctorStationAdviceAppService iDoctorStationAdviceAppService;
@Resource
IDoctorStationEmrAppService iDoctorStationEmrAppService;
@Resource
IDoctorStationDiagnosisAppService iDoctorStationDiagnosisAppService;
@Resource
IDoctorStationChineseMedicalAppService iDoctorStationChineseMedicalAppService;
/**
* 查询就诊患者信息
*
@@ -154,6 +163,45 @@ public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppSer
return update > 0 ? R.ok() : R.fail();
}
/**
* 取消接诊
*
* @param encounterId 就诊id
* @return 结果
*/
@Override
public R<?> cancelEncounter(Long encounterId) {
//1.判断是否已经产生业务,如医生已经开有病历、处方、诊断、检验检查或相关项目已收费、执行等,
//如果有则提示:需要医生删除、作废、退费才能【取消接诊】。
//1.1病历
Object emrDetailResult = iDoctorStationEmrAppService.getEmrDetail(encounterId).getData();
//1.2诊断
Object diagnosisResult = iDoctorStationDiagnosisAppService.getEncounterDiagnosis(encounterId).getData();
//1.3处方
Object adviceResult = iDoctorStationAdviceAppService.getRequestBaseInfo(encounterId).getData();
//1.4中医诊断、处方
Map<?,?> tcmDiagnosisResult = (Map<?,?>) iDoctorStationChineseMedicalAppService.getTcmEncounterDiagnosis(encounterId).getData();
Object symptom = tcmDiagnosisResult.get("symptom");
Object illness = tcmDiagnosisResult.get("illness");
Object tcmPrescriptionResult = iDoctorStationChineseMedicalAppService.getTcmRequestBaseInfo(encounterId).getData();
boolean isEmpty = ObjectUtil.isAllEmpty(emrDetailResult, diagnosisResult, adviceResult, symptom,illness, tcmPrescriptionResult);
if (!isEmpty) {
return R.fail();
}
//2.取消接诊,患者重新回到患者队列待诊中
int update = encounterMapper.update(null,
new LambdaUpdateWrapper<Encounter>().eq(Encounter::getId, encounterId)
.set(Encounter::getStatusEnum, EncounterStatus.PLANNED.getValue())
.set(Encounter::getSubjectStatusEnum, EncounterSubjectStatus.TRIAGED.getValue()));
return update > 0 ? R.ok() : R.fail();
}
/**
* 查询处方号列表信息
*

View File

@@ -92,6 +92,17 @@ public class DoctorStationMainController {
return iDoctorStationMainAppService.completeEncounter(encounterId);
}
/**
* 取消接诊
*
* @param encounterId 就诊id
* @return 结果
*/
@GetMapping(value = "/cancel-encounter")
public R<?> cancelEncounter(@RequestParam Long encounterId) {
return iDoctorStationMainAppService.cancelEncounter(encounterId);
}
/**
* 查询处方号列表信息
*

View File

@@ -161,6 +161,27 @@ public class PurchaseInventoryAppServiceImpl implements IPurchaseInventoryAppSer
if (receiptDetailList.isEmpty()) {
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00006, null));
}
// 获取所有供应商ID
Set<Long> supplierIds = receiptDetailList.stream()
.filter(dto -> dto.getSupplierId() != null)
.map(ReceiptDetailDto::getSupplierId)
.collect(Collectors.toSet());
// 查询供应商信息并设置供应商名称
if (!supplierIds.isEmpty()) {
List<Supplier> suppliers = supplierService.listByIds(supplierIds);
Map<Long, String> supplierNameMap = suppliers.stream()
.collect(Collectors.toMap(Supplier::getId, Supplier::getName));
// 设置供应商名称
receiptDetailList.forEach(dto -> {
if (dto.getSupplierId() != null) {
dto.setSupplierName(supplierNameMap.getOrDefault(dto.getSupplierId(), ""));
}
});
}
return R.ok(receiptDetailList);
}
@@ -212,7 +233,7 @@ public class PurchaseInventoryAppServiceImpl implements IPurchaseInventoryAppSer
// 申请时间
.setApplyTime(DateUtils.getNowDate());
supplyRequestList.add(supplyRequest);
}
// 保存
@@ -224,7 +245,7 @@ public class PurchaseInventoryAppServiceImpl implements IPurchaseInventoryAppSer
List<Long> requestIdList = supplyRequestIdList.stream().map(SupplyRequest::getId).collect(Collectors.toList());
for (Long list : requestIdList) {
idList.add(list.toString());
}
}
// 返回请求id
return R.ok(idList, null);

View File

@@ -128,10 +128,11 @@ public class PatientInformationServiceImpl implements IPatientInformationService
public IPage<PatientInformationDto> getPatientInfo(PatientInfoSearchParam patientInfoSearchParam, String searchKey,
Integer pageNo, Integer pageSize, HttpServletRequest request) {
// 构建查询条件
// 构建查询条件 - 添加phone字段到搜索条件中
QueryWrapper<PatientInformationDto> queryWrapper = HisQueryUtils.buildQueryWrapper(
patientInfoSearchParam, searchKey, new HashSet<>(Arrays.asList(CommonConstants.FieldName.Name,
CommonConstants.FieldName.BusNo, CommonConstants.FieldName.PyStr, CommonConstants.FieldName.WbStr)),
CommonConstants.FieldName.BusNo, CommonConstants.FieldName.PyStr, CommonConstants.FieldName.WbStr,
CommonConstants.FieldName.Phone)), // 添加phone字段支持手机号搜索
request);
IPage<PatientInformationDto> patientInformationPage =

View File

@@ -597,7 +597,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
// 全退
String ybSettleIds = paymentReconciliation.getYbSettleIds();
PaymentReconciliation unPaymentReconciliation = normalUnCharge(paymentReconciliation, PaymentRecDetails, null);
PaymentReconciliation unPaymentReconciliation = normalUnCharge(paymentReconciliation, PaymentRecDetails, null, null);
if (!StringUtils.isEmpty(ybSettleIds)) {
// 医保结算信息
List<String> ybSettleIdList = Arrays.asList(ybSettleIds.split(","));
@@ -734,7 +734,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
}
PaymentReconciliation unPaymentReconciliation =
normalUnCharge(paymentReconciliation, paymentRecDetails, cancelPaymentDto.getSetlId());
normalUnCharge(paymentReconciliation, paymentRecDetails, cancelPaymentDto.getSetlId(), cancelPaymentDto.getReason());
return R.ok(unPaymentReconciliation);
}
@@ -792,10 +792,12 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
*
* @param paymentReconciliation 付款实体
* @param paymentRecDetails 付款详情
* @param setlIds 医保结算ID
* @param reason 退号/退费原因
* @return 结果
*/
private PaymentReconciliation normalUnCharge(PaymentReconciliation paymentReconciliation,
List<PaymentRecDetail> paymentRecDetails, String setlIds) {
List<PaymentRecDetail> paymentRecDetails, String setlIds, String reason) {
// 获取原ID
Long id = paymentReconciliation.getId();
@@ -805,7 +807,8 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
.setEntererId(SecurityUtils.getLoginUser().getPractitionerId()).setBillDate(new Date())
.setTenderedAmount(paymentReconciliation.getTenderedAmount().negate())
.setReturnedAmount(paymentReconciliation.getReturnedAmount().negate())
.setDisplayAmount(paymentReconciliation.getDisplayAmount().negate());
.setDisplayAmount(paymentReconciliation.getDisplayAmount().negate())
.setRefundReason(reason); // 保存退号/退费原因
if (setlIds != null) {
paymentReconciliation.setYbSettleIds(setlIds);
}
@@ -2232,7 +2235,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
}
// 全退
PaymentReconciliation unPaymentReconciliation = normalUnCharge(paymentReconciliation, paymentRecDetails, null);
PaymentReconciliation unPaymentReconciliation = normalUnCharge(paymentReconciliation, paymentRecDetails, null, null);
// 取医保结算数据
String ybSettleIds = paymentReconciliation.getYbSettleIds();

View File

@@ -172,13 +172,13 @@ public class PaymentReconciliationController {
/**
* 挂号收费(挂号收费先医保挂号,收费成功后再本系统挂号)
*
* @param outpatientRegistrationAddParam 挂号信息
* @param outpatientRegistrationSettleParam 挂号信息
* @return 操做结果
*/
@PostMapping("/reg-pay")
public R<?> regPay(@Valid @RequestBody OutpatientRegistrationSettleParam outpatientRegistrationAddParam) {
R<?> result = paymentReconciliationService.regPay(outpatientRegistrationAddParam,
outpatientRegistrationAddParam.getChrgBchno(), outpatientRegistrationAddParam.getPaymentDetails());
public R<?> regPay(@Valid @RequestBody OutpatientRegistrationSettleParam outpatientRegistrationSettleParam) {
R<?> result = paymentReconciliationService.regPay(outpatientRegistrationSettleParam,
outpatientRegistrationSettleParam.getChrgBchno(), outpatientRegistrationSettleParam.getPaymentDetails());
// 付款成功后,开具发票
if (result.getCode() == 200) {
PaymentReconciliation paymentRecon = null;

View File

@@ -68,6 +68,11 @@ public class InventoryProductReportAppServiceImpl implements IInventoryProductRe
public R<?> getPage(InventoryProductReportSearchParam inventoryProductReportSearchParam, Integer pageNo,
Integer pageSize, String searchKey, HttpServletRequest request) {
// 数据初始化不使用eq条件拼接
// 库存范围
Integer inventoryScope = inventoryProductReportSearchParam.getInventoryScope();
inventoryProductReportSearchParam.setInventoryScope(null);
// 设置模糊查询的字段名
HashSet<String> searchFields = new HashSet<>();
searchFields.add(CommonConstants.FieldName.BusNo);
@@ -78,7 +83,8 @@ public class InventoryProductReportAppServiceImpl implements IInventoryProductRe
// 查询库存商品明细分页列表
Page<InventoryProductReportPageDto> productReportPage = inventoryProductReportMapper.selectProductReportPage(
new Page<>(pageNo, pageSize), queryWrapper, ConditionCode.LOT_NUMBER_COST.getValue().toString());
new Page<>(pageNo, pageSize), queryWrapper, ConditionCode.LOT_NUMBER_COST.getValue().toString(),
inventoryScope);
productReportPage.getRecords().forEach(e -> {
// 药品类型
@@ -104,6 +110,11 @@ public class InventoryProductReportAppServiceImpl implements IInventoryProductRe
Integer pageSize, String searchKey, HttpServletRequest request, HttpServletResponse response) {
pageNo = 1;
pageSize = 10000;
// 数据初始化不使用eq条件拼接
// 库存范围
Integer inventoryScope = inventoryProductReportSearchParam.getInventoryScope();
inventoryProductReportSearchParam.setInventoryScope(null);
// 设置模糊查询的字段名
HashSet<String> searchFields = new HashSet<>();
searchFields.add(CommonConstants.FieldName.BusNo);
@@ -114,7 +125,8 @@ public class InventoryProductReportAppServiceImpl implements IInventoryProductRe
// 查询库存商品明细分页列表
Page<InventoryProductReportPageDto> productReportPage = inventoryProductReportMapper.selectProductReportPage(
new Page<>(pageNo, pageSize), queryWrapper, ConditionCode.LOT_NUMBER_COST.getValue().toString());
new Page<>(pageNo, pageSize), queryWrapper, ConditionCode.LOT_NUMBER_COST.getValue().toString(),
inventoryScope);
productReportPage.getRecords().forEach(e -> {
// 药品类型

View File

@@ -38,4 +38,10 @@ public class InventoryProductReportSearchParam {
/** 供应商 */
private Long supplierId;
/** 厂家/产地(供应商名称) */
private String manufacturerText;
/** 仓库ID药房ID */
private Long purposeLocationId;
}

View File

@@ -27,9 +27,11 @@ public interface InventoryProductReportMapper {
* @param page 分页
* @param queryWrapper 查询条件
* @param lotNumber 命中条件枚举类型:产品批号
* @param inventoryScope 库存范围无限制1、数量等于02、数量大于03、数量小于等于204、数量小于等于505
* @return 库存商品明细
*/
Page<InventoryProductReportPageDto> selectProductReportPage(@Param("page") Page<InventoryProductReportPageDto> page,
@Param(Constants.WRAPPER) QueryWrapper<InventoryProductReportSearchParam> queryWrapper,
@Param("lotNumber") String lotNumber);
@Param("lotNumber") String lotNumber,
@Param("inventoryScope") Integer inventoryScope);
}

View File

@@ -5,43 +5,32 @@ package com.openhis.web.ybmanage.vo;
import java.math.BigDecimal;
import javax.validation.constraints.NotNull;
import lombok.Data;
/**
* 【3201】后台计算结果 DB映射实体
* Settlement3202 Result DB mapping entity
*
* @author SunJQ
* @date 2025-04-15
*/
@Data
public class Settlement3202VO {
/** 医疗费用总额 */
/** Medical Fee Sum */
private BigDecimal medFeeSumAmt;
/** 基金支付总额 */
/** Fund Pay Sum */
private BigDecimal fundPaySumAmt;
/** 个人账户支付总额 */
/** Account Pay */
private BigDecimal acctPay;
/** 个人账户支付总额 */
/** Account Gj Pay */
private BigDecimal acctGjPay;
/** 现金支付总额 */
/** Self Pay Cash */
private BigDecimal selfPayCash;
/** 微信支付总额 */
/** Self Pay WeChat */
private BigDecimal selfPayVx;
/** 阿里支付总额 */
/** Self Pay Alipay */
private BigDecimal selfPayAli;
/** 银行卡支付总额 */
/** Self Pay Bank Card */
private BigDecimal selfPayUnion;
/** 定点医药机构结算笔数 */
/** Settlement Count */
private Integer fixMedInsSetlCnt;
}

View File

@@ -12,7 +12,7 @@ spring:
# 从库数据源
slave:
# 从数据源开关/默认关闭
enabled: false
enabled:
url:
username:
password:

View File

@@ -6,9 +6,9 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:postgresql://localhost:5432/openhis?currentSchema=public&characterEncoding=UTF-8&client_encoding=UTF-8
username: postgres
password: root
url: jdbc:postgresql://192.168.110.252:15432/postgresql?currentSchema=public&characterEncoding=UTF-8&client_encoding=UTF-8
username: postgresql
password: Jchl1528
# 从库数据源
slave:
# 从数据源开关/默认关闭
@@ -62,13 +62,13 @@ spring:
# redis 配置
redis:
# 地址
host: 127.0.0.1
host: 192.168.110.252
# 端口默认为6379
port: 6379
# 数据库索引
database: 1
# 密码
password: redis
password: Jchl1528
# 连接超时时间
timeout: 10s
lettuce:

View File

@@ -74,12 +74,14 @@
T2."name" AS item_name,
T2.id AS item_id,
T2.part_percent,
T2.manufacturer_text AS supplier_name,
T2.manufacturer_text AS manufacturer_text,
T3.total_volume,
T5."name" AS practitioner_name,
T6."name" AS purpose_location_name,
T6."id" AS purpose_location_id,
T7."name" AS purpose_location_store_name,
T1.supplier_id AS supplierId,
T10."name" AS supplier_name,
T1.occurrence_time,
(SELECT SUM(T9.quantity)
FROM wor_inventory_item T9
@@ -100,6 +102,8 @@
LEFT JOIN wor_inventory_item T9
ON T1.item_id = T9.item_id
AND T1.purpose_location_id = T9.location_id
LEFT JOIN adm_supplier T10
ON T1.supplier_id = T10.id
WHERE T1.bus_no = #{busNo}
AND T1.delete_flag = '0'
UNION
@@ -121,12 +125,14 @@
T8."name" AS item_name,
T8.id AS item_id,
T8.part_percent,
T8.manufacturer_text AS supplier_name,
T8.manufacturer_text AS manufacturer_text,
T8."size" AS total_volume,
T5."name" AS practitioner_name,
T6."name" AS purpose_location_name,
T6."id" AS purpose_location_id,
T7."name" AS purpose_location_store_name,
T1.supplier_id AS supplierId,
T10."name" AS supplier_name,
T1.occurrence_time,
(SELECT SUM(T9.quantity)
FROM wor_inventory_item T9
@@ -145,6 +151,8 @@
LEFT JOIN wor_inventory_item T9
ON T1.item_id = T9.item_id
AND T1.purpose_location_id = T9.location_id
LEFT JOIN adm_supplier T10
ON T1.supplier_id = T10.id
WHERE T1.bus_no = #{busNo}
AND T1.delete_flag = '0'
</select>
@@ -167,12 +175,14 @@
T2."name" AS item_name,
T2.id AS item_id,
T2.part_percent,
T2.manufacturer_text AS supplier_name,
T2.manufacturer_text AS manufacturer_text,
T3.total_volume,
T5."name" AS practitioner_name,
T6."name" AS purpose_location_name,
T6."id" AS purpose_location_id,
T7."name" AS purpose_location_store_name,
T1.supplier_id AS supplierId,
T10."name" AS supplier_name,
(SELECT SUM(T9.quantity)
FROM wor_inventory_item T9
WHERE T9.item_id = T1.item_id
@@ -192,6 +202,8 @@
LEFT JOIN wor_inventory_item T9
ON T1.item_id = T9.item_id
AND T1.purpose_location_id = T9.location_id
LEFT JOIN adm_supplier T10
ON T1.supplier_id = T10.id
WHERE T1.purpose_location_id = #{locationId}
AND T1.status_enum = #{statusEnum}
AND T1.type_enum IN
@@ -220,12 +232,14 @@
T8."name" AS item_name,
T8.id AS item_id,
T8.part_percent,
T8.manufacturer_text AS supplier_name,
T8.manufacturer_text AS manufacturer_text,
T8."size" AS total_volume,
T5."name" AS practitioner_name,
T6."name" AS purpose_location_name,
T6."id" AS purpose_location_id,
T7."name" AS purpose_location_store_name,
T1.supplier_id AS supplierId,
T10."name" AS supplier_name,
(SELECT SUM(T9.quantity)
FROM wor_inventory_item T9
WHERE T9.item_id = T1.item_id
@@ -243,6 +257,8 @@
LEFT JOIN wor_inventory_item T9
ON T1.item_id = T9.item_id
AND T1.purpose_location_id = T9.location_id
LEFT JOIN adm_supplier T10
ON T1.supplier_id = T10.id
WHERE T1.purpose_location_id = #{locationId}
AND T1.status_enum = #{statusEnum}
AND T1.type_enum IN

View File

@@ -18,6 +18,7 @@
T3.extra_details,
T3.contact,
T3.appointment_required_flag,
T3.practitioner_id,
T3.definition_id,
T3.charge_name,
T3.price,
@@ -36,6 +37,7 @@
T1.extra_details,
T1.contact,
T1.appointment_required_flag,
T1.practitioner_id,
T2.ID AS definition_id,
T2.charge_name,
T2.price,

View File

@@ -62,7 +62,14 @@
T9.charge_item_ids,
T9.payment_id,
T9.picture_url,
T9.birth_date
T9.birth_date,
T9.return_date,
T9.return_reason,
T9.operator_name,
T9.operator_id,
T9.refund_amount,
T9.contract_no,
T9.refund_method
from (
SELECT T1.tenant_id AS tenant_id,
T1.id AS encounter_id,
@@ -84,7 +91,15 @@
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,
-- 退号相关信息
T14.bill_date AS return_date,
T14.refund_reason AS return_reason,
T15."name" AS operator_name,
T17.user_name AS operator_id,
ABS(T14.display_amount) AS refund_amount,
T6.contract_no AS contract_no,
T16.refund_method AS refund_method
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'
@@ -111,9 +126,36 @@
LEFT JOIN fin_payment_reconciliation T13
ON T10.id::TEXT = ANY(string_to_array(T13.charge_item_ids,','))
AND T13.delete_flag = '0'
AND T13.status_enum = ${paymentStatus}
LEFT JOIN adm_invoice AS ai
ON ai.reconciliation_id = T13.id AND ai.delete_flag = '0'
AND T13.status_enum = ${paymentStatus}
-- 关联退号记录当状态为退号时通过relation_id关联原支付记录
LEFT JOIN fin_payment_reconciliation T14
ON T13.id = T14.relation_id
AND T14.delete_flag = '0'
AND T14.status_enum = 3
AND T14.payment_enum = 1
LEFT JOIN adm_practitioner AS T15 ON T15.ID = T14.enterer_id AND T15.delete_flag = '0'
LEFT JOIN sys_user AS T17 ON T17.user_id = T15.user_id AND T17.delete_flag = '0'
-- 关联退号支付详情,获取退款方式(聚合多个支付方式)
LEFT JOIN (
SELECT reconciliation_id,
STRING_AGG(
CASE pay_enum
WHEN 220400 THEN '现金'
WHEN 220100 THEN '微信'
WHEN 220200 THEN '支付宝'
WHEN 220300 THEN '银联'
END,
','
ORDER BY pay_enum
) AS refund_method
FROM fin_payment_rec_detail
WHERE delete_flag = '0'
AND amount &lt; 0
AND pay_enum IN (220400, 220100, 220200, 220300)
GROUP BY reconciliation_id
) AS T16 ON T14.id = T16.reconciliation_id
LEFT JOIN adm_invoice AS ai
ON ai.reconciliation_id = T13.id AND ai.delete_flag = '0'
WHERE T1.delete_flag = '0'
AND T1.class_enum = #{classEnum}
-- AND T1.create_time

View File

@@ -41,188 +41,366 @@
abi.restricted_flag,
abi.restricted_scope
from (
<if test="adviceTypes == null or adviceTypes.contains(1)">
SELECT T1.tenant_id,
1 AS advice_type,
T1.category_code AS category_code,
T1.pharmacology_category_code AS pharmacology_category_code,
T1.part_percent AS part_percent,
T1.unit_conversion_ratio AS unit_conversion_ratio,
T1.part_attribute_enum AS part_attribute_enum,
T1.tho_part_attribute_enum AS tho_part_attribute_enum,
T1.skin_test_flag AS skin_test_flag,
T1.inject_flag AS inject_flag,
T1.ID AS advice_definition_id,
T1.NAME AS advice_name,
T1.bus_no AS advice_bus_no,
T1.py_str AS py_str,
T1.wb_str AS wb_str,
T1.yb_no AS yb_no,
T1.merchandise_name AS product_name,
0 AS activity_type,
T1.unit_code AS unit_code,
T1.min_unit_code AS min_unit_code,
T2.total_volume AS volume,
T2.method_code AS method_code,
T2.rate_code AS rate_code,
T2.org_id AS org_id,
T2.location_id AS location_id,
CAST(T2.dose AS TEXT) AS dose,
T2.dose_unit_code AS dose_unit_code,
T3.NAME AS supplier,
T3.id AS supplier_id,
T1.manufacturer_text AS manufacturer,
T5.id AS charge_item_definition_id,
T5.instance_table AS advice_table_name,
T6.def_location_id AS position_id,
t1.restricted_flag AS restricted_flag,
t1.restricted_scope AS restricted_scope
FROM med_medication_definition AS t1
INNER JOIN med_medication AS T2 ON T2.medication_def_id = T1.ID
AND T2.delete_flag = '0' AND T2.status_enum = #{statusEnum}
LEFT JOIN adm_supplier AS T3
ON T3.ID = T1.supply_id
AND T3.delete_flag = '0'
LEFT JOIN adm_charge_item_definition AS T5 ON T5.instance_id = T1.ID
AND T5.delete_flag = '0'
LEFT JOIN adm_organization_location AS T6
ON T6.distribution_category_code = T1.category_code
AND T6.delete_flag = '0' AND T6.organization_id = #{organizationId} AND
(CURRENT_TIME :: time (6) BETWEEN T6.start_time AND T6.end_time)
WHERE T1.delete_flag = '0'
AND T2.status_enum = #{statusEnum}
<if test="pricingFlag ==1">
AND 1 = 2
</if>
<if test="adviceDefinitionIdParamList != null and !adviceDefinitionIdParamList.isEmpty()">
AND T1.id IN
<foreach collection="adviceDefinitionIdParamList" item="itemId" open="(" separator="," close=")">
#{itemId}
</foreach>
</if>
AND T5.instance_table = #{medicationTableName}
</if>
<!-- 改进SQL逻辑确保所有情况都能正确处理避免空的FROM子查询 -->
<!-- 当adviceTypes包含4或不在1-3范围内时或者adviceTypes为空/null时查询所有类型 -->
<choose>
<!-- 检查adviceTypes是否为null、空列表或者包含4、5或其他不在1-3范围内的值 -->
<when test="adviceTypes == null or adviceTypes.isEmpty() or adviceTypes.contains(4) or adviceTypes.contains(5)">
<!-- 查询所有类型 -->
SELECT T1.tenant_id,
1 AS advice_type,
T1.category_code AS category_code,
T1.pharmacology_category_code AS pharmacology_category_code,
T1.part_percent AS part_percent,
T1.unit_conversion_ratio AS unit_conversion_ratio,
T1.part_attribute_enum AS part_attribute_enum,
T1.tho_part_attribute_enum AS tho_part_attribute_enum,
T1.skin_test_flag AS skin_test_flag,
T1.inject_flag AS inject_flag,
T1.ID AS advice_definition_id,
T1.NAME AS advice_name,
T1.bus_no AS advice_bus_no,
T1.py_str AS py_str,
T1.wb_str AS wb_str,
T1.yb_no AS yb_no,
T1.merchandise_name AS product_name,
0 AS activity_type,
T1.unit_code AS unit_code,
T1.min_unit_code AS min_unit_code,
T2.total_volume AS volume,
T2.method_code AS method_code,
T2.rate_code AS rate_code,
T2.org_id AS org_id,
T2.location_id AS location_id,
CAST(T2.dose AS TEXT) AS dose,
T2.dose_unit_code AS dose_unit_code,
T3.NAME AS supplier,
T3.id AS supplier_id,
T1.manufacturer_text AS manufacturer,
T5.id AS charge_item_definition_id,
T5.instance_table AS advice_table_name,
T6.def_location_id AS position_id,
t1.restricted_flag AS restricted_flag,
t1.restricted_scope AS restricted_scope
FROM med_medication_definition AS t1
INNER JOIN med_medication AS T2 ON T2.medication_def_id = T1.ID
AND T2.delete_flag = '0' AND T2.status_enum = #{statusEnum}
LEFT JOIN adm_supplier AS T3
ON T3.ID = T1.supply_id
AND T3.delete_flag = '0'
LEFT JOIN adm_charge_item_definition AS T5 ON T5.instance_id = T1.ID
AND T5.delete_flag = '0'
LEFT JOIN adm_organization_location AS T6
ON T6.distribution_category_code = T1.category_code
AND T6.delete_flag = '0' AND T6.organization_id = #{organizationId} AND
(CURRENT_TIME :: time (6) BETWEEN T6.start_time AND T6.end_time)
WHERE T1.delete_flag = '0'
AND T2.status_enum = #{statusEnum}
<if test="pricingFlag ==1">
AND 1 = 2
</if>
<if test="adviceDefinitionIdParamList != null and !adviceDefinitionIdParamList.isEmpty()">
AND T1.id IN
<foreach collection="adviceDefinitionIdParamList" item="itemId" open="(" separator="," close=")">
#{itemId}
</foreach>
</if>
AND T5.instance_table = #{medicationTableName}
UNION ALL
SELECT T1.tenant_id,
2 AS advice_type,
T1.category_code AS category_code,
'' AS pharmacology_category_code,
T1.part_percent AS part_percent,
0 AS unit_conversion_ratio,
null AS part_attribute_enum,
null AS tho_part_attribute_enum,
null AS skin_test_flag,
null AS inject_flag,
T1.ID AS advice_definition_id,
T1.NAME AS advice_name,
T1.bus_no AS advice_bus_no,
T1.py_str AS py_str,
T1.wb_str AS wb_str,
T1.yb_no AS yb_no,
'' AS product_name,
0 AS activity_type,
T1.unit_code AS unit_code,
T1.min_unit_code AS min_unit_code,
T1.SIZE AS volume,
'' AS method_code,
'' AS rate_code,
T1.org_id AS org_id,
T1.location_id AS location_id,
'' AS dose,
'' AS dose_unit_code,
T2.NAME AS supplier,
T2.id AS supplier_id,
T1.manufacturer_text AS manufacturer,
T4.id AS charge_item_definition_id,
T4.instance_table AS advice_table_name,
T5.def_location_id AS position_id,
0 AS restricted_flag,
'' AS restricted_scope
FROM adm_device_definition AS T1
LEFT JOIN adm_supplier AS T2
ON T2.ID = T1.supply_id
AND T2.delete_flag = '0'
LEFT JOIN adm_charge_item_definition AS T4 ON T4.instance_id = T1.ID
AND T4.delete_flag = '0'
LEFT JOIN adm_organization_location AS T5 ON T5.distribution_category_code = T1.category_code
AND T5.delete_flag = '0' AND T5.organization_id = #{organizationId} AND
(CURRENT_TIME :: time (6) BETWEEN T5.start_time AND T5.end_time)
WHERE T1.delete_flag = '0'
<if test="adviceDefinitionIdParamList != null and !adviceDefinitionIdParamList.isEmpty()">
AND T1.id IN
<foreach collection="adviceDefinitionIdParamList" item="itemId" open="(" separator="," close=")">
#{itemId}
</foreach>
</if>
AND T4.instance_table = #{deviceTableName}
AND T1.category_code = #{singleUse}
AND T1.status_enum = #{statusEnum}
UNION ALL
SELECT T1.tenant_id,
3 AS advice_type,
T1.category_code AS category_code,
'' AS pharmacology_category_code,
1 AS part_percent,
0 AS unit_conversion_ratio,
null AS part_attribute_enum,
null AS tho_part_attribute_enum,
null AS skin_test_flag,
null AS inject_flag,
T1.ID AS advice_definition_id,
T1.NAME AS advice_name,
T1.bus_no AS advice_bus_no,
T1.py_str AS py_str,
T1.wb_str AS wb_str,
T1.yb_no AS yb_no,
'' AS product_name,
T1.type_enum AS activity_type,
'' AS unit_code,
'' AS min_unit_code,
'' AS volume,
'' AS method_code,
'' AS rate_code,
T1.org_id AS org_id,
T1.location_id AS location_id,
'' AS dose,
'' AS dose_unit_code,
'' AS supplier,
null AS supplier_id,
'' AS manufacturer,
T2.ID AS charge_item_definition_id,
T2.instance_table AS advice_table_name,
COALESCE(T3.organization_id, T1.org_id) AS position_id,
0 AS restricted_flag,
'' AS restricted_scope
FROM wor_activity_definition AS T1
LEFT JOIN adm_charge_item_definition AS T2
ON T2.instance_id = T1.ID
AND T2.delete_flag = '0'
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}
</if>
<if test="adviceDefinitionIdParamList != null and !adviceDefinitionIdParamList.isEmpty()">
AND T1.id IN
<foreach collection="adviceDefinitionIdParamList" item="itemId" open="(" separator="," close=")">
#{itemId}
</foreach>
</if>
AND T1.status_enum = #{statusEnum}
AND T2.instance_table = #{activityTableName}
</when>
<otherwise>
<!-- 当adviceTypes不为null且不为空且只包含1、2、3时根据选中的类型查询 -->
<!-- 确保至少有一个类型被选中,避免空查询 -->
<if test="adviceTypes.contains(1) or adviceTypes.contains(2) or adviceTypes.contains(3)">
<if test="adviceTypes.contains(1)">
SELECT T1.tenant_id,
1 AS advice_type,
T1.category_code AS category_code,
T1.pharmacology_category_code AS pharmacology_category_code,
T1.part_percent AS part_percent,
T1.unit_conversion_ratio AS unit_conversion_ratio,
T1.part_attribute_enum AS part_attribute_enum,
T1.tho_part_attribute_enum AS tho_part_attribute_enum,
T1.skin_test_flag AS skin_test_flag,
T1.inject_flag AS inject_flag,
T1.ID AS advice_definition_id,
T1.NAME AS advice_name,
T1.bus_no AS advice_bus_no,
T1.py_str AS py_str,
T1.wb_str AS wb_str,
T1.yb_no AS yb_no,
T1.merchandise_name AS product_name,
0 AS activity_type,
T1.unit_code AS unit_code,
T1.min_unit_code AS min_unit_code,
T2.total_volume AS volume,
T2.method_code AS method_code,
T2.rate_code AS rate_code,
T2.org_id AS org_id,
T2.location_id AS location_id,
CAST(T2.dose AS TEXT) AS dose,
T2.dose_unit_code AS dose_unit_code,
T3.NAME AS supplier,
T3.id AS supplier_id,
T1.manufacturer_text AS manufacturer,
T5.id AS charge_item_definition_id,
T5.instance_table AS advice_table_name,
T6.def_location_id AS position_id,
t1.restricted_flag AS restricted_flag,
t1.restricted_scope AS restricted_scope
FROM med_medication_definition AS t1
INNER JOIN med_medication AS T2 ON T2.medication_def_id = T1.ID
AND T2.delete_flag = '0' AND T2.status_enum = #{statusEnum}
LEFT JOIN adm_supplier AS T3
ON T3.ID = T1.supply_id
AND T3.delete_flag = '0'
LEFT JOIN adm_charge_item_definition AS T5 ON T5.instance_id = T1.ID
AND T5.delete_flag = '0'
LEFT JOIN adm_organization_location AS T6
ON T6.distribution_category_code = T1.category_code
AND T6.delete_flag = '0' AND T6.organization_id = #{organizationId} AND
(CURRENT_TIME :: time (6) BETWEEN T6.start_time AND T6.end_time)
WHERE T1.delete_flag = '0'
AND T2.status_enum = #{statusEnum}
<if test="pricingFlag ==1">
AND 1 = 2
</if>
<if test="adviceDefinitionIdParamList != null and !adviceDefinitionIdParamList.isEmpty()">
AND T1.id IN
<foreach collection="adviceDefinitionIdParamList" item="itemId" open="(" separator="," close=")">
#{itemId}
</foreach>
</if>
AND T5.instance_table = #{medicationTableName}
</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.contains(1) and (adviceTypes.contains(2) or adviceTypes.contains(3))">UNION ALL</if>
<if test="adviceTypes == null or adviceTypes.contains(2)">
SELECT T1.tenant_id,
2 AS advice_type,
T1.category_code AS category_code,
'' AS pharmacology_category_code,
T1.part_percent AS part_percent,
0 AS unit_conversion_ratio,
null AS part_attribute_enum,
null AS tho_part_attribute_enum,
null AS skin_test_flag,
null AS inject_flag,
T1.ID AS advice_definition_id,
T1.NAME AS advice_name,
T1.bus_no AS advice_bus_no,
T1.py_str AS py_str,
T1.wb_str AS wb_str,
T1.yb_no AS yb_no,
'' AS product_name,
0 AS activity_type,
T1.unit_code AS unit_code,
T1.min_unit_code AS min_unit_code,
T1.SIZE AS volume,
'' AS method_code,
'' AS rate_code,
T1.org_id AS org_id,
T1.location_id AS location_id,
'' AS dose,
'' AS dose_unit_code,
T2.NAME AS supplier,
T2.id AS supplier_id,
T1.manufacturer_text AS manufacturer,
T4.id AS charge_item_definition_id,
T4.instance_table AS advice_table_name,
T5.def_location_id AS position_id,
0 AS restricted_flag,
'' AS restricted_scope
FROM adm_device_definition AS T1
LEFT JOIN adm_supplier AS T2
ON T2.ID = T1.supply_id
AND T2.delete_flag = '0'
LEFT JOIN adm_charge_item_definition AS T4 ON T4.instance_id = T1.ID
AND T4.delete_flag = '0'
LEFT JOIN adm_organization_location AS T5 ON T5.distribution_category_code = T1.category_code
AND T5.delete_flag = '0' AND T5.organization_id = #{organizationId} AND
(CURRENT_TIME :: time (6) BETWEEN T5.start_time AND T5.end_time)
WHERE T1.delete_flag = '0'
<if test="adviceDefinitionIdParamList != null and !adviceDefinitionIdParamList.isEmpty()">
AND T1.id IN
<foreach collection="adviceDefinitionIdParamList" item="itemId" open="(" separator="," close=")">
#{itemId}
</foreach>
</if>
AND T4.instance_table = #{deviceTableName}
AND T1.category_code = #{singleUse}
AND T1.status_enum = #{statusEnum}
</if>
<if test="adviceTypes.contains(2)">
SELECT T1.tenant_id,
2 AS advice_type,
T1.category_code AS category_code,
'' AS pharmacology_category_code,
T1.part_percent AS part_percent,
0 AS unit_conversion_ratio,
null AS part_attribute_enum,
null AS tho_part_attribute_enum,
null AS skin_test_flag,
null AS inject_flag,
T1.ID AS advice_definition_id,
T1.NAME AS advice_name,
T1.bus_no AS advice_bus_no,
T1.py_str AS py_str,
T1.wb_str AS wb_str,
T1.yb_no AS yb_no,
'' AS product_name,
0 AS activity_type,
T1.unit_code AS unit_code,
T1.min_unit_code AS min_unit_code,
T1.SIZE AS volume,
'' AS method_code,
'' AS rate_code,
T1.org_id AS org_id,
T1.location_id AS location_id,
'' AS dose,
'' AS dose_unit_code,
T2.NAME AS supplier,
T2.id AS supplier_id,
T1.manufacturer_text AS manufacturer,
T4.id AS charge_item_definition_id,
T4.instance_table AS advice_table_name,
T5.def_location_id AS position_id,
0 AS restricted_flag,
'' AS restricted_scope
FROM adm_device_definition AS T1
LEFT JOIN adm_supplier AS T2
ON T2.ID = T1.supply_id
AND T2.delete_flag = '0'
LEFT JOIN adm_charge_item_definition AS T4 ON T4.instance_id = T1.ID
AND T4.delete_flag = '0'
LEFT JOIN adm_organization_location AS T5 ON T5.distribution_category_code = T1.category_code
AND T5.delete_flag = '0' AND T5.organization_id = #{organizationId} AND
(CURRENT_TIME :: time (6) BETWEEN T5.start_time AND T5.end_time)
WHERE T1.delete_flag = '0'
<if test="adviceDefinitionIdParamList != null and !adviceDefinitionIdParamList.isEmpty()">
AND T1.id IN
<foreach collection="adviceDefinitionIdParamList" item="itemId" open="(" separator="," close=")">
#{itemId}
</foreach>
</if>
AND T4.instance_table = #{deviceTableName}
AND T1.category_code = #{singleUse}
AND T1.status_enum = #{statusEnum}
</if>
<if test="adviceTypes == null or adviceTypes.contains(2)">
<if test="adviceTypes == null or adviceTypes.contains(3)">UNION ALL</if>
</if>
<if test="adviceTypes.contains(2) and adviceTypes.contains(3)">UNION ALL</if>
<if test="adviceTypes == null or adviceTypes.contains(3)">
SELECT T1.tenant_id,
3 AS advice_type,
T1.category_code AS category_code,
'' AS pharmacology_category_code,
1 AS part_percent,
0 AS unit_conversion_ratio,
null AS part_attribute_enum,
null AS tho_part_attribute_enum,
null AS skin_test_flag,
null AS inject_flag,
T1.ID AS advice_definition_id,
T1.NAME AS advice_name,
T1.bus_no AS advice_bus_no,
T1.py_str AS py_str,
T1.wb_str AS wb_str,
T1.yb_no AS yb_no,
'' AS product_name,
T1.type_enum AS activity_type,
'' AS unit_code,
'' AS min_unit_code,
'' AS volume,
'' AS method_code,
'' AS rate_code,
T1.org_id AS org_id,
T1.location_id AS location_id,
'' AS dose,
'' AS dose_unit_code,
'' AS supplier,
null AS supplier_id,
'' AS manufacturer,
T2.ID AS charge_item_definition_id,
T2.instance_table AS advice_table_name,
T3.organization_id AS position_id,
0 AS restricted_flag,
'' AS restricted_scope
FROM wor_activity_definition AS T1
LEFT JOIN adm_charge_item_definition AS T2
ON T2.instance_id = T1.ID
AND T2.delete_flag = '0'
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}
</if>
<if test="adviceDefinitionIdParamList != null and !adviceDefinitionIdParamList.isEmpty()">
AND T1.id IN
<foreach collection="adviceDefinitionIdParamList" item="itemId" open="(" separator="," close=")">
#{itemId}
</foreach>
</if>
AND T1.status_enum = #{statusEnum}
AND T2.instance_table = #{activityTableName}
</if>
<if test="adviceTypes.contains(3)">
SELECT T1.tenant_id,
3 AS advice_type,
T1.category_code AS category_code,
'' AS pharmacology_category_code,
1 AS part_percent,
0 AS unit_conversion_ratio,
null AS part_attribute_enum,
null AS tho_part_attribute_enum,
null AS skin_test_flag,
null AS inject_flag,
T1.ID AS advice_definition_id,
T1.NAME AS advice_name,
T1.bus_no AS advice_bus_no,
T1.py_str AS py_str,
T1.wb_str AS wb_str,
T1.yb_no AS yb_no,
'' AS product_name,
T1.type_enum AS activity_type,
'' AS unit_code,
'' AS min_unit_code,
'' AS volume,
'' AS method_code,
'' AS rate_code,
T1.org_id AS org_id,
T1.location_id AS location_id,
'' AS dose,
'' AS dose_unit_code,
'' AS supplier,
null AS supplier_id,
'' AS manufacturer,
T2.ID AS charge_item_definition_id,
T2.instance_table AS advice_table_name,
COALESCE(T3.organization_id, T1.org_id) AS position_id,
0 AS restricted_flag,
'' AS restricted_scope
FROM wor_activity_definition AS T1
LEFT JOIN adm_charge_item_definition AS T2
ON T2.instance_id = T1.ID
AND T2.delete_flag = '0'
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}
</if>
<if test="adviceDefinitionIdParamList != null and !adviceDefinitionIdParamList.isEmpty()">
AND T1.id IN
<foreach collection="adviceDefinitionIdParamList" item="itemId" open="(" separator="," close=")">
#{itemId}
</foreach>
</if>
AND T1.status_enum = #{statusEnum}
AND T2.instance_table = #{activityTableName}
</if>
</if>
</otherwise>
</choose>
) AS abi
${ew.customSqlSegment}
</select>

View File

@@ -4,7 +4,9 @@
<select id="selectProductReportPage"
resultType="com.openhis.web.reportmanage.dto.InventoryProductReportPageDto">
SELECT T8.id, --ID
SELECT *
FROM (
SELECT T8.id, --ID
T8.bus_no, --药品编码
T8.name, --药品名称
T8.lot_number, --批次号
@@ -23,9 +25,11 @@
T8.purpose_type_enum, --仓库类型
T8.location_name, --仓库名称
T8.location_store_name, --货位名称
T8.purpose_location_id, --仓库ID
T8.expiration_date, --有效期
T8.yb_no, --医保编码
T8.tenant_id -- 租户ID
T8.tenant_id, -- 租户ID
CAST(T8.item_table AS INTEGER) AS category_type -- 项目类型(按分类编码,整型)
FROM (SELECT T1.id, --ID
T2.bus_no, --药品编码
T2.name, --药品名称
@@ -46,6 +50,7 @@
T6.form_enum AS purpose_type_enum, --仓库类型
T6.name AS location_name, --仓库名称
T7.name AS location_store_name, --货位名称
T1.location_id AS purpose_location_id, --仓库ID
T1.expiration_date, --有效期
T2.yb_no, --医保编码
T1.tenant_id -- 租户ID
@@ -86,9 +91,11 @@
T10.purpose_type_enum, --仓库类型
T10.location_name, --仓库名称
T10.location_store_name, --货位名称
T10.purpose_location_id, --仓库ID
T10.expiration_date, --有效期
T10.yb_no, --医保编码
T10.tenant_id -- 租户ID
T10.tenant_id, -- 租户ID
CAST(T10.item_table AS INTEGER) AS category_type -- 项目类型(按分类编码,整型)
FROM (SELECT T1.id, --ID
T9.bus_no, --药品编码
T9.name, --药品名称
@@ -109,6 +116,7 @@
T6.form_enum AS purpose_type_enum, --仓库类型
T6.name AS location_name, --仓库名称
T7.name AS location_store_name, --货位名称
T1.location_id AS purpose_location_id, --仓库ID
T1.expiration_date, --有效期
T9.yb_no, --医保编码
T1.tenant_id -- 租户ID
@@ -128,7 +136,24 @@
LEFT JOIN adm_location T7
ON T1.location_store_id = T7.id
AND T7.delete_flag = '0'
WHERE T1.delete_flag = '0') AS T10
WHERE T1.delete_flag = '0') AS T10
) AS T
${ew.customSqlSegment}
<if test="inventoryScope != null">
<choose>
<when test="inventoryScope == 2">
AND item_quantity = 0
</when>
<when test="inventoryScope == 3">
AND item_quantity > 0
</when>
<when test="inventoryScope == 4">
AND item_quantity <![CDATA[ <= ]]> 20
</when>
<when test="inventoryScope == 5">
AND item_quantity <![CDATA[ <= ]]> 50
</when>
</choose>
</if>
</select>
</mapper>

View File

@@ -142,6 +142,11 @@ public class CommonConstants {
*/
public interface FieldName {
/**
* 手机号
*/
String Phone = "phone";
/**
* 单据号
*/

View File

@@ -39,7 +39,7 @@ public enum LocationForm implements HisEnumInterface {
PHARMACY(16, "ph", "药房"),
WAREHOUSE (17, "wa", ""),
WAREHOUSE (17, "wa", "耗材"),
DEPARTMENT (18, "de", "科室");

View File

@@ -32,6 +32,11 @@
<groupId>com.openhis</groupId>
<artifactId>openhis-common</artifactId>
</dependency>
<!-- 核心共通模块 -->
<dependency>
<groupId>com.core</groupId>
<artifactId>core-common</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>

View File

@@ -60,6 +60,9 @@ public class HealthcareService extends HisBaseEntity {
/** 预约要求 */
private Integer appointmentRequiredFlag;
/** 出诊医生ID */
private Long practitionerId;
/** 医保编码 */
private String ybNo;

View File

@@ -0,0 +1,59 @@
package com.openhis.administration.domain;
import java.util.Date;
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 lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* 发票段管理Entity实体
*
* @author system
* @date 2025-11-18
*/
@Data
@TableName("adm_invoice_segment")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class InvoiceSegment extends HisBaseEntity {
/** ID */
@TableId(type = IdType.ASSIGN_ID)
private Long id;
/** 段ID */
private Long segmentId;
/** 开始号码 */
private String beginNumber;
/** 结束号码 */
private String endNumber;
/** 员工ID */
private Long employeeId;
/** 员工姓名 */
private String employeeName;
/** 开票员ID */
private Long invoicingStaffId;
/** 开票员姓名 */
private String invoicingStaffName;
/** 创建日期 */
private Date createDate;
/** 状态 */
private String status;
/** 备注 */
private String remark;
}

View File

@@ -0,0 +1,17 @@
package com.openhis.administration.mapper;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.openhis.administration.domain.InvoiceSegment;
/**
* 发票段管理Mapper接口
*
* @author system
* @date 2025-11-18
*/
@Repository
public interface InvoiceSegmentMapper extends BaseMapper<InvoiceSegment> {
}

View File

@@ -0,0 +1,47 @@
package com.openhis.administration.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.openhis.administration.domain.InvoiceSegment;
/**
* 发票段管理Service接口
*
* @author system
* @date 2025-11-18
*/
public interface IInvoiceSegmentService {
/**
* 分页查询发票段列表
*
* @param page 分页对象
* @param isAdmin 是否管理员
* @param userId 用户ID
* @return 分页结果
*/
Page<InvoiceSegment> selectInvoiceSegmentPage(Page<InvoiceSegment> page, boolean isAdmin, Long userId);
/**
* 新增发票段
*
* @param invoiceSegment 发票段信息
* @return 结果
*/
int insertInvoiceSegment(InvoiceSegment invoiceSegment);
/**
* 修改发票段
*
* @param invoiceSegment 发票段信息
* @return 结果
*/
int updateInvoiceSegment(InvoiceSegment invoiceSegment);
/**
* 删除发票段
*
* @param ids 发票段ID列表
* @return 结果
*/
int deleteInvoiceSegmentByIds(Long[] ids);
}

View File

@@ -1,5 +1,7 @@
package com.openhis.administration.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.openhis.administration.domain.Invoice;
import com.openhis.administration.domain.Supplier;
@@ -18,4 +20,14 @@ public interface IInvoiceService extends IService<Invoice> {
* @return
*/
Long addInvoice(Invoice invoice);
/**
* 分页查询发票列表(带用户角色权限过滤)
*
* @param page 分页参数
* @param isAdmin 是否管理员
* @param userId 当前用户ID
* @return 发票列表
*/
IPage<Invoice> selectInvoicePage(Page<Invoice> page, boolean isAdmin, Long userId);
}

View File

@@ -0,0 +1,196 @@
package com.openhis.administration.service.impl;
import java.util.List;
import java.util.Objects;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.openhis.administration.domain.InvoiceSegment;
import com.openhis.administration.mapper.InvoiceSegmentMapper;
import com.openhis.administration.service.IInvoiceSegmentService;
/**
* 发票段管理Service实现
*
* @author system
* @date 2025-11-18
*/
@Service
public class InvoiceSegmentServiceImpl implements IInvoiceSegmentService {
@Autowired
private InvoiceSegmentMapper invoiceSegmentMapper;
/**
* 分页查询发票段列表
*/
@Override
public Page<InvoiceSegment> selectInvoiceSegmentPage(Page<InvoiceSegment> page, boolean isAdmin, Long userId) {
LambdaQueryWrapper<InvoiceSegment> queryWrapper = new LambdaQueryWrapper<>();
// 移除数据过滤限制,允许查看所有发票段数据
// 按创建时间倒序排列
queryWrapper.orderByDesc(InvoiceSegment::getCreateDate);
return invoiceSegmentMapper.selectPage(page, queryWrapper);
}
/**
* 新增发票段
*/
@Override
public int insertInvoiceSegment(InvoiceSegment invoiceSegment) {
return invoiceSegmentMapper.insert(invoiceSegment);
}
/**
* 修改发票段
*/
@Override
public int updateInvoiceSegment(InvoiceSegment invoiceSegment) {
System.out.println("===== 开始更新发票段 ====");
System.out.println("传入的invoiceSegment对象: id=" + invoiceSegment.getId() + ", segmentId=" + invoiceSegment.getSegmentId());
// 确保必填字段存在
if (invoiceSegment.getBeginNumber() == null || invoiceSegment.getEndNumber() == null) {
System.out.println("错误: beginNumber或endNumber为空无法更新");
return 0;
}
// 先尝试直接通过id更新
int rows = invoiceSegmentMapper.updateById(invoiceSegment);
System.out.println("直接通过id更新结果: 影响行数=" + rows);
// 如果直接更新失败,尝试多种查询策略
if (rows == 0) {
// 策略1: 使用传入的id作为segmentId查询处理前端传入的keyId作为segment_id的情况
if (invoiceSegment.getId() != null) {
System.out.println("策略1: 尝试将id=" + invoiceSegment.getId() + "作为segment_id查询");
LambdaQueryWrapper<InvoiceSegment> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(InvoiceSegment::getSegmentId, invoiceSegment.getId());
queryWrapper.eq(InvoiceSegment::getDeleteFlag, "0");
InvoiceSegment existingSegment = invoiceSegmentMapper.selectOne(queryWrapper);
if (existingSegment != null) {
System.out.println("策略1成功: 找到匹配的记录原始id=" + existingSegment.getId() + ", segmentId=" + existingSegment.getSegmentId());
invoiceSegment.setId(existingSegment.getId());
invoiceSegment.setSegmentId(existingSegment.getSegmentId()); // 确保segmentId正确
rows = invoiceSegmentMapper.updateById(invoiceSegment);
System.out.println("更新结果: 影响行数=" + rows);
}
}
// 策略2: 使用传入的segmentId字段查询
if (rows == 0 && invoiceSegment.getSegmentId() != null) {
System.out.println("策略2: 尝试使用segmentId=" + invoiceSegment.getSegmentId() + "查询");
LambdaQueryWrapper<InvoiceSegment> segmentIdWrapper = new LambdaQueryWrapper<>();
segmentIdWrapper.eq(InvoiceSegment::getSegmentId, invoiceSegment.getSegmentId());
segmentIdWrapper.eq(InvoiceSegment::getDeleteFlag, "0");
InvoiceSegment existingSegment = invoiceSegmentMapper.selectOne(segmentIdWrapper);
if (existingSegment != null) {
System.out.println("策略2成功: 找到匹配的记录原始id=" + existingSegment.getId() + ", segmentId=" + existingSegment.getSegmentId());
invoiceSegment.setId(existingSegment.getId());
rows = invoiceSegmentMapper.updateById(invoiceSegment);
System.out.println("更新结果: 影响行数=" + rows);
}
}
// 策略3: 基于业务键查询beginNumber和endNumber通常是唯一的业务组合
if (rows == 0) {
System.out.println("策略3: 尝试根据业务键查询beginNumber=" + invoiceSegment.getBeginNumber() + ", endNumber=" + invoiceSegment.getEndNumber());
LambdaQueryWrapper<InvoiceSegment> businessWrapper = new LambdaQueryWrapper<>();
businessWrapper.eq(InvoiceSegment::getBeginNumber, invoiceSegment.getBeginNumber());
businessWrapper.eq(InvoiceSegment::getEndNumber, invoiceSegment.getEndNumber());
businessWrapper.eq(InvoiceSegment::getDeleteFlag, "0");
InvoiceSegment existingSegment = invoiceSegmentMapper.selectOne(businessWrapper);
if (existingSegment != null) {
System.out.println("策略3成功: 找到匹配的记录原始id=" + existingSegment.getId() + ", segmentId=" + existingSegment.getSegmentId());
invoiceSegment.setId(existingSegment.getId());
invoiceSegment.setSegmentId(existingSegment.getSegmentId()); // 确保segmentId正确
rows = invoiceSegmentMapper.updateById(invoiceSegment);
System.out.println("更新结果: 影响行数=" + rows);
}
}
// 策略4: 如果是特定场景下的已知ID问题添加特殊处理逻辑
if (rows == 0) {
System.out.println("策略4: 检查是否需要特殊处理");
// 检查是否是之前日志中提到的ID问题
if ("1990329963367977000".equals(invoiceSegment.getSegmentId() + "")) {
System.out.println("检测到特殊ID模式尝试替代查询");
// 这里可以添加更具体的替代查询逻辑
}
}
// 增强调试信息:显示当前表中所有可能相关的记录
if (rows == 0) {
System.out.println("所有查询策略都失败了,显示表中相关记录:");
// 查询条件可以根据实际情况调整
LambdaQueryWrapper<InvoiceSegment> debugWrapper = new LambdaQueryWrapper<>();
debugWrapper.eq(InvoiceSegment::getDeleteFlag, "0");
// 可以添加时间范围或其他条件来限制结果数量
debugWrapper.last("LIMIT 10");
List<InvoiceSegment> segments = invoiceSegmentMapper.selectList(debugWrapper);
for (InvoiceSegment seg : segments) {
System.out.println("记录: id=" + seg.getId() + ", segmentId=" + seg.getSegmentId() + ", beginNumber=" + seg.getBeginNumber() + ", endNumber=" + seg.getEndNumber());
}
System.out.println("提示: 请检查前端传递的ID是否与数据库中的记录匹配");
}
}
System.out.println("===== 更新发票段结束 ==== 最终结果: " + (rows > 0 ? "成功" : "失败"));
return rows;
}
/**
* 删除发票段
*/
@Override
public int deleteInvoiceSegmentByIds(Long[] ids) {
System.out.println("删除发票段IDs: " + java.util.Arrays.toString(ids));
List<Long> idList = java.util.Arrays.asList(ids);
System.out.println("删除ID列表: " + idList);
// 检查记录是否存在且未被删除 - 先尝试通过id查找
LambdaQueryWrapper<InvoiceSegment> checkWrapper = new LambdaQueryWrapper<>();
checkWrapper.in(InvoiceSegment::getId, idList);
checkWrapper.eq(InvoiceSegment::getDeleteFlag, "0"); // 检查未被删除的记录
List<InvoiceSegment> existingRecords = invoiceSegmentMapper.selectList(checkWrapper);
System.out.println("通过id检查到的未删除记录数: " + existingRecords.size());
// 如果通过id没有找到记录尝试通过segment_id查找
if (existingRecords.isEmpty()) {
System.out.println("通过id未找到记录尝试通过segment_id查找");
LambdaQueryWrapper<InvoiceSegment> segmentIdWrapper = new LambdaQueryWrapper<>();
segmentIdWrapper.in(InvoiceSegment::getSegmentId, idList);
segmentIdWrapper.eq(InvoiceSegment::getDeleteFlag, "0");
existingRecords = invoiceSegmentMapper.selectList(segmentIdWrapper);
System.out.println("通过segment_id检查到的未删除记录数: " + existingRecords.size());
// 如果通过segment_id找到了记录使用这些记录的id进行删除
if (!existingRecords.isEmpty()) {
List<Long> actualIds = existingRecords.stream()
.map(InvoiceSegment::getId)
.collect(java.util.stream.Collectors.toList());
System.out.println("使用实际id列表进行删除: " + actualIds);
int rows = invoiceSegmentMapper.deleteBatchIds(actualIds);
System.out.println("删除影响行数: " + rows);
return rows;
}
}
// 直接通过id删除
int rows = invoiceSegmentMapper.deleteBatchIds(idList);
System.out.println("删除影响行数: " + rows);
return rows;
}
}

View File

@@ -2,17 +2,18 @@ package com.openhis.administration.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.core.common.utils.SecurityUtils;
import com.openhis.administration.domain.Invoice;
import com.openhis.administration.domain.Supplier;
import com.openhis.administration.mapper.InvoiceMapper;
import com.openhis.administration.service.IInvoiceService;
import com.openhis.common.enums.SupplyStatus;
import com.openhis.workflow.domain.SupplyRequest;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.openhis.administration.domain.Invoice;
import com.openhis.administration.mapper.InvoiceMapper;
import com.openhis.administration.service.IInvoiceService;
import java.util.Date;
import java.util.List;
@@ -26,11 +27,12 @@ import java.util.List;
public class InvoiceServiceImpl extends ServiceImpl<InvoiceMapper, Invoice> implements IInvoiceService {
/**
* 新增发票
*
*
* @param invoice 发票实体
* @return
*/
public Long addInvoice(Invoice invoice){
@Override
public Long addInvoice(Invoice invoice){
// 根据编码判断发票是否存在
List<Invoice> invoices =
baseMapper.selectList(new LambdaQueryWrapper<Invoice>().eq(Invoice::getBusNo, invoice.getBusNo()));
@@ -46,4 +48,26 @@ public class InvoiceServiceImpl extends ServiceImpl<InvoiceMapper, Invoice> impl
return invoice.getId();
}
/**
* 分页查询发票列表(带用户角色权限过滤)
*
* @param page 分页参数
* @param isAdmin 是否管理员
* @param userId 当前用户ID
* @return 发票列表
*/
@Override
public IPage<Invoice> selectInvoicePage(Page<Invoice> page, boolean isAdmin, Long userId) {
LambdaQueryWrapper<Invoice> queryWrapper = new LambdaQueryWrapper<>();
// 如果不是管理员,只查询当前用户创建的发票
if (!isAdmin) {
queryWrapper.eq(Invoice::getInvoicingStaffId, userId);
}
// 按创建时间降序排序
queryWrapper.orderByDesc(Invoice::getCreateTime);
return baseMapper.selectPage(page, queryWrapper);
}
}

View File

@@ -63,7 +63,7 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i
@Override
public List<Location> getPharmacyCabinetList() {
return baseMapper.selectList(new LambdaQueryWrapper<Location>().in(Location::getFormEnum,
LocationForm.CABINET.getValue(), LocationForm.PHARMACY.getValue()));
LocationForm.CABINET.getValue(), LocationForm.PHARMACY.getValue(), LocationForm.WAREHOUSE.getValue()));
}
/**

View File

@@ -33,7 +33,10 @@ public class PractitionerServiceImpl extends ServiceImpl<PractitionerMapper, Pra
QueryWrapper<Practitioner> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("user_id", userId);
return baseMapper.selectOne(queryWrapper);
queryWrapper.orderByDesc("create_time"); // 按创建时间倒序,取最新的一条
queryWrapper.last("LIMIT 1"); // 限制只返回一条
List<Practitioner> list = baseMapper.selectList(queryWrapper);
return list != null && !list.isEmpty() ? list.get(0) : null;
}
/**

View File

@@ -0,0 +1,75 @@
package com.openhis.check.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
/**
* 检查方法
*
* @author system
* @date 2025-07-22
*/
@Data
@Accessors(chain = true)
@TableName(value = "check_method", autoResultMap = true)
public class CheckMethod {
private static final long serialVersionUID = 1L;
/**
* 检查方法ID
*/
@TableId(type = IdType.AUTO)
private Long id;
/* 检查类型 */
private String checkType;
/* 方法代码 */
private String code;
/* 方法名称 */
private String name;
/* 套餐名称 */
private String packageName;
/* 曝光次数 */
private Integer exposureNum;
/* 序号 */
private Integer orderNum;
/* 备注 */
private String remark;
/** 创建时间 */
private LocalDateTime createTime;
/** 更新时间 */
private LocalDateTime updateTime;
/**
* 禁用逻辑删除因为数据库表中没有delete_flag字段
*/
@TableField(exist = false)
private String deleteFlag;
/**
* 以下字段数据库表中不存在用于禁用MyBatis Plus自动添加的字段
*/
@TableField(exist = false)
private String createBy;
@TableField(exist = false)
private String updateBy;
@TableField(exist = false)
private Integer tenantId;
}

View File

@@ -0,0 +1,127 @@
package com.openhis.check.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.experimental.Accessors;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* 检查套餐
*
* @author system
* @date 2025-07-22
* @updated 2025-11-26 - 扩展字段以支持套餐设置PRD需求
*/
@Data
@Accessors(chain = true)
@TableName(value = "check_package", autoResultMap = true)
public class CheckPackage {
private static final long serialVersionUID = 1L;
/** 检查套餐ID */
@TableId(type = IdType.AUTO)
private Long id;
/** 套餐名称 */
@TableField("package_name")
private String packageName;
/** 套餐编码 */
private String code;
/** 套餐类别 */
@TableField("package_type")
private String packageType;
/** 套餐级别 (1:全院套餐 2:科室套餐 3:个人套餐) */
@TableField("package_level")
private String packageLevel;
/** 适用科室 (当套餐级别为科室套餐时必填) */
@TableField("department")
private String department;
/** 适用用户 (当套餐级别为个人套餐时必填) */
@TableField("\"user\"")
private String user;
/** 卫生机构 */
@TableField("organization")
private String organization;
/** 套餐金额 */
@TableField("package_price")
private BigDecimal packagePrice;
/** 折扣 (百分比) */
@TableField("discount")
private BigDecimal discount;
/** 制单人 */
@TableField("creator")
private String creator;
/** 是否停用 (0:启用 1:停用) */
@TableField("is_disabled")
private Integer isDisabled;
/** 显示套餐名 (0:否 1:是) */
@TableField("show_package_name")
private Integer showPackageName;
/** 生成服务费 (0:否 1:是) */
@TableField("generate_service_fee")
private Integer generateServiceFee;
/** 套餐价格启用状态 (0:不启用 1:启用) */
@TableField("package_price_enabled")
private Integer packagePriceEnabled;
/** 服务费 */
@TableField("service_fee")
private BigDecimal serviceFee;
/** 备注 */
private String remark;
/** 描述 */
private String description;
/** 序号 */
private Integer number;
/** 套餐维护日期 (系统自动生成) */
@TableField("maintain_date")
private LocalDate maintainDate;
/** 创建时间 */
private LocalDateTime createTime;
/** 更新时间 */
private LocalDateTime updateTime;
/**
* 禁用逻辑删除因为数据库表中没有delete_flag字段
*/
@TableField(exist = false)
private String deleteFlag;
/**
* 以下字段数据库表中不存在用于禁用MyBatis Plus自动添加的字段
*/
@TableField(exist = false)
private String createBy;
@TableField(exist = false)
private String updateBy;
@TableField(exist = false)
private Integer tenantId;
}

View File

@@ -0,0 +1,95 @@
package com.openhis.check.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.experimental.Accessors;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* 检查套餐明细表
*
* @author system
* @date 2025-11-26
*/
@Data
@Accessors(chain = true)
@TableName(value = "check_package_detail", autoResultMap = true)
public class CheckPackageDetail {
private static final long serialVersionUID = 1L;
/** 套餐明细ID */
@TableId(type = IdType.AUTO)
private Long id;
/** 套餐ID */
private Long packageId;
/** 项目编号 */
private String itemCode;
/** 项目名称/规格 */
private String itemName;
/** 检查项目ID(诊疗项目ID) */
private Long checkItemId;
/** 剂量 */
private String dose;
/** 途径 */
private String method;
/** 频次 */
private String frequency;
/** 天数 */
private String days;
/** 数量 */
private Integer quantity;
/** 单价 */
private BigDecimal unitPrice;
/** 金额 */
private BigDecimal amount;
/** 服务费 */
private BigDecimal serviceCharge;
/** 总金额 */
private BigDecimal total;
/** 产地 */
private String origin;
/** 序号 */
private Integer orderNum;
/** 创建时间 */
private LocalDateTime createTime;
/** 更新时间 */
private LocalDateTime updateTime;
/**
* 禁用MyBatis Plus自动添加的字段
*/
@TableField(exist = false)
private String createBy;
@TableField(exist = false)
private String updateBy;
@TableField(exist = false)
private Integer tenantId;
@TableField(exist = false)
private String deleteFlag;
}

View File

@@ -0,0 +1,82 @@
package com.openhis.check.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
/**
* 检查部位
*
* @author system
* @date 2025-07-22
*/
@Data
@Accessors(chain = true)
@TableName(value = "check_part", autoResultMap = true)
public class CheckPart {
private static final long serialVersionUID = 1L;
/** 检查部位ID */
@TableId(type = IdType.AUTO)
private Long id;
/** 检查部位名称 */
private String name;
/** 检查部位编码 */
private String code;
/** 检查部位检查类型 */
private String checkType;
/** 曝光次数 */
private Integer exposureNum;
/** 费用套餐 */
private String packageName;
/** 金额 */
private Double price;
/** 序号 */
private Integer number;
/** 服务范围 */
private String serviceScope;
/** 下级医技类型 */
private String subType;
/** 备注 */
private String remark;
/** 创建时间 */
private LocalDateTime createTime;
/** 更新时间 */
private LocalDateTime updateTime;
/**
* 禁用逻辑删除因为数据库表中没有delete_flag字段
*/
@TableField(exist = false)
private String deleteFlag;
/**
* 以下字段数据库表中不存在用于禁用MyBatis Plus自动添加的字段
*/
@TableField(exist = false)
private String createBy;
@TableField(exist = false)
private String updateBy;
@TableField(exist = false)
private Integer tenantId;
}

View File

@@ -0,0 +1,73 @@
package com.openhis.check.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
/**
* 检查类型
*
* @author system
* @date 2025-07-22
*/
@Data
@Accessors(chain = true)
@TableName(value = "check_type", autoResultMap = true)
public class CheckType {
private static final long serialVersionUID = 1L;
/** 检查类型ID */
@TableId(type = IdType.AUTO)
private Long id;
/** 检查类型名称 */
private String name;
/** 检查类型编码 */
private String code;
/** 检查类型 */
private String type;
/** 是否选中 */
private Boolean selected;
/** 科室 */
private String department;
/** 序号 */
private Integer number;
/** 备注 */
private String remark;
/** 创建时间 */
private LocalDateTime createTime;
/** 更新时间 */
private LocalDateTime updateTime;
/**
* 禁用逻辑删除因为数据库表中没有delete_flag字段
*/
@TableField(exist = false)
private String deleteFlag;
/**
* 以下字段数据库表中不存在用于禁用MyBatis Plus自动添加的字段
*/
@TableField(exist = false)
private String createBy;
@TableField(exist = false)
private String updateBy;
@TableField(exist = false)
private Integer tenantId;
}

View File

@@ -0,0 +1,33 @@
package com.openhis.check.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.core.common.core.domain.HisBaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* 套餐项目关系表
*
* @author system
* @date 2025-07-22
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("package_item")
public class PackageItem extends HisBaseEntity {
private static final long serialVersionUID = 1L;
/** ID */
private Long id;
/** 套餐ID */
private Long packageId;
/** 检查项目ID */
private Long checkItemId;
/** 项目类型1检查类型 2检查方法 3检查部位 */
private Integer itemType;
}

View File

@@ -0,0 +1,16 @@
package com.openhis.check.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.openhis.check.domain.CheckMethod;
import org.springframework.stereotype.Repository;
/**
* 检查方法Mapper接口
*
* @author system
* @date 2025-07-22
*/
@Repository
public interface CheckMethodMapper extends BaseMapper<CheckMethod> {
}

View File

@@ -0,0 +1,16 @@
package com.openhis.check.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.openhis.check.domain.CheckPackageDetail;
import org.apache.ibatis.annotations.Mapper;
/**
* 检查套餐明细Mapper接口
*
* @author system
* @date 2025-11-26
*/
@Mapper
public interface CheckPackageDetailMapper extends BaseMapper<CheckPackageDetail> {
}

View File

@@ -0,0 +1,16 @@
package com.openhis.check.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.openhis.check.domain.CheckPackage;
import org.springframework.stereotype.Repository;
/**
* 检查套餐Mapper接口
*
* @author system
* @date 2025-07-22
*/
@Repository
public interface CheckPackageMapper extends BaseMapper<CheckPackage> {
}

View File

@@ -0,0 +1,16 @@
package com.openhis.check.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.openhis.check.domain.CheckPart;
import org.springframework.stereotype.Repository;
/**
* 检查部位Mapper接口
*
* @author system
* @date 2025-07-22
*/
@Repository
public interface CheckPartMapper extends BaseMapper<CheckPart> {
}

View File

@@ -0,0 +1,16 @@
package com.openhis.check.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.openhis.check.domain.CheckType;
import org.springframework.stereotype.Repository;
/**
* 检查类型Mapper接口
*
* @author system
* @date 2025-07-22
*/
@Repository
public interface CheckTypeMapper extends BaseMapper<CheckType> {
}

View File

@@ -0,0 +1,16 @@
package com.openhis.check.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.openhis.check.domain.PackageItem;
import org.springframework.stereotype.Repository;
/**
* 套餐项目关系表Mapper接口
*
* @author system
* @date 2025-07-22
*/
@Repository
public interface PackageItemMapper extends BaseMapper<PackageItem> {
}

View File

@@ -0,0 +1,14 @@
package com.openhis.check.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.openhis.check.domain.CheckMethod;
/**
* 检查方法Service接口
*
* @author system
* @date 2025-07-22
*/
public interface ICheckMethodService extends IService<CheckMethod> {
}

View File

@@ -0,0 +1,14 @@
package com.openhis.check.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.openhis.check.domain.CheckPackageDetail;
/**
* 检查套餐明细Service接口
*
* @author system
* @date 2025-11-26
*/
public interface ICheckPackageDetailService extends IService<CheckPackageDetail> {
}

View File

@@ -0,0 +1,14 @@
package com.openhis.check.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.openhis.check.domain.CheckPackage;
/**
* 检查套餐Service接口
*
* @author system
* @date 2025-07-22
*/
public interface ICheckPackageService extends IService<CheckPackage> {
}

View File

@@ -0,0 +1,14 @@
package com.openhis.check.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.openhis.check.domain.CheckPart;
/**
* 检查部位Service接口
*
* @author system
* @date 2025-07-22
*/
public interface ICheckPartService extends IService<CheckPart> {
}

View File

@@ -0,0 +1,14 @@
package com.openhis.check.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.openhis.check.domain.CheckType;
/**
* 检查类型Service接口
*
* @author system
* @date 2025-07-22
*/
public interface ICheckTypeService extends IService<CheckType> {
}

View File

@@ -0,0 +1,14 @@
package com.openhis.check.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.openhis.check.domain.PackageItem;
/**
* 套餐项目关系表Service接口
*
* @author system
* @date 2025-07-22
*/
public interface IPackageItemService extends IService<PackageItem> {
}

View File

@@ -0,0 +1,18 @@
package com.openhis.check.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.openhis.check.domain.CheckMethod;
import com.openhis.check.mapper.CheckMethodMapper;
import com.openhis.check.service.ICheckMethodService;
import org.springframework.stereotype.Service;
/**
* 检查方法Service实现类
*
* @author system
* @date 2025-07-22
*/
@Service
public class CheckMethodServiceImpl extends ServiceImpl<CheckMethodMapper, CheckMethod> implements ICheckMethodService {
}

View File

@@ -0,0 +1,19 @@
package com.openhis.check.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.openhis.check.domain.CheckPackageDetail;
import com.openhis.check.mapper.CheckPackageDetailMapper;
import com.openhis.check.service.ICheckPackageDetailService;
import org.springframework.stereotype.Service;
/**
* 检查套餐明细Service实现
*
* @author system
* @date 2025-11-26
*/
@Service
public class CheckPackageDetailServiceImpl extends ServiceImpl<CheckPackageDetailMapper, CheckPackageDetail>
implements ICheckPackageDetailService {
}

View File

@@ -0,0 +1,18 @@
package com.openhis.check.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.openhis.check.domain.CheckPackage;
import com.openhis.check.mapper.CheckPackageMapper;
import com.openhis.check.service.ICheckPackageService;
import org.springframework.stereotype.Service;
/**
* 检查套餐Service实现类
*
* @author system
* @date 2025-07-22
*/
@Service
public class CheckPackageServiceImpl extends ServiceImpl<CheckPackageMapper, CheckPackage> implements ICheckPackageService {
}

View File

@@ -0,0 +1,18 @@
package com.openhis.check.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.openhis.check.domain.CheckPart;
import com.openhis.check.mapper.CheckPartMapper;
import com.openhis.check.service.ICheckPartService;
import org.springframework.stereotype.Service;
/**
* 检查部位Service实现类
*
* @author system
* @date 2025-07-22
*/
@Service
public class CheckPartServiceImpl extends ServiceImpl<CheckPartMapper, CheckPart> implements ICheckPartService {
}

View File

@@ -0,0 +1,18 @@
package com.openhis.check.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.openhis.check.domain.CheckType;
import com.openhis.check.mapper.CheckTypeMapper;
import com.openhis.check.service.ICheckTypeService;
import org.springframework.stereotype.Service;
/**
* 检查类型Service实现类
*
* @author system
* @date 2025-07-22
*/
@Service
public class CheckTypeServiceImpl extends ServiceImpl<CheckTypeMapper, CheckType> implements ICheckTypeService {
}

View File

@@ -0,0 +1,18 @@
package com.openhis.check.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.openhis.check.domain.PackageItem;
import com.openhis.check.mapper.PackageItemMapper;
import com.openhis.check.service.IPackageItemService;
import org.springframework.stereotype.Service;
/**
* 套餐项目关系表Service实现类
*
* @author system
* @date 2025-07-22
*/
@Service
public class PackageItemServiceImpl extends ServiceImpl<PackageItemMapper, PackageItem> implements IPackageItemService {
}

View File

@@ -45,9 +45,13 @@ public class ConditionDefinitionServiceImpl extends ServiceImpl<ConditionDefinit
@Transactional(rollbackFor = Exception.class)
public boolean addDisease(ConditionDefinition conditionDefinition) {
// 根据病种编码判断病种是否存在
// List<ConditionDefinition> conditionDefinitions =
// conditionDefinitionMapper.selectList(new LambdaQueryWrapper<ConditionDefinition>()
// .eq(ConditionDefinition::getConditionCode, conditionDefinition.getConditionCode()));
// 根据医保编码判断病种是否存在
List<ConditionDefinition> conditionDefinitions =
conditionDefinitionMapper.selectList(new LambdaQueryWrapper<ConditionDefinition>()
.eq(ConditionDefinition::getConditionCode, conditionDefinition.getConditionCode()));
conditionDefinitionMapper.selectList(new LambdaQueryWrapper<ConditionDefinition>()
.eq(ConditionDefinition::getYbNo,conditionDefinition.getYbNo()));
if (conditionDefinitions.size() > 0) {
return false;
}

View File

@@ -4,6 +4,7 @@ import java.math.BigDecimal;
import java.util.Date;
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;
@@ -102,4 +103,8 @@ public class PaymentReconciliation extends HisBaseEntity {
/** 医保清算标志 */
private Integer ybClearFlag;//默认值0 未清算
/** 退号/退费原因 */
@TableField("refund_reason")
private String refundReason;
}

View File

@@ -131,13 +131,16 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
*/
@Override
public Contract getContract(String contractNo) {
// 先从缓存中查找
List<Contract> contractList = getRedisContractList();
for (Contract contract : contractList) {
if (contractNo.equals(contract.getBusNo())) {
return contract;
}
}
return null;
// 缓存中找不到时直接从数据库查询支持contractNo动态变化
return getByContractNo(contractNo);
}
/**

View File

@@ -85,33 +85,33 @@
</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>
<!-- <build>-->
<!-- <plugins>-->
<!-- <plugin>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
<!-- <configuration>-->
<!-- <fork>true</fork> &lt;!&ndash; 如果没有该配置devtools不会生效 &ndash;&gt;-->
<!-- </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>

View File

@@ -1,11 +1,11 @@
# 页面标题
VITE_APP_TITLE = 医院信息管理系统
VITE_APP_TITLE=医院信息管理系统
# 生产环境配置
VITE_APP_ENV = 'production'
VITE_APP_ENV=production
# OpenHIS管理系统/生产环境
VITE_APP_BASE_API = '/prod-api'
VITE_APP_BASE_API=/prod-api
# 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip
VITE_BUILD_COMPRESS=gzip

35
openhis-ui-vue3/.env.spug Normal file
View File

@@ -0,0 +1,35 @@
# 开发环境本地只启动前端项目依赖开发环境后端、APP
# 生产环境配置
VITE_APP_ENV = 'spug'
VITE_DEV=true
# 请求路径
VITE_BASE_URL='http://192.168.110.252'
# 文件上传类型server - 后端上传, client - 前端直连上传仅支持S3服务
VITE_UPLOAD_TYPE=server
# OpenHIS管理系统/SPUG环境
VITE_APP_BASE_API = '/admin-api'
# 是否删除debugger
VITE_DROP_DEBUGGER=false
# 是否删除console.log
VITE_DROP_CONSOLE=false
# 是否sourcemap
VITE_SOURCEMAP=true
# 打包路径
VITE_BASE_PATH=/
# 商城H5会员端域名
VITE_MALL_H5_DOMAIN='http://mall.yudao.iocoder.cn'
# 验证码的开关
VITE_APP_CAPTCHA_ENABLE=false
# GoView域名
VITE_GOVIEW_URL='http://127.0.0.1:3000'

View File

@@ -9,7 +9,7 @@
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
/>
<!-- <link rel="icon" href="src/assets/images/ccu.png" /> -->
<link rel="stylesheet" type="text/css" media="print" href="/public/print-lock.css">
<link rel="stylesheet" type="text/css" media="print" href="/print-lock.css">
<title>医院信息管理系统</title>
<!--[if lt IE 11
]><script>

View File

@@ -13,9 +13,10 @@
"@vueup/vue-quill": "1.2.0",
"@vueuse/core": "10.6.1",
"axios": "0.27.2",
"chart.js": "^4.5.1",
"d3": "^7.9.0",
"decimal.js": "^10.5.0",
"echarts": "5.4.3",
"echarts": "^5.4.3",
"element-china-area-data": "^6.1.0",
"element-plus": "2.9.11",
"file-saver": "2.0.5",
@@ -544,6 +545,11 @@
"resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
"integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="
},
"node_modules/@kurkle/color": {
"version": "0.3.4",
"resolved": "https://registry.npmmirror.com/@kurkle/color/-/color-0.3.4.tgz",
"integrity": "sha512-M5UknZPHRu3DEDWoipU6sE8PdkZ6Z/S+v4dD+Ke8IaNlpdSQah50lz1KtcFBa2vsdOnwbbnxJwVM4wty6udA5w=="
},
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@@ -1686,6 +1692,18 @@
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/chart.js": {
"version": "4.5.1",
"resolved": "https://registry.npmmirror.com/chart.js/-/chart.js-4.5.1.tgz",
"integrity": "sha512-GIjfiT9dbmHRiYi6Nl2yFCq7kkwdkp1W/lp2J99rX0yo9tgJGn3lKQATztIjb5tVtevcBtIdICNWqlq5+E8/Pw==",
"license": "MIT",
"dependencies": {
"@kurkle/color": "^0.3.0"
},
"engines": {
"pnpm": ">=8"
}
},
"node_modules/china-division": {
"version": "2.7.0",
"resolved": "https://registry.npmmirror.com/china-division/-/china-division-2.7.0.tgz",
@@ -1837,20 +1855,6 @@
"integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==",
"dev": true
},
"node_modules/copy-anything": {
"version": "2.0.6",
"resolved": "https://registry.npmmirror.com/copy-anything/-/copy-anything-2.0.6.tgz",
"integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"is-what": "^3.14.1"
},
"funding": {
"url": "https://github.com/sponsors/mesqueeb"
}
},
"node_modules/copy-descriptor": {
"version": "0.1.1",
"resolved": "https://registry.npmmirror.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
@@ -2823,20 +2827,6 @@
"integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
"dev": true
},
"node_modules/errno": {
"version": "0.1.8",
"resolved": "https://registry.npmmirror.com/errno/-/errno-0.1.8.tgz",
"integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"prr": "~1.0.1"
},
"bin": {
"errno": "cli.js"
}
},
"node_modules/error-ex": {
"version": "1.3.2",
"resolved": "https://registry.npmmirror.com/error-ex/-/error-ex-1.3.2.tgz",
@@ -4195,14 +4185,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/is-what": {
"version": "3.14.1",
"resolved": "https://registry.npmmirror.com/is-what/-/is-what-3.14.1.tgz",
"integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==",
"dev": true,
"optional": true,
"peer": true
},
"node_modules/is-windows": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/is-windows/-/is-windows-1.0.2.tgz",
@@ -4325,34 +4307,6 @@
"node": ">=0.10.0"
}
},
"node_modules/less": {
"version": "4.2.2",
"resolved": "https://registry.npmmirror.com/less/-/less-4.2.2.tgz",
"integrity": "sha512-tkuLHQlvWUTeQ3doAqnHbNn8T6WX1KA8yvbKG9x4VtKtIjHsVKQZCH11zRgAfbDAXC2UNIg/K9BYAAcEzUIrNg==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"copy-anything": "^2.0.1",
"parse-node-version": "^1.0.1",
"tslib": "^2.3.0"
},
"bin": {
"lessc": "bin/lessc"
},
"engines": {
"node": ">=6"
},
"optionalDependencies": {
"errno": "^0.1.1",
"graceful-fs": "^4.1.2",
"image-size": "~0.5.0",
"make-dir": "^2.1.0",
"mime": "^1.4.1",
"needle": "^3.1.0",
"source-map": "~0.6.0"
}
},
"node_modules/lines-and-columns": {
"version": "1.2.4",
"resolved": "https://registry.npmmirror.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
@@ -4432,21 +4386,6 @@
"@jridgewell/sourcemap-codec": "^1.5.0"
}
},
"node_modules/make-dir": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/make-dir/-/make-dir-2.1.0.tgz",
"integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"pify": "^4.0.1",
"semver": "^5.6.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/map-cache": {
"version": "0.2.2",
"resolved": "https://registry.npmmirror.com/map-cache/-/map-cache-0.2.2.tgz",
@@ -4521,20 +4460,6 @@
"node": ">=8.6"
}
},
"node_modules/mime": {
"version": "1.6.0",
"resolved": "https://registry.npmmirror.com/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
"dev": true,
"optional": true,
"peer": true,
"bin": {
"mime": "cli.js"
},
"engines": {
"node": ">=4"
}
},
"node_modules/mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
@@ -4723,24 +4648,6 @@
"node": ">=0.10.0"
}
},
"node_modules/needle": {
"version": "3.3.1",
"resolved": "https://registry.npmmirror.com/needle/-/needle-3.3.1.tgz",
"integrity": "sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"iconv-lite": "^0.6.3",
"sax": "^1.2.4"
},
"bin": {
"needle": "bin/needle"
},
"engines": {
"node": ">= 4.4.x"
}
},
"node_modules/normalize-path": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz",
@@ -4984,17 +4891,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/parse-node-version": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/parse-node-version/-/parse-node-version-1.0.1.tgz",
"integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==",
"dev": true,
"optional": true,
"peer": true,
"engines": {
"node": ">= 0.10"
}
},
"node_modules/pascalcase": {
"version": "0.1.1",
"resolved": "https://registry.npmmirror.com/pascalcase/-/pascalcase-0.1.1.tgz",
@@ -5045,17 +4941,6 @@
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/pify": {
"version": "4.0.1",
"resolved": "https://registry.npmmirror.com/pify/-/pify-4.0.1.tgz",
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
"dev": true,
"optional": true,
"peer": true,
"engines": {
"node": ">=6"
}
},
"node_modules/pinia": {
"version": "2.1.7",
"resolved": "https://registry.npmmirror.com/pinia/-/pinia-2.1.7.tgz",
@@ -5290,14 +5175,6 @@
"@province-city-china/types": "8.5.8"
}
},
"node_modules/prr": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/prr/-/prr-1.0.1.tgz",
"integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==",
"dev": true,
"optional": true,
"peer": true
},
"node_modules/quansync": {
"version": "0.2.8",
"resolved": "https://registry.npmmirror.com/quansync/-/quansync-0.2.8.tgz",
@@ -5779,14 +5656,6 @@
"node": ">=14.0.0"
}
},
"node_modules/sax": {
"version": "1.4.1",
"resolved": "https://registry.npmmirror.com/sax/-/sax-1.4.1.tgz",
"integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==",
"dev": true,
"optional": true,
"peer": true
},
"node_modules/scule": {
"version": "1.3.0",
"resolved": "https://registry.npmmirror.com/scule/-/scule-1.3.0.tgz",
@@ -5801,17 +5670,6 @@
"preval.macro": "^4.0.0"
}
},
"node_modules/semver": {
"version": "5.7.2",
"resolved": "https://registry.npmmirror.com/semver/-/semver-5.7.2.tgz",
"integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true,
"optional": true,
"peer": true,
"bin": {
"semver": "bin/semver"
}
},
"node_modules/set-function-length": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/set-function-length/-/set-function-length-1.2.2.tgz",
@@ -7817,6 +7675,11 @@
"resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
"integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="
},
"@kurkle/color": {
"version": "0.3.4",
"resolved": "https://registry.npmmirror.com/@kurkle/color/-/color-0.3.4.tgz",
"integrity": "sha512-M5UknZPHRu3DEDWoipU6sE8PdkZ6Z/S+v4dD+Ke8IaNlpdSQah50lz1KtcFBa2vsdOnwbbnxJwVM4wty6udA5w=="
},
"@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@@ -8634,6 +8497,14 @@
"supports-color": "^7.1.0"
}
},
"chart.js": {
"version": "4.5.1",
"resolved": "https://registry.npmmirror.com/chart.js/-/chart.js-4.5.1.tgz",
"integrity": "sha512-GIjfiT9dbmHRiYi6Nl2yFCq7kkwdkp1W/lp2J99rX0yo9tgJGn3lKQATztIjb5tVtevcBtIdICNWqlq5+E8/Pw==",
"requires": {
"@kurkle/color": "^0.3.0"
}
},
"china-division": {
"version": "2.7.0",
"resolved": "https://registry.npmmirror.com/china-division/-/china-division-2.7.0.tgz",
@@ -8749,17 +8620,6 @@
"integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==",
"dev": true
},
"copy-anything": {
"version": "2.0.6",
"resolved": "https://registry.npmmirror.com/copy-anything/-/copy-anything-2.0.6.tgz",
"integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==",
"dev": true,
"optional": true,
"peer": true,
"requires": {
"is-what": "^3.14.1"
}
},
"copy-descriptor": {
"version": "0.1.1",
"resolved": "https://registry.npmmirror.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
@@ -9458,17 +9318,6 @@
"integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
"dev": true
},
"errno": {
"version": "0.1.8",
"resolved": "https://registry.npmmirror.com/errno/-/errno-0.1.8.tgz",
"integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==",
"dev": true,
"optional": true,
"peer": true,
"requires": {
"prr": "~1.0.1"
}
},
"error-ex": {
"version": "1.3.2",
"resolved": "https://registry.npmmirror.com/error-ex/-/error-ex-1.3.2.tgz",
@@ -10443,14 +10292,6 @@
"get-intrinsic": "^1.2.6"
}
},
"is-what": {
"version": "3.14.1",
"resolved": "https://registry.npmmirror.com/is-what/-/is-what-3.14.1.tgz",
"integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==",
"dev": true,
"optional": true,
"peer": true
},
"is-windows": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/is-windows/-/is-windows-1.0.2.tgz",
@@ -10554,26 +10395,6 @@
"integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
"dev": true
},
"less": {
"version": "4.2.2",
"resolved": "https://registry.npmmirror.com/less/-/less-4.2.2.tgz",
"integrity": "sha512-tkuLHQlvWUTeQ3doAqnHbNn8T6WX1KA8yvbKG9x4VtKtIjHsVKQZCH11zRgAfbDAXC2UNIg/K9BYAAcEzUIrNg==",
"dev": true,
"optional": true,
"peer": true,
"requires": {
"copy-anything": "^2.0.1",
"errno": "^0.1.1",
"graceful-fs": "^4.1.2",
"image-size": "~0.5.0",
"make-dir": "^2.1.0",
"mime": "^1.4.1",
"needle": "^3.1.0",
"parse-node-version": "^1.0.1",
"source-map": "~0.6.0",
"tslib": "^2.3.0"
}
},
"lines-and-columns": {
"version": "1.2.4",
"resolved": "https://registry.npmmirror.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
@@ -10639,18 +10460,6 @@
"@jridgewell/sourcemap-codec": "^1.5.0"
}
},
"make-dir": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/make-dir/-/make-dir-2.1.0.tgz",
"integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
"dev": true,
"optional": true,
"peer": true,
"requires": {
"pify": "^4.0.1",
"semver": "^5.6.0"
}
},
"map-cache": {
"version": "0.2.2",
"resolved": "https://registry.npmmirror.com/map-cache/-/map-cache-0.2.2.tgz",
@@ -10707,14 +10516,6 @@
"picomatch": "^2.3.1"
}
},
"mime": {
"version": "1.6.0",
"resolved": "https://registry.npmmirror.com/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
"dev": true,
"optional": true,
"peer": true
},
"mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
@@ -10853,18 +10654,6 @@
}
}
},
"needle": {
"version": "3.3.1",
"resolved": "https://registry.npmmirror.com/needle/-/needle-3.3.1.tgz",
"integrity": "sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==",
"dev": true,
"optional": true,
"peer": true,
"requires": {
"iconv-lite": "^0.6.3",
"sax": "^1.2.4"
}
},
"normalize-path": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz",
@@ -11045,14 +10834,6 @@
"lines-and-columns": "^1.1.6"
}
},
"parse-node-version": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/parse-node-version/-/parse-node-version-1.0.1.tgz",
"integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==",
"dev": true,
"optional": true,
"peer": true
},
"pascalcase": {
"version": "0.1.1",
"resolved": "https://registry.npmmirror.com/pascalcase/-/pascalcase-0.1.1.tgz",
@@ -11091,14 +10872,6 @@
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"dev": true
},
"pify": {
"version": "4.0.1",
"resolved": "https://registry.npmmirror.com/pify/-/pify-4.0.1.tgz",
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
"dev": true,
"optional": true,
"peer": true
},
"pinia": {
"version": "2.1.7",
"resolved": "https://registry.npmmirror.com/pinia/-/pinia-2.1.7.tgz",
@@ -11245,14 +11018,6 @@
"@province-city-china/types": "8.5.8"
}
},
"prr": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/prr/-/prr-1.0.1.tgz",
"integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==",
"dev": true,
"optional": true,
"peer": true
},
"quansync": {
"version": "0.2.8",
"resolved": "https://registry.npmmirror.com/quansync/-/quansync-0.2.8.tgz",
@@ -11592,14 +11357,6 @@
"source-map-js": ">=0.6.2 <2.0.0"
}
},
"sax": {
"version": "1.4.1",
"resolved": "https://registry.npmmirror.com/sax/-/sax-1.4.1.tgz",
"integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==",
"dev": true,
"optional": true,
"peer": true
},
"scule": {
"version": "1.3.0",
"resolved": "https://registry.npmmirror.com/scule/-/scule-1.3.0.tgz",
@@ -11614,14 +11371,6 @@
"preval.macro": "^4.0.0"
}
},
"semver": {
"version": "5.7.2",
"resolved": "https://registry.npmmirror.com/semver/-/semver-5.7.2.tgz",
"integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"dev": true,
"optional": true,
"peer": true
},
"set-function-length": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/set-function-length/-/set-function-length-1.2.2.tgz",

View File

@@ -7,9 +7,10 @@
"type": "module",
"scripts": {
"dev": "vite",
"build:prod": "vite build",
"build:prod": "vite build --mode production",
"build:stage": "vite build --mode staging",
"preview": "vite preview"
"preview": "vite preview",
"build:spug": "vite build --mode spug"
},
"repository": {
"type": "git",
@@ -20,9 +21,10 @@
"@vueup/vue-quill": "1.2.0",
"@vueuse/core": "10.6.1",
"axios": "0.27.2",
"chart.js": "^4.5.1",
"d3": "^7.9.0",
"decimal.js": "^10.5.0",
"echarts": "5.4.3",
"echarts": "^5.4.3",
"element-china-area-data": "^6.1.0",
"element-plus": "2.9.11",
"file-saver": "2.0.5",

View File

@@ -0,0 +1,61 @@
import request from '@/utils/request';
import { parseStrEmpty } from "@/utils/openhis";
/**
* 查询患者列表
* 完全复用门诊挂号查询患者的逻辑和API
* @param {Object} query - 查询参数
* @returns {Promise} 请求结果
*/
export function getPatientList(query) {
// 打印日志便于调试
console.log('调用患者查询API参数:', query);
// 直接复用门诊挂号模块完全相同的实现方式
// 不做额外的参数处理直接将query传递给后端
return request({
url: '/charge-manage/register/patient-metadata',
method: 'get',
params: query
});
};
/**
* 更新患者换卡信息
* @param {Object} params - 换卡参数
* @returns {Promise} 请求结果
*/
export const renewPatientCard = (params) => {
return request({
url: '/cardRenewal/card/renewal',
method: 'post',
data: params
});
};
/**
* 获取患者详情信息
* @param {string} patientId - 患者ID
* @returns {Promise} 请求结果
*/
export const getPatientInfo = (patientId) => {
return request({
url: `/cardRenewal/patient/info/${patientId}`,
method: 'get'
});
};
// 获取患者详细信息
/* export function getPatientInfo(patientId) {
return request({
url: '/cardRenewal/patient/info/' + patientId,
method: 'get'
}).catch(error => {
console.error('获取患者详细信息API调用失败:', error);
return {
code: 500,
msg: 'API调用失败',
data: {}
};
});
} */

Some files were not shown because too many files have changed in this diff Show More