|
@@ -3,7 +3,6 @@ package com.lantone.qc.kernel.web.controller;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.lantone.qc.kernel.analysis.QCAnalysis;
|
|
|
import com.lantone.qc.kernel.util.CacheFileManager;
|
|
|
-import com.lantone.qc.kernel.util.ModelDataUtil;
|
|
|
import com.lantone.qc.kernel.util.KernelConstants;
|
|
|
import com.lantone.qc.pub.jdbc.MysqlJdbc;
|
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
@@ -16,7 +15,9 @@ import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.sql.Connection;
|
|
|
import java.sql.ResultSet;
|
|
@@ -98,6 +99,26 @@ public class QCTestController {
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @ApiOperation(value = "质控单个病历测试,无需token信息", notes = "")
|
|
|
+ @PostMapping("qc_test_single")
|
|
|
+ public Response<OutputInfo> qc_test_single(String cid, String caseNumber, String hospitalId) {
|
|
|
+ Response response = new Response();
|
|
|
+ if (StringUtils.isEmpty(hospitalId)) {
|
|
|
+ response.setData("未填写医院流水号(hospitalId)......");
|
|
|
+ }
|
|
|
+ if (StringUtils.isEmpty(cid)) {
|
|
|
+ response.setData("未填写医院缩写(cid)......");
|
|
|
+ }
|
|
|
+ //key = 患者就诊号
|
|
|
+ Map<String, QueryVo> queryVoMap = createQueryVo(cid, hospitalId, caseNumber);
|
|
|
+ //key = 患者就诊号
|
|
|
+ OutputInfo outputInfo = qCAnalysis.anlysis(queryVoMap.get(caseNumber));
|
|
|
+ response.setData(outputInfo);
|
|
|
+ return response.success();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
public Map<String, QueryVo> createQueryVo(String cid, String hospitalId, String caseNumber) {
|
|
|
PropertiesUtil propertiesUtil = new PropertiesUtil("kernel.properties");
|
|
|
MysqlJdbc mysqlJdbc = new MysqlJdbc(propertiesUtil.getProperty("mysql.test.user"),
|