package com.ruoyi.web.controller.smartor;
|
|
import com.ruoyi.common.annotation.AddOrgId;
|
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.system.service.ISysConfigService;
|
import com.ruoyi.inhospvisit.domain.PatMedInhosp;
|
import com.ruoyi.common.core.service.dto.PatMedReq;
|
import com.smartor.service.IPatMedInhospService;
|
import com.smartor.service.IPatMedOuthospService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.web.bind.annotation.*;
|
|
/**
|
* 患者住院记录Controller
|
*
|
* @author smartor
|
* @date 2023-03-04
|
*/
|
@Api(description = "患者住院记录")
|
@RestController
|
@RequestMapping("/smartor/patinhosp")
|
public class PatMedInhospController extends BaseController {
|
@Autowired
|
private IPatMedInhospService patMedInhospService;
|
|
@Autowired
|
private IPatMedOuthospService iPatMedOuthospService;
|
|
@Autowired
|
private IPatMedInhospService iPatMedInhospService;
|
|
/**
|
* 出入院随访模块的<b>常驻门面</b>(第 10 步切换)。
|
* <p>
|
* ⚠️ 注入门面而不是内部实现:门面永远存在,所以即使模块被开关关掉
|
* 或没被打进应用,本 Controller 也<b>不会启动失败</b>,只是调用降级并打 WARN。
|
*/
|
@Autowired
|
private com.ruoyi.inhospvisit.api.InhospVisitFacade inhospVisitFacade;
|
|
@Autowired
|
private ISysConfigService configService;
|
|
@Value("${server.port}")
|
private String port;
|
|
@Value("${spring.profiles.active}")
|
private String active;
|
|
@PostMapping("/getDeptCodeByPatId")
|
@ApiOperation("查询住、出院部门编码通过patId")
|
public AjaxResult getDeptCodeByPatId(@RequestBody PatMedInhosp patMedInhosp) {
|
return success(patMedInhospService.getDeptCodeByPatId(patMedInhosp));
|
}
|
/**
|
* 各科室服务人次
|
*
|
* @return
|
*/
|
@ApiOperation("各科室服务人次")
|
@AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
|
@PostMapping("/getDeptRanking")
|
public TableDataInfo getDeptRanking(@RequestBody PatMedReq patMedReq) {
|
return getDataTable(patMedInhospService.getDeptRanking(patMedReq));
|
}
|
|
/**
|
* 医护与患者关联关系
|
*
|
* @return
|
*/
|
@ApiOperation("医护与患者关联关系")
|
@PostMapping("/getDocAndPat")
|
public TableDataInfo getDocAndPat(@RequestBody PatMedInhosp patMedInhosp) {
|
return getDataTable(patMedInhospService.getDocAndPat(patMedInhosp));
|
}
|
}
|