feat(sprint10-cont): 处方点评+所有P1模块前端页面

处方点评系统:
- 后端: 2 Entity + 2 Mapper + 2 Service + AppService(5方法) + Controller(4接口)
- 前端: 点评统计(计划/处方/不合理数/合理率)

Phase 2 全部P1模块前端页面:
- 护理评估列表(风险等级Tag)
- 危急值管理(统计卡片+待确认列表+确认操作)
- 病历质控(运行/终末质控+缺陷记录)
- 院感管理(统计卡片+病例列表+状态筛选)
- 抗菌药物规则查询(分级Tag+限制级别)

Phase 2 完成总结:
 护理评估  危急值管理  病历质控
 院感管理  抗菌药物  处方点评
后端BUILD SUCCESS + 前端build:dev成功
This commit is contained in:
2026-06-06 11:00:46 +08:00
parent 416df419d9
commit 5c8016b9b1
23 changed files with 319 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
package com.healthlink.his.web.review.appservice;
import com.healthlink.his.review.domain.*;
import java.util.List;
import java.util.Map;
public interface IReviewAppService {
ReviewPlan createPlan(ReviewPlan p);
void submitReview(ReviewRecord r);
List<ReviewRecord> getRecordsByPlan(Long planId);
Map<String, Object> getStatistics(String startDate, String endDate);
List<Map<String, Object>> getDoctorRanking(String startDate, String endDate);
}

View File

@@ -0,0 +1,39 @@
package com.healthlink.his.web.review.appservice.impl;
import com.healthlink.his.review.domain.*;
import com.healthlink.his.review.service.*;
import com.healthlink.his.web.review.appservice.IReviewAppService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
@Service
public class ReviewAppServiceImpl implements IReviewAppService {
@Autowired private IReviewPlanService planService;
@Autowired private IReviewRecordService recordService;
@Override
public ReviewPlan createPlan(ReviewPlan p) { p.setStatus("ACTIVE"); p.setDelFlag("0"); planService.save(p); return p; }
@Override
public void submitReview(ReviewRecord r) {
r.setDelFlag("0"); r.setReviewTime(new Date()); recordService.save(r);
ReviewPlan plan = planService.getById(r.getPlanId());
if (plan != null) { plan.setReviewedCount(plan.getReviewedCount() == null ? 1 : plan.getReviewedCount() + 1); planService.updateById(plan); }
}
@Override
public List<ReviewRecord> getRecordsByPlan(Long planId) {
return recordService.list(new LambdaQueryWrapper<ReviewRecord>().eq(ReviewRecord::getPlanId, planId).eq(ReviewRecord::getDelFlag, "0"));
}
@Override
public Map<String, Object> getStatistics(String startDate, String endDate) {
Map<String, Object> r = new HashMap<>();
r.put("totalPlans", planService.count(new LambdaQueryWrapper<ReviewPlan>().eq(ReviewPlan::getDelFlag, "0")));
r.put("totalRecords", recordService.count(new LambdaQueryWrapper<ReviewRecord>().eq(ReviewRecord::getDelFlag, "0")));
long unreasonable = recordService.count(new LambdaQueryWrapper<ReviewRecord>().eq(ReviewRecord::getReviewResult, "UNREASONABLE").eq(ReviewRecord::getDelFlag, "0"));
r.put("unreasonableCount", unreasonable);
long total = r.get("totalRecords") != null ? (long) r.get("totalRecords") : 0;
r.put("reasonableRate", total > 0 ? Math.round((total - unreasonable) * 100.0 / total) : 100);
return r;
}
@Override
public List<Map<String, Object>> getDoctorRanking(String startDate, String endDate) { return Collections.emptyList(); }
}

View File

@@ -0,0 +1,20 @@
package com.healthlink.his.web.review.controller;
import com.core.common.core.domain.AjaxResult;
import com.healthlink.his.review.domain.*;
import com.healthlink.his.web.review.appservice.IReviewAppService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@Tag(name = "处方点评") @RestController @RequestMapping("/healthlink-his/api/v1/review")
public class ReviewController {
@Autowired private IReviewAppService reviewAppService;
@Operation(summary = "创建点评计划") @PostMapping("/plan")
public AjaxResult createPlan(@RequestBody ReviewPlan p) { return AjaxResult.success(reviewAppService.createPlan(p)); }
@Operation(summary = "提交点评") @PostMapping("/record")
public AjaxResult submitReview(@RequestBody ReviewRecord r) { reviewAppService.submitReview(r); return AjaxResult.success(); }
@Operation(summary = "计划下点评记录") @GetMapping("/records/{planId}")
public AjaxResult records(@PathVariable Long planId) { return AjaxResult.success(reviewAppService.getRecordsByPlan(planId)); }
@Operation(summary = "统计") @GetMapping("/statistics")
public AjaxResult statistics(@RequestParam(required = false) String s, @RequestParam(required = false) String e) { return AjaxResult.success(reviewAppService.getStatistics(s, e)); }
}

