赵文轩
2024-06-07 cf32b62b2baae720a57d66da0b3ba3a105150483
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
package com.ltkj.web.controller.his;
 
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.ltkj.common.core.domain.AjaxResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
@Slf4j
@RestController
@RequestMapping("/his/getData")
public class TestGetController {
    @Autowired
    private HisApiGetMethodService apiGetMethodService;
 
    @PostMapping("test")
    public AjaxResult test(@RequestBody String json){
        JSONObject jsonObject = JSONUtil.parseObj(json);
        HashMap<String, Object> hashMap = new HashMap<>();
        hashMap.put("his_registration_id",jsonObject.getStr("his_registration_id"));
        hashMap.put("ksbm",jsonObject.getStr("ksbm"));
        hashMap.put("pationid",jsonObject.getStr("pationid"));
        hashMap.put("ksrq",jsonObject.getStr("ksrq"));
        hashMap.put("jsrq",jsonObject.getStr("jsrq"));
        hashMap.put("pagecount",jsonObject.getInt("pagecount"));
        hashMap.put("page",jsonObject.getInt("page"));
        // 获取检验报告记录信息
        AjaxResult getlabreportinfo = apiGetMethodService.getHISDataNew("Getlabreportinfo", hashMap);
        log.info("getlabreportinfo ->{}",getlabreportinfo);
        if (getlabreportinfo.get("code").toString().equals("200")){
            List<Map<String ,Object>> data = (List<Map<String, Object>>) getlabreportinfo.get("data");
            Map<String, Object> resultMap = data.get(0);
            String jybgid = (String) resultMap.get("JYBGID");
            // 获取检验结果记录信息
            hashMap = new HashMap<>();
            hashMap.put("jybgid",jybgid);
            AjaxResult getlabdetailinfo = apiGetMethodService.getHISDataNew("Getlabdetailinfo", hashMap);
            // 获取微生物报告记录信息
            AjaxResult getlabgermrepinfo = apiGetMethodService.getHISDataNew("Getlabgermrepinfo", hashMap);
            // 获取微生物药敏信息
            AjaxResult getlabgermdetailinfo = apiGetMethodService.getHISDataNew("Getlabgermdetailinfo", hashMap);
            // 获取危急值信息
            AjaxResult getlaburgentinfo = apiGetMethodService.getHISDataNew("Getlaburgentinfo", hashMap);
        }
        return AjaxResult.success();
    }
}