修复了BUG
This commit is contained in:
parent
4027608a29
commit
ebf27c80f9
@ -452,6 +452,11 @@ public class InspectPatientController {
|
||||
}
|
||||
break;
|
||||
}
|
||||
//查询是否已经存在记录 存在则不进行同步操作
|
||||
if(pacsDataService.IspacsDataExist(medicalSn, model))
|
||||
{
|
||||
return success(true);
|
||||
}
|
||||
ConfigDO config = configService.getConfigByKey("url.reporttj");
|
||||
String url = config.getValue();
|
||||
String response = HttpUtils.get(url + "?" + "barCode=" + barCode + "&" + "hospitalCode=" + patientDO.getHospitalNo());
|
||||
@ -473,21 +478,25 @@ public class InspectPatientController {
|
||||
inspectPacs.setData(reportPath);
|
||||
inspectPacs.setType(model);
|
||||
inspectPacs.setPersonName(patientDO.getPName());
|
||||
// 获取 results 数组并遍历
|
||||
List<ResultItem> results = reportData.getResults();
|
||||
for (ResultItem result : results) {
|
||||
// 判断 Item Tips 并输出相应的结果
|
||||
String itemTips = result.getItemTips();
|
||||
String tipsDescription = "";
|
||||
if ("1".equals(itemTips)) {
|
||||
tipsDescription = "偏低";
|
||||
} else if ("4".equals(itemTips)) {
|
||||
tipsDescription = "偏高";
|
||||
}
|
||||
if(reportData.getResults()!=null&&reportData.getResults().size()>0)
|
||||
{
|
||||
// 获取 results 数组并遍历
|
||||
List<ResultItem> results = reportData.getResults();
|
||||
for (ResultItem result : results) {
|
||||
// 判断 Item Tips 并输出相应的结果
|
||||
String itemTips = result.getItemTips();
|
||||
String tipsDescription = "";
|
||||
if ("1".equals(itemTips)) {
|
||||
tipsDescription = "偏低";
|
||||
} else if ("4".equals(itemTips)) {
|
||||
tipsDescription = "偏高";
|
||||
}
|
||||
|
||||
sb.append(result.getItemName() + ":" + result.getItemValue() + result.getItemUnit() + ","+"正常范围:"+result.getReferenceRange()+","+"提示:"+tipsDescription+"。"+"\n");
|
||||
sb.append("【"+result.getItemName() +":"+tipsDescription+" ,结果:" + result.getItemValue() + result.getItemUnit() +","+"参考值("+result.getReferenceRange()+ ")】"+"\n");
|
||||
}
|
||||
inspectPacs.setItem(sb.toString());
|
||||
}
|
||||
inspectPacs.setItem(sb.toString());
|
||||
|
||||
pacsDataService.createPacsData(inspectPacs);
|
||||
}
|
||||
|
||||
|
||||
@ -53,6 +53,11 @@ public interface InspectPacsDataService {
|
||||
* 根据体检编号获取pacs数据
|
||||
* */
|
||||
List<InspectPacsDataDO> GetpacsData(String code);
|
||||
/*
|
||||
*
|
||||
* 根据体检编号和类型判断是否存在pacs数据
|
||||
* */
|
||||
Boolean IspacsDataExist(String code, String type);
|
||||
|
||||
/**
|
||||
* 获得pacs抓取数据分页
|
||||
|
||||
@ -79,6 +79,15 @@ public class InspectPacsDataServiceImpl implements InspectPacsDataService {
|
||||
queryWrapper.eq("code", code);
|
||||
return pacsDataMapper.selectList(queryWrapper);
|
||||
}
|
||||
@Override
|
||||
public Boolean IspacsDataExist(String code,String type) {
|
||||
|
||||
QueryWrapper<InspectPacsDataDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("code", code);
|
||||
queryWrapper.eq("type", type);
|
||||
return pacsDataMapper.selectList(queryWrapper).size()>0? true:false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<InspectPacsDataDO> getPacsDataPage(InspectPacsDataPageReqVO pageReqVO) {
|
||||
return pacsDataMapper.selectPage(pageReqVO);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user