zjh
2024-05-28 c9ab52e29d8f399b90017dd3bec22106445f1491
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
package com.ltkj.web.controller.his;
 
 
import com.ltkj.common.core.controller.BaseController;
import com.ltkj.common.core.domain.AjaxResult;
import com.ltkj.common.core.page.TableDataInfo;
import com.ltkj.common.utils.http.HttpUtils;
import com.ltkj.hosp.domain.DictSsdm;
import com.ltkj.hosp.domain.TjCustomer;
import com.ltkj.hosp.hisDto.OutpinimpapplyDto;
import com.ltkj.hosp.hisDto.OutpinregapplyDto;
import com.ltkj.hosp.service.ITjCustomerService;
import com.ltkj.web.wxUtils.HttpClientUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
 
@Api(tags = "AAAAA-----HISAPI相关接口文档")
@RestController
@RequestMapping("/api/His")
public class HisApiController extends BaseController {
    @Autowired
    private ITjCustomerService tjCustomerService;
 
    private static final String HIS_URL = "https://mock.mengxuegu.com/mock/664d3dbce45d2156fa209c80/example/api/His/HisRequest";
 
    @PostMapping("/Outpincreateapply")
    @ApiOperation(value = "新增/修改门诊注册信息")
    public AjaxResult Outpincreateapply(@RequestBody TjCustomer customer) {
        Map<String, Object> map = new HashMap<>();
        if (null != customer.getCusId()) {
            map.put("pationid", customer.getCusId());
        } else {
            map.put("pationid", null);
        }
        map.put("brxm", customer.getCusName());
        map.put("brxb", customer.getCusSex());
        map.put("csrq", customer.getCusBrithday());
        map.put("brnl", customer.getAge());
        map.put("brnldw", customer.getAgeUnit());
        map.put("addr", customer.getAddr());
        map.put("gzdw", null);
        map.put("dwdz", null);
        map.put("lxr", customer.getCusName());
        map.put("lxrdh", customer.getCusPhone());
        map.put("lxrgx", "本人");
        map.put("sfzh", customer.getCusIdcard());
        map.put("jhrxm", null);
        map.put("jhrsfzh", null);
        map.put("mz", customer.getCusNational());
        map.put("zy", customer.getCareer());
        map.put("fbbm", null);
        map.put("czy", customer.getCreateBy());
        map.put("jkkkh", customer.getIndexCard());
        map.put("mindex_id", customer.getIndexCard());
        String post = HttpClientUtils.sendPost(HIS_URL, map);
        return AjaxResult.success(post);
    }
 
 
    @PostMapping("/Outpinconapply")
    @ApiOperation(value = "门诊医生接诊")
    public AjaxResult Outpinconapply(@RequestParam @ApiParam(value = "就诊号") String jzh,
                                     @ApiParam(value = "接诊日期") @RequestParam Date jzrq,
                                     @ApiParam(value = "接诊医师") @RequestParam String jzysbm) {
        Map<String, Object> map = new HashMap<>();
        map.put("jzh",jzh);
        map.put("jzrq",jzrq);
        map.put("jzysbm",jzysbm);
        String post = HttpClientUtils.sendPost(HIS_URL, map);
        return AjaxResult.success(post);
    }
 
 
    @PostMapping("/Outpinunconapply")
    @ApiOperation(value = "门诊医生取消接诊")
    public AjaxResult Outpinunconapply(@RequestParam @ApiParam(value = "就诊号") String jzh,
                                     @ApiParam(value = "接诊日期") @RequestParam Date jzrq,
                                     @ApiParam(value = "接诊医师") @RequestParam String jzysbm) {
        Map<String, Object> map = new HashMap<>();
        map.put("jzh",jzh);
        map.put("jzrq",jzrq);
        map.put("jzysbm",jzysbm);
        String post = HttpClientUtils.sendPost(HIS_URL, map);
        return AjaxResult.success(post);
    }
 
    @PostMapping("/Outpinimpapply")
    @ApiOperation(value = "新增/修改门诊诊断")
    public AjaxResult Outpinimpapply(@RequestBody OutpinimpapplyDto dto ) {
        Map<String, Object> map = new HashMap<>();
        map.put("his_registration_id",dto.getHisRegistrationId());
        map.put("mzzdid",dto.getMzzdid());
        map.put("sqysbm",dto.getSqysbm());
        map.put("mzksbm",dto.getMzksbm());
        map.put("fbrq",dto.getFbrq());
        map.put("zdrq",dto.getZdrq());
        map.put("czybm",dto.getCzybm());
        map.put("czyksbm",dto.getCzyksbm());
        map.put("zs",dto.getZs());
        map.put("bs",dto.getBs());
        map.put("clyz",dto.getClyz());
        map.put("jws",dto.getJws());
        map.put("tgjc",dto.getTgjc());
        map.put("gms",dto.getGms());
        map.put("jbbm",dto.getJbbm());
        map.put("jbbm1",dto.getJbbm1());
        map.put("jbbm2",dto.getJbbm2());
        map.put("tw",dto.getTw());
        map.put("mb",dto.getMb());
        map.put("hx",dto.getHx());
        map.put("bp",dto.getBp());
        map.put("fzbz",dto.getFzbz());
        map.put("hzqx",dto.getHzqx());
        map.put("sfqc",dto.getSfqc());
        map.put("qchs",dto.getQchs());
        map.put("sfqj",dto.getSfqj());
        map.put("ckrq",dto.getCkrq());
        String post = HttpClientUtils.sendPost(HIS_URL, map);
        return AjaxResult.success(post);
    }
 
 
    @PostMapping("/Outpinmesapply")
    @ApiOperation(value = "门诊预交收费")
    public AjaxResult Outpinmesapply(@RequestParam @ApiParam(value = "门诊患者 ID") String pationid,
                                       @ApiParam(value = "操作员") @RequestParam String czybm,
                                       @ApiParam(value = "支付类型编码") @RequestParam String zflxbm,
                                       @ApiParam(value = "预交金额") @RequestParam int yjje) {
        Map<String, Object> map = new HashMap<>();
        map.put("pationid",pationid);
        map.put("czybm",czybm);
        map.put("zflxbm",zflxbm);
        map.put("yjje",yjje);
        String post = HttpClientUtils.sendPost(HIS_URL, map);
        return AjaxResult.success(post);
    }
 
 
    @PostMapping("/Outpinregapply")
    @ApiOperation(value = "新增/修改门诊挂号申请")
    public AjaxResult Outpinregapply(@RequestBody OutpinregapplyDto dao) {
        Map<String, Object> map = new HashMap<>();
        map.put("pationid",dao.getPationid());
        map.put("his_registration_id",dao.getHisRegistrationId());
        map.put("sqysbm",dao.getSqysbm());
        map.put("mzksbm",dao.getMzksbm());
        map.put("czybm",dao.getCzybm());
        map.put("sfjz",dao.getSfjz());
        map.put("ghzlbm",dao.getGhzlbm());
        map.put("ywckbm",dao.getYwckbm());
        map.put("sflstd",dao.getSflstd());
        map.put("ghrq",dao.getGhrq());
        String post = HttpClientUtils.sendPost(HIS_URL, map);
        return AjaxResult.success(post);
    }
 
 
}