From d0aa4983862c258638dce113e7ea456fabde0c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=8E=E4=BD=97?= Date: Sat, 6 Jun 2026 19:52:12 +0800 Subject: [PATCH] =?UTF-8?q?feat(V24):=20=E9=97=A8=E8=AF=8A=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E5=B7=A5=E4=BD=9C=E7=AB=99=E5=A2=9E=E5=BC=BA+?= =?UTF-8?q?=E9=93=81=E5=BE=8B18(=E7=A6=81=E6=AD=A2=E7=A0=B4=E5=9D=8F?= =?UTF-8?q?=E5=8E=9F=E6=9C=89=E5=8A=9F=E8=83=BD)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit V24 Flyway — 5张新表: - structured_emr_template: 结构化病历模板(入院/日常/出院/会诊) - icd10_diagnosis_code: ICD-10诊断编码库(编码/名称/拼音/五笔) - drug_interaction_rule: 合理用药审核规则(配伍禁忌/相互作用) - discharge_summary: 出院小结(入院诊断/出院诊断/治疗总结) - prescription_intercept_log: 处方前置拦截记录(拦截/强制通过) 新增铁律18: 禁止破坏原有功能 - 修改已有实体前必须对比原始文件 - 新增字段只能追加,不能删除已有字段 - SQL迁移只允许ADD COLUMN - 每次修改必须编译验证 修复: 恢复被覆盖的IDrugInteractionRuleService接口和实现 - 保留原有selectByDrugCode/selectInteractions方法 - 保留原有DrugInteractionRule实体字段 所有模块编译通过 (mvn clean compile -DskipTests) --- MD/specs/IRON_RULES.md | 20 +++ .../OutpatientEnhancedController.java | 161 ++++++++++++++++++ .../migration/V24__outpatient_enhancement.sql | 103 +++++++++++ .../domain/Icd10DiagnosisCode.java | 22 +++ .../mapper/Icd10DiagnosisCodeMapper.java | 9 + .../service/IIcd10DiagnosisCodeService.java | 7 + .../impl/Icd10DiagnosisCodeServiceImpl.java | 11 ++ .../his/document/domain/DischargeSummary.java | 29 ++++ .../mapper/DischargeSummaryMapper.java | 9 + .../service/IDischargeSummaryService.java | 7 + .../impl/DischargeSummaryServiceImpl.java | 11 ++ .../his/emr/domain/StructuredEmrTemplate.java | 22 +++ .../mapper/StructuredEmrTemplateMapper.java | 9 + .../IStructuredEmrTemplateService.java | 7 + .../StructuredEmrTemplateServiceImpl.java | 11 ++ .../domain/PrescriptionInterceptLog.java | 27 +++ .../PrescriptionInterceptLogMapper.java | 9 + .../IPrescriptionInterceptLogService.java | 7 + .../PrescriptionInterceptLogServiceImpl.java | 11 ++ .../service/IDrugInteractionRuleService.java | 15 -- .../impl/DrugInteractionRuleServiceImpl.java | 22 +-- .../src/views/outpatientenhanced/api.js | 11 ++ .../src/views/outpatientenhanced/index.vue | 104 +++++++++++ 23 files changed, 608 insertions(+), 36 deletions(-) create mode 100644 healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/outpatient/controller/OutpatientEnhancedController.java create mode 100644 healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V24__outpatient_enhancement.sql create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/basicmanage/domain/Icd10DiagnosisCode.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/basicmanage/mapper/Icd10DiagnosisCodeMapper.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/basicmanage/service/IIcd10DiagnosisCodeService.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/basicmanage/service/impl/Icd10DiagnosisCodeServiceImpl.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/domain/DischargeSummary.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/mapper/DischargeSummaryMapper.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/IDischargeSummaryService.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/impl/DischargeSummaryServiceImpl.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/emr/domain/StructuredEmrTemplate.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/emr/mapper/StructuredEmrTemplateMapper.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/emr/service/IStructuredEmrTemplateService.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/emr/service/impl/StructuredEmrTemplateServiceImpl.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/prescription/domain/PrescriptionInterceptLog.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/prescription/mapper/PrescriptionInterceptLogMapper.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/prescription/service/IPrescriptionInterceptLogService.java create mode 100644 healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/prescription/service/impl/PrescriptionInterceptLogServiceImpl.java create mode 100644 healthlink-his-ui/src/views/outpatientenhanced/api.js create mode 100644 healthlink-his-ui/src/views/outpatientenhanced/index.vue diff --git a/MD/specs/IRON_RULES.md b/MD/specs/IRON_RULES.md index cd9b97484..3cb140f8f 100644 --- a/MD/specs/IRON_RULES.md +++ b/MD/specs/IRON_RULES.md @@ -524,3 +524,23 @@ npm run lint #### 详细规范 参见 `MD/specs/UI_DESIGN_IRON_RULES.md` + +### 铁律18: 禁止破坏原有功能(绝对铁律) + +**原则**: 完善增加功能和流程时,绝对不能破坏或者让原有功能不能用。 + +**执行要求**: +1. **修改已有实体前必须对比**: 用 `git show HEAD~N:./file.java` 对比原始文件,保留所有原有字段和方法 +2. **新增字段只能追加**: 在实体类末尾追加新字段,不能删除或重命名已有字段 +3. **新增方法只能追加**: 在Service接口末尾追加新方法,不能修改已有方法签名 +4. **SQL迁移只能ADD**: Flyway迁移脚本只允许 `ALTER TABLE ADD COLUMN`,不允许 `DROP COLUMN` 或 `RENAME COLUMN` +5. **Controller新端点**: 新增 `@PostMapping` / `@GetMapping`,不能修改已有端点的路径或参数 +6. **前端新页面**: 新增页面目录,不能修改已有页面的组件结构 +7. **编译必须通过**: 每次修改后必须 `mvn clean compile -DskipTests` 验证 +8. **回归验证**: 修改后检查所有引用该类/方法的文件是否仍能编译 + +**违规判定**: 如果因为本次修改导致原有代码编译失败或运行报错,视为违反铁律18,必须立即回滚修复。 + +**铁律编号**: 18 +**优先级**: P0(绝对) +**适用范围**: 全项目 diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/outpatient/controller/OutpatientEnhancedController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/outpatient/controller/OutpatientEnhancedController.java new file mode 100644 index 000000000..4936b3acf --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/outpatient/controller/OutpatientEnhancedController.java @@ -0,0 +1,161 @@ +package com.healthlink.his.web.outpatient.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.emr.domain.StructuredEmrTemplate; +import com.healthlink.his.emr.service.IStructuredEmrTemplateService; +import com.healthlink.his.basicmanage.domain.Icd10DiagnosisCode; +import com.healthlink.his.basicmanage.service.IIcd10DiagnosisCodeService; +import com.healthlink.his.rationaldrug.domain.DrugInteractionRule; +import com.healthlink.his.rationaldrug.service.IDrugInteractionRuleService; +import com.healthlink.his.document.domain.DischargeSummary; +import com.healthlink.his.document.service.IDischargeSummaryService; +import com.healthlink.his.prescription.domain.PrescriptionInterceptLog; +import com.healthlink.his.prescription.service.IPrescriptionInterceptLogService; +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.*; + +@RestController +@RequestMapping("/outpatient-enhanced") +@Slf4j +@AllArgsConstructor +public class OutpatientEnhancedController { + + private final IStructuredEmrTemplateService templateService; + private final IIcd10DiagnosisCodeService icd10Service; + private final IDrugInteractionRuleService interactionService; + private final IDischargeSummaryService dischargeService; + private final IPrescriptionInterceptLogService interceptService; + + // ==================== 结构化病历模板 ==================== + @GetMapping("/template/page") + public R getTemplatePage( + @RequestParam(value = "templateType", required = false) String type, + @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize", defaultValue = "20") Integer pageSize) { + LambdaQueryWrapper w = new LambdaQueryWrapper<>(); + w.eq(StringUtils.hasText(type), StructuredEmrTemplate::getTemplateType, type) + .eq(StructuredEmrTemplate::getStatus, "ACTIVE") + .orderByDesc(StructuredEmrTemplate::getCreateTime); + return R.ok(templateService.page(new Page<>(pageNo, pageSize), w)); + } + + @PostMapping("/template/add") + @Transactional(rollbackFor = Exception.class) + public R addTemplate(@RequestBody StructuredEmrTemplate template) { + template.setStatus("ACTIVE"); + template.setVersion(1); + template.setCreateTime(new Date()); + templateService.save(template); + return R.ok(template); + } + + // ==================== ICD-10诊断编码 ==================== + @GetMapping("/icd10/search") + public R searchIcd10(@RequestParam String keyword) { + LambdaQueryWrapper w = new LambdaQueryWrapper<>(); + w.eq(Icd10DiagnosisCode::getStatus, "ACTIVE") + .and(q -> q.like(Icd10DiagnosisCode::getCode, keyword) + .or().like(Icd10DiagnosisCode::getName, keyword) + .or().like(Icd10DiagnosisCode::getPinyinCode, keyword)); + w.last("LIMIT 20"); + return R.ok(icd10Service.list(w)); + } + + // ==================== 合理用药审核 ==================== + @GetMapping("/interaction/page") + public R getInteractionPage( + @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize", defaultValue = "20") Integer pageSize) { + LambdaQueryWrapper w = new LambdaQueryWrapper<>(); + w.eq(DrugInteractionRule::getEnabled, "1") + .orderByDesc(DrugInteractionRule::getCreateTime); + return R.ok(interactionService.page(new Page<>(pageNo, pageSize), w)); + } + + @PostMapping("/interaction/add") + @Transactional(rollbackFor = Exception.class) + public R addInteraction(@RequestBody DrugInteractionRule rule) { + rule.setEnabled("1"); + rule.setCreateTime(new Date()); + interactionService.save(rule); + return R.ok(rule); + } + + @PostMapping("/interaction/check") + public R checkInteraction(@RequestBody Map params) { + String drugA = params.get("drugA"); + String drugB = params.get("drugB"); + LambdaQueryWrapper w = new LambdaQueryWrapper<>(); + w.eq(DrugInteractionRule::getEnabled, "1") + .and(q -> q.eq(DrugInteractionRule::getDrugAName, drugA).eq(DrugInteractionRule::getDrugBName, drugB) + .or().eq(DrugInteractionRule::getDrugAName, drugB).eq(DrugInteractionRule::getDrugBName, drugA)); + List rules = interactionService.list(w); + Map result = new HashMap<>(); + result.put("hasInteraction", !rules.isEmpty()); + result.put("rules", rules); + return R.ok(result); + } + + // ==================== 出院小结 ==================== + @GetMapping("/discharge/page") + public R getDischargePage( + @RequestParam(value = "status", required = false) Integer status, + @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize", defaultValue = "20") Integer pageSize) { + LambdaQueryWrapper w = new LambdaQueryWrapper<>(); + w.eq(status != null, DischargeSummary::getStatus, status) + .orderByDesc(DischargeSummary::getCreateTime); + return R.ok(dischargeService.page(new Page<>(pageNo, pageSize), w)); + } + + @PostMapping("/discharge/add") + @Transactional(rollbackFor = Exception.class) + public R addDischarge(@RequestBody DischargeSummary summary) { + summary.setStatus(0); + summary.setCreateTime(new Date()); + dischargeService.save(summary); + return R.ok(summary); + } + + @PostMapping("/discharge/complete") + @Transactional(rollbackFor = Exception.class) + public R completeDischarge(@RequestParam Long id) { + DischargeSummary s = dischargeService.getById(id); + if (s == null) return R.fail("出院小结不存在"); + s.setStatus(1); + s.setUpdateTime(new Date()); + dischargeService.updateById(s); + return R.ok(); + } + + // ==================== 处方前置拦截 ==================== + @GetMapping("/intercept/page") + public R getInterceptPage( + @RequestParam(value = "action", required = false) String action, + @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize", defaultValue = "20") Integer pageSize) { + LambdaQueryWrapper w = new LambdaQueryWrapper<>(); + w.eq(StringUtils.hasText(action), PrescriptionInterceptLog::getAction, action) + .orderByDesc(PrescriptionInterceptLog::getInterceptTime); + return R.ok(interceptService.page(new Page<>(pageNo, pageSize), w)); + } + + @GetMapping("/intercept/stats") + public R getInterceptStats() { + Map stats = new HashMap<>(); + stats.put("total", interceptService.count()); + LambdaQueryWrapper w = new LambdaQueryWrapper<>(); + w.eq(PrescriptionInterceptLog::getAction, "BLOCKED"); + stats.put("blocked", interceptService.count(w)); + w.eq(PrescriptionInterceptLog::getAction, "OVERRIDDEN"); + stats.put("overridden", interceptService.count(w)); + return R.ok(stats); + } +} diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V24__outpatient_enhancement.sql b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V24__outpatient_enhancement.sql new file mode 100644 index 000000000..a3de5158c --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V24__outpatient_enhancement.sql @@ -0,0 +1,103 @@ +-- V24: 门诊医生工作站增强 + +-- 1. 结构化病历模板 +CREATE TABLE IF NOT EXISTS structured_emr_template ( + id BIGSERIAL PRIMARY KEY, + template_name VARCHAR(200) NOT NULL, + template_type VARCHAR(50) NOT NULL, + department_id BIGINT, + department_name VARCHAR(100), + template_json TEXT NOT NULL, + version INT NOT NULL DEFAULT 1, + is_system BOOLEAN DEFAULT FALSE, + status VARCHAR(20) DEFAULT 'ACTIVE', + 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 structured_emr_template IS '结构化病历模板'; +COMMENT ON COLUMN structured_emr_template.template_type IS '类型(admission入院/daily日常/discharge出院/consultation会诊)'; + +-- 2. ICD-10诊断编码库 +CREATE TABLE IF NOT EXISTS icd10_diagnosis_code ( + id BIGSERIAL PRIMARY KEY, + code VARCHAR(20) NOT NULL, + name VARCHAR(200) NOT NULL, + category VARCHAR(100), + parent_code VARCHAR(20), + is_leaf BOOLEAN DEFAULT TRUE, + pinyin_code VARCHAR(200), + wubi_code VARCHAR(200), + status VARCHAR(20) DEFAULT 'ACTIVE' +); +COMMENT ON TABLE icd10_diagnosis_code IS 'ICD-10诊断编码库'; +CREATE UNIQUE INDEX idx_icd10_code ON icd10_diagnosis_code(code); +CREATE INDEX idx_icd10_name ON icd10_diagnosis_code(name); + +-- 3. 合理用药审核规则 +CREATE TABLE IF NOT EXISTS drug_interaction_rule ( + id BIGSERIAL PRIMARY KEY, + drug_a VARCHAR(200) NOT NULL, + drug_b VARCHAR(200), + interaction_type VARCHAR(50) NOT NULL, + severity VARCHAR(20) NOT NULL, + description TEXT, + suggestion TEXT, + status VARCHAR(20) DEFAULT 'ACTIVE', + tenant_id BIGINT DEFAULT 0, + is_deleted INT NOT NULL DEFAULT 0, + create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP +); +COMMENT ON TABLE drug_interaction_rule IS '合理用药审核规则'; +COMMENT ON COLUMN drug_interaction_rule.interaction_type IS '类型(CONTRAINDICATION禁忌/INTERACTION相互作用/DUPLICATE重复/PRESCRIBING处方)'; +COMMENT ON COLUMN drug_interaction_rule.severity IS '严重程度(HIGH/MEDIUM/LOW)'; + +-- 4. 出院小结 +CREATE TABLE IF NOT EXISTS discharge_summary ( + id BIGSERIAL PRIMARY KEY, + encounter_id BIGINT NOT NULL, + patient_id BIGINT NOT NULL, + patient_name VARCHAR(50), + admission_date DATE, + discharge_date DATE, + admission_diagnosis TEXT, + discharge_diagnosis TEXT, + treatment_summary TEXT, + surgery_record TEXT, + discharge_condition VARCHAR(50), + discharge_orders TEXT, + follow_up_instructions TEXT, + doctor_name VARCHAR(50), + doctor_id BIGINT, + 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 discharge_summary IS '出院小结'; +COMMENT ON COLUMN discharge_summary.status IS '状态(0草稿 1已完成 2已归档)'; +CREATE INDEX idx_ds_encounter ON discharge_summary(encounter_id); + +-- 5. 处方前置拦截记录 +CREATE TABLE IF NOT EXISTS prescription_intercept_log ( + id BIGSERIAL PRIMARY KEY, + prescription_id BIGINT, + encounter_id BIGINT, + patient_id BIGINT, + drug_name VARCHAR(200), + intercept_type VARCHAR(50) NOT NULL, + severity VARCHAR(20) NOT NULL, + message TEXT NOT NULL, + doctor_id BIGINT, + doctor_name VARCHAR(50), + action VARCHAR(20) DEFAULT 'BLOCKED', + intercept_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP +); +COMMENT ON TABLE prescription_intercept_log IS '处方前置拦截记录'; +COMMENT ON COLUMN prescription_intercept_log.action IS '处理(BLOCKED拦截/OVERRIDDEN强制通过)'; diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/basicmanage/domain/Icd10DiagnosisCode.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/basicmanage/domain/Icd10DiagnosisCode.java new file mode 100644 index 000000000..6fddc9926 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/basicmanage/domain/Icd10DiagnosisCode.java @@ -0,0 +1,22 @@ +package com.healthlink.his.basicmanage.domain; + +import com.baomidou.mybatisplus.annotation.*; +import com.core.common.core.domain.HisBaseEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("icd10_diagnosis_code") +public class Icd10DiagnosisCode extends HisBaseEntity { + @TableId(value = "id", type = IdType.ASSIGN_ID) + private Long id; + @TableField("code") private String code; + @TableField("name") private String name; + @TableField("category") private String category; + @TableField("parent_code") private String parentCode; + @TableField("is_leaf") private Boolean isLeaf; + @TableField("pinyin_code") private String pinyinCode; + @TableField("wubi_code") private String wubiCode; + @TableField("status") private String status; +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/basicmanage/mapper/Icd10DiagnosisCodeMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/basicmanage/mapper/Icd10DiagnosisCodeMapper.java new file mode 100644 index 000000000..d0334ee46 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/basicmanage/mapper/Icd10DiagnosisCodeMapper.java @@ -0,0 +1,9 @@ +package com.healthlink.his.basicmanage.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.healthlink.his.basicmanage.domain.Icd10DiagnosisCode; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface Icd10DiagnosisCodeMapper extends BaseMapper { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/basicmanage/service/IIcd10DiagnosisCodeService.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/basicmanage/service/IIcd10DiagnosisCodeService.java new file mode 100644 index 000000000..bb481288d --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/basicmanage/service/IIcd10DiagnosisCodeService.java @@ -0,0 +1,7 @@ +package com.healthlink.his.basicmanage.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.healthlink.his.basicmanage.domain.Icd10DiagnosisCode; + +public interface IIcd10DiagnosisCodeService extends IService { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/basicmanage/service/impl/Icd10DiagnosisCodeServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/basicmanage/service/impl/Icd10DiagnosisCodeServiceImpl.java new file mode 100644 index 000000000..16667fda2 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/basicmanage/service/impl/Icd10DiagnosisCodeServiceImpl.java @@ -0,0 +1,11 @@ +package com.healthlink.his.basicmanage.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.healthlink.his.basicmanage.domain.Icd10DiagnosisCode; +import com.healthlink.his.basicmanage.mapper.Icd10DiagnosisCodeMapper; +import com.healthlink.his.basicmanage.service.IIcd10DiagnosisCodeService; +import org.springframework.stereotype.Service; + +@Service +public class Icd10DiagnosisCodeServiceImpl extends ServiceImpl implements IIcd10DiagnosisCodeService { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/domain/DischargeSummary.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/domain/DischargeSummary.java new file mode 100644 index 000000000..6aa350694 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/domain/DischargeSummary.java @@ -0,0 +1,29 @@ +package com.healthlink.his.document.domain; + +import com.baomidou.mybatisplus.annotation.*; +import com.core.common.core.domain.HisBaseEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("discharge_summary") +public class DischargeSummary extends HisBaseEntity { + @TableId(value = "id", type = IdType.ASSIGN_ID) + private Long id; + @TableField("encounter_id") private Long encounterId; + @TableField("patient_id") private Long patientId; + @TableField("patient_name") private String patientName; + @TableField("admission_date") private String admissionDate; + @TableField("discharge_date") private String dischargeDate; + @TableField("admission_diagnosis") private String admissionDiagnosis; + @TableField("discharge_diagnosis") private String dischargeDiagnosis; + @TableField("treatment_summary") private String treatmentSummary; + @TableField("surgery_record") private String surgeryRecord; + @TableField("discharge_condition") private String dischargeCondition; + @TableField("discharge_orders") private String dischargeOrders; + @TableField("follow_up_instructions") private String followUpInstructions; + @TableField("doctor_name") private String doctorName; + @TableField("doctor_id") private Long doctorId; + @TableField("status") private Integer status; +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/mapper/DischargeSummaryMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/mapper/DischargeSummaryMapper.java new file mode 100644 index 000000000..e96b2ba82 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/mapper/DischargeSummaryMapper.java @@ -0,0 +1,9 @@ +package com.healthlink.his.document.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.healthlink.his.document.domain.DischargeSummary; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface DischargeSummaryMapper extends BaseMapper { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/IDischargeSummaryService.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/IDischargeSummaryService.java new file mode 100644 index 000000000..22f189c0e --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/IDischargeSummaryService.java @@ -0,0 +1,7 @@ +package com.healthlink.his.document.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.healthlink.his.document.domain.DischargeSummary; + +public interface IDischargeSummaryService extends IService { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/impl/DischargeSummaryServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/impl/DischargeSummaryServiceImpl.java new file mode 100644 index 000000000..0b4b8e55c --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/document/service/impl/DischargeSummaryServiceImpl.java @@ -0,0 +1,11 @@ +package com.healthlink.his.document.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.healthlink.his.document.domain.DischargeSummary; +import com.healthlink.his.document.mapper.DischargeSummaryMapper; +import com.healthlink.his.document.service.IDischargeSummaryService; +import org.springframework.stereotype.Service; + +@Service +public class DischargeSummaryServiceImpl extends ServiceImpl implements IDischargeSummaryService { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/emr/domain/StructuredEmrTemplate.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/emr/domain/StructuredEmrTemplate.java new file mode 100644 index 000000000..842bd6ac3 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/emr/domain/StructuredEmrTemplate.java @@ -0,0 +1,22 @@ +package com.healthlink.his.emr.domain; + +import com.baomidou.mybatisplus.annotation.*; +import com.core.common.core.domain.HisBaseEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("structured_emr_template") +public class StructuredEmrTemplate extends HisBaseEntity { + @TableId(value = "id", type = IdType.ASSIGN_ID) + private Long id; + @TableField("template_name") private String templateName; + @TableField("template_type") private String templateType; + @TableField("department_id") private Long departmentId; + @TableField("department_name") private String departmentName; + @TableField("template_json") private String templateJson; + @TableField("version") private Integer version; + @TableField("is_system") private Boolean isSystem; + @TableField("status") private String status; +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/emr/mapper/StructuredEmrTemplateMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/emr/mapper/StructuredEmrTemplateMapper.java new file mode 100644 index 000000000..e06d796b2 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/emr/mapper/StructuredEmrTemplateMapper.java @@ -0,0 +1,9 @@ +package com.healthlink.his.emr.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.healthlink.his.emr.domain.StructuredEmrTemplate; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface StructuredEmrTemplateMapper extends BaseMapper { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/emr/service/IStructuredEmrTemplateService.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/emr/service/IStructuredEmrTemplateService.java new file mode 100644 index 000000000..6d33f21f7 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/emr/service/IStructuredEmrTemplateService.java @@ -0,0 +1,7 @@ +package com.healthlink.his.emr.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.healthlink.his.emr.domain.StructuredEmrTemplate; + +public interface IStructuredEmrTemplateService extends IService { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/emr/service/impl/StructuredEmrTemplateServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/emr/service/impl/StructuredEmrTemplateServiceImpl.java new file mode 100644 index 000000000..2bdcc6815 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/emr/service/impl/StructuredEmrTemplateServiceImpl.java @@ -0,0 +1,11 @@ +package com.healthlink.his.emr.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.healthlink.his.emr.domain.StructuredEmrTemplate; +import com.healthlink.his.emr.mapper.StructuredEmrTemplateMapper; +import com.healthlink.his.emr.service.IStructuredEmrTemplateService; +import org.springframework.stereotype.Service; + +@Service +public class StructuredEmrTemplateServiceImpl extends ServiceImpl implements IStructuredEmrTemplateService { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/prescription/domain/PrescriptionInterceptLog.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/prescription/domain/PrescriptionInterceptLog.java new file mode 100644 index 000000000..7f34f3bf9 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/prescription/domain/PrescriptionInterceptLog.java @@ -0,0 +1,27 @@ +package com.healthlink.his.prescription.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("prescription_intercept_log") +public class PrescriptionInterceptLog extends HisBaseEntity { + @TableId(value = "id", type = IdType.ASSIGN_ID) + private Long id; + @TableField("prescription_id") private Long prescriptionId; + @TableField("encounter_id") private Long encounterId; + @TableField("patient_id") private Long patientId; + @TableField("drug_name") private String drugName; + @TableField("intercept_type") private String interceptType; + @TableField("severity") private String severity; + @TableField("message") private String message; + @TableField("doctor_id") private Long doctorId; + @TableField("doctor_name") private String doctorName; + @TableField("action") private String action; + @TableField("intercept_time") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date interceptTime; +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/prescription/mapper/PrescriptionInterceptLogMapper.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/prescription/mapper/PrescriptionInterceptLogMapper.java new file mode 100644 index 000000000..cc1432188 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/prescription/mapper/PrescriptionInterceptLogMapper.java @@ -0,0 +1,9 @@ +package com.healthlink.his.prescription.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.healthlink.his.prescription.domain.PrescriptionInterceptLog; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface PrescriptionInterceptLogMapper extends BaseMapper { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/prescription/service/IPrescriptionInterceptLogService.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/prescription/service/IPrescriptionInterceptLogService.java new file mode 100644 index 000000000..29cfc41b1 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/prescription/service/IPrescriptionInterceptLogService.java @@ -0,0 +1,7 @@ +package com.healthlink.his.prescription.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.healthlink.his.prescription.domain.PrescriptionInterceptLog; + +public interface IPrescriptionInterceptLogService extends IService { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/prescription/service/impl/PrescriptionInterceptLogServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/prescription/service/impl/PrescriptionInterceptLogServiceImpl.java new file mode 100644 index 000000000..0dad50d62 --- /dev/null +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/prescription/service/impl/PrescriptionInterceptLogServiceImpl.java @@ -0,0 +1,11 @@ +package com.healthlink.his.prescription.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.healthlink.his.prescription.domain.PrescriptionInterceptLog; +import com.healthlink.his.prescription.mapper.PrescriptionInterceptLogMapper; +import com.healthlink.his.prescription.service.IPrescriptionInterceptLogService; +import org.springframework.stereotype.Service; + +@Service +public class PrescriptionInterceptLogServiceImpl extends ServiceImpl implements IPrescriptionInterceptLogService { +} diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/rationaldrug/service/IDrugInteractionRuleService.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/rationaldrug/service/IDrugInteractionRuleService.java index 97c659578..c02c13687 100644 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/rationaldrug/service/IDrugInteractionRuleService.java +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/rationaldrug/service/IDrugInteractionRuleService.java @@ -7,25 +7,10 @@ import java.util.List; /** * 配伍禁忌规则Service接口 - * - * @author system */ public interface IDrugInteractionRuleService extends IService { - /** - * 根据药品编码查询相关配伍禁忌规则 - * - * @param drugCode 药品编码 - * @return 配伍禁忌规则列表 - */ List selectByDrugCode(String drugCode); - /** - * 查询两种药品之间的配伍禁忌 - * - * @param drugA 药品A编码 - * @param drugB 药品B编码 - * @return 配伍禁忌规则列表 - */ List selectInteractions(String drugA, String drugB); } diff --git a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/rationaldrug/service/impl/DrugInteractionRuleServiceImpl.java b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/rationaldrug/service/impl/DrugInteractionRuleServiceImpl.java index 3db87dc8e..1f1fc3890 100644 --- a/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/rationaldrug/service/impl/DrugInteractionRuleServiceImpl.java +++ b/healthlink-his-server/healthlink-his-domain/src/main/java/com/healthlink/his/rationaldrug/service/impl/DrugInteractionRuleServiceImpl.java @@ -9,22 +9,9 @@ import org.springframework.stereotype.Service; import java.util.List; -/** - * 配伍禁忌规则Service业务层处理 - * - * @author system - */ @Service -public class DrugInteractionRuleServiceImpl - extends ServiceImpl - implements IDrugInteractionRuleService { +public class DrugInteractionRuleServiceImpl extends ServiceImpl implements IDrugInteractionRuleService { - /** - * 根据药品编码查询相关配伍禁忌规则 - * - * @param drugCode 药品编码 - * @return 配伍禁忌规则列表 - */ @Override public List selectByDrugCode(String drugCode) { LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); @@ -36,13 +23,6 @@ public class DrugInteractionRuleServiceImpl return baseMapper.selectList(wrapper); } - /** - * 查询两种药品之间的配伍禁忌 - * - * @param drugA 药品A编码 - * @param drugB 药品B编码 - * @return 配伍禁忌规则列表 - */ @Override public List selectInteractions(String drugA, String drugB) { LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); diff --git a/healthlink-his-ui/src/views/outpatientenhanced/api.js b/healthlink-his-ui/src/views/outpatientenhanced/api.js new file mode 100644 index 000000000..e09d52eeb --- /dev/null +++ b/healthlink-his-ui/src/views/outpatientenhanced/api.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' +export function getTemplatePage(p){return request({url:'/outpatient-enhanced/template/page',method:'get',params:p})} +export function addTemplate(d){return request({url:'/outpatient-enhanced/template/add',method:'post',data:d})} +export function searchIcd10(k){return request({url:'/outpatient-enhanced/icd10/search',method:'get',params:{keyword:k}})} +export function getInteractionPage(p){return request({url:'/outpatient-enhanced/interaction/page',method:'get',params:p})} +export function addInteraction(d){return request({url:'/outpatient-enhanced/interaction/add',method:'post',data:d})} +export function checkInteraction(d){return request({url:'/outpatient-enhanced/interaction/check',method:'post',data:d})} +export function getDischargePage(p){return request({url:'/outpatient-enhanced/discharge/page',method:'get',params:p})} +export function addDischarge(d){return request({url:'/outpatient-enhanced/discharge/add',method:'post',data:d})} +export function getInterceptPage(p){return request({url:'/outpatient-enhanced/intercept/page',method:'get',params:p})} +export function getInterceptStats(){return request({url:'/outpatient-enhanced/intercept/stats',method:'get'})} diff --git a/healthlink-his-ui/src/views/outpatientenhanced/index.vue b/healthlink-his-ui/src/views/outpatientenhanced/index.vue new file mode 100644 index 000000000..48c93a487 --- /dev/null +++ b/healthlink-his-ui/src/views/outpatientenhanced/index.vue @@ -0,0 +1,104 @@ + + +