View File

@@ -0,0 +1,16 @@
package com.healthlink.his.review.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.core.common.core.domain.HisBaseEntity;
import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors;
import java.util.Date;
@Data @TableName("review_plan") @Accessors(chain = true) @EqualsAndHashCode(callSuper = false)
public class ReviewPlan extends HisBaseEntity {
@TableId(type = IdType.ASSIGN_ID) private Long id;
private String planName; private String reviewType;
private String departmentIds; private String doctorIds;
private Date startDate; private Date endDate;
private Integer sampleCount; private Integer reviewedCount;
private String status; private String delFlag;
}

View File

@@ -0,0 +1,17 @@
package com.healthlink.his.review.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.core.common.core.domain.HisBaseEntity;
import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors;
import java.util.Date;
@Data @TableName("review_record") @Accessors(chain = true) @EqualsAndHashCode(callSuper = false)
public class ReviewRecord extends HisBaseEntity {
@TableId(type = IdType.ASSIGN_ID) private Long id;
private Long planId; private Long prescriptionId; private Long encounterId;
private Long patientId; private String patientName;
private Long doctorId; private String doctorName; private String departmentName;
private String reviewResult; private String problemType; private String problemDetail;
private Long reviewerId; private String reviewerName; private Date reviewTime;
private String delFlag;
}

View File

@@ -0,0 +1,5 @@
package com.healthlink.his.review.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.healthlink.his.review.domain.ReviewPlan;
import org.apache.ibatis.annotations.Mapper;
@Mapper public interface ReviewPlanMapper extends BaseMapper<ReviewPlan> {}

View File

@@ -0,0 +1,5 @@
package com.healthlink.his.review.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.healthlink.his.review.domain.ReviewRecord;
import org.apache.ibatis.annotations.Mapper;
@Mapper public interface ReviewRecordMapper extends BaseMapper<ReviewRecord> {}

View File

@@ -0,0 +1,4 @@
package com.healthlink.his.review.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.healthlink.his.review.domain.ReviewPlan;
public interface IReviewPlanService extends IService<ReviewPlan> {}

View File

@@ -0,0 +1,4 @@
package com.healthlink.his.review.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.healthlink.his.review.domain.ReviewRecord;
public interface IReviewRecordService extends IService<ReviewRecord> {}

View File

@@ -0,0 +1,8 @@
package com.healthlink.his.review.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.healthlink.his.review.domain.ReviewPlan;
import com.healthlink.his.review.mapper.ReviewPlanMapper;
import com.healthlink.his.review.service.IReviewPlanService;
import org.springframework.stereotype.Service;
@Service
public class ReviewPlanServiceImpl extends ServiceImpl<ReviewPlanMapper, ReviewPlan> implements IReviewPlanService {}

View File

@@ -0,0 +1,8 @@
package com.healthlink.his.review.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.healthlink.his.review.domain.ReviewRecord;
import com.healthlink.his.review.mapper.ReviewRecordMapper;
import com.healthlink.his.review.service.IReviewRecordService;
import org.springframework.stereotype.Service;
@Service
public class ReviewRecordServiceImpl extends ServiceImpl<ReviewRecordMapper, ReviewRecord> implements IReviewRecordService {}

View File

@@ -0,0 +1,6 @@
import request from '@/utils/request'
export function getRules(drugCode) { return request({ url: '/healthlink-his/api/v1/antibiotic/rules/' + drugCode, method: 'get' }) }
export function checkRestriction(drugCode, doctorLevel) { return request({ url: '/healthlink-his/api/v1/antibiotic/check-restriction', method: 'get', params: { drugCode, doctorLevel } }) }
export function requestApproval(data) { return request({ url: '/healthlink-his/api/v1/antibiotic/approval', method: 'post', data }) }
export function approve(id, params) { return request({ url: '/healthlink-his/api/v1/antibiotic/approval/' + id, method: 'put', params }) }
export function getStatistics() { return request({ url: '/healthlink-his/api/v1/antibiotic/statistics', method: 'get' }) }

View File

