From f68fe3989791b7d1fb454232611da8a397dacb79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=8E=E4=BD=97?= Date: Sat, 6 Jun 2026 16:09:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E5=A4=8D=E4=BC=9A=E8=AF=8A?= =?UTF-8?q?=E6=97=B6=E9=99=90=E7=BC=96=E8=AF=91=E9=94=99=E8=AF=AF=20+=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=9F=A5=E6=83=85=E5=90=8C=E6=84=8F/?= =?UTF-8?q?=E7=97=85=E7=A8=8B=E8=AE=B0=E5=BD=95/=E9=99=A2=E6=84=9F?= =?UTF-8?q?=E5=A2=9E=E5=BC=BA=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 修复 ConsultationAppServiceImpl 编译错误 - 重写 checkTimeLimit/getTimeLimitStats/getConsultationUrgency 方法 - 使用 ConsultationRequest 实体替代 RequestForm - 使用 consultationRequestMapper 替代 requestFormService 2. 新增知情同意管理模块 (V15) - 实体: InformedConsent (含7种同意类型、双签名、版本管理) - Controller: 完整CRUD + 医生签名/患者签名/拒绝/归档/作废 - 前端: 列表页 + 手写板签名 + 拒绝弹窗 3. 新增病程记录模块 (V16) - 实体: ProgressNote + ProgressNoteReminder - Controller: CRUD + 签名/审核 + 时限监控面板 + 提醒 - 10种记录类型(首次/日常/上级查房/疑难/阶段/抢救/转科/接收/出院/死亡) - 前端: 列表页 + 时限监控面板 + 超时预警 4. 院感管理增强模块 (V17) - 暴发预警: 预警/处理/排除流程 - 目标性监测: ICU/手术部位/导管相关 - 手卫生监测: 依从性统计+总体依从率 - 多重耐药菌: 菌种/耐药类型/隔离管理 - 环境卫生学监测: 空气/物表/手/消毒液/无菌物品 - 前端: Tab页整合5个子模块 所有模块编译通过 (mvn clean compile -DskipTests) --- .../appservice/IConsultationAppService.java | 10 + .../impl/ConsultationAppServiceImpl.java | 115 +++++- .../controller/ConsultationController.java | 36 +- .../controller/InformedConsentController.java | 223 +++++++++++ .../controller/ProgressNoteController.java | 271 +++++++++++++ .../InfectionEnhancedController.java | 271 +++++++++++++ .../db/migration/V14__preop_discussion.sql | 51 +++ .../db/migration/V15__informed_consent.sql | 54 +++ .../db/migration/V16__progress_notes.sql | 58 +++ .../V17__hospital_infection_enhancement.sql | 132 +++++++ .../his/document/domain/InformedConsent.java | 136 +++++++ .../his/document/domain/ProgressNote.java | 92 +++++ .../document/domain/ProgressNoteReminder.java | 55 +++ .../mapper/InformedConsentMapper.java | 12 + .../document/mapper/ProgressNoteMapper.java | 9 + .../mapper/ProgressNoteReminderMapper.java | 9 + .../service/IInformedConsentService.java | 10 + .../service/IProgressNoteReminderService.java | 7 + .../service/IProgressNoteService.java | 7 + .../impl/InformedConsentServiceImpl.java | 15 + .../impl/ProgressNoteReminderServiceImpl.java | 12 + .../service/impl/ProgressNoteServiceImpl.java | 12 + .../domain/EnvironmentalMonitor.java | 37 ++ .../his/infection/domain/HandHygiene.java | 34 ++ .../infection/domain/MultiDrugResistant.java | 52 +++ .../his/infection/domain/OutbreakWarning.java | 41 ++ .../domain/TargetedSurveillance.java | 43 ++ .../mapper/EnvironmentalMonitorMapper.java | 9 + .../infection/mapper/HandHygieneMapper.java | 9 + .../mapper/MultiDrugResistantMapper.java | 9 + .../mapper/OutbreakWarningMapper.java | 9 + .../mapper/TargetedSurveillanceMapper.java | 9 + .../service/IEnvironmentalMonitorService.java | 7 + .../service/IHandHygieneService.java | 7 + .../service/IMultiDrugResistantService.java | 7 + .../service/IOutbreakWarningService.java | 7 + .../service/ITargetedSurveillanceService.java | 7 + .../impl/EnvironmentalMonitorServiceImpl.java | 11 + .../service/impl/HandHygieneServiceImpl.java | 11 + .../impl/MultiDrugResistantServiceImpl.java | 11 + .../impl/OutbreakWarningServiceImpl.java | 11 + .../impl/TargetedSurveillanceServiceImpl.java | 11 + .../src/views/infectionenhanced/api.js | 27 ++ .../src/views/infectionenhanced/index.vue | 336 ++++++++++++++++ .../src/views/informedconsent/api.js | 45 +++ .../src/views/informedconsent/index.vue | 374 ++++++++++++++++++ .../preopmanage/discussion/components/api.js | 9 + .../views/preopmanage/discussion/index.vue | 235 +++++++++++ .../src/views/progressnotes/api.js | 32 ++ .../src/views/progressnotes/index.vue | 287 ++++++++++++++ 50 files changed, 3282 insertions(+), 2 deletions(-) create mode 100644 healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/controller/InformedConsentController.java create mode 100644 healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/controller/ProgressNoteController.java create mode 100644 healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/controller/InfectionEnhancedController.java create mode 100644 healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V14__preop_discussion.sql create mode 100644 healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V15__informed_consent.sql create mode 100644 healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V16__progress_notes.sql create mode 100644 healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V17__hospital_infection_enhancement.sql create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/domain/InformedConsent.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/domain/ProgressNote.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/domain/ProgressNoteReminder.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/mapper/InformedConsentMapper.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/mapper/ProgressNoteMapper.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/mapper/ProgressNoteReminderMapper.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/IInformedConsentService.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/IProgressNoteReminderService.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/IProgressNoteService.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/impl/InformedConsentServiceImpl.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/impl/ProgressNoteReminderServiceImpl.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/impl/ProgressNoteServiceImpl.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/domain/EnvironmentalMonitor.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/domain/HandHygiene.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/domain/MultiDrugResistant.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/domain/OutbreakWarning.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/domain/TargetedSurveillance.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/mapper/EnvironmentalMonitorMapper.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/mapper/HandHygieneMapper.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/mapper/MultiDrugResistantMapper.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/mapper/OutbreakWarningMapper.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/mapper/TargetedSurveillanceMapper.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/IEnvironmentalMonitorService.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/IHandHygieneService.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/IMultiDrugResistantService.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/IOutbreakWarningService.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/ITargetedSurveillanceService.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/EnvironmentalMonitorServiceImpl.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/HandHygieneServiceImpl.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/MultiDrugResistantServiceImpl.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/OutbreakWarningServiceImpl.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/TargetedSurveillanceServiceImpl.java create mode 100644 healthlink-his-ui/src/views/infectionenhanced/api.js create mode 100644 healthlink-his-ui/src/views/infectionenhanced/index.vue create mode 100644 healthlink-his-ui/src/views/informedconsent/api.js create mode 100644 healthlink-his-ui/src/views/informedconsent/index.vue create mode 100644 healthlink-his-ui/src/views/preopmanage/discussion/components/api.js create mode 100644 healthlink-his-ui/src/views/preopmanage/discussion/index.vue create mode 100644 healthlink-his-ui/src/views/progressnotes/api.js create mode 100644 healthlink-his-ui/src/views/progressnotes/index.vue diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/consultation/appservice/IConsultationAppService.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/consultation/appservice/IConsultationAppService.java index ff67c8d0b..4679e1c84 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/consultation/appservice/IConsultationAppService.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/consultation/appservice/IConsultationAppService.java @@ -157,6 +157,16 @@ public interface IConsultationAppService { * @return 会诊申请详情 */ ConsultationRequestDto getConsultationById(Long id); + + /** + * 检查会诊时限(铁律15: 三甲要求) + */ + java.util.Map checkTimeLimit(String consultationId); + + /** + * 获取会诊时限统计 + */ + java.util.Map getTimeLimitStats(); } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/consultation/appservice/impl/ConsultationAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/consultation/appservice/impl/ConsultationAppServiceImpl.java index 7ae92b33b..c95ec15a7 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/consultation/appservice/impl/ConsultationAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/consultation/appservice/impl/ConsultationAppServiceImpl.java @@ -1943,5 +1943,118 @@ public class ConsultationAppServiceImpl implements IConsultationAppService { throw new RuntimeException("查询会诊申请详情失败: " + e.getMessage()); } } -} + + /** + * 检查会诊时限(铁律15: 三甲要求) + * 急会诊:10分钟内到位 + * 科间会诊:48小时内完成 + */ + public Map checkTimeLimit(String consultationId) { + Map result = new java.util.HashMap<>(); + try { + var wrapper = new LambdaQueryWrapper(); + wrapper.eq(ConsultationRequest::getConsultationId, consultationId); + ConsultationRequest request = consultationRequestMapper.selectOne(wrapper); + if (request == null) { + result.put("hasIssue", false); + result.put("message", "未找到会诊申请"); + return result; + } + + Date submitTime = request.getConsultationRequestDate(); + if (submitTime == null) { + result.put("hasIssue", false); + result.put("message", "会诊申请尚未提交"); + return result; + } + + long elapsedMinutes = (System.currentTimeMillis() - submitTime.getTime()) / (1000 * 60); + String urgency = request.getConsultationUrgency(); + if (urgency == null) urgency = "1"; + + // 急会诊:10分钟内到位 + if ("2".equals(urgency)) { + if (elapsedMinutes > 10) { + result.put("hasIssue", true); + result.put("type", "URGENT_OVERDUE"); + result.put("message", "急会诊已超时" + (elapsedMinutes - 10) + "分钟,要求10分钟内到位"); + result.put("severity", "HIGH"); + result.put("elapsedMinutes", elapsedMinutes); + } else { + result.put("hasIssue", false); + result.put("remainingMinutes", 10 - elapsedMinutes); + result.put("message", "急会诊剩余" + (10 - elapsedMinutes) + "分钟"); + } + } else { + // 普通会诊:48小时完成 + long elapsedHours = elapsedMinutes / 60; + if (elapsedHours > 48) { + result.put("hasIssue", true); + result.put("type", "NORMAL_OVERDUE"); + result.put("message", "科间会诊已超时" + (elapsedHours - 48) + "小时,要求48小时内完成"); + result.put("severity", "MEDIUM"); + result.put("elapsedHours", elapsedHours); + } else { + result.put("hasIssue", false); + result.put("remainingHours", 48 - elapsedHours); + result.put("message", "科间会诊剩余" + (48 - elapsedHours) + "小时"); + } + } + } catch (Exception e) { + log.error("检查会诊时限异常: {}", e.getMessage(), e); + result.put("hasIssue", false); + result.put("error", e.getMessage()); + } + return result; + } + + /** + * 获取会诊时限统计 + */ + public Map getTimeLimitStats() { + Map stats = new java.util.HashMap<>(); + try { + Date now = new Date(); + long nowMs = now.getTime(); + + // 查询所有已提交或已确认的会诊(status=10已提交, 20已确认) + var wrapper = new LambdaQueryWrapper(); + wrapper.in(ConsultationRequest::getConsultationStatus, ConsultationStatusEnum.SUBMITTED.getCode(), + ConsultationStatusEnum.CONFIRMED.getCode()); + List pendingList = consultationRequestMapper.selectList(wrapper); + + int urgentOverdue = 0; + int urgentNormal = 0; + int normalOverdue = 0; + int normalNormal = 0; + + for (ConsultationRequest req : pendingList) { + Date submitTime = req.getConsultationRequestDate(); + if (submitTime == null) continue; + long elapsedMin = (nowMs - submitTime.getTime()) / (1000 * 60); + + String urgency = req.getConsultationUrgency(); + if (urgency == null) urgency = "1"; + + if ("2".equals(urgency)) { + if (elapsedMin > 10) urgentOverdue++; + else urgentNormal++; + } else { + if (elapsedMin > 48 * 60) normalOverdue++; + else normalNormal++; + } + } + + stats.put("urgentOverdue", urgentOverdue); + stats.put("urgentNormal", urgentNormal); + stats.put("normalOverdue", normalOverdue); + stats.put("normalNormal", normalNormal); + stats.put("totalPending", pendingList.size()); + } catch (Exception e) { + log.error("获取会诊时限统计异常: {}", e.getMessage(), e); + } + return stats; + } + +} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/consultation/controller/ConsultationController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/consultation/controller/ConsultationController.java index 4b96a0579..129e8b495 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/consultation/controller/ConsultationController.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/consultation/controller/ConsultationController.java @@ -319,5 +319,39 @@ public class ConsultationController { return R.fail("查询会诊申请详情失败: " + e.getMessage()); } } -} + + // ==================== 时限控制相关接口(铁律15: 三甲要求)==================== + + /** + * 检查会诊时限 + */ + @Operation(summary = "检查会诊时限") + @GetMapping("/time-limit/check") + public R> checkTimeLimit( + @Parameter(description = "会诊申请单号") @RequestParam String consultationId) { + try { + Map result = consultationAppService.checkTimeLimit(consultationId); + return R.ok(result); + } catch (Exception e) { + log.error("检查会诊时限失败", e); + return R.fail("检查会诊时限失败: " + e.getMessage()); + } + } + + /** + * 获取会诊时限统计 + */ + @Operation(summary = "获取会诊时限统计") + @GetMapping("/time-limit/stats") + public R> getTimeLimitStats() { + try { + Map stats = consultationAppService.getTimeLimitStats(); + return R.ok(stats); + } catch (Exception e) { + log.error("获取会诊时限统计失败", e); + return R.fail("获取会诊时限统计失败: " + e.getMessage()); + } + } + +} \ No newline at end of file diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/controller/InformedConsentController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/controller/InformedConsentController.java new file mode 100644 index 000000000..fd5c79eed --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/controller/InformedConsentController.java @@ -0,0 +1,223 @@ +package com.healthlink.his.web.document.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.core.common.core.domain.R; +import com.healthlink.his.document.domain.InformedConsent; +import com.healthlink.his.document.service.IInformedConsentService; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.*; + +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/** + * 知情同意书Controller + * 依据: 《医疗纠纷预防和处理条例》患者知情同意权 + */ +@RestController +@RequestMapping("/informed-consent") +@Slf4j +@AllArgsConstructor +public class InformedConsentController { + + private final IInformedConsentService consentService; + + /** + * 分页查询知情同意书列表 + */ + @GetMapping("/page") + public R getPage( + @RequestParam(value = "patientName", required = false) String patientName, + @RequestParam(value = "consentType", required = false) Integer consentType, + @RequestParam(value = "status", required = false) Integer status, + @RequestParam(value = "encounterId", required = false) Long encounterId, + @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize", defaultValue = "20") Integer pageSize) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.like(StringUtils.hasText(patientName), InformedConsent::getPatientName, patientName) + .eq(consentType != null, InformedConsent::getConsentType, consentType) + .eq(status != null, InformedConsent::getStatus, status) + .eq(encounterId != null, InformedConsent::getEncounterId, encounterId) + .orderByDesc(InformedConsent::getCreateTime); + return R.ok(consentService.page(new Page<>(pageNo, pageSize), wrapper)); + } + + /** + * 查询知情同意书详情 + */ + @GetMapping("/detail") + public R getDetail(@RequestParam Long id) { + InformedConsent consent = consentService.getById(id); + if (consent == null) { + return R.fail("知情同意书不存在"); + } + return R.ok(consent); + } + + /** + * 新增知情同意书(草稿) + */ + @PostMapping("/add") + @Transactional(rollbackFor = Exception.class) + public R add(@RequestBody InformedConsent consent) { + consent.setStatus(0); // 草稿 + consent.setPatientSignStatus(0); // 未签名 + consent.setVersion(1); + consent.setCreateTime(new Date()); + consentService.save(consent); + return R.ok(consent); + } + + /** + * 修改知情同意书 + */ + @PutMapping("/update") + @Transactional(rollbackFor = Exception.class) + public R update(@RequestBody InformedConsent consent) { + InformedConsent existing = consentService.getById(consent.getId()); + if (existing == null) { + return R.fail("知情同意书不存在"); + } + if (existing.getStatus() != 0) { + return R.fail("只有草稿状态可以修改"); + } + consent.setUpdateTime(new Date()); + consentService.updateById(consent); + return R.ok(); + } + + /** + * 删除知情同意书(仅草稿状态) + */ + @DeleteMapping("/delete") + @Transactional(rollbackFor = Exception.class) + public R delete(@RequestParam Long id) { + InformedConsent consent = consentService.getById(id); + if (consent == null) { + return R.fail("知情同意书不存在"); + } + if (consent.getStatus() != 0) { + return R.fail("只有草稿状态可以删除"); + } + consentService.removeById(id); + return R.ok(); + } + + /** + * 医生签名 → 发送给患者 + */ + @PostMapping("/doctor-sign") + @Transactional(rollbackFor = Exception.class) + public R doctorSign(@RequestBody Map params) { + Long id = Long.valueOf(params.get("id").toString()); + String signImage = (String) params.get("signImage"); + InformedConsent consent = consentService.getById(id); + if (consent == null) return R.fail("知情同意书不存在"); + if (consent.getStatus() != 0) return R.fail("当前状态不允许签名"); + + consent.setDoctorSignTime(new Date()); + consent.setDoctorSignImage(signImage); + consent.setStatus(1); // 待患者签名 + consent.setUpdateTime(new Date()); + consentService.updateById(consent); + return R.ok(); + } + + /** + * 患者签名 + */ + @PostMapping("/patient-sign") + @Transactional(rollbackFor = Exception.class) + public R patientSign(@RequestBody Map params) { + Long id = Long.valueOf(params.get("id").toString()); + String signImage = (String) params.get("signImage"); + InformedConsent consent = consentService.getById(id); + if (consent == null) return R.fail("知情同意书不存在"); + if (consent.getStatus() != 1) return R.fail("当前状态不接受患者签名"); + + consent.setPatientSignStatus(1); // 已签 + consent.setPatientSignTime(new Date()); + consent.setPatientSignImage(signImage); + consent.setStatus(2); // 已完成 + consent.setUpdateTime(new Date()); + consentService.updateById(consent); + return R.ok(); + } + + /** + * 患者拒绝签署 + */ + @PostMapping("/patient-reject") + @Transactional(rollbackFor = Exception.class) + public R patientReject(@RequestBody Map params) { + Long id = Long.valueOf(params.get("id").toString()); + String reason = (String) params.get("rejectReason"); + String witness = (String) params.get("witnessName"); + InformedConsent consent = consentService.getById(id); + if (consent == null) return R.fail("知情同意书不存在"); + + consent.setPatientSignStatus(2); // 拒绝 + consent.setRejectReason(reason); + consent.setWitnessName(witness); + consent.setStatus(4); // 已作废 + consent.setUpdateTime(new Date()); + consentService.updateById(consent); + return R.ok(); + } + + /** + * 归档到病历 + */ + @PostMapping("/archive") + @Transactional(rollbackFor = Exception.class) + public R archive(@RequestParam Long id) { + InformedConsent consent = consentService.getById(id); + if (consent == null) return R.fail("知情同意书不存在"); + if (consent.getStatus() != 2) return R.fail("只有已完成状态可以归档"); + + consent.setStatus(3); // 已归档 + consent.setUpdateTime(new Date()); + consentService.updateById(consent); + return R.ok(); + } + + /** + * 作废知情同意书 + */ + @PostMapping("/void") + @Transactional(rollbackFor = Exception.class) + public R voidConsent(@RequestParam Long id, @RequestParam(required = false) String reason) { + InformedConsent consent = consentService.getById(id); + if (consent == null) return R.fail("知情同意书不存在"); + if (consent.getStatus() >= 3) return R.fail("已归档/已作废的知情同意书不能再次作废"); + + consent.setStatus(4); // 已作废 + consent.setOtherNotes(consent.getOtherNotes() != null ? consent.getOtherNotes() + "\n作废原因: " + reason : "作废原因: " + reason); + consent.setUpdateTime(new Date()); + consentService.updateById(consent); + return R.ok(); + } + + /** + * 获取统计信息 + */ + @GetMapping("/stats") + public R getStats(@RequestParam Long encounterId) { + Map stats = new HashMap<>(); + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(InformedConsent::getEncounterId, encounterId); + stats.put("total", consentService.count(wrapper)); + wrapper.eq(InformedConsent::getStatus, 1); + stats.put("pendingSign", consentService.count(wrapper)); + wrapper.eq(InformedConsent::getStatus, 2); + stats.put("completed", consentService.count(wrapper)); + wrapper.eq(InformedConsent::getStatus, 3); + stats.put("archived", consentService.count(wrapper)); + return R.ok(stats); + } +} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/controller/ProgressNoteController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/controller/ProgressNoteController.java new file mode 100644 index 000000000..0850f0a89 --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/document/controller/ProgressNoteController.java @@ -0,0 +1,271 @@ +package com.healthlink.his.web.document.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.core.common.core.domain.R; +import com.healthlink.his.document.domain.ProgressNote; +import com.healthlink.his.document.domain.ProgressNoteReminder; +import com.healthlink.his.document.service.IProgressNoteReminderService; +import com.healthlink.his.document.service.IProgressNoteService; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.*; + +import java.util.*; +import java.util.concurrent.TimeUnit; + +/** + * 病程记录Controller + * 依据: 《病历书写基本规范》 + */ +@RestController +@RequestMapping("/progress-note") +@Slf4j +@AllArgsConstructor +public class ProgressNoteController { + + private final IProgressNoteService progressNoteService; + private final IProgressNoteReminderService reminderService; + + /** 记录类型时限(小时) */ + private static final Map TYPE_DEADLINE_HOURS = Map.of( + 1, 8, // 首次病程记录: 8小时 + 2, 72, // 日常病程记录: 3天(一般) + 3, 72, // 上级查房: 72小时 + 5, 720, // 阶段小结: 30天 + 6, 6, // 抢救记录: 6小时 + 9, 24, // 出院记录: 24小时 + 10, 168 // 死亡讨论: 7天 + ); + + /** 病情等级对应的日常病程频率(小时) */ + private static final Map CONDITION_FREQUENCY = Map.of( + 1, 24, // 病危: 每天1次 + 2, 48, // 病重: 2天1次 + 3, 72 // 一般: 3天1次 + ); + + /** + * 分页查询病程记录列表 + */ + @GetMapping("/page") + public R getPage( + @RequestParam(value = "patientName", required = false) String patientName, + @RequestParam(value = "noteType", required = false) Integer noteType, + @RequestParam(value = "authorName", required = false) String authorName, + @RequestParam(value = "encounterId", required = false) Long encounterId, + @RequestParam(value = "isOverdue", required = false) Boolean isOverdue, + @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize", defaultValue = "20") Integer pageSize) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.like(StringUtils.hasText(patientName), ProgressNote::getPatientName, patientName) + .eq(noteType != null, ProgressNote::getNoteType, noteType) + .like(StringUtils.hasText(authorName), ProgressNote::getAuthorName, authorName) + .eq(encounterId != null, ProgressNote::getEncounterId, encounterId) + .eq(isOverdue != null, ProgressNote::getIsOverdue, isOverdue) + .orderByDesc(ProgressNote::getCreateTime); + return R.ok(progressNoteService.page(new Page<>(pageNo, pageSize), wrapper)); + } + + /** + * 查询病程记录详情 + */ + @GetMapping("/detail") + public R getDetail(@RequestParam Long id) { + ProgressNote note = progressNoteService.getById(id); + if (note == null) return R.fail("病程记录不存在"); + return R.ok(note); + } + + /** + * 新增病程记录 + */ + @PostMapping("/add") + @Transactional(rollbackFor = Exception.class) + public R add(@RequestBody ProgressNote note) { + note.setSignStatus(0); + note.setIsOverdue(false); + note.setOverdueHours(0); + note.setVersion(1); + // 计算时限 + Integer hours = TYPE_DEADLINE_HOURS.getOrDefault(note.getNoteType(), 72); + Date now = new Date(); + note.setDeadline(new Date(now.getTime() + TimeUnit.HOURS.toMillis(hours))); + note.setCreateTime(now); + progressNoteService.save(note); + // 创建提醒记录 + createReminder(note); + return R.ok(note); + } + + /** + * 修改病程记录(仅未签名可修改) + */ + @PutMapping("/update") + @Transactional(rollbackFor = Exception.class) + public R update(@RequestBody ProgressNote note) { + ProgressNote existing = progressNoteService.getById(note.getId()); + if (existing == null) return R.fail("病程记录不存在"); + if (existing.getSignStatus() == 1) return R.fail("已签名的病程记录不能修改"); + note.setVersion(existing.getVersion() + 1); + note.setUpdateTime(new Date()); + progressNoteService.updateById(note); + return R.ok(); + } + + /** + * 删除病程记录(仅未签名可删除) + */ + @DeleteMapping("/delete") + @Transactional(rollbackFor = Exception.class) + public R delete(@RequestParam Long id) { + ProgressNote note = progressNoteService.getById(id); + if (note == null) return R.fail("病程记录不存在"); + if (note.getSignStatus() == 1) return R.fail("已签名的病程记录不能删除"); + progressNoteService.removeById(id); + return R.ok(); + } + + /** + * 签名病程记录 + */ + @PostMapping("/sign") + @Transactional(rollbackFor = Exception.class) + public R sign(@RequestBody Map params) { + Long id = Long.valueOf(params.get("id").toString()); + ProgressNote note = progressNoteService.getById(id); + if (note == null) return R.fail("病程记录不存在"); + if (note.getSignStatus() == 1) return R.fail("已签名"); + note.setSignStatus(1); + note.setSignTime(new Date()); + note.setUpdateTime(new Date()); + progressNoteService.updateById(note); + // 更新提醒状态 + updateReminderStatus(note.getEncounterId(), note.getNoteType(), 1); + return R.ok(); + } + + /** + * 审核病程记录(上级医师) + */ + @PostMapping("/review") + @Transactional(rollbackFor = Exception.class) + public R review(@RequestBody Map params) { + Long id = Long.valueOf(params.get("id").toString()); + String reviewerName = (String) params.get("reviewUserName"); + Long reviewerId = Long.valueOf(params.get("reviewUserId").toString()); + ProgressNote note = progressNoteService.getById(id); + if (note == null) return R.fail("病程记录不存在"); + note.setReviewUserId(reviewerId); + note.setReviewUserName(reviewerName); + note.setUpdateTime(new Date()); + progressNoteService.updateById(note); + return R.ok(); + } + + /** + * 获取时限监控面板 + */ + @GetMapping("/monitor") + public R getMonitor(@RequestParam(required = false) Long encounterId) { + Map result = new HashMap<>(); + Date now = new Date(); + + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + if (encounterId != null) { + wrapper.eq(ProgressNote::getEncounterId, encounterId); + } + List allNotes = progressNoteService.list(wrapper); + + int overdueCount = 0; + int warningCount = 0; // 即将超时(2小时内) + int normalCount = 0; + + for (ProgressNote note : allNotes) { + if (note.getSignStatus() == 1) { + normalCount++; + continue; + } + long remainingMs = note.getDeadline().getTime() - now.getTime(); + long remainingHours = remainingMs / (1000 * 60 * 60); + if (remainingMs < 0) { + overdueCount++; + // 更新超时状态 + if (!Boolean.TRUE.equals(note.getIsOverdue())) { + note.setIsOverdue(true); + note.setOverdueHours((int)(-remainingHours)); + progressNoteService.updateById(note); + } + } else if (remainingHours <= 2) { + warningCount++; + } else { + normalCount++; + } + } + + result.put("overdueCount", overdueCount); + result.put("warningCount", warningCount); + result.put("normalCount", normalCount); + result.put("totalCount", allNotes.size()); + return R.ok(result); + } + + /** + * 获取提醒列表 + */ + @GetMapping("/reminders") + public R getReminders( + @RequestParam(value = "status", required = false) Integer status, + @RequestParam(value = "encounterId", required = false) Long encounterId) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(status != null, ProgressNoteReminder::getStatus, status) + .eq(encounterId != null, ProgressNoteReminder::getEncounterId, encounterId) + .orderByAsc(ProgressNoteReminder::getDeadline); + return R.ok(reminderService.list(wrapper)); + } + + /** + * 获取病程记录统计 + */ + @GetMapping("/stats") + public R getStats(@RequestParam Long encounterId) { + Map stats = new HashMap<>(); + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(ProgressNote::getEncounterId, encounterId); + stats.put("total", progressNoteService.count(wrapper)); + wrapper.eq(ProgressNote::getSignStatus, 0); + stats.put("unsigned", progressNoteService.count(wrapper)); + wrapper.eq(ProgressNote::getSignStatus, 1); + stats.put("signed", progressNoteService.count(wrapper)); + wrapper.eq(ProgressNote::getIsOverdue, true); + stats.put("overdue", progressNoteService.count(wrapper)); + return R.ok(stats); + } + + private void createReminder(ProgressNote note) { + ProgressNoteReminder reminder = new ProgressNoteReminder(); + reminder.setEncounterId(note.getEncounterId()); + reminder.setPatientName(note.getPatientName()); + reminder.setNoteType(note.getNoteType()); + reminder.setDeadline(note.getDeadline()); + reminder.setStatus(0); + reminder.setRemindUserId(note.getAuthorUserId()); + reminder.setRemindUserName(note.getAuthorName()); + reminder.setCreatedTime(new Date()); + reminderService.save(reminder); + } + + private void updateReminderStatus(Long encounterId, Integer noteType, int status) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(ProgressNoteReminder::getEncounterId, encounterId) + .eq(ProgressNoteReminder::getNoteType, noteType) + .eq(ProgressNoteReminder::getStatus, 0); + ProgressNoteReminder reminder = reminderService.getOne(wrapper); + if (reminder != null) { + reminder.setStatus(status); + reminderService.updateById(reminder); + } + } +} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/controller/InfectionEnhancedController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/controller/InfectionEnhancedController.java new file mode 100644 index 000000000..b87ecd67a --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/infection/controller/InfectionEnhancedController.java @@ -0,0 +1,271 @@ +package com.healthlink.his.web.infection.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.core.common.core.domain.R; +import com.healthlink.his.infection.domain.*; +import com.healthlink.his.infection.service.*; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.*; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.util.*; + +/** + * 院感管理增强Controller + * 补全: 暴发预警、目标性监测、手卫生监测、多重耐药菌、环境卫生学监测 + */ +@RestController +@RequestMapping("/infection-enhanced") +@Slf4j +@AllArgsConstructor +public class InfectionEnhancedController { + + private final IOutbreakWarningService outbreakService; + private final ITargetedSurveillanceService surveillanceService; + private final IHandHygieneService handHygieneService; + private final IMultiDrugResistantService mdrService; + private final IEnvironmentalMonitorService envMonitorService; + + // ==================== 暴发预警 ==================== + + @GetMapping("/outbreak/page") + public R getOutbreakPage( + @RequestParam(value = "departmentName", required = false) String departmentName, + @RequestParam(value = "status", required = false) Integer status, + @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize", defaultValue = "20") Integer pageSize) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.like(StringUtils.hasText(departmentName), OutbreakWarning::getDepartmentName, departmentName) + .eq(status != null, OutbreakWarning::getStatus, status) + .orderByDesc(OutbreakWarning::getCreateTime); + return R.ok(outbreakService.page(new Page<>(pageNo, pageSize), wrapper)); + } + + @PostMapping("/outbreak/add") + @Transactional(rollbackFor = Exception.class) + public R addOutbreak(@RequestBody OutbreakWarning warning) { + warning.setStatus(0); + warning.setCreateTime(new Date()); + outbreakService.save(warning); + return R.ok(warning); + } + + @PostMapping("/outbreak/handle") + @Transactional(rollbackFor = Exception.class) + public R handleOutbreak(@RequestBody Map params) { + Long id = Long.valueOf(params.get("id").toString()); + String result = (String) params.get("handleResult"); + OutbreakWarning warning = outbreakService.getById(id); + if (warning == null) return R.fail("预警记录不存在"); + warning.setStatus(2); + warning.setHandleResult(result); + warning.setHandleTime(new Date()); + warning.setUpdateTime(new Date()); + outbreakService.updateById(warning); + return R.ok(); + } + + @PostMapping("/outbreak/exclude") + @Transactional(rollbackFor = Exception.class) + public R excludeOutbreak(@RequestParam Long id, @RequestParam(required = false) String reason) { + OutbreakWarning warning = outbreakService.getById(id); + if (warning == null) return R.fail("预警记录不存在"); + warning.setStatus(3); + warning.setHandleResult("排除: " + (reason != null ? reason : "误报")); + warning.setHandleTime(new Date()); + warning.setUpdateTime(new Date()); + outbreakService.updateById(warning); + return R.ok(); + } + + // ==================== 目标性监测 ==================== + + @GetMapping("/surveillance/page") + public R getSurveillancePage( + @RequestParam(value = "surveillanceType", required = false) Integer type, + @RequestParam(value = "departmentName", required = false) String deptName, + @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize", defaultValue = "20") Integer pageSize) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(type != null, TargetedSurveillance::getSurveillanceType, type) + .like(StringUtils.hasText(deptName), TargetedSurveillance::getDepartmentName, deptName) + .orderByDesc(TargetedSurveillance::getStartDate); + return R.ok(surveillanceService.page(new Page<>(pageNo, pageSize), wrapper)); + } + + @PostMapping("/surveillance/add") + @Transactional(rollbackFor = Exception.class) + public R addSurveillance(@RequestBody TargetedSurveillance sv) { + sv.setStatus(0); + sv.setTotalCases(0); + sv.setInfectionCases(0); + sv.setInfectionRate(BigDecimal.ZERO); + sv.setCreateTime(new Date()); + surveillanceService.save(sv); + return R.ok(sv); + } + + @PostMapping("/surveillance/update-stats") + @Transactional(rollbackFor = Exception.class) + public R updateSurveillanceStats(@RequestBody Map params) { + Long id = Long.valueOf(params.get("id").toString()); + Integer totalCases = Integer.valueOf(params.get("totalCases").toString()); + Integer infectionCases = Integer.valueOf(params.get("infectionCases").toString()); + TargetedSurveillance sv = surveillanceService.getById(id); + if (sv == null) return R.fail("监测记录不存在"); + sv.setTotalCases(totalCases); + sv.setInfectionCases(infectionCases); + if (totalCases > 0) { + sv.setInfectionRate(BigDecimal.valueOf(infectionCases) + .divide(BigDecimal.valueOf(totalCases), 4, RoundingMode.HALF_UP) + .multiply(BigDecimal.valueOf(100)) + .setScale(2, RoundingMode.HALF_UP)); + } + sv.setUpdateTime(new Date()); + surveillanceService.updateById(sv); + return R.ok(); + } + + // ==================== 手卫生监测 ==================== + + @GetMapping("/hand-hygiene/page") + public R getHandHygienePage( + @RequestParam(value = "departmentName", required = false) String deptName, + @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize", defaultValue = "20") Integer pageSize) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.like(StringUtils.hasText(deptName), HandHygiene::getDepartmentName, deptName) + .orderByDesc(HandHygiene::getMonitorDate); + return R.ok(handHygieneService.page(new Page<>(pageNo, pageSize), wrapper)); + } + + @PostMapping("/hand-hygiene/add") + @Transactional(rollbackFor = Exception.class) + public R addHandHygiene(@RequestBody HandHygiene hh) { + if (hh.getObserveCount() != null && hh.getObserveCount() > 0 && hh.getComplyCount() != null) { + hh.setComplyRate(BigDecimal.valueOf(hh.getComplyCount()) + .divide(BigDecimal.valueOf(hh.getObserveCount()), 4, RoundingMode.HALF_UP) + .multiply(BigDecimal.valueOf(100)) + .setScale(2, RoundingMode.HALF_UP)); + } + hh.setCreateTime(new Date()); + handHygieneService.save(hh); + return R.ok(hh); + } + + @GetMapping("/hand-hygiene/stats") + public R getHandHygieneStats(@RequestParam(required = false) Long departmentId) { + Map stats = new HashMap<>(); + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + if (departmentId != null) { + wrapper.eq(HandHygiene::getDepartmentId, departmentId); + } + List list = handHygieneService.list(wrapper); + int totalObserve = 0, totalComply = 0; + for (HandHygiene hh : list) { + totalObserve += hh.getObserveCount() != null ? hh.getObserveCount() : 0; + totalComply += hh.getComplyCount() != null ? hh.getComplyCount() : 0; + } + stats.put("totalObserve", totalObserve); + stats.put("totalComply", totalComply); + stats.put("overallRate", totalObserve > 0 ? + BigDecimal.valueOf(totalComply).divide(BigDecimal.valueOf(totalObserve), 4, RoundingMode.HALF_UP) + .multiply(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP) : BigDecimal.ZERO); + stats.put("recordCount", list.size()); + return R.ok(stats); + } + + // ==================== 多重耐药菌 ==================== + + @GetMapping("/mdr/page") + public R getMdrPage( + @RequestParam(value = "patientName", required = false) String patientName, + @RequestParam(value = "bacteriaName", required = false) String bacteriaName, + @RequestParam(value = "isolationStatus", required = false) Integer isolationStatus, + @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize", defaultValue = "20") Integer pageSize) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.like(StringUtils.hasText(patientName), MultiDrugResistant::getPatientName, patientName) + .like(StringUtils.hasText(bacteriaName), MultiDrugResistant::getBacteriaName, bacteriaName) + .eq(isolationStatus != null, MultiDrugResistant::getIsolationStatus, isolationStatus) + .orderByDesc(MultiDrugResistant::getReportDate); + return R.ok(mdrService.page(new Page<>(pageNo, pageSize), wrapper)); + } + + @PostMapping("/mdr/add") + @Transactional(rollbackFor = Exception.class) + public R addMdr(@RequestBody MultiDrugResistant mdr) { + mdr.setIsolationStatus(0); + mdr.setStatus(0); + mdr.setCreateTime(new Date()); + mdrService.save(mdr); + return R.ok(mdr); + } + + @PostMapping("/mdr/isolate") + @Transactional(rollbackFor = Exception.class) + public R isolateMdr(@RequestBody Map params) { + Long id = Long.valueOf(params.get("id").toString()); + MultiDrugResistant mdr = mdrService.getById(id); + if (mdr == null) return R.fail("记录不存在"); + mdr.setIsolationStatus(1); + mdr.setIsolationStartDate(new Date()); + mdr.setUpdateTime(new Date()); + mdrService.updateById(mdr); + return R.ok(); + } + + @PostMapping("/mdr/release") + @Transactional(rollbackFor = Exception.class) + public R releaseMdr(@RequestParam Long id) { + MultiDrugResistant mdr = mdrService.getById(id); + if (mdr == null) return R.fail("记录不存在"); + mdr.setIsolationStatus(2); + mdr.setIsolationEndDate(new Date()); + mdr.setUpdateTime(new Date()); + mdrService.updateById(mdr); + return R.ok(); + } + + // ==================== 环境卫生学监测 ==================== + + @GetMapping("/env-monitor/page") + public R getEnvMonitorPage( + @RequestParam(value = "departmentName", required = false) String deptName, + @RequestParam(value = "monitorType", required = false) String monitorType, + @RequestParam(value = "result", required = false) String result, + @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize", defaultValue = "20") Integer pageSize) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.like(StringUtils.hasText(deptName), EnvironmentalMonitor::getDepartmentName, deptName) + .eq(StringUtils.hasText(monitorType), EnvironmentalMonitor::getMonitorType, monitorType) + .eq(StringUtils.hasText(result), EnvironmentalMonitor::getResult, result) + .orderByDesc(EnvironmentalMonitor::getMonitorDate); + return R.ok(envMonitorService.page(new Page<>(pageNo, pageSize), wrapper)); + } + + @PostMapping("/env-monitor/add") + @Transactional(rollbackFor = Exception.class) + public R addEnvMonitor(@RequestBody EnvironmentalMonitor env) { + env.setCreateTime(new Date()); + envMonitorService.save(env); + return R.ok(env); + } + + @GetMapping("/env-monitor/stats") + public R getEnvMonitorStats() { + Map stats = new HashMap<>(); + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + stats.put("total", envMonitorService.count(wrapper)); + wrapper.eq(EnvironmentalMonitor::getResult, "合格"); + stats.put("qualified", envMonitorService.count(wrapper)); + wrapper.eq(EnvironmentalMonitor::getResult, "不合格"); + stats.put("unqualified", envMonitorService.count(wrapper)); + return R.ok(stats); + } +} diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V14__preop_discussion.sql b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V14__preop_discussion.sql new file mode 100644 index 000000000..ccf5b4eb3 --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V14__preop_discussion.sql @@ -0,0 +1,51 @@ +CREATE TABLE IF NOT EXISTS sys_preop_discussion ( + id BIGSERIAL PRIMARY KEY, + encounter_id BIGINT NOT NULL, + surgery_id BIGINT, + patient_id BIGINT NOT NULL, + patient_name VARCHAR(50), + discussion_type INT DEFAULT 1, + surgery_level INT, + preop_diagnosis TEXT, + surgery_name VARCHAR(200), + surgery_indication TEXT, + main_plan TEXT, + backup_plan TEXT, + anesthesia_type VARCHAR(50), + risks_and_countermeasures TEXT, + postop_notes TEXT, + discussion_conclusion INT, + discussion_result TEXT, + host_user_id BIGINT, + host_user_name VARCHAR(50), + status INT DEFAULT 0, + discussion_time TIMESTAMP, + discussion_location VARCHAR(200), + create_by VARCHAR(64), + create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + update_by VARCHAR(64), + update_time TIMESTAMP, + tenant_id INT DEFAULT 0 +); +CREATE INDEX IF NOT EXISTS idx_preop_encounter ON sys_preop_discussion(encounter_id); +CREATE INDEX IF NOT EXISTS idx_preop_surgery ON sys_preop_discussion(surgery_id); +CREATE INDEX IF NOT EXISTS idx_preop_status ON sys_preop_discussion(status); + +CREATE TABLE IF NOT EXISTS sys_preop_participant ( + id BIGSERIAL PRIMARY KEY, + discussion_id BIGINT NOT NULL, + user_id BIGINT NOT NULL, + user_name VARCHAR(50), + role VARCHAR(20), + title VARCHAR(50), + sign_status INT DEFAULT 0, + sign_time TIMESTAMP, + sign_image TEXT, + opinion TEXT, + create_by VARCHAR(64), + create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + update_by VARCHAR(64), + update_time TIMESTAMP, + tenant_id INT DEFAULT 0 +); +CREATE INDEX IF NOT EXISTS idx_preop_part_disc ON sys_preop_participant(discussion_id); diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V15__informed_consent.sql b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V15__informed_consent.sql new file mode 100644 index 000000000..768919f2d --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V15__informed_consent.sql @@ -0,0 +1,54 @@ +-- V15: 知情同意管理模块 +-- 依据: 《医疗纠纷预防和处理条例》《侵权责任法》患者知情同意权 + +CREATE TABLE IF NOT EXISTS sys_informed_consent ( + id BIGSERIAL PRIMARY KEY, + encounter_id BIGINT NOT NULL, + patient_id BIGINT NOT NULL, + patient_name VARCHAR(50) NOT NULL, + consent_type INT NOT NULL, + related_surgery_id BIGINT, + related_advice_id BIGINT, + diagnosis TEXT, + procedure_name VARCHAR(200), + procedure_purpose TEXT, + procedure_method TEXT, + expected_outcome TEXT, + risks_and_complications TEXT, + alternative_plans TEXT, + consequences_of_refusal TEXT, + other_notes TEXT, + doctor_user_id BIGINT NOT NULL, + doctor_name VARCHAR(50) NOT NULL, + doctor_sign_time TIMESTAMP, + doctor_sign_image TEXT, + patient_sign_status INT NOT NULL DEFAULT 0, + patient_sign_time TIMESTAMP, + patient_sign_image TEXT, + guardian_name VARCHAR(50), + guardian_relation VARCHAR(20), + witness_name VARCHAR(50), + reject_reason TEXT, + status INT NOT NULL DEFAULT 0, + version INT NOT NULL DEFAULT 1, + tenant_id BIGINT DEFAULT 0, + is_deleted INT NOT NULL DEFAULT 0, + create_by VARCHAR(64), + create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + update_by VARCHAR(64), + update_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + remark VARCHAR(500) +); + +COMMENT ON TABLE sys_informed_consent IS '知情同意书'; +COMMENT ON COLUMN sys_informed_consent.encounter_id IS '就诊ID'; +COMMENT ON COLUMN sys_informed_consent.patient_id IS '患者ID'; +COMMENT ON COLUMN sys_informed_consent.consent_type IS '类型(1手术 2麻醉 3输血 4特殊检查 5特殊治疗 6病危 7自费)'; +COMMENT ON COLUMN sys_informed_consent.status IS '状态(0草稿 1待患者签名 2已完成 3已归档 4已作废)'; +COMMENT ON COLUMN sys_informed_consent.patient_sign_status IS '患者签名状态(0未签 1已签 2拒绝)'; +COMMENT ON COLUMN sys_informed_consent.version IS '版本号'; + +CREATE INDEX idx_ic_encounter ON sys_informed_consent(encounter_id); +CREATE INDEX idx_ic_patient ON sys_informed_consent(patient_id); +CREATE INDEX idx_ic_type ON sys_informed_consent(consent_type); +CREATE INDEX idx_ic_status ON sys_informed_consent(status); diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V16__progress_notes.sql b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V16__progress_notes.sql new file mode 100644 index 000000000..39033d756 --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V16__progress_notes.sql @@ -0,0 +1,58 @@ +-- V16: 病程记录管理模块 +-- 依据: 《病历书写基本规范》《电子病历应用管理规范》 + +CREATE TABLE IF NOT EXISTS sys_progress_note ( + id BIGSERIAL PRIMARY KEY, + encounter_id BIGINT NOT NULL, + patient_id BIGINT NOT NULL, + patient_name VARCHAR(50) NOT NULL, + note_type INT NOT NULL, + note_content TEXT, + author_user_id BIGINT NOT NULL, + author_name VARCHAR(50) NOT NULL, + author_title VARCHAR(50), + review_user_id BIGINT, + review_user_name VARCHAR(50), + sign_status INT NOT NULL DEFAULT 0, + sign_time TIMESTAMP, + deadline TIMESTAMP NOT NULL, + is_overdue BOOLEAN NOT NULL DEFAULT FALSE, + overdue_hours INT DEFAULT 0, + template_id BIGINT, + version INT NOT NULL DEFAULT 1, + tenant_id BIGINT DEFAULT 0, + is_deleted INT NOT NULL DEFAULT 0, + create_by VARCHAR(64), + create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + update_by VARCHAR(64), + update_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + remark VARCHAR(500) +); + +COMMENT ON TABLE sys_progress_note IS '病程记录'; +COMMENT ON COLUMN sys_progress_note.note_type IS '类型(1首次 2日常 3上级查房 4疑难讨论 5阶段小结 6抢救 7转科 8接收 9出院 10死亡)'; +COMMENT ON COLUMN sys_progress_note.sign_status IS '签名状态(0未签 1已签)'; +COMMENT ON COLUMN sys_progress_note.is_overdue IS '是否超时'; + +CREATE INDEX idx_pn_encounter ON sys_progress_note(encounter_id); +CREATE INDEX idx_pn_patient ON sys_progress_note(patient_id); +CREATE INDEX idx_pn_type ON sys_progress_note(note_type); +CREATE INDEX idx_pn_deadline ON sys_progress_note(deadline); + +CREATE TABLE IF NOT EXISTS sys_progress_note_reminder ( + id BIGSERIAL PRIMARY KEY, + encounter_id BIGINT NOT NULL, + patient_name VARCHAR(50) NOT NULL, + note_type INT NOT NULL, + deadline TIMESTAMP NOT NULL, + status INT NOT NULL DEFAULT 0, + remind_user_id BIGINT, + remind_user_name VARCHAR(50), + created_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP +); + +COMMENT ON TABLE sys_progress_note_reminder IS '病程记录提醒'; +COMMENT ON COLUMN sys_progress_note_reminder.status IS '状态(0待书写 1已书写 2已超时 3已提醒)'; + +CREATE INDEX idx_pnr_encounter ON sys_progress_note_reminder(encounter_id); +CREATE INDEX idx_pnr_status ON sys_progress_note_reminder(status); diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V17__hospital_infection_enhancement.sql b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V17__hospital_infection_enhancement.sql new file mode 100644 index 000000000..ea4fde827 --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V17__hospital_infection_enhancement.sql @@ -0,0 +1,132 @@ +-- V17: 院感管理增强模块 +-- 补全: 暴发预警、目标性监测、手卫生监测、多重耐药菌、环境卫生学监测 + +-- 1. 暴发预警表 +CREATE TABLE IF NOT EXISTS hir_outbreak_warning ( + id BIGSERIAL PRIMARY KEY, + department_id BIGINT NOT NULL, + department_name VARCHAR(100) NOT NULL, + infection_type VARCHAR(100) NOT NULL, + case_count INT NOT NULL DEFAULT 0, + warning_level VARCHAR(20) NOT NULL DEFAULT 'YELLOW', + time_range_days INT NOT NULL DEFAULT 7, + threshold_count INT NOT NULL DEFAULT 3, + status INT NOT NULL DEFAULT 0, + handle_user_id BIGINT, + handle_user_name VARCHAR(50), + handle_time TIMESTAMP, + handle_result TEXT, + tenant_id BIGINT DEFAULT 0, + is_deleted INT NOT NULL DEFAULT 0, + create_by VARCHAR(64), + create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + update_by VARCHAR(64), + update_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP +); +COMMENT ON TABLE hir_outbreak_warning IS '院感暴发预警'; +COMMENT ON COLUMN hir_outbreak_warning.warning_level IS '预警级别(YELLOW/RED)'; +COMMENT ON COLUMN hir_outbreak_warning.status IS '状态(0待处理 1处理中 2已处理 3已排除)'; + +-- 2. 目标性监测表 +CREATE TABLE IF NOT EXISTS hir_targeted_surveillance ( + id BIGSERIAL PRIMARY KEY, + surveillance_type INT NOT NULL, + department_id BIGINT NOT NULL, + department_name VARCHAR(100) NOT NULL, + monitor_object VARCHAR(200) NOT NULL, + monitor_item VARCHAR(200), + start_date DATE NOT NULL, + end_date DATE, + total_cases INT NOT NULL DEFAULT 0, + infection_cases INT NOT NULL DEFAULT 0, + infection_rate DECIMAL(5,2) DEFAULT 0, + status INT NOT NULL DEFAULT 0, + report_content TEXT, + tenant_id BIGINT DEFAULT 0, + is_deleted INT NOT NULL DEFAULT 0, + create_by VARCHAR(64), + create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + update_by VARCHAR(64), + update_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP +); +COMMENT ON TABLE hir_targeted_surveillance IS '目标性监测'; +COMMENT ON COLUMN hir_targeted_surveillance.surveillance_type IS '监测类型(1ICU 2手术部位 3导管相关 4其他)'; + +-- 3. 手卫生监测表 +CREATE TABLE IF NOT EXISTS hir_hand_hygiene ( + id BIGSERIAL PRIMARY KEY, + department_id BIGINT NOT NULL, + department_name VARCHAR(100) NOT NULL, + monitor_date DATE NOT NULL, + observe_count INT NOT NULL DEFAULT 0, + comply_count INT NOT NULL DEFAULT 0, + comply_rate DECIMAL(5,2) DEFAULT 0, + observer_name VARCHAR(50), + remarks TEXT, + tenant_id BIGINT DEFAULT 0, + is_deleted INT NOT NULL DEFAULT 0, + create_by VARCHAR(64), + create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + update_by VARCHAR(64), + update_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP +); +COMMENT ON TABLE hir_hand_hygiene IS '手卫生依从性监测'; + +-- 4. 多重耐药菌表 +CREATE TABLE IF NOT EXISTS hir_multi_drug_resistant ( + id BIGSERIAL PRIMARY KEY, + patient_id BIGINT NOT NULL, + patient_name VARCHAR(50) NOT NULL, + encounter_id BIGINT, + department_id BIGINT NOT NULL, + department_name VARCHAR(100) NOT NULL, + bacteria_name VARCHAR(200) NOT NULL, + resistance_type VARCHAR(200) NOT NULL, + specimen_type VARCHAR(50), + specimen_date DATE, + report_date DATE NOT NULL, + isolation_status INT NOT NULL DEFAULT 0, + isolation_start_date DATE, + isolation_end_date DATE, + treatment_plan TEXT, + outcome VARCHAR(50), + status INT NOT NULL DEFAULT 0, + tenant_id BIGINT DEFAULT 0, + is_deleted INT NOT NULL DEFAULT 0, + create_by VARCHAR(64), + create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + update_by VARCHAR(64), + update_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP +); +COMMENT ON TABLE hir_multi_drug_resistant IS '多重耐药菌管理'; +COMMENT ON COLUMN hir_multi_drug_resistant.isolation_status IS '隔离状态(0未隔离 1已隔离 2解除隔离)'; + +-- 5. 环境卫生学监测表 +CREATE TABLE IF NOT EXISTS hir_environmental_monitor ( + id BIGSERIAL PRIMARY KEY, + department_id BIGINT NOT NULL, + department_name VARCHAR(100) NOT NULL, + monitor_type VARCHAR(50) NOT NULL, + monitor_item VARCHAR(200) NOT NULL, + monitor_date DATE NOT NULL, + standard_value VARCHAR(100), + actual_value VARCHAR(100), + result VARCHAR(20) NOT NULL, + tester_name VARCHAR(50), + remarks TEXT, + tenant_id BIGINT DEFAULT 0, + is_deleted INT NOT NULL DEFAULT 0, + create_by VARCHAR(64), + create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + update_by VARCHAR(64), + update_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP +); +COMMENT ON TABLE hir_environmental_monitor IS '环境卫生学监测'; +COMMENT ON COLUMN hir_environmental_monitor.monitor_type IS '监测类型(1空气 2物表 3手 4消毒液 5无菌物品)'; +COMMENT ON COLUMN hir_environmental_monitor.result IS '结果(合格/不合格)'; + +CREATE INDEX idx_outbreak_dept ON hir_outbreak_warning(department_id); +CREATE INDEX idx_surveillance_type ON hir_targeted_surveillance(surveillance_type); +CREATE INDEX idx_hand_hygiene_date ON hir_hand_hygiene(monitor_date); +CREATE INDEX idx_mdr_patient ON hir_multi_drug_resistant(patient_id); +CREATE INDEX idx_env_dept ON hir_environmental_monitor(department_id); diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/domain/InformedConsent.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/domain/InformedConsent.java new file mode 100644 index 000000000..cd5240a92 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/domain/InformedConsent.java @@ -0,0 +1,136 @@ +package com.healthlink.his.document.domain; + +import com.baomidou.mybatisplus.annotation.*; +import com.core.common.core.domain.HisBaseEntity; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 知情同意书实体类 + * 依据: 《医疗纠纷预防和处理条例》 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("sys_informed_consent") +public class InformedConsent extends HisBaseEntity { + + @TableId(value = "id", type = IdType.ASSIGN_ID) + private Long id; + + /** 就诊ID */ + @TableField("encounter_id") + private Long encounterId; + + /** 患者ID */ + @TableField("patient_id") + private Long patientId; + + /** 患者姓名 */ + @TableField("patient_name") + private String patientName; + + /** 类型(1手术 2麻醉 3输血 4特殊检查 5特殊治疗 6病危 7自费) */ + @TableField("consent_type") + private Integer consentType; + + /** 关联手术ID */ + @TableField("related_surgery_id") + private Long relatedSurgeryId; + + /** 关联医嘱ID */ + @TableField("related_advice_id") + private Long relatedAdviceId; + + /** 疾病诊断 */ + @TableField("diagnosis") + private String diagnosis; + + /** 拟实施手术/操作名称 */ + @TableField("procedure_name") + private String procedureName; + + /** 手术/操作目的 */ + @TableField("procedure_purpose") + private String procedurePurpose; + + /** 手术/操作方式 */ + @TableField("procedure_method") + private String procedureMethod; + + /** 预期效果 */ + @TableField("expected_outcome") + private String expectedOutcome; + + /** 可能出现的风险和并发症 */ + @TableField("risks_and_complications") + private String risksAndComplications; + + /** 替代方案及其利弊 */ + @TableField("alternative_plans") + private String alternativePlans; + + /** 不接受治疗的后果 */ + @TableField("consequences_of_refusal") + private String consequencesOfRefusal; + + /** 其他需要说明的事项 */ + @TableField("other_notes") + private String otherNotes; + + /** 签署医生ID */ + @TableField("doctor_user_id") + private Long doctorUserId; + + /** 签署医生姓名 */ + @TableField("doctor_name") + private String doctorName; + + /** 医生签名时间 */ + @TableField("doctor_sign_time") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date doctorSignTime; + + /** 医生签名图片(base64) */ + @TableField("doctor_sign_image") + private String doctorSignImage; + + /** 患者签名状态(0未签 1已签 2拒绝) */ + @TableField("patient_sign_status") + private Integer patientSignStatus; + + /** 患者签名时间 */ + @TableField("patient_sign_time") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date patientSignTime; + + /** 患者签名图片(base64) */ + @TableField("patient_sign_image") + private String patientSignImage; + + /** 代理人姓名 */ + @TableField("guardian_name") + private String guardianName; + + /** 代理人与患者关系 */ + @TableField("guardian_relation") + private String guardianRelation; + + /** 见证人姓名 */ + @TableField("witness_name") + private String witnessName; + + /** 拒绝原因 */ + @TableField("reject_reason") + private String rejectReason; + + /** 状态(0草稿 1待患者签名 2已完成 3已归档 4已作废) */ + @TableField("status") + private Integer status; + + /** 版本号 */ + @TableField("version") + private Integer version; +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/domain/ProgressNote.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/domain/ProgressNote.java new file mode 100644 index 000000000..60e8e8150 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/domain/ProgressNote.java @@ -0,0 +1,92 @@ +package com.healthlink.his.document.domain; + +import com.baomidou.mybatisplus.annotation.*; +import com.core.common.core.domain.HisBaseEntity; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 病程记录实体类 + * 依据: 《病历书写基本规范》 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("sys_progress_note") +public class ProgressNote extends HisBaseEntity { + + @TableId(value = "id", type = IdType.ASSIGN_ID) + private Long id; + + /** 就诊ID */ + @TableField("encounter_id") + private Long encounterId; + + /** 患者ID */ + @TableField("patient_id") + private Long patientId; + + /** 患者姓名 */ + @TableField("patient_name") + private String patientName; + + /** 记录类型(1首次 2日常 3上级查房 4疑难讨论 5阶段小结 6抢救 7转科 8接收 9出院 10死亡) */ + @TableField("note_type") + private Integer noteType; + + /** 记录内容(结构化) */ + @TableField("note_content") + private String noteContent; + + /** 书写人ID */ + @TableField("author_user_id") + private Long authorUserId; + + /** 书写人姓名 */ + @TableField("author_name") + private String authorName; + + /** 书写人职称 */ + @TableField("author_title") + private String authorTitle; + + /** 审核人ID */ + @TableField("review_user_id") + private Long reviewUserId; + + /** 审核人姓名 */ + @TableField("review_user_name") + private String reviewUserName; + + /** 签名状态(0未签 1已签) */ + @TableField("sign_status") + private Integer signStatus; + + /** 签名时间 */ + @TableField("sign_time") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date signTime; + + /** 时限要求 */ + @TableField("deadline") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date deadline; + + /** 是否超时 */ + @TableField("is_overdue") + private Boolean isOverdue; + + /** 超时小时数 */ + @TableField("overdue_hours") + private Integer overdueHours; + + /** 使用的模板ID */ + @TableField("template_id") + private Long templateId; + + /** 版本号 */ + @TableField("version") + private Integer version; +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/domain/ProgressNoteReminder.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/domain/ProgressNoteReminder.java new file mode 100644 index 000000000..f94d51caf --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/domain/ProgressNoteReminder.java @@ -0,0 +1,55 @@ +package com.healthlink.his.document.domain; + +import com.baomidou.mybatisplus.annotation.*; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 病程记录提醒实体类 + */ +@Data +@TableName("sys_progress_note_reminder") +public class ProgressNoteReminder implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.ASSIGN_ID) + private Long id; + + /** 就诊ID */ + @TableField("encounter_id") + private Long encounterId; + + /** 患者姓名 */ + @TableField("patient_name") + private String patientName; + + /** 记录类型 */ + @TableField("note_type") + private Integer noteType; + + /** 截止时间 */ + @TableField("deadline") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date deadline; + + /** 状态(0待书写 1已书写 2已超时 3已提醒) */ + @TableField("status") + private Integer status; + + /** 提醒对象ID */ + @TableField("remind_user_id") + private Long remindUserId; + + /** 提醒对象姓名 */ + @TableField("remind_user_name") + private String remindUserName; + + /** 创建时间 */ + @TableField("created_time") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createdTime; +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/mapper/InformedConsentMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/mapper/InformedConsentMapper.java new file mode 100644 index 000000000..889b192d4 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/mapper/InformedConsentMapper.java @@ -0,0 +1,12 @@ +package com.healthlink.his.document.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.healthlink.his.document.domain.InformedConsent; +import org.apache.ibatis.annotations.Mapper; + +/** + * 知情同意书Mapper接口 + */ +@Mapper +public interface InformedConsentMapper extends BaseMapper { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/mapper/ProgressNoteMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/mapper/ProgressNoteMapper.java new file mode 100644 index 000000000..b9bb5e1d3 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/mapper/ProgressNoteMapper.java @@ -0,0 +1,9 @@ +package com.healthlink.his.document.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.healthlink.his.document.domain.ProgressNote; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface ProgressNoteMapper extends BaseMapper { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/mapper/ProgressNoteReminderMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/mapper/ProgressNoteReminderMapper.java new file mode 100644 index 000000000..127faf553 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/mapper/ProgressNoteReminderMapper.java @@ -0,0 +1,9 @@ +package com.healthlink.his.document.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.healthlink.his.document.domain.ProgressNoteReminder; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface ProgressNoteReminderMapper extends BaseMapper { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/IInformedConsentService.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/IInformedConsentService.java new file mode 100644 index 000000000..ea0d7ef9f --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/IInformedConsentService.java @@ -0,0 +1,10 @@ +package com.healthlink.his.document.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.healthlink.his.document.domain.InformedConsent; + +/** + * 知情同意书Service接口 + */ +public interface IInformedConsentService extends IService { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/IProgressNoteReminderService.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/IProgressNoteReminderService.java new file mode 100644 index 000000000..08ccb26ba --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/IProgressNoteReminderService.java @@ -0,0 +1,7 @@ +package com.healthlink.his.document.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.healthlink.his.document.domain.ProgressNoteReminder; + +public interface IProgressNoteReminderService extends IService { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/IProgressNoteService.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/IProgressNoteService.java new file mode 100644 index 000000000..613471786 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/IProgressNoteService.java @@ -0,0 +1,7 @@ +package com.healthlink.his.document.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.healthlink.his.document.domain.ProgressNote; + +public interface IProgressNoteService extends IService { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/impl/InformedConsentServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/impl/InformedConsentServiceImpl.java new file mode 100644 index 000000000..5eda0c935 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/impl/InformedConsentServiceImpl.java @@ -0,0 +1,15 @@ +package com.healthlink.his.document.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.healthlink.his.document.domain.InformedConsent; +import com.healthlink.his.document.mapper.InformedConsentMapper; +import com.healthlink.his.document.service.IInformedConsentService; +import org.springframework.stereotype.Service; + +/** + * 知情同意书Service实现 + */ +@Service +public class InformedConsentServiceImpl extends ServiceImpl + implements IInformedConsentService { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/impl/ProgressNoteReminderServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/impl/ProgressNoteReminderServiceImpl.java new file mode 100644 index 000000000..dd73c0e39 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/impl/ProgressNoteReminderServiceImpl.java @@ -0,0 +1,12 @@ +package com.healthlink.his.document.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.healthlink.his.document.domain.ProgressNoteReminder; +import com.healthlink.his.document.mapper.ProgressNoteReminderMapper; +import com.healthlink.his.document.service.IProgressNoteReminderService; +import org.springframework.stereotype.Service; + +@Service +public class ProgressNoteReminderServiceImpl extends ServiceImpl + implements IProgressNoteReminderService { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/impl/ProgressNoteServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/impl/ProgressNoteServiceImpl.java new file mode 100644 index 000000000..c13a559f5 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/impl/ProgressNoteServiceImpl.java @@ -0,0 +1,12 @@ +package com.healthlink.his.document.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.healthlink.his.document.domain.ProgressNote; +import com.healthlink.his.document.mapper.ProgressNoteMapper; +import com.healthlink.his.document.service.IProgressNoteService; +import org.springframework.stereotype.Service; + +@Service +public class ProgressNoteServiceImpl extends ServiceImpl + implements IProgressNoteService { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/domain/EnvironmentalMonitor.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/domain/EnvironmentalMonitor.java new file mode 100644 index 000000000..e05ca42e2 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/domain/EnvironmentalMonitor.java @@ -0,0 +1,37 @@ +package com.healthlink.his.infection.domain; + +import com.baomidou.mybatisplus.annotation.*; +import com.core.common.core.domain.HisBaseEntity; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; +import java.util.Date; + +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("hir_environmental_monitor") +public class EnvironmentalMonitor extends HisBaseEntity { + @TableId(value = "id", type = IdType.ASSIGN_ID) + private Long id; + @TableField("department_id") + private Long departmentId; + @TableField("department_name") + private String departmentName; + @TableField("monitor_type") + private String monitorType; + @TableField("monitor_item") + private String monitorItem; + @TableField("monitor_date") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date monitorDate; + @TableField("standard_value") + private String standardValue; + @TableField("actual_value") + private String actualValue; + @TableField("result") + private String result; + @TableField("tester_name") + private String testerName; + @TableField("remarks") + private String remarks; +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/domain/HandHygiene.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/domain/HandHygiene.java new file mode 100644 index 000000000..efe01b130 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/domain/HandHygiene.java @@ -0,0 +1,34 @@ +package com.healthlink.his.infection.domain; + +import com.baomidou.mybatisplus.annotation.*; +import com.core.common.core.domain.HisBaseEntity; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; +import java.math.BigDecimal; +import java.util.Date; + +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("hir_hand_hygiene") +public class HandHygiene extends HisBaseEntity { + @TableId(value = "id", type = IdType.ASSIGN_ID) + private Long id; + @TableField("department_id") + private Long departmentId; + @TableField("department_name") + private String departmentName; + @TableField("monitor_date") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date monitorDate; + @TableField("observe_count") + private Integer observeCount; + @TableField("comply_count") + private Integer complyCount; + @TableField("comply_rate") + private BigDecimal complyRate; + @TableField("observer_name") + private String observerName; + @TableField("remarks") + private String remarks; +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/domain/MultiDrugResistant.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/domain/MultiDrugResistant.java new file mode 100644 index 000000000..c9df64f33 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/domain/MultiDrugResistant.java @@ -0,0 +1,52 @@ +package com.healthlink.his.infection.domain; + +import com.baomidou.mybatisplus.annotation.*; +import com.core.common.core.domain.HisBaseEntity; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; +import java.util.Date; + +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("hir_multi_drug_resistant") +public class MultiDrugResistant extends HisBaseEntity { + @TableId(value = "id", type = IdType.ASSIGN_ID) + private Long id; + @TableField("patient_id") + private Long patientId; + @TableField("patient_name") + private String patientName; + @TableField("encounter_id") + private Long encounterId; + @TableField("department_id") + private Long departmentId; + @TableField("department_name") + private String departmentName; + @TableField("bacteria_name") + private String bacteriaName; + @TableField("resistance_type") + private String resistanceType; + @TableField("specimen_type") + private String specimenType; + @TableField("specimen_date") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date specimenDate; + @TableField("report_date") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date reportDate; + @TableField("isolation_status") + private Integer isolationStatus; + @TableField("isolation_start_date") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date isolationStartDate; + @TableField("isolation_end_date") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date isolationEndDate; + @TableField("treatment_plan") + private String treatmentPlan; + @TableField("outcome") + private String outcome; + @TableField("status") + private Integer status; +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/domain/OutbreakWarning.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/domain/OutbreakWarning.java new file mode 100644 index 000000000..a66a76f7f --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/domain/OutbreakWarning.java @@ -0,0 +1,41 @@ +package com.healthlink.his.infection.domain; + +import com.baomidou.mybatisplus.annotation.*; +import com.core.common.core.domain.HisBaseEntity; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; +import java.util.Date; + +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("hir_outbreak_warning") +public class OutbreakWarning extends HisBaseEntity { + @TableId(value = "id", type = IdType.ASSIGN_ID) + private Long id; + @TableField("department_id") + private Long departmentId; + @TableField("department_name") + private String departmentName; + @TableField("infection_type") + private String infectionType; + @TableField("case_count") + private Integer caseCount; + @TableField("warning_level") + private String warningLevel; + @TableField("time_range_days") + private Integer timeRangeDays; + @TableField("threshold_count") + private Integer thresholdCount; + @TableField("status") + private Integer status; + @TableField("handle_user_id") + private Long handleUserId; + @TableField("handle_user_name") + private String handleUserName; + @TableField("handle_time") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date handleTime; + @TableField("handle_result") + private String handleResult; +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/domain/TargetedSurveillance.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/domain/TargetedSurveillance.java new file mode 100644 index 000000000..db8ce9d13 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/domain/TargetedSurveillance.java @@ -0,0 +1,43 @@ +package com.healthlink.his.infection.domain; + +import com.baomidou.mybatisplus.annotation.*; +import com.core.common.core.domain.HisBaseEntity; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; +import java.math.BigDecimal; +import java.util.Date; + +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("hir_targeted_surveillance") +public class TargetedSurveillance extends HisBaseEntity { + @TableId(value = "id", type = IdType.ASSIGN_ID) + private Long id; + @TableField("surveillance_type") + private Integer surveillanceType; + @TableField("department_id") + private Long departmentId; + @TableField("department_name") + private String departmentName; + @TableField("monitor_object") + private String monitorObject; + @TableField("monitor_item") + private String monitorItem; + @TableField("start_date") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date startDate; + @TableField("end_date") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date endDate; + @TableField("total_cases") + private Integer totalCases; + @TableField("infection_cases") + private Integer infectionCases; + @TableField("infection_rate") + private BigDecimal infectionRate; + @TableField("status") + private Integer status; + @TableField("report_content") + private String reportContent; +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/mapper/EnvironmentalMonitorMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/mapper/EnvironmentalMonitorMapper.java new file mode 100644 index 000000000..4b562824a --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/mapper/EnvironmentalMonitorMapper.java @@ -0,0 +1,9 @@ +package com.healthlink.his.infection.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.healthlink.his.infection.domain.EnvironmentalMonitor; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface EnvironmentalMonitorMapper extends BaseMapper { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/mapper/HandHygieneMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/mapper/HandHygieneMapper.java new file mode 100644 index 000000000..35becf009 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/mapper/HandHygieneMapper.java @@ -0,0 +1,9 @@ +package com.healthlink.his.infection.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.healthlink.his.infection.domain.HandHygiene; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface HandHygieneMapper extends BaseMapper { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/mapper/MultiDrugResistantMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/mapper/MultiDrugResistantMapper.java new file mode 100644 index 000000000..e30d01bca --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/mapper/MultiDrugResistantMapper.java @@ -0,0 +1,9 @@ +package com.healthlink.his.infection.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.healthlink.his.infection.domain.MultiDrugResistant; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface MultiDrugResistantMapper extends BaseMapper { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/mapper/OutbreakWarningMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/mapper/OutbreakWarningMapper.java new file mode 100644 index 000000000..8cc8f4c19 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/mapper/OutbreakWarningMapper.java @@ -0,0 +1,9 @@ +package com.healthlink.his.infection.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.healthlink.his.infection.domain.OutbreakWarning; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface OutbreakWarningMapper extends BaseMapper { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/mapper/TargetedSurveillanceMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/mapper/TargetedSurveillanceMapper.java new file mode 100644 index 000000000..895684fd5 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/mapper/TargetedSurveillanceMapper.java @@ -0,0 +1,9 @@ +package com.healthlink.his.infection.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.healthlink.his.infection.domain.TargetedSurveillance; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface TargetedSurveillanceMapper extends BaseMapper { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/IEnvironmentalMonitorService.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/IEnvironmentalMonitorService.java new file mode 100644 index 000000000..4fedcc823 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/IEnvironmentalMonitorService.java @@ -0,0 +1,7 @@ +package com.healthlink.his.infection.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.healthlink.his.infection.domain.EnvironmentalMonitor; + +public interface IEnvironmentalMonitorService extends IService { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/IHandHygieneService.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/IHandHygieneService.java new file mode 100644 index 000000000..45023f0c9 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/IHandHygieneService.java @@ -0,0 +1,7 @@ +package com.healthlink.his.infection.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.healthlink.his.infection.domain.HandHygiene; + +public interface IHandHygieneService extends IService { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/IMultiDrugResistantService.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/IMultiDrugResistantService.java new file mode 100644 index 000000000..7e30887bc --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/IMultiDrugResistantService.java @@ -0,0 +1,7 @@ +package com.healthlink.his.infection.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.healthlink.his.infection.domain.MultiDrugResistant; + +public interface IMultiDrugResistantService extends IService { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/IOutbreakWarningService.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/IOutbreakWarningService.java new file mode 100644 index 000000000..224e7acc1 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/IOutbreakWarningService.java @@ -0,0 +1,7 @@ +package com.healthlink.his.infection.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.healthlink.his.infection.domain.OutbreakWarning; + +public interface IOutbreakWarningService extends IService { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/ITargetedSurveillanceService.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/ITargetedSurveillanceService.java new file mode 100644 index 000000000..5d0a41265 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/ITargetedSurveillanceService.java @@ -0,0 +1,7 @@ +package com.healthlink.his.infection.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.healthlink.his.infection.domain.TargetedSurveillance; + +public interface ITargetedSurveillanceService extends IService { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/EnvironmentalMonitorServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/EnvironmentalMonitorServiceImpl.java new file mode 100644 index 000000000..ab7d26c5e --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/EnvironmentalMonitorServiceImpl.java @@ -0,0 +1,11 @@ +package com.healthlink.his.infection.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.healthlink.his.infection.domain.EnvironmentalMonitor; +import com.healthlink.his.infection.mapper.EnvironmentalMonitorMapper; +import com.healthlink.his.infection.service.IEnvironmentalMonitorService; +import org.springframework.stereotype.Service; + +@Service +public class EnvironmentalMonitorServiceImpl extends ServiceImpl implements IEnvironmentalMonitorService { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/HandHygieneServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/HandHygieneServiceImpl.java new file mode 100644 index 000000000..9cb483ba4 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/HandHygieneServiceImpl.java @@ -0,0 +1,11 @@ +package com.healthlink.his.infection.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.healthlink.his.infection.domain.HandHygiene; +import com.healthlink.his.infection.mapper.HandHygieneMapper; +import com.healthlink.his.infection.service.IHandHygieneService; +import org.springframework.stereotype.Service; + +@Service +public class HandHygieneServiceImpl extends ServiceImpl implements IHandHygieneService { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/MultiDrugResistantServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/MultiDrugResistantServiceImpl.java new file mode 100644 index 000000000..5b0e6f1c7 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/MultiDrugResistantServiceImpl.java @@ -0,0 +1,11 @@ +package com.healthlink.his.infection.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.healthlink.his.infection.domain.MultiDrugResistant; +import com.healthlink.his.infection.mapper.MultiDrugResistantMapper; +import com.healthlink.his.infection.service.IMultiDrugResistantService; +import org.springframework.stereotype.Service; + +@Service +public class MultiDrugResistantServiceImpl extends ServiceImpl implements IMultiDrugResistantService { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/OutbreakWarningServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/OutbreakWarningServiceImpl.java new file mode 100644 index 000000000..c8c6d3ff8 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/OutbreakWarningServiceImpl.java @@ -0,0 +1,11 @@ +package com.healthlink.his.infection.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.healthlink.his.infection.domain.OutbreakWarning; +import com.healthlink.his.infection.mapper.OutbreakWarningMapper; +import com.healthlink.his.infection.service.IOutbreakWarningService; +import org.springframework.stereotype.Service; + +@Service +public class OutbreakWarningServiceImpl extends ServiceImpl implements IOutbreakWarningService { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/TargetedSurveillanceServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/TargetedSurveillanceServiceImpl.java new file mode 100644 index 000000000..c06b42272 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/infection/service/impl/TargetedSurveillanceServiceImpl.java @@ -0,0 +1,11 @@ +package com.healthlink.his.infection.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.healthlink.his.infection.domain.TargetedSurveillance; +import com.healthlink.his.infection.mapper.TargetedSurveillanceMapper; +import com.healthlink.his.infection.service.ITargetedSurveillanceService; +import org.springframework.stereotype.Service; + +@Service +public class TargetedSurveillanceServiceImpl extends ServiceImpl implements ITargetedSurveillanceService { +} diff --git a/healthlink-his-ui/src/views/infectionenhanced/api.js b/healthlink-his-ui/src/views/infectionenhanced/api.js new file mode 100644 index 000000000..b33283a7f --- /dev/null +++ b/healthlink-his-ui/src/views/infectionenhanced/api.js @@ -0,0 +1,27 @@ +import request from '@/utils/request' + +// 暴发预警 +export function getOutbreakPage(params) { return request({ url: '/infection-enhanced/outbreak/page', method: 'get', params }) } +export function addOutbreak(data) { return request({ url: '/infection-enhanced/outbreak/add', method: 'post', data }) } +export function handleOutbreak(data) { return request({ url: '/infection-enhanced/outbreak/handle', method: 'post', data }) } +export function excludeOutbreak(id, reason) { return request({ url: '/infection-enhanced/outbreak/exclude', method: 'post', params: { id, reason } }) } + +// 目标性监测 +export function getSurveillancePage(params) { return request({ url: '/infection-enhanced/surveillance/page', method: 'get', params }) } +export function addSurveillance(data) { return request({ url: '/infection-enhanced/surveillance/add', method: 'post', data }) } + +// 手卫生 +export function getHandHygienePage(params) { return request({ url: '/infection-enhanced/hand-hygiene/page', method: 'get', params }) } +export function addHandHygiene(data) { return request({ url: '/infection-enhanced/hand-hygiene/add', method: 'post', data }) } +export function getHandHygieneStats(params) { return request({ url: '/infection-enhanced/hand-hygiene/stats', method: 'get', params }) } + +// 多重耐药菌 +export function getMdrPage(params) { return request({ url: '/infection-enhanced/mdr/page', method: 'get', params }) } +export function addMdr(data) { return request({ url: '/infection-enhanced/mdr/add', method: 'post', data }) } +export function isolateMdr(data) { return request({ url: '/infection-enhanced/mdr/isolate', method: 'post', data }) } +export function releaseMdr(id) { return request({ url: '/infection-enhanced/mdr/release', method: 'post', params: { id } }) } + +// 环境监测 +export function getEnvMonitorPage(params) { return request({ url: '/infection-enhanced/env-monitor/page', method: 'get', params }) } +export function addEnvMonitor(data) { return request({ url: '/infection-enhanced/env-monitor/add', method: 'post', data }) } +export function getEnvMonitorStats() { return request({ url: '/infection-enhanced/env-monitor/stats', method: 'get' }) } diff --git a/healthlink-his-ui/src/views/infectionenhanced/index.vue b/healthlink-his-ui/src/views/infectionenhanced/index.vue new file mode 100644 index 000000000..22c79b36a --- /dev/null +++ b/healthlink-his-ui/src/views/infectionenhanced/index.vue @@ -0,0 +1,336 @@ + + + + + diff --git a/healthlink-his-ui/src/views/informedconsent/api.js b/healthlink-his-ui/src/views/informedconsent/api.js new file mode 100644 index 000000000..e4af80794 --- /dev/null +++ b/healthlink-his-ui/src/views/informedconsent/api.js @@ -0,0 +1,45 @@ +import request from '@/utils/request' + +export function getConsentPage(params) { + return request({ url: '/informed-consent/page', method: 'get', params }) +} + +export function getConsentDetail(id) { + return request({ url: '/informed-consent/detail', method: 'get', params: { id } }) +} + +export function addConsent(data) { + return request({ url: '/informed-consent/add', method: 'post', data }) +} + +export function updateConsent(data) { + return request({ url: '/informed-consent/update', method: 'put', data }) +} + +export function deleteConsent(id) { + return request({ url: '/informed-consent/delete', method: 'delete', params: { id } }) +} + +export function doctorSign(data) { + return request({ url: '/informed-consent/doctor-sign', method: 'post', data }) +} + +export function patientSign(data) { + return request({ url: '/informed-consent/patient-sign', method: 'post', data }) +} + +export function patientReject(data) { + return request({ url: '/informed-consent/patient-reject', method: 'post', data }) +} + +export function archiveConsent(id) { + return request({ url: '/informed-consent/archive', method: 'post', params: { id } }) +} + +export function voidConsent(id, reason) { + return request({ url: '/informed-consent/void', method: 'post', params: { id, reason } }) +} + +export function getConsentStats(encounterId) { + return request({ url: '/informed-consent/stats', method: 'get', params: { encounterId } }) +} diff --git a/healthlink-his-ui/src/views/informedconsent/index.vue b/healthlink-his-ui/src/views/informedconsent/index.vue new file mode 100644 index 000000000..5f7b39899 --- /dev/null +++ b/healthlink-his-ui/src/views/informedconsent/index.vue @@ -0,0 +1,374 @@ + + + + + diff --git a/healthlink-his-ui/src/views/preopmanage/discussion/components/api.js b/healthlink-his-ui/src/views/preopmanage/discussion/components/api.js new file mode 100644 index 000000000..0212c0fff --- /dev/null +++ b/healthlink-his-ui/src/views/preopmanage/discussion/components/api.js @@ -0,0 +1,9 @@ +import request from '@/utils/request' +export function getDiscussionPage(params) { return request({ url: '/preop-discussion/page', method: 'get', params }) } +export function getDiscussionDetail(id) { return request({ url: '/preop-discussion/detail', method: 'get', params: { id } }) } +export function addDiscussion(data) { return request({ url: '/preop-discussion/add', method: 'post', data }) } +export function submitDiscussion(id) { return request({ url: '/preop-discussion/submit', method: 'put', params: { id } }) } +export function signDiscussion(discussionId, userId, signImage) { return request({ url: '/preop-discussion/sign', method: 'put', params: { discussionId, userId, signImage } }) } +export function reviewDiscussion(id, action, remark) { return request({ url: '/preop-discussion/review', method: 'put', params: { id, action, remark } }) } +export function checkRequired(surgeryId, surgeryLevel) { return request({ url: '/preop-discussion/check-required', method: 'get', params: { surgeryId, surgeryLevel } }) } +export function getStatistics() { return request({ url: '/preop-discussion/statistics', method: 'get' }) } diff --git a/healthlink-his-ui/src/views/preopmanage/discussion/index.vue b/healthlink-his-ui/src/views/preopmanage/discussion/index.vue new file mode 100644 index 000000000..c7b33dc73 --- /dev/null +++ b/healthlink-his-ui/src/views/preopmanage/discussion/index.vue @@ -0,0 +1,235 @@ + + + + + diff --git a/healthlink-his-ui/src/views/progressnotes/api.js b/healthlink-his-ui/src/views/progressnotes/api.js new file mode 100644 index 000000000..61bbadd37 --- /dev/null +++ b/healthlink-his-ui/src/views/progressnotes/api.js @@ -0,0 +1,32 @@ +import request from '@/utils/request' + +export function getNotePage(params) { + return request({ url: '/progress-note/page', method: 'get', params }) +} +export function getNoteDetail(id) { + return request({ url: '/progress-note/detail', method: 'get', params: { id } }) +} +export function addNote(data) { + return request({ url: '/progress-note/add', method: 'post', data }) +} +export function updateNote(data) { + return request({ url: '/progress-note/update', method: 'put', data }) +} +export function deleteNote(id) { + return request({ url: '/progress-note/delete', method: 'delete', params: { id } }) +} +export function signNote(data) { + return request({ url: '/progress-note/sign', method: 'post', data }) +} +export function reviewNote(data) { + return request({ url: '/progress-note/review', method: 'post', data }) +} +export function getMonitor(params) { + return request({ url: '/progress-note/monitor', method: 'get', params }) +} +export function getReminders(params) { + return request({ url: '/progress-note/reminders', method: 'get', params }) +} +export function getNoteStats(encounterId) { + return request({ url: '/progress-note/stats', method: 'get', params: { encounterId } }) +} diff --git a/healthlink-his-ui/src/views/progressnotes/index.vue b/healthlink-his-ui/src/views/progressnotes/index.vue new file mode 100644 index 000000000..2960e9778 --- /dev/null +++ b/healthlink-his-ui/src/views/progressnotes/index.vue @@ -0,0 +1,287 @@ + + + + +