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();
|
}
|
}
|