同步检查报告接口新增尿常规异常项判断
This commit is contained in:
parent
2e138a6270
commit
d2a2031be7
@ -61,4 +61,22 @@ public class NumberUtils {
|
|||||||
return NumberUtil.mul(values);
|
return NumberUtil.mul(values);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查给定的字符串是否为数值类型
|
||||||
|
*
|
||||||
|
* @param value 要检查的字符串
|
||||||
|
* @return 如果字符串为数值类型,则返回 true;否则返回 false
|
||||||
|
*/
|
||||||
|
public static boolean isNumeric(String value) {
|
||||||
|
if (value == null || value.isEmpty()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
Double.parseDouble(value);
|
||||||
|
return true;
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstant
|
|||||||
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
|
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
|
||||||
import cn.iocoder.yudao.framework.common.util.http.HttpUtils;
|
import cn.iocoder.yudao.framework.common.util.http.HttpUtils;
|
||||||
import cn.iocoder.yudao.framework.common.util.io.FileUtils;
|
import cn.iocoder.yudao.framework.common.util.io.FileUtils;
|
||||||
|
import cn.iocoder.yudao.framework.common.util.number.NumberUtils;
|
||||||
import cn.iocoder.yudao.framework.common.util.string.StrUtils;
|
import cn.iocoder.yudao.framework.common.util.string.StrUtils;
|
||||||
import cn.iocoder.yudao.module.infra.dal.dataobject.config.ConfigDO;
|
import cn.iocoder.yudao.module.infra.dal.dataobject.config.ConfigDO;
|
||||||
import cn.iocoder.yudao.module.infra.service.config.ConfigService;
|
import cn.iocoder.yudao.module.infra.service.config.ConfigService;
|
||||||
@ -640,7 +641,79 @@ public class InspectPatientController {
|
|||||||
}
|
}
|
||||||
inspectPacs.setItem(sb.toString());
|
inspectPacs.setItem(sb.toString());
|
||||||
}
|
}
|
||||||
|
//解析尿常规异常项
|
||||||
|
if (type.equals("NCG")) {
|
||||||
|
if (reportData.getResultsAll() != null && reportData.getResultsAll().size() > 0) {
|
||||||
|
StringBuilder ncgsb = new StringBuilder();
|
||||||
|
// 获取 results 数组并遍历
|
||||||
|
List<ResultItem> results = reportData.getResultsAll();
|
||||||
|
for (ResultItem result : results) {
|
||||||
|
switch (result.getItemCode()) {
|
||||||
|
case "WBC":
|
||||||
|
case "NIT":
|
||||||
|
if (result.getItemValue() != null && result.getItemValue().contains("+")) {
|
||||||
|
ncgsb.append("【" + result.getItemName() + ":" + "该项异常,值为:" +result.getItemValue()+ "】" + "\n");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "URO":
|
||||||
|
if (result.getItemValue() != null && !result.getItemValue().contains("Normal")) {
|
||||||
|
ncgsb.append("【" + result.getItemName() + ":" + "该项异常,值为:" +result.getItemValue()+ "】" + "\n");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "PRO":
|
||||||
|
case "BLD":
|
||||||
|
case "BIL":
|
||||||
|
case "KET":
|
||||||
|
case "GLU":
|
||||||
|
if (result.getItemValue() != null && !result.getItemValue().contains("+")) {
|
||||||
|
ncgsb.append("【" + result.getItemName() + ":" + "该项异常,值为:" +result.getItemValue()+ "】" + "\n");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "PH":
|
||||||
|
if (result.getItemValue() != null) {
|
||||||
|
if(NumberUtils.isNumeric(result.getItemValue()))
|
||||||
|
{
|
||||||
|
double ph = Double.parseDouble(result.getItemValue());
|
||||||
|
if(ph<5.0 || ph>8.0)
|
||||||
|
{
|
||||||
|
ncgsb.append("【" + result.getItemName() + ":" + "该项异常,值为:" +result.getItemValue()+ "】" + "\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "SG":
|
||||||
|
if (result.getItemValue() != null) {
|
||||||
|
if(NumberUtils.isNumeric(result.getItemValue()))
|
||||||
|
{
|
||||||
|
double sg = Double.parseDouble(result.getItemValue());
|
||||||
|
if(sg<1.015 || sg>1.025)
|
||||||
|
{
|
||||||
|
ncgsb.append("【" + result.getItemName() + ":" + "该项异常,值为:" +result.getItemValue()+ "】" + "\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "VC":
|
||||||
|
if (result.getItemValue() != null) {
|
||||||
|
if(NumberUtils.isNumeric(result.getItemValue()))
|
||||||
|
{
|
||||||
|
double vc = Double.parseDouble(result.getItemValue());
|
||||||
|
if( vc>10)
|
||||||
|
{
|
||||||
|
ncgsb.append("【" + result.getItemName() + ":" + "该项异常,值为:" +result.getItemValue()+ "】" + "\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
inspectPacs.setItem(ncgsb.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
pacsDataService.createPacsData(inspectPacs);
|
pacsDataService.createPacsData(inspectPacs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -672,12 +745,11 @@ public class InspectPatientController {
|
|||||||
// 获取 pdfurl 和 pname
|
// 获取 pdfurl 和 pname
|
||||||
String pdfurl = (String) dataMap.get("pdfurl");
|
String pdfurl = (String) dataMap.get("pdfurl");
|
||||||
String pname = (String) dataMap.get("pname");
|
String pname = (String) dataMap.get("pname");
|
||||||
String examDescription="";
|
String examDescription = "";
|
||||||
String diagResults="";
|
String diagResults = "";
|
||||||
if(dataMap.get("examDescription")!=null&&dataMap.get("diagResults")!=null)
|
if (dataMap.get("examDescription") != null && dataMap.get("diagResults") != null) {
|
||||||
{
|
examDescription = (String) dataMap.get("examDescription");
|
||||||
examDescription = (String) dataMap.get("examDescription");
|
diagResults = (String) dataMap.get("diagResults");
|
||||||
diagResults = (String) dataMap.get("diagResults");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查 pdfurl 和 pname 是否为空
|
// 检查 pdfurl 和 pname 是否为空
|
||||||
@ -690,8 +762,7 @@ public class InspectPatientController {
|
|||||||
pacsDataService.createPacsData(inspectPacs);
|
pacsDataService.createPacsData(inspectPacs);
|
||||||
}
|
}
|
||||||
//更新超声所见所得
|
//更新超声所见所得
|
||||||
if(examDescription!=null&&!examDescription.isEmpty()&&diagResults!=null&&!diagResults.isEmpty())
|
if (examDescription != null && !examDescription.isEmpty() && diagResults != null && !diagResults.isEmpty()) {
|
||||||
{
|
|
||||||
InspectPatientitemsSaveReqVO saveReqVO = new InspectPatientitemsSaveReqVO();
|
InspectPatientitemsSaveReqVO saveReqVO = new InspectPatientitemsSaveReqVO();
|
||||||
saveReqVO.setMedicalSn(medicalSn);
|
saveReqVO.setMedicalSn(medicalSn);
|
||||||
saveReqVO.setItemCode("US001");
|
saveReqVO.setItemCode("US001");
|
||||||
@ -1447,6 +1518,7 @@ public class InspectPatientController {
|
|||||||
patientService.updateMedicalDateTime(medicalSn, medicalDateTime);
|
patientService.updateMedicalDateTime(medicalSn, medicalDateTime);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/GetbarcodeInfo")
|
@GetMapping("/GetbarcodeInfo")
|
||||||
@Operation(summary = "获取样本码信息")
|
@Operation(summary = "获取样本码信息")
|
||||||
public CommonResult<BarcodeInfoVO> GetbarcodeInfo(@RequestParam("medicalSn") String medicalSn) {
|
public CommonResult<BarcodeInfoVO> GetbarcodeInfo(@RequestParam("medicalSn") String medicalSn) {
|
||||||
@ -1456,8 +1528,7 @@ public class InspectPatientController {
|
|||||||
if (patientDO == null) {
|
if (patientDO == null) {
|
||||||
return success("未找到该患者信息");
|
return success("未找到该患者信息");
|
||||||
}
|
}
|
||||||
if(patientDO.getNcgcode()==null || patientDO.getXcgcode()==null|| patientDO.getShqx()==null)
|
if (patientDO.getNcgcode() == null || patientDO.getXcgcode() == null || patientDO.getShqx() == null) {
|
||||||
{
|
|
||||||
return success("条码不存在");
|
return success("条码不存在");
|
||||||
}
|
}
|
||||||
BarcodeInfoVO barcodeInfoVO = new BarcodeInfoVO();
|
BarcodeInfoVO barcodeInfoVO = new BarcodeInfoVO();
|
||||||
|
Loading…
Reference in New Issue
Block a user