feat(router): 添加医生工作站等功能模块路由配置

- 新增医生工作站路由,包含待写病历功能
- 添加全部功能模块路由,支持功能列表和配置页面
- 集成待办事项模块路由,完善工作流功能
- 配置相关API接口和服务类,实现用户配置管理
- 实现待写病历列表展示和相关业务逻辑
- 完善首页统计数据显示功能
This commit is contained in:
2026-02-01 15:05:57 +08:00
parent 6f7d723c6b
commit 98fe9f3301
16 changed files with 2811 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
package com.openhis.web.doctorstation.controller;
import com.core.common.core.domain.R;
import com.openhis.web.doctorstation.appservice.IDoctorStationEmrAppService;
import com.openhis.web.doctorstation.dto.PatientEmrDto;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
* 待写病历控制器
* 用于处理医生待写病历的相关操作
*/
@RestController
@RequestMapping("/doctor-station/pending-emr")
@Slf4j
@AllArgsConstructor
public class PendingEmrController {
private final IDoctorStationEmrAppService iDoctorStationEmrAppService;
/**
* 获取待写病历列表
*
* @param doctorId 医生ID
* @return 待写病历列表
*/
@GetMapping("/pending-list")
public R<?> getPendingEmrList(@RequestParam(required = false) Long doctorId) {
// 如果没有传递医生ID则使用当前登录用户ID
if (doctorId == null) {
doctorId = com.core.common.utils.SecurityUtils.getLoginUser().getUserId();
}
// 调用服务获取待写病历列表
return iDoctorStationEmrAppService.getPendingEmrList(doctorId);
}
/**
* 获取待写病历数量
*
* @param doctorId 医生ID
* @return 待写病历数量
*/
@GetMapping("/pending-count")
public R<?> getPendingEmrCount(@RequestParam(required = false) Long doctorId) {
// 如果没有传递医生ID则使用当前登录用户ID
if (doctorId == null) {
doctorId = com.core.common.utils.SecurityUtils.getLoginUser().getUserId();
}
// 调用服务获取待写病历数量
return iDoctorStationEmrAppService.getPendingEmrCount(doctorId);
}
/**
* 检查患者是否需要写病历
*
* @param encounterId 就诊ID
* @return 患者是否需要写病历
*/
@GetMapping("/need-write-emr")
public R<?> checkNeedWriteEmr(@RequestParam Long encounterId) {
return iDoctorStationEmrAppService.checkNeedWriteEmr(encounterId);
}
}

View File

@@ -0,0 +1,38 @@
package com.openhis.web.system.controller;
import com.core.common.core.domain.R;
import com.core.common.utils.SecurityUtils;
import com.openhis.web.doctorstation.appservice.IDoctorStationEmrAppService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 系统首页控制器
*/
@Api(tags = "系统首页")
@RestController
@RequestMapping("/system/home")
@AllArgsConstructor
public class HomeController {
private final IDoctorStationEmrAppService doctorStationEmrAppService;
@ApiOperation("获取首页统计数据")
@GetMapping("/statistics")
public R<?> getStatistics() {
// 这里可以返回各种统计数据
// 为了简化,我们只返回待写病历数量
Long userId = SecurityUtils.getLoginUser().getUserId();
R<?> pendingEmrCount = doctorStationEmrAppService.getPendingEmrCount(userId);
// 构建返回数据
java.util.Map<String, Object> data = new java.util.HashMap<>();
data.put("pendingEmr", pendingEmrCount.getData());
return R.ok(data);
}
}