|
@@ -3,21 +3,24 @@ package com.lantone.data.facade.data;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
-import com.diagbot.dto.AnalyzeRunDTO;
|
|
|
|
-import com.diagbot.dto.RecordContentDTO;
|
|
|
|
-import com.diagbot.dto.RespDTO;
|
|
|
|
-import com.diagbot.dto.data.AMedicalRecordDTO;
|
|
|
|
-import com.diagbot.entity.*;
|
|
|
|
-import com.diagbot.enums.IsDeleteEnum;
|
|
|
|
-import com.diagbot.enums.ModeIdEnum;
|
|
|
|
-import com.diagbot.facade.*;
|
|
|
|
-import com.diagbot.service.impl.MedicalRecordServiceImpl;
|
|
|
|
-import com.diagbot.util.*;
|
|
|
|
-import com.diagbot.vo.AnalyzeRunVO;
|
|
|
|
-import com.diagbot.vo.MedrecVo;
|
|
|
|
-import com.diagbot.vo.QueryVo;
|
|
|
|
-import com.diagbot.vo.data.*;
|
|
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Lists;
|
|
|
|
+import com.lantone.data.dto.AnalyzeRunDTO;
|
|
|
|
+import com.lantone.data.dto.RespDTO;
|
|
|
|
+import com.lantone.data.entity.*;
|
|
|
|
+import com.lantone.data.enums.IsDeleteEnum;
|
|
|
|
+import com.lantone.data.enums.ModeIdEnum;
|
|
|
|
+import com.lantone.data.facade.ModelHospitalFacade;
|
|
|
|
+import com.lantone.data.facade.QcTypeFacade;
|
|
|
|
+import com.lantone.data.service.impl.MedicalRecordServiceImpl;
|
|
|
|
+import com.lantone.data.util.*;
|
|
|
|
+import com.lantone.data.vo.AnalyzeRunVO;
|
|
|
|
+import com.lantone.data.vo.ColumnContentVO;
|
|
|
|
+import com.lantone.data.vo.HisDataDealVO;
|
|
|
|
+import com.lantone.data.vo.data.MedicalRecordContentVO;
|
|
|
|
+import com.lantone.data.vo.data.MedicalRecordVO;
|
|
|
|
+import com.lantone.data.vo.data.MrContentVO;
|
|
|
|
+import com.lantone.structure.model.vo.MedrecVo;
|
|
|
|
+import com.lantone.structure.model.vo.QueryVo;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
@@ -76,10 +79,10 @@ public class MedicalRecordFacade extends MedicalRecordServiceImpl {
|
|
* @param list
|
|
* @param list
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public RespDTO<List<AMedicalRecordDTO>> executeMrRecord(List<AMedicalRecordVO> list) {
|
|
|
|
|
|
+ public RespDTO executeMrRecord(List<MedicalRecordVO> list) {
|
|
if (list != null && list.size() > 0) {
|
|
if (list != null && list.size() > 0) {
|
|
//循环验证数据有效性
|
|
//循环验证数据有效性
|
|
- for (AMedicalRecordVO aMedicalRecordVO : list) {
|
|
|
|
|
|
+ for (MedicalRecordVO aMedicalRecordVO : list) {
|
|
if ("".equals(aMedicalRecordVO.getRecId())) {
|
|
if ("".equals(aMedicalRecordVO.getRecId())) {
|
|
return RespDTO.onError("请输入文书序号!");
|
|
return RespDTO.onError("请输入文书序号!");
|
|
} else if (aMedicalRecordVO.getHospitalId() == null) {
|
|
} else if (aMedicalRecordVO.getHospitalId() == null) {
|
|
@@ -99,7 +102,6 @@ public class MedicalRecordFacade extends MedicalRecordServiceImpl {
|
|
});
|
|
});
|
|
execute(medicalRecordList);
|
|
execute(medicalRecordList);
|
|
|
|
|
|
- List<AMedicalRecordDTO> medicalRecordDTOList = BeanUtil.listCopyTo(list, AMedicalRecordDTO.class);
|
|
|
|
return RespDTO.onSuc("操作成功!");
|
|
return RespDTO.onSuc("操作成功!");
|
|
} else {
|
|
} else {
|
|
return RespDTO.onError("未接收到数据!");
|
|
return RespDTO.onError("未接收到数据!");
|
|
@@ -137,13 +139,13 @@ public class MedicalRecordFacade extends MedicalRecordServiceImpl {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- List<AMedicalRecordContentVO> contents = BeanUtil.listCopyTo(medicalRecordContentList, AMedicalRecordContentVO.class);
|
|
|
|
- AMedicalRecordVO aMedicalRecordVO = new AMedicalRecordVO();
|
|
|
|
|
|
+ List<MedicalRecordContentVO> contents = BeanUtil.listCopyTo(medicalRecordContentList, AMedicalRecordContentVO.class);
|
|
|
|
+ MedicalRecordVO aMedicalRecordVO = new MedicalRecordVO();
|
|
BeanUtil.copyProperties(medicalRecord, aMedicalRecordVO);
|
|
BeanUtil.copyProperties(medicalRecord, aMedicalRecordVO);
|
|
aMedicalRecordVO.setContents(contents);
|
|
aMedicalRecordVO.setContents(contents);
|
|
- List<AMedicalRecordVO> records = Lists.newArrayList();
|
|
|
|
|
|
+ List<MedicalRecordVO> records = Lists.newArrayList();
|
|
records.add(aMedicalRecordVO);
|
|
records.add(aMedicalRecordVO);
|
|
- AMrContentVO aMrContentVO = new AMrContentVO();
|
|
|
|
|
|
+ MrContentVO aMrContentVO = new MrContentVO();
|
|
aMrContentVO.setRecords(records);
|
|
aMrContentVO.setRecords(records);
|
|
splicingParam(aMrContentVO);
|
|
splicingParam(aMrContentVO);
|
|
}
|
|
}
|
|
@@ -179,16 +181,16 @@ public class MedicalRecordFacade extends MedicalRecordServiceImpl {
|
|
*
|
|
*
|
|
* @param aMrContentVO
|
|
* @param aMrContentVO
|
|
*/
|
|
*/
|
|
- public void splicingParam(AMrContentVO aMrContentVO) {
|
|
|
|
|
|
+ public void splicingParam(MrContentVO aMrContentVO) {
|
|
|
|
|
|
try {
|
|
try {
|
|
QueryVo queryVo = new QueryVo();
|
|
QueryVo queryVo = new QueryVo();
|
|
List<MedrecVo> medreclist = Lists.newArrayList();
|
|
List<MedrecVo> medreclist = Lists.newArrayList();
|
|
|
|
|
|
- List<AColumnContentVO> content = Lists.newArrayList();
|
|
|
|
|
|
+ List<ColumnContentVO> content = Lists.newArrayList();
|
|
aMrContentVO.getRecords().stream().forEach(s -> {
|
|
aMrContentVO.getRecords().stream().forEach(s -> {
|
|
queryVo.setHospitalId(s.getHospitalId().toString());
|
|
queryVo.setHospitalId(s.getHospitalId().toString());
|
|
- queryVo.setCid(basHospitalInfoFacade.getHosCode(s.getHospitalId()));
|
|
|
|
|
|
+ //queryVo.setCid(basHospitalInfoFacade.getHosCode(s.getHospitalId()));
|
|
Long modeId ;
|
|
Long modeId ;
|
|
if (null == s.getModeId()) {
|
|
if (null == s.getModeId()) {
|
|
modeId = initModeId(s.getHospitalId(), s.getRecTypeId());
|
|
modeId = initModeId(s.getHospitalId(), s.getRecTypeId());
|
|
@@ -197,7 +199,7 @@ public class MedicalRecordFacade extends MedicalRecordServiceImpl {
|
|
}
|
|
}
|
|
s.getContents().stream().forEach(item -> {
|
|
s.getContents().stream().forEach(item -> {
|
|
//拼接入参用于结构化解析
|
|
//拼接入参用于结构化解析
|
|
- AColumnContentVO aColumnContentVO = new AColumnContentVO();
|
|
|
|
|
|
+ ColumnContentVO aColumnContentVO = new ColumnContentVO();
|
|
aColumnContentVO.setModeId(modeId);
|
|
aColumnContentVO.setModeId(modeId);
|
|
aColumnContentVO.setStandModelName(ModeIdEnum.getName(Integer.parseInt(modeId.toString())));
|
|
aColumnContentVO.setStandModelName(ModeIdEnum.getName(Integer.parseInt(modeId.toString())));
|
|
aColumnContentVO.setRecId(s.getRecId());
|
|
aColumnContentVO.setRecId(s.getRecId());
|
|
@@ -212,7 +214,7 @@ public class MedicalRecordFacade extends MedicalRecordServiceImpl {
|
|
List<Map<String, Object>> returnData = new ArrayList<>();
|
|
List<Map<String, Object>> returnData = new ArrayList<>();
|
|
String keyNname = ModeIdEnum.getName(Integer.parseInt(modeId.toString()));
|
|
String keyNname = ModeIdEnum.getName(Integer.parseInt(modeId.toString()));
|
|
Map<String, List<Map<String, Object>>> returnMap = new HashMap<>();
|
|
Map<String, List<Map<String, Object>>> returnMap = new HashMap<>();
|
|
- for (AColumnContentVO aColumnContentVO : content) {
|
|
|
|
|
|
+ for (ColumnContentVO aColumnContentVO : content) {
|
|
try {
|
|
try {
|
|
Map<String, Object> objectMap = MapUtil.objectToMap(aColumnContentVO);
|
|
Map<String, Object> objectMap = MapUtil.objectToMap(aColumnContentVO);
|
|
returnData.add(objectMap);
|
|
returnData.add(objectMap);
|
|
@@ -230,10 +232,9 @@ public class MedicalRecordFacade extends MedicalRecordServiceImpl {
|
|
});
|
|
});
|
|
queryVo.setMedrec(medreclist);
|
|
queryVo.setMedrec(medreclist);
|
|
|
|
|
|
- columnFacade.analyseRec(queryVo);
|
|
|
|
|
|
+ //columnFacade.analyseRec(queryVo);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
log.error(e.getMessage(), e);
|
|
log.error(e.getMessage(), e);
|
|
- aMedAbnormalInfoFacade.saveAbnormalInfo("参数拼接", "", JSON.toJSONString(aMrContentVO), "", e.getMessage());
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -244,10 +245,10 @@ public class MedicalRecordFacade extends MedicalRecordServiceImpl {
|
|
* @param aMrContentVO
|
|
* @param aMrContentVO
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public RespDTO<Map<String, Object>> executeMrRecordIng(AMrContentVO aMrContentVO) {
|
|
|
|
|
|
+ public RespDTO<Map<String, Object>> executeMrRecordIng(MrContentVO aMrContentVO) {
|
|
if (aMrContentVO.getRecords() != null && aMrContentVO.getRecords().size() > 0) {
|
|
if (aMrContentVO.getRecords() != null && aMrContentVO.getRecords().size() > 0) {
|
|
//循环验证数据有效性
|
|
//循环验证数据有效性
|
|
- for (AMedicalRecordVO aMedicalRecordVO : aMrContentVO.getRecords()) {
|
|
|
|
|
|
+ for (MedicalRecordVO aMedicalRecordVO : aMrContentVO.getRecords()) {
|
|
if ("".equals(aMedicalRecordVO.getRecId())) {
|
|
if ("".equals(aMedicalRecordVO.getRecId())) {
|
|
return RespDTO.onError("请输入文书序号!");
|
|
return RespDTO.onError("请输入文书序号!");
|
|
} else if (aMedicalRecordVO.getHospitalId() == null) {
|
|
} else if (aMedicalRecordVO.getHospitalId() == null) {
|