liusheng
5 天以前 cc479e6a056785103996cc7ea67dbd5faa3e800e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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));
    }
}