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 {}