fix(database): 修复数据库字典重复和表结构缺失问题
- 删除手术状态下拉框的重复字典数据,保留每组中dict_code最小的记录 - 修复HisBaseEntity列缺失问题,为多个表添加create_by、update_by、update_time等基础字段 - 为adm_patient表添加邮政编码、户籍地址、监护人信息、患者来源等缺失字段 - 添加文化程度字典类型和相关字典数据,补充3919到3914等10个学历级别选项 - 为adm_patient_identifier表创建tenant_id和patient_id的联合索引以提升查询性能 - 修复prescription_intercept_log和clinical_pathway_execution表的基础实体字段缺失 - 为wor_device_request表增加医嘱退回相关的back_reason、performer_check_id等字段 - 创建EMPI核心表empi_person和empi_person_id_mapping用于全局患者主
This commit is contained in:
@@ -8,4 +8,6 @@ public interface IEmrQualityAppService {
|
||||
List<Map<String, Object>> getDefects(Long encounterId);
|
||||
Map<String, Object> getDefectStatistics(String startDate, String endDate);
|
||||
Map<String, Object> getCompletionRate(String startDate, String endDate);
|
||||
Map<String, Object> startDefectRectify(Long defectId);
|
||||
Map<String, Object> completeDefectRectify(Long defectId);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.*;
|
||||
import java.util.Date;
|
||||
@Service
|
||||
public class EmrQualityAppServiceImpl implements IEmrQualityAppService {
|
||||
@Autowired private EmrQualityScoreMapper scoreMapper;
|
||||
@@ -80,4 +81,37 @@ public class EmrQualityAppServiceImpl implements IEmrQualityAppService {
|
||||
result.put("totalEncounters", 0); result.put("completedEmr", 0); result.put("overdueEmr", 0); result.put("completionRate", 100);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> startDefectRectify(Long defectId) {
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
EmrDefect defect = defectMapper.selectById(defectId);
|
||||
if (defect != null) {
|
||||
defect.setRectifyStatus("RECTIFYING");
|
||||
defectMapper.updateById(defect);
|
||||
result.put("success", true);
|
||||
result.put("message", "开始整改");
|
||||
} else {
|
||||
result.put("success", false);
|
||||
result.put("message", "缺陷记录不存在");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> completeDefectRectify(Long defectId) {
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
EmrDefect defect = defectMapper.selectById(defectId);
|
||||
if (defect != null) {
|
||||
defect.setRectifyStatus("RECTIFIED");
|
||||
defect.setRectifyTime(new Date());
|
||||
defectMapper.updateById(defect);
|
||||
result.put("success", true);
|
||||
result.put("message", "整改完成");
|
||||
} else {
|
||||
result.put("success", false);
|
||||
result.put("message", "缺陷记录不存在");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,4 +30,12 @@ public class EmrQualityController {
|
||||
@Operation(summary = "完成率") @GetMapping("/completion-rate")
|
||||
public AjaxResult completionRate(@RequestParam(required = false) String startDate, @RequestParam(required = false) String endDate) {
|
||||
return AjaxResult.success(emrQualityAppService.getCompletionRate(startDate, endDate)); }
|
||||
|
||||
@Operation(summary = "开始整改缺陷") @PostMapping("/defect/rectify/{defectId}")
|
||||
public AjaxResult startDefectRectify(@PathVariable Long defectId) {
|
||||
return AjaxResult.success(emrQualityAppService.startDefectRectify(defectId)); }
|
||||
|
||||
@Operation(summary = "完成整改缺陷") @PostMapping("/defect/complete/{defectId}")
|
||||
public AjaxResult completeDefectRectify(@PathVariable Long defectId) {
|
||||
return AjaxResult.success(emrQualityAppService.completeDefectRectify(defectId)); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user