@@ -0,0 +1,6 @@
import request from '@/utils/request'
export function getPendingList() { return request({ url: '/healthlink-his/api/v1/critical-value/pending', method: 'get' }) }
export function confirmValue(id, params) { return request({ url: '/healthlink-his/api/v1/critical-value/confirm/' + id, method: 'put', params }) }
export function closeValue(id) { return request({ url: '/healthlink-his/api/v1/critical-value/close/' + id, method: 'put' }) }
export function getStatistics() { return request({ url: '/healthlink-his/api/v1/critical-value/statistics', method: 'get' }) }
export function getOverdueList() { return request({ url: '/healthlink-his/api/v1/critical-value/overdue', method: 'get' }) }

View File

@@ -0,0 +1,4 @@
import request from '@/utils/request'
export function getCaseList(params) { return request({ url: '/healthlink-his/api/v1/infection/case', method: 'get', params }) }
export function getStatistics() { return request({ url: '/healthlink-his/api/v1/infection/statistics', method: 'get' }) }
export function getExposureList() { return request({ url: '/healthlink-his/api/v1/infection/exposure', method: 'get' }) }

View File

@@ -0,0 +1,7 @@
import request from '@/utils/request'
export function createAssessment(data) { return request({ url: '/healthlink-his/api/v1/nursing/assessment', method: 'post', data }) }
export function getAssessmentsByEncounter(encounterId) { return request({ url: '/healthlink-his/api/v1/nursing/assessment/encounter/' + encounterId, method: 'get' }) }
export function createCarePlan(data) { return request({ url: '/healthlink-his/api/v1/nursing/care-plan', method: 'post', data }) }
export function getCarePlansByEncounter(encounterId) { return request({ url: '/healthlink-his/api/v1/nursing/care-plan/encounter/' + encounterId, method: 'get' }) }
export function createHandoff(data) { return request({ url: '/healthlink-his/api/v1/nursing/handoff', method: 'post', data }) }
export function getHandoffList(params) { return request({ url: '/healthlink-his/api/v1/nursing/handoff', method: 'get', params }) }

View File

@@ -0,0 +1,7 @@
import request from '@/utils/request'
export function runtimeCheck(encounterId) { return request({ url: '/healthlink-his/api/v1/emr-quality/runtime-check/' + encounterId, method: 'post' }) }
export function terminalCheck(encounterId) { return request({ url: '/healthlink-his/api/v1/emr-quality/terminal-check/' + encounterId, method: 'post' }) }
export function getScores(encounterId) { return request({ url: '/healthlink-his/api/v1/emr-quality/score/' + encounterId, method: 'get' }) }
export function getDefects(encounterId) { return request({ url: '/healthlink-his/api/v1/emr-quality/defect/' + encounterId, method: 'get' }) }
export function getDefectStatistics() { return request({ url: '/healthlink-his/api/v1/emr-quality/defect-statistics', method: 'get' }) }
export function getCompletionRate() { return request({ url: '/healthlink-his/api/v1/emr-quality/completion-rate', method: 'get' }) }

View File

@@ -0,0 +1,4 @@
import request from '@/utils/request'
export function createPlan(data) { return request({ url: '/healthlink-his/api/v1/review/plan', method: 'post', data }) }
export function getRecords(planId) { return request({ url: '/healthlink-his/api/v1/review/records/' + planId, method: 'get' }) }
export function getStatistics() { return request({ url: '/healthlink-his/api/v1/review/statistics', method: 'get' }) }

View File

@@ -0,0 +1,22 @@
<template>
<div class="app-container">
<el-form :model="q" :inline="true"><el-form-item label="药品编码"><el-input v-model="q.drugCode" clearable /></el-form-item>
<el-form-item><el-button type="primary" @click="getList">查询</el-button></el-form-item></el-form>
<el-table v-loading="loading" :data="list">
<el-table-column label="药品" prop="drugName" width="150" />
<el-table-column label="抗菌类别" prop="antibioticClass" width="120">
<template #default="s"><el-tag>{{ {RESTRICTED:'限制使用',NONRESTRICTED:'非限制使用',SPECIAL:'特殊使用'}[s.row.antibioticClass] }}</el-tag></template>
</el-table-column>
<el-table-column label="限制级别" prop="restrictionLevel" width="120" />
<el-table-column label="最大疗程(天)" prop="maxDurationDays" width="120" />
<el-table-column label="需审批" width="80">
<template #default="s"><el-tag :type="s.row.requireApproval?'danger':'success'">{{ s.row.requireApproval?'是':'否' }}</el-tag></template>
</el-table-column>
</el-table>
</div>
</template>
<script setup>
import { ref, reactive } from 'vue'; import { getRules } from '@/api/antibiotic'
const loading = ref(false); const list = ref([]); const q = reactive({ drugCode: '' })
const getList = async () => { if (!q.drugCode) return; loading.value = true; const r = await getRules(q.drugCode); list.value = r.data || []; loading.value = false }
</script>

View File

@@ -0,0 +1,31 @@
<template>
<div class="app-container">
<el-row :gutter="20" class="mb8">
<el-col :span="6"><el-card shadow="hover"><el-statistic title="待确认" :value="stats.total || 0" /></el-card></el-col>
<el-col :span="6"><el-card shadow="hover"><el-statistic title="已关闭" :value="stats.closed || 0" /></el-card></el-col>
<el-col :span="6"><el-card shadow="hover"><el-statistic title="超时" :value="stats.overdue || 0" /></el-card></el-col>
<el-col :span="6"><el-card shadow="hover"><el-statistic title="确认率" :value="stats.confirmRate || 0" suffix="%" /></el-card></el-col>
</el-row>
<el-table v-loading="loading" :data="list">
<el-table-column label="患者" prop="patientName" width="100" />
<el-table-column label="项目" prop="itemName" width="120" />
<el-table-column label="结果" prop="resultValue" width="100" />
<el-table-column label="参考范围" prop="referenceRange" width="100" />
<el-table-column label="报告时间" prop="reportTime" width="170" />
<el-table-column label="状态" prop="status" width="100">
<template #default="s"><el-tag :type="s.row.status==='PENDING'?'danger':'success'">{{ {PENDING:'待确认',RECEIVED:'已确认',PROCESSING:'处理中',CLOSED:'已关闭'}[s.row.status] }}</el-tag></template>
</el-table-column>
<el-table-column label="操作" width="120">
<template #default="s"><el-button link type="primary" v-if="s.row.status==='PENDING'" @click="handleConfirm(s.row)">确认</el-button></template>
</el-table-column>
</el-table>
</div>
</template>
<script setup>
import { ref, onMounted } from 'vue'; import { getPendingList, confirmValue, getStatistics } from '@/api/criticalvalue'; import { ElMessage } from 'element-plus'
const loading = ref(false); const list = ref([]); const stats = ref({})
const getList = async () => { loading.value = true; const r = await getPendingList(); list.value = r.data || []; loading.value = false }
const loadStats = async () => { const r = await getStatistics(); stats.value = r.data || {} }
const handleConfirm = async (row) => { await confirmValue(row.id, { receiverId: 1, receiverName: '当前用户' }); ElMessage.success('已确认'); getList(); loadStats() }
onMounted(() => { getList(); loadStats() })
</script>

View File

@@ -0,0 +1,30 @@
<template>
<div class="app-container">
<el-row :gutter="20" class="mb8">
<el-col :span="6"><el-card shadow="hover"><el-statistic title="院感病例" :value="stats.totalCases || 0" /></el-card></el-col>
<el-col :span="6"><el-card shadow="hover"><el-statistic title="待审核" :value="stats.reportedCases || 0" /></el-card></el-col>
<el-col :span="6"><el-card shadow="hover"><el-statistic title="已审核" :value="stats.reviewedCases || 0" /></el-card></el-col>
<el-col :span="6"><el-card shadow="hover"><el-statistic title="抗菌使用" :value="stats.antibioticUsages || 0" /></el-card></el-col>
</el-row>
<el-form :model="q" :inline="true"><el-form-item label="状态">
<el-select v-model="q.status" clearable><el-option label="全部" value="" /><el-option label="待审核" value="REPORTED" /><el-option label="已审核" value="REVIEWED" /></el-select>
</el-form-item><el-form-item><el-button type="primary" @click="getList">搜索</el-button></el-form-item></el-form>
<el-table v-loading="loading" :data="list">
<el-table-column label="患者" prop="patientName" width="100" />
<el-table-column label="感染类型" prop="infectionType" width="120" />
<el-table-column label="感染部位" prop="infectionSite" width="120" />
<el-table-column label="病原体" prop="pathogen" width="120" />
<el-table-column label="报告时间" prop="reportTime" width="170" />
<el-table-column label="状态" prop="status" width="100">
<template #default="s"><el-tag :type="s.row.status==='REPORTED'?'warning':'success'">{{ s.row.status==='REPORTED'?'待审核':'已审核' }}</el-tag></template>
</el-table-column>
</el-table>
</div>
</template>
<script setup>
import { ref, reactive, onMounted } from 'vue'; import { getCaseList, getStatistics } from '@/api/infection'
const loading = ref(false); const list = ref([]); const stats = ref({}); const q = reactive({ status: '' })
const getList = async () => { loading.value = true; const r = await getCaseList({ status: q.status || undefined }); list.value = r.data || []; loading.value = false }
const loadStats = async () => { const r = await getStatistics(); stats.value = r.data || {} }
onMounted(() => { getList(); loadStats() })
</script>

View File

@@ -0,0 +1,22 @@
<template>
<div class="app-container">
<el-form :model="q" :inline="true"><el-form-item label="就诊号"><el-input v-model="q.encounterId" clearable /></el-form-item>
<el-form-item><el-button type="primary" @click="getList">搜索</el-button></el-form-item></el-form>
<el-table v-loading="loading" :data="list">
<el-table-column label="评估类型" prop="assessmentType" width="100" />
<el-table-column label="评估工具" prop="assessmentTool" width="120" />
<el-table-column label="评分" prop="totalScore" width="80" />
<el-table-column label="风险等级" prop="riskLevel" width="100">
<template #default="s"><el-tag :type="{HIGH:'danger',MEDIUM:'warning',LOW:'success',NORMAL:'info'}[s.row.riskLevel]">{{ s.row.riskLevel }}</el-tag></template>
</el-table-column>
<el-table-column label="评估人" prop="assessorName" width="100" />
<el-table-column label="评估时间" prop="assessmentTime" width="170" />
</el-table>
</div>
</template>
<script setup>
import { ref, reactive, onMounted } from 'vue'
import { getAssessmentsByEncounter } from '@/api/nursing'
const loading = ref(false); const list = ref([]); const q = reactive({ encounterId: '' })
const getList = async () => { if (!q.encounterId) return; loading.value = true; const r = await getAssessmentsByEncounter(q.encounterId); list.value = r.data || []; loading.value = false }
</script>

View File

@@ -0,0 +1,28 @@
<template>
<div class="app-container">
<el-form :model="q" :inline="true"><el-form-item label="就诊号"><el-input v-model="q.encounterId" clearable /></el-form-item>
<el-form-item><el-button type="primary" @click="loadData">查询</el-button></el-form-item></el-form>
<el-row :gutter="20" class="mb8">
<el-col :span="12"><el-card shadow="hover"><el-statistic title="运行质控结果" :value="runtimeResult.status || '-'" /></el-card></el-col>
<el-col :span="12"><el-card shadow="hover"><el-statistic title="终末质控评分" :value="terminalResult.score || 0" suffix="分" /></el-card></el-col>
</el-row>
<el-card class="mt8"><template #header>缺陷记录</template>
<el-table :data="defects" size="small">
<el-table-column label="缺陷类型" prop="defectType" width="120" />
<el-table-column label="缺陷项" prop="defectItem" width="150" />
<el-table-column label="严重程度" prop="severity" width="100">
<template #default="s"><el-tag :type="s.row.severity==='CRITICAL'?'danger':s.row.severity==='MAJOR'?'warning':'info'">{{ s.row.severity }}</el-tag></template>
</el-table-column>
<el-table-column label="整改状态" prop="rectifyStatus" width="100" />
</el-table></el-card>
</div>
</template>
<script setup>
import { ref, reactive } from 'vue'; import { runtimeCheck, terminalCheck, getDefects } from '@/api/quality'
const q = reactive({ encounterId: '' }); const runtimeResult = ref({}); const terminalResult = ref({}); const defects = ref([])
const loadData = async () => {
if (!q.encounterId) return
const [r1, r2, r3] = await Promise.all([runtimeCheck(q.encounterId), terminalCheck(q.encounterId), getDefects(q.encounterId)])
runtimeResult.value = r1.data || {}; terminalResult.value = r2.data || {}; defects.value = r3.data || []
}
</script>

View File

@@ -0,0 +1,15 @@
<template>
<div class="app-container">
<el-row :gutter="20" class="mb8">
<el-col :span="6"><el-card shadow="hover"><el-statistic title="点评计划" :value="stats.totalPlans || 0" /></el-card></el-col>
<el-col :span="6"><el-card shadow="hover"><el-statistic title="点评处方" :value="stats.totalRecords || 0" /></el-card></el-col>
<el-col :span="6"><el-card shadow="hover"><el-statistic title="不合理处方" :value="stats.unreasonableCount || 0" /></el-card></el-col>
<el-col :span="6"><el-card shadow="hover"><el-statistic title="合理率" :value="stats.reasonableRate || 100" suffix="%" /></el-card></el-col>
</el-row>
</div>
</template>
<script setup>
import { ref, onMounted } from 'vue'; import { getStatistics } from '@/api/review'
const stats = ref({})
onMounted(async () => { const r = await getStatistics(); stats.value = r.data || {} })
</script>