|
@@ -1,27 +1,25 @@
|
|
|
package com.diagbot.facade.data;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.TypeReference;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
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.dto.data.AMrContentDTO;
|
|
|
import com.diagbot.entity.*;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.enums.ModeIdEnum;
|
|
|
-import com.diagbot.facade.BasHospitalInfoFacade;
|
|
|
-import com.diagbot.facade.BehospitalInfoFacade;
|
|
|
-import com.diagbot.facade.ModelHospitalFacade;
|
|
|
-import com.diagbot.facade.QcTypeFacade;
|
|
|
+import com.diagbot.facade.*;
|
|
|
import com.diagbot.service.impl.MedicalRecordServiceImpl;
|
|
|
import com.diagbot.service.impl.QcAbnormalServiceImpl;
|
|
|
import com.diagbot.util.*;
|
|
|
-import com.diagbot.vo.AnalyzeRunVO;
|
|
|
-import com.diagbot.vo.MedrecVo;
|
|
|
-import com.diagbot.vo.QueryVo;
|
|
|
+import com.diagbot.vo.*;
|
|
|
import com.diagbot.vo.data.*;
|
|
|
import com.google.common.collect.Lists;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
@@ -39,6 +37,9 @@ public class AMedicalRecordFacade extends MedicalRecordServiceImpl {
|
|
|
@Autowired
|
|
|
private ModelHospitalFacade modelHospitalFacade;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ MedicalRecordFacade medicalRecordFacade;
|
|
|
+
|
|
|
@Autowired
|
|
|
private AMedicalRecordContentFacade aMedicalRecordContentFacade;
|
|
|
|
|
@@ -115,101 +116,265 @@ public class AMedicalRecordFacade extends MedicalRecordServiceImpl {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public boolean hisDataDeal(HisDataDealVO hisDataDealVO) {
|
|
|
+ public boolean hisDataDeal(HisDataDealVO hisDataDealVO) throws Exception {
|
|
|
QueryWrapper<MedicalRecord> medicalRecordQe = new QueryWrapper<>();
|
|
|
medicalRecordQe.eq("hospital_id", hisDataDealVO.getHospitalId());
|
|
|
- medicalRecordQe.eq("mode_id", hisDataDealVO.getModeId());
|
|
|
+ medicalRecordQe.in("mode_id", hisDataDealVO.getModeId());
|
|
|
if (hisDataDealVO.getRecIdList().size() > 0) {
|
|
|
medicalRecordQe.in("rec_id", hisDataDealVO.getRecIdList());
|
|
|
}
|
|
|
List<MedicalRecord> medicalRecordList = medicalRecordService.list(medicalRecordQe);
|
|
|
- medicalRecordList.forEach(medicalRecord -> {
|
|
|
- QueryWrapper<MedicalRecordContent> medicalRecordContentQe = new QueryWrapper<>();
|
|
|
- medicalRecordContentQe.eq("hospital_id", hisDataDealVO.getHospitalId());
|
|
|
- medicalRecordContentQe.eq("rec_id", medicalRecord.getRecId());
|
|
|
- List<MedicalRecordContent> medicalRecordContentList = aMedicalRecordContentFacade.list(medicalRecordContentQe);
|
|
|
-
|
|
|
- if (ListUtil.isEmpty(medicalRecordContentList)) {
|
|
|
- return;
|
|
|
+ List<MedicalRecordContent> medicalRecord_7 = new ArrayList<>();
|
|
|
+
|
|
|
+ List<MedicalRecordContent> medicalRecord_30 = new ArrayList<>();
|
|
|
+
|
|
|
+ List<MedicalRecordContent> medicalRecord_31 = new ArrayList<>();
|
|
|
+
|
|
|
+
|
|
|
+ Boolean flag = true;
|
|
|
+ Long log = null;
|
|
|
+
|
|
|
+ for (MedicalRecord medicalRecord : medicalRecordList) {
|
|
|
+
|
|
|
+ if (medicalRecord.getModeId() == 7l) {
|
|
|
+ specialDataWithKey(medicalRecord_7, hisDataDealVO, medicalRecord);
|
|
|
+ log = 7l;
|
|
|
+ flag = false;
|
|
|
+ }
|
|
|
+ if (medicalRecord.getModeId() == 30l) {
|
|
|
+ specialDataWithKey(medicalRecord_30, hisDataDealVO, medicalRecord);
|
|
|
+ log = 30l;
|
|
|
+ flag = false;
|
|
|
}
|
|
|
+ if (medicalRecord.getModeId() == 31l) {
|
|
|
+ specialDataWithKey(medicalRecord_31, hisDataDealVO, medicalRecord);
|
|
|
+ log = 31l;
|
|
|
+ flag = false;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
- if (encryptFlag) {
|
|
|
- try {
|
|
|
- EncrypDES encrypDES = new EncrypDES();
|
|
|
- for (MedicalRecordContent mrj : medicalRecordContentList) {
|
|
|
- mrj.setXmlText(encrypDES.decryptor(mrj.getXmlText()));
|
|
|
+
|
|
|
+ if (log == 7l) {
|
|
|
+ specialDataWithKey2(encryptFlag, medicalRecord_7);
|
|
|
+
|
|
|
+ }
|
|
|
+ if (log == 30l) {
|
|
|
+ specialDataWithKey2(encryptFlag, medicalRecord_30);
|
|
|
+ }
|
|
|
+ if (log == 31l) {
|
|
|
+ specialDataWithKey2(encryptFlag, medicalRecord_31);
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String, Object> content = new HashMap<>();
|
|
|
+ for (MedicalRecord medicalRecord : medicalRecordList) {
|
|
|
+
|
|
|
+ Map<String, Object> listMap = new HashMap<>();
|
|
|
+// List<MedicalRecordContent> recIdList_7 = null;
|
|
|
+// List<MedicalRecordContent> recIdList_30 = null;
|
|
|
+// List<MedicalRecordContent> recIdList_31 = null;
|
|
|
+ RecordDataVO recordContentVO_7 = new RecordDataVO();
|
|
|
+ BeanUtil.copyProperties(medicalRecord, recordContentVO_7);
|
|
|
+ recordContentVO_7.setModeId(7l);
|
|
|
+ List<RecordContentDTO> recordContentFac_7 = medicalRecordFacade.getRecordData(recordContentVO_7);
|
|
|
+// recIdList_7 = BeanUtil.listCopyTo(recordContentFac_7, MedicalRecordContent.class);
|
|
|
+ List<Map<String, Object>> returnData = new ArrayList<>();
|
|
|
+ if (ListUtil.isNotEmpty(recordContentFac_7)) {
|
|
|
+ for (RecordContentDTO recordContentDTO : recordContentFac_7) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> objectMap = MapUtil.objectToMap(recordContentDTO);
|
|
|
+ returnData.add(objectMap);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
- } catch (Exception e) {
|
|
|
- return;
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
- List<AMedicalRecordContentVO> contents = BeanUtil.listCopyTo(medicalRecordContentList, AMedicalRecordContentVO.class);
|
|
|
- AMedicalRecordVO aMedicalRecordVO = new AMedicalRecordVO();
|
|
|
- BeanUtil.copyProperties(medicalRecord, aMedicalRecordVO);
|
|
|
- aMedicalRecordVO.setContents(contents);
|
|
|
-
|
|
|
- List<AMedicalRecordVO> records = Lists.newArrayList();
|
|
|
- records.add(aMedicalRecordVO);
|
|
|
- AMrContentVO aMrContentVO = new AMrContentVO();
|
|
|
- aMrContentVO.setRecords(records);
|
|
|
- splicingParam(aMrContentVO);
|
|
|
- });
|
|
|
+
|
|
|
+ RecordDataVO recordContentVO_30 = new RecordDataVO();
|
|
|
+ BeanUtil.copyProperties(medicalRecord, recordContentVO_30);
|
|
|
+ recordContentVO_30.setModeId(30l);
|
|
|
+ List<RecordContentDTO> recordContentFac_30 = medicalRecordFacade.getRecordData(recordContentVO_30);
|
|
|
+// recIdList_30 = BeanUtil.listCopyTo(recordContentFac_30, MedicalRecordContent.class);
|
|
|
+ if (ListUtil.isNotEmpty(recordContentFac_30)) {
|
|
|
+ for (RecordContentDTO recordContentDTO : recordContentFac_30) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> objectMap = MapUtil.objectToMap(recordContentDTO);
|
|
|
+ returnData.add(objectMap);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ RecordDataVO recordContentVO_31 = new RecordDataVO();
|
|
|
+ BeanUtil.copyProperties(medicalRecord, recordContentVO_31);
|
|
|
+ recordContentVO_31.setModeId(31l);
|
|
|
+
|
|
|
+ List<RecordContentDTO> recordContentFac_31 = medicalRecordFacade.getRecordData(recordContentVO_31);
|
|
|
+// recIdList_31 = BeanUtil.listCopyTo(recordContentFac_31, MedicalRecordContent.class);
|
|
|
+ if (ListUtil.isNotEmpty(recordContentFac_31)) {
|
|
|
+
|
|
|
+ for (RecordContentDTO recordContentDTO :recordContentFac_31) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> objectMap = MapUtil.objectToMap(recordContentDTO);
|
|
|
+ returnData.add(objectMap);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ content.put("content", returnData);
|
|
|
+ MedrecVo medrecVo = new MedrecVo();
|
|
|
+ medrecVo.setContent(content);
|
|
|
+ medrecVo.setTitle("会诊");
|
|
|
+ splicingParam(null,medrecVo);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (flag) {
|
|
|
+ medicalRecordList.forEach(medicalRecord -> {
|
|
|
+
|
|
|
+ QueryWrapper<MedicalRecordContent> medicalRecordContentQe = new QueryWrapper<>();
|
|
|
+ medicalRecordContentQe.eq("hospital_id", hisDataDealVO.getHospitalId());
|
|
|
+ medicalRecordContentQe.eq("rec_id", medicalRecord.getRecId());
|
|
|
+ List<MedicalRecordContent> medicalRecordContentList = aMedicalRecordContentFacade.list(medicalRecordContentQe);
|
|
|
+
|
|
|
+ if (ListUtil.isEmpty(medicalRecordContentList)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (encryptFlag) {
|
|
|
+ try {
|
|
|
+ EncrypDES encrypDES = new EncrypDES();
|
|
|
+ for (MedicalRecordContent mrj : medicalRecordContentList) {
|
|
|
+ mrj.setXmlText(encrypDES.decryptor(mrj.getXmlText()));
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ List<AMedicalRecordContentVO> contents = BeanUtil.listCopyTo(medicalRecordContentList, AMedicalRecordContentVO.class);
|
|
|
+ AMedicalRecordVO aMedicalRecordVO = new AMedicalRecordVO();
|
|
|
+ BeanUtil.copyProperties(medicalRecord, aMedicalRecordVO);
|
|
|
+ aMedicalRecordVO.setContents(contents);
|
|
|
+ List<AMedicalRecordVO> records = Lists.newArrayList();
|
|
|
+ records.add(aMedicalRecordVO);
|
|
|
+ AMrContentVO aMrContentVO = new AMrContentVO();
|
|
|
+ aMrContentVO.setRecords(records);
|
|
|
+ splicingParam(aMrContentVO,null);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+ ;
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 特殊公共方法处理数据1
|
|
|
+ *
|
|
|
+ * @param hisDataDealVO
|
|
|
+ * @param medicalRecord
|
|
|
+ */
|
|
|
+ public void specialDataWithKey(List<MedicalRecordContent> medicalRecordContentList,
|
|
|
+ HisDataDealVO hisDataDealVO, MedicalRecord medicalRecord) {
|
|
|
+
|
|
|
+ QueryWrapper<MedicalRecordContent> medicalRecordContentQe = new QueryWrapper<>();
|
|
|
+ medicalRecordContentQe.eq("hospital_id", hisDataDealVO.getHospitalId());
|
|
|
+ medicalRecordContentQe.eq("rec_id", medicalRecord.getRecId());
|
|
|
+ MedicalRecordContent medicalRecordContent = aMedicalRecordContentFacade.getOne(medicalRecordContentQe);
|
|
|
+ medicalRecordContentList.add(medicalRecordContent);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 特殊公共方法处理数据2
|
|
|
+ *
|
|
|
+ * @param
|
|
|
+ */
|
|
|
+ public void specialDataWithKey2(Boolean encryptFlag, List<MedicalRecordContent> medicalRecordContentList
|
|
|
+ ) {
|
|
|
+
|
|
|
+ if (encryptFlag) {
|
|
|
+ try {
|
|
|
+ EncrypDES encrypDES = new EncrypDES();
|
|
|
+ for (MedicalRecordContent mrj : medicalRecordContentList) {
|
|
|
+ mrj.setXmlText(encrypDES.decryptor(mrj.getXmlText()));
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 入参结构拼接-仅支持接口对接的方式
|
|
|
*
|
|
|
* @param aMrContentVO
|
|
|
*/
|
|
|
- public void splicingParam(AMrContentVO aMrContentVO) {
|
|
|
- try{
|
|
|
+ public void splicingParam(AMrContentVO aMrContentVO, MedrecVo medrec) {
|
|
|
+ if (null == aMrContentVO) {
|
|
|
QueryVo queryVo = new QueryVo();
|
|
|
List<MedrecVo> medreclist = Lists.newArrayList();
|
|
|
-
|
|
|
- List<AColumnContentVO> content = Lists.newArrayList();
|
|
|
- aMrContentVO.getRecords().stream().forEach(s -> {
|
|
|
- queryVo.setHospitalId(s.getHospitalId().toString());
|
|
|
- queryVo.setCid(basHospitalInfoFacade.getHosCode(s.getHospitalId()));
|
|
|
-
|
|
|
- Long modeId = initModeId(s.getHospitalId(), s.getRecTitle());
|
|
|
- s.getContents().stream().forEach(item -> {
|
|
|
- //拼接入参用于结构化解析
|
|
|
- AColumnContentVO aColumnContentVO = new AColumnContentVO();
|
|
|
- aColumnContentVO.setModeId(modeId);
|
|
|
- aColumnContentVO.setStandModelName(ModeIdEnum.getName(Integer.parseInt(modeId.toString())));
|
|
|
- aColumnContentVO.setRecId(s.getRecId());
|
|
|
- aColumnContentVO.setRecTypeId(s.getRecTypeId());
|
|
|
- aColumnContentVO.setRecTitle(s.getRecTitle());
|
|
|
- aColumnContentVO.setXmlText(item.getXmlText());
|
|
|
- aColumnContentVO.setBehospitalCode(s.getBehospitalCode());
|
|
|
-
|
|
|
- content.add(aColumnContentVO);
|
|
|
- });
|
|
|
- Map<String, Object> map = new HashMap<String, Object>();
|
|
|
- List<Map<String, Object>> returnData = new ArrayList<>();
|
|
|
- for (AColumnContentVO aColumnContentVO : content) {
|
|
|
- try {
|
|
|
- Map<String, Object> objectMap = MapUtil.objectToMap(aColumnContentVO);
|
|
|
- returnData.add(objectMap);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
+ medreclist.add(medrec);
|
|
|
+ queryVo.setMedrec(medreclist);
|
|
|
+ columnFacade.analyseRec(queryVo);
|
|
|
+ } if(null == medrec) {
|
|
|
+ try {
|
|
|
+ QueryVo queryVo = new QueryVo();
|
|
|
+ List<MedrecVo> medreclist = Lists.newArrayList();
|
|
|
+
|
|
|
+ List<AColumnContentVO> content = Lists.newArrayList();
|
|
|
+ aMrContentVO.getRecords().stream().forEach(s -> {
|
|
|
+ queryVo.setHospitalId(s.getHospitalId().toString());
|
|
|
+ queryVo.setCid(basHospitalInfoFacade.getHosCode(s.getHospitalId()));
|
|
|
+
|
|
|
+ Long modeId = initModeId(s.getHospitalId(), s.getRecTitle());
|
|
|
+ s.getContents().stream().forEach(item -> {
|
|
|
+ //拼接入参用于结构化解析
|
|
|
+ AColumnContentVO aColumnContentVO = new AColumnContentVO();
|
|
|
+ aColumnContentVO.setModeId(modeId);
|
|
|
+ aColumnContentVO.setStandModelName(ModeIdEnum.getName(Integer.parseInt(modeId.toString())));
|
|
|
+ aColumnContentVO.setRecId(s.getRecId());
|
|
|
+ aColumnContentVO.setRecTypeId(s.getRecTypeId());
|
|
|
+ aColumnContentVO.setRecTitle(s.getRecTitle());
|
|
|
+ aColumnContentVO.setXmlText(item.getXmlText());
|
|
|
+ aColumnContentVO.setBehospitalCode(s.getBehospitalCode());
|
|
|
+
|
|
|
+ content.add(aColumnContentVO);
|
|
|
+ });
|
|
|
+ Map<String, Object> map = new HashMap<String, Object>();
|
|
|
+ List<Map<String, Object>> returnData = new ArrayList<>();
|
|
|
+ for (AColumnContentVO aColumnContentVO : content) {
|
|
|
+ try {
|
|
|
+ Map<String, Object> objectMap = MapUtil.objectToMap(aColumnContentVO);
|
|
|
+ returnData.add(objectMap);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- map.put("content", returnData);
|
|
|
- MedrecVo medrecVo = new MedrecVo();
|
|
|
- medrecVo.setTitle(ModeIdEnum.getName(Integer.parseInt(modeId.toString())));
|
|
|
- medrecVo.setContent(map);
|
|
|
- medreclist.add(medrecVo);
|
|
|
- });
|
|
|
- queryVo.setMedrec(medreclist);
|
|
|
+ map.put("content", returnData);
|
|
|
+ MedrecVo medrecVo = new MedrecVo();
|
|
|
+ medrecVo.setTitle(ModeIdEnum.getName(Integer.parseInt(modeId.toString())));
|
|
|
+ medrecVo.setContent(map);
|
|
|
+ medreclist.add(medrecVo);
|
|
|
+ });
|
|
|
+ queryVo.setMedrec(medreclist);
|
|
|
|
|
|
- columnFacade.analyseRec(queryVo);
|
|
|
- }catch (Exception e){
|
|
|
- log.error(e.getMessage(),e);
|
|
|
- aMedAbnormalInfoFacade.saveAbnormalInfo("参数拼接", "",JSON.toJSONString(aMrContentVO),"",e.getMessage());
|
|
|
+ columnFacade.analyseRec(queryVo);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
+ aMedAbnormalInfoFacade.saveAbnormalInfo("参数拼接", "", JSON.toJSONString(aMrContentVO), "", e.getMessage());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -247,7 +412,7 @@ public class AMedicalRecordFacade extends MedicalRecordServiceImpl {
|
|
|
});
|
|
|
|
|
|
//数据解析
|
|
|
- splicingParam(aMrContentVO);
|
|
|
+ splicingParam(aMrContentVO,null);
|
|
|
|
|
|
//评分后返回结构体
|
|
|
return mrIng(aMrContentVO);
|
|
@@ -317,7 +482,7 @@ public class AMedicalRecordFacade extends MedicalRecordServiceImpl {
|
|
|
}
|
|
|
|
|
|
public void execute(List<MedicalRecord> medicalRecordList) {
|
|
|
- try{
|
|
|
+ try {
|
|
|
List<MedicalRecord> addE = Lists.newLinkedList();
|
|
|
List<MedicalRecord> updateE = Lists.newLinkedList();
|
|
|
List<BehospitalInfo> behospitalInfoList = Lists.newLinkedList();
|
|
@@ -373,9 +538,9 @@ public class AMedicalRecordFacade extends MedicalRecordServiceImpl {
|
|
|
if (behospitalInfoList.size() > 0) {
|
|
|
behospitalInfoFacade.updateBatchByKey(behospitalInfoList);
|
|
|
}
|
|
|
- }catch (Exception e){
|
|
|
- log.error(e.getMessage(),e);
|
|
|
- aMedAbnormalInfoFacade.saveAbnormalInfo("文书信息","", JSON.toJSONString(medicalRecordList),"",e.getMessage());
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
+ aMedAbnormalInfoFacade.saveAbnormalInfo("文书信息", "", JSON.toJSONString(medicalRecordList), "", e.getMessage());
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -428,6 +593,7 @@ public class AMedicalRecordFacade extends MedicalRecordServiceImpl {
|
|
|
|
|
|
/**
|
|
|
* 初始化模型ID
|
|
|
+ *
|
|
|
* @param hospitalId
|
|
|
* @param recTitle
|
|
|
* @return
|
|
@@ -446,7 +612,7 @@ public class AMedicalRecordFacade extends MedicalRecordServiceImpl {
|
|
|
return modeId;
|
|
|
}
|
|
|
|
|
|
- public RespDTO deleteFlag(ADeleteFlagVO aDeleteFlagVO){
|
|
|
+ public RespDTO deleteFlag(ADeleteFlagVO aDeleteFlagVO) {
|
|
|
try {
|
|
|
//验证数据是否存在
|
|
|
if (StringUtil.isEmpty(aDeleteFlagVO.getRecId())) {
|
|
@@ -455,32 +621,32 @@ public class AMedicalRecordFacade extends MedicalRecordServiceImpl {
|
|
|
return RespDTO.onError("请输入医院编码!");
|
|
|
} else if (StringUtil.isEmpty(aDeleteFlagVO.getBehospitalCode())) {
|
|
|
return RespDTO.onError("请输入病人住院编码!");
|
|
|
- }else {
|
|
|
- UpdateWrapper<MedicalRecord> updateWrapper=new UpdateWrapper<>();
|
|
|
+ } else {
|
|
|
+ UpdateWrapper<MedicalRecord> updateWrapper = new UpdateWrapper<>();
|
|
|
updateWrapper.eq("rec_id", aDeleteFlagVO.getRecId())
|
|
|
.eq("hospital_id", aDeleteFlagVO.getHospitalId())
|
|
|
.eq("behospital_code", aDeleteFlagVO.getBehospitalCode())
|
|
|
- .eq("is_deleted",IsDeleteEnum.N)
|
|
|
- .set("is_deleted",IsDeleteEnum.Y)
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N)
|
|
|
+ .set("is_deleted", IsDeleteEnum.Y)
|
|
|
.set("gmt_modified", DateUtil.now());
|
|
|
|
|
|
- Boolean flag=update(new MedicalRecord(),updateWrapper);
|
|
|
- if(flag){
|
|
|
- UpdateWrapper<MedicalRecordContent> updateWrapperContent=new UpdateWrapper<>();
|
|
|
+ Boolean flag = update(new MedicalRecord(), updateWrapper);
|
|
|
+ if (flag) {
|
|
|
+ UpdateWrapper<MedicalRecordContent> updateWrapperContent = new UpdateWrapper<>();
|
|
|
updateWrapperContent.eq("rec_id", aDeleteFlagVO.getRecId())
|
|
|
.eq("hospital_id", aDeleteFlagVO.getHospitalId())
|
|
|
- .eq("is_deleted",IsDeleteEnum.N)
|
|
|
- .set("is_deleted",IsDeleteEnum.Y)
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N)
|
|
|
+ .set("is_deleted", IsDeleteEnum.Y)
|
|
|
.set("gmt_modified", DateUtil.now());
|
|
|
|
|
|
- Boolean flagContent=aMedicalRecordContentFacade.update(new MedicalRecordContent(),updateWrapperContent);
|
|
|
+ Boolean flagContent = aMedicalRecordContentFacade.update(new MedicalRecordContent(), updateWrapperContent);
|
|
|
//aMedAbnormalInfoFacade.saveAbnormalInfo("文书内容-删除",JSON.toJSONString(aDeleteFlagVO),JSON.toJSONString(RespDTO.onSuc(flagContent)),"操作成功!");
|
|
|
}
|
|
|
//aMedAbnormalInfoFacade.saveAbnormalInfo("文书信息-删除",JSON.toJSONString(aDeleteFlagVO),JSON.toJSONString(RespDTO.onSuc(flag)),"操作成功!");
|
|
|
return RespDTO.onSuc(flag);
|
|
|
}
|
|
|
- }catch (Exception e){
|
|
|
- aMedAbnormalInfoFacade.saveAbnormalInfo("文书-删除","", JSON.toJSONString(aDeleteFlagVO),"",e.getMessage());
|
|
|
+ } catch (Exception e) {
|
|
|
+ aMedAbnormalInfoFacade.saveAbnormalInfo("文书-删除", "", JSON.toJSONString(aDeleteFlagVO), "", e.getMessage());
|
|
|
return RespDTO.onError(e.getMessage());
|
|
|
}
|
|
|
}
|