|
@@ -13,6 +13,7 @@ import com.lantone.common.util.ListUtil;
|
|
|
import com.lantone.common.util.StringUtil;
|
|
|
import com.lantone.common.util.SysUserUtils;
|
|
|
import com.lantone.common.vo.BlockLossTypeGatherVO;
|
|
|
+import com.lantone.common.vo.DataRepariVO;
|
|
|
import com.lantone.daqe.client.OperationLogService;
|
|
|
import com.lantone.daqe.dto.BlockLossTypeGatherDTO;
|
|
|
import com.lantone.daqe.dto.GetBlockLossPageDTO;
|
|
@@ -67,6 +68,9 @@ public class BlockLossManagementFacade {
|
|
|
@Autowired
|
|
|
private OperationLogService operationLogService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private HisDataManagementFacade hisDataManagementFacade;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 获取病历数据丢失明细分页列表
|
|
@@ -87,7 +91,7 @@ public class BlockLossManagementFacade {
|
|
|
public Boolean upBlockLossById(UpBlockLossByIdVO upBlockLossByIdVO) {
|
|
|
BlocklossResult blocklossResult = new BlocklossResult();
|
|
|
BeanUtils.copyProperties(upBlockLossByIdVO, blocklossResult);
|
|
|
- blocklossResult.setModifier(SysUserUtils.getCurrentPrinciple());
|
|
|
+ blocklossResult.setModifier(SysUserUtils.getCurrentPrinciple() == null ? "0" : SysUserUtils.getCurrentPrinciple());
|
|
|
blocklossResult.setGmtModified(DateUtil.now());
|
|
|
return blocklossResultFacade.updateById(blocklossResult);
|
|
|
}
|
|
@@ -102,8 +106,8 @@ public class BlockLossManagementFacade {
|
|
|
Boolean flag = false;
|
|
|
//====1.获取已丢失状态记录,去数据库中对比判断是否补录
|
|
|
List<BlocklossResult> lossResults = blocklossResultFacade.list(new QueryWrapper<BlocklossResult>()
|
|
|
- .ge(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getStartDate())
|
|
|
- .le(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getEndDate())
|
|
|
+ .select("id,behospital_code,rec_id,loss_type,loss_way")
|
|
|
+ .eq(SysUserUtils.getCurrentHospitalId() != null, "hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
|
.eq("status", LossStatusEnum.IS_LOSS.getKey())
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey()));
|
|
|
Map<String, List<BlocklossResult>> lossResultMap = null;
|
|
@@ -118,44 +122,58 @@ public class BlockLossManagementFacade {
|
|
|
|
|
|
//获取his对应的数据
|
|
|
List<HisMedicalRecordDTO> hisMedicalRecords = getHisMedicalRecords(dataCompareVO);
|
|
|
+ Map<String, HisMedicalRecordDTO> hisMedicalRecordMap = EntityUtil.makeEntityMap(hisMedicalRecords, "behospitalCode");
|
|
|
|
|
|
//获取操作记录数据
|
|
|
//病历数据
|
|
|
dataCompareVO.setOperationUrl("save/saveBehospitalCode");
|
|
|
List<GetOperationLogDTO> behospitalCodeLogs = getOperationLogs(dataCompareVO);
|
|
|
//病案首页数据
|
|
|
- dataCompareVO.setOperationUrl("save/saveHomePages");
|
|
|
- List<GetOperationLogDTO> homePageLogs = getOperationLogs(dataCompareVO);
|
|
|
+ List<GetOperationLogDTO> homePageLogs = new ArrayList<>();
|
|
|
//文书数据
|
|
|
- dataCompareVO.setOperationUrl("save/saveRecs");
|
|
|
- List<GetOperationLogDTO> recLogs = getOperationLogs(dataCompareVO);
|
|
|
+ List<GetOperationLogDTO> recLogs = new ArrayList<>();
|
|
|
+
|
|
|
+ List<String> logCodes = null;
|
|
|
+ //没有病历数据就不用去查病案首页和文书
|
|
|
+ if (ListUtil.isNotEmpty(behospitalCodeLogs)) {
|
|
|
+ logCodes = behospitalCodeLogs.stream().map(GetOperationLogDTO::getBehospitalCode).collect(Collectors.toList());
|
|
|
+ dataCompareVO.setBehospitalCodes(logCodes);
|
|
|
+ //病案首页数据
|
|
|
+ dataCompareVO.setOperationUrl("save/saveHomePages");
|
|
|
+ homePageLogs = getOperationLogs(dataCompareVO);
|
|
|
+ //文书数据
|
|
|
+ dataCompareVO.setOperationUrl("save/saveRecs");
|
|
|
+ recLogs = getOperationLogs(dataCompareVO);
|
|
|
+ }
|
|
|
|
|
|
//获取库中数据
|
|
|
//病历数据
|
|
|
List<String> dataBaseBehospitalCodes = behospitalInfoFacade.list(new QueryWrapper<BehospitalInfo>()
|
|
|
.select("behospital_code")
|
|
|
- .ge(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getStartDate())
|
|
|
- .le(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getEndDate())
|
|
|
- .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
|
+ .ge(dataCompareVO.getStartDate() != null && StringUtil.isBlank(dataCompareVO.getBehospitalCode()), "gmt_create", dataCompareVO.getStartDate())
|
|
|
+ .le(dataCompareVO.getEndDate() != null && StringUtil.isBlank(dataCompareVO.getBehospitalCode()), "gmt_create", dataCompareVO.getEndDate())
|
|
|
+ .eq(StringUtil.isNotBlank(dataCompareVO.getBehospitalCode()), "behospital_code", dataCompareVO.getBehospitalCode())
|
|
|
+ .eq(SysUserUtils.getCurrentHospitalId() != null, "hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey()))
|
|
|
.stream().map(BehospitalInfo::getBehospitalCode).collect(Collectors.toList());
|
|
|
//病案首页数据
|
|
|
- List<String> dataBaseHomePageIds = homePageFacade.list(new QueryWrapper<HomePage>()
|
|
|
- .select("home_page_id")
|
|
|
- .ge(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getStartDate())
|
|
|
- .le(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getEndDate())
|
|
|
- .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
|
- .eq("is_deleted", IsDeleteEnum.N.getKey()))
|
|
|
- .stream().map(HomePage::getHomePageId).collect(Collectors.toList());
|
|
|
-
|
|
|
+ List<String> dataBaseHomePageIds = new ArrayList<>();
|
|
|
//文书数据
|
|
|
- List<String> dataBaseRecIds = medicalRecordFacade.list(new QueryWrapper<MedicalRecord>()
|
|
|
- .select("rec_id")
|
|
|
- .ge(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getStartDate())
|
|
|
- .le(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getEndDate())
|
|
|
- .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
|
- .eq("is_deleted", IsDeleteEnum.N.getKey()))
|
|
|
- .stream().map(MedicalRecord::getRecId).collect(Collectors.toList());
|
|
|
+ List<String> dataBaseRecIds = new ArrayList<>();
|
|
|
+ if (ListUtil.isNotEmpty(dataBaseBehospitalCodes)) {
|
|
|
+ dataBaseHomePageIds = homePageFacade.list(new QueryWrapper<HomePage>()
|
|
|
+ .select("home_page_id")
|
|
|
+ .in("behospital_code", dataBaseBehospitalCodes)
|
|
|
+ .eq(SysUserUtils.getCurrentHospitalId() != null, "hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey()))
|
|
|
+ .stream().map(HomePage::getHomePageId).collect(Collectors.toList());
|
|
|
+ dataBaseRecIds = medicalRecordFacade.list(new QueryWrapper<MedicalRecord>()
|
|
|
+ .select("rec_id")
|
|
|
+ .in("behospital_code", dataBaseBehospitalCodes)
|
|
|
+ .eq(SysUserUtils.getCurrentHospitalId() != null, "hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey()))
|
|
|
+ .stream().map(MedicalRecord::getRecId).collect(Collectors.toList());
|
|
|
+ }
|
|
|
|
|
|
//==已丢失 外部|内部 病历、文书、病案首页 id集合
|
|
|
//外部
|
|
@@ -166,35 +184,36 @@ public class BlockLossManagementFacade {
|
|
|
List<String> inLossCodes = null;
|
|
|
List<String> inLossHomepages = null;
|
|
|
List<String> inLossRecs = null;
|
|
|
- if (ListUtil.isNotEmpty(lossResultMap.get(LossTypeEnum.REC_LOSS.getKey()))) {
|
|
|
- Map<String, List<BlocklossResult>> lossWayRecMap = EntityUtil.makeEntityListMap(lossResultMap.get(LossTypeEnum.REC_LOSS.getKey()), "lossWay");
|
|
|
- if (ListUtil.isNotEmpty(lossWayRecMap.get(LossWayEnum.OUT_LOSS))) {
|
|
|
- outLossRecs = lossWayRecMap.get(LossWayEnum.OUT_LOSS).stream().map(BlocklossResult::getRecId).collect(Collectors.toList());
|
|
|
- }
|
|
|
- if (ListUtil.isNotEmpty(lossWayRecMap.get(LossWayEnum.IN_LOSS))) {
|
|
|
- inLossRecs = lossWayRecMap.get(LossWayEnum.IN_LOSS).stream().map(BlocklossResult::getRecId).collect(Collectors.toList());
|
|
|
- }
|
|
|
- }
|
|
|
- if (ListUtil.isNotEmpty(lossResultMap.get(LossTypeEnum.HOMEPAGE_LOSS.getKey()))) {
|
|
|
- Map<String, List<BlocklossResult>> lossWayHomePageMap = EntityUtil.makeEntityListMap(lossResultMap.get(LossTypeEnum.HOMEPAGE_LOSS.getKey()), "lossWay");
|
|
|
- if (ListUtil.isNotEmpty(lossWayHomePageMap.get(LossWayEnum.OUT_LOSS))) {
|
|
|
- outLossHomepages = lossWayHomePageMap.get(LossWayEnum.OUT_LOSS).stream().map(BlocklossResult::getRecId).collect(Collectors.toList());
|
|
|
- }
|
|
|
- if (ListUtil.isNotEmpty(lossWayHomePageMap.get(LossWayEnum.IN_LOSS))) {
|
|
|
- inLossHomepages = lossWayHomePageMap.get(LossWayEnum.IN_LOSS).stream().map(BlocklossResult::getRecId).collect(Collectors.toList());
|
|
|
+ if (lossResultMap != null) {
|
|
|
+ if (ListUtil.isNotEmpty(lossResultMap.get(LossTypeEnum.REC_LOSS.getKey()))) {
|
|
|
+ Map<String, List<BlocklossResult>> lossWayRecMap = EntityUtil.makeEntityListMap(lossResultMap.get(LossTypeEnum.REC_LOSS.getKey()), "lossWay");
|
|
|
+ if (ListUtil.isNotEmpty(lossWayRecMap.get(LossWayEnum.OUT_LOSS.getKey()))) {
|
|
|
+ outLossRecs = lossWayRecMap.get(LossWayEnum.OUT_LOSS.getKey()).stream().map(BlocklossResult::getRecId).collect(Collectors.toList());
|
|
|
+ }
|
|
|
+ if (ListUtil.isNotEmpty(lossWayRecMap.get(LossWayEnum.IN_LOSS.getKey()))) {
|
|
|
+ inLossRecs = lossWayRecMap.get(LossWayEnum.IN_LOSS.getKey()).stream().map(BlocklossResult::getRecId).collect(Collectors.toList());
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- if (ListUtil.isNotEmpty(lossResultMap.get(LossTypeEnum.CODE_LOSS.getKey()))) {
|
|
|
- Map<String, List<BlocklossResult>> lossWayCodeMap = EntityUtil.makeEntityListMap(lossResultMap.get(LossTypeEnum.CODE_LOSS.getKey()), "lossWay");
|
|
|
- if (ListUtil.isNotEmpty(lossWayCodeMap.get(LossWayEnum.OUT_LOSS))) {
|
|
|
- outLossCodes = lossWayCodeMap.get(LossWayEnum.OUT_LOSS).stream().map(BlocklossResult::getRecId).collect(Collectors.toList());
|
|
|
+ if (ListUtil.isNotEmpty(lossResultMap.get(LossTypeEnum.HOMEPAGE_LOSS.getKey()))) {
|
|
|
+ Map<String, List<BlocklossResult>> lossWayHomePageMap = EntityUtil.makeEntityListMap(lossResultMap.get(LossTypeEnum.HOMEPAGE_LOSS.getKey()), "lossWay");
|
|
|
+ if (ListUtil.isNotEmpty(lossWayHomePageMap.get(LossWayEnum.OUT_LOSS.getKey()))) {
|
|
|
+ outLossHomepages = lossWayHomePageMap.get(LossWayEnum.OUT_LOSS.getKey()).stream().map(BlocklossResult::getRecId).collect(Collectors.toList());
|
|
|
+ }
|
|
|
+ if (ListUtil.isNotEmpty(lossWayHomePageMap.get(LossWayEnum.IN_LOSS.getKey()))) {
|
|
|
+ inLossHomepages = lossWayHomePageMap.get(LossWayEnum.IN_LOSS.getKey()).stream().map(BlocklossResult::getRecId).collect(Collectors.toList());
|
|
|
+ }
|
|
|
}
|
|
|
- if (ListUtil.isNotEmpty(lossWayCodeMap.get(LossWayEnum.IN_LOSS))) {
|
|
|
- inLossCodes = lossWayCodeMap.get(LossWayEnum.IN_LOSS).stream().map(BlocklossResult::getRecId).collect(Collectors.toList());
|
|
|
+ if (ListUtil.isNotEmpty(lossResultMap.get(LossTypeEnum.CODE_LOSS.getKey()))) {
|
|
|
+ Map<String, List<BlocklossResult>> lossWayCodeMap = EntityUtil.makeEntityListMap(lossResultMap.get(LossTypeEnum.CODE_LOSS.getKey()), "lossWay");
|
|
|
+ if (ListUtil.isNotEmpty(lossWayCodeMap.get(LossWayEnum.OUT_LOSS.getKey()))) {
|
|
|
+ outLossCodes = lossWayCodeMap.get(LossWayEnum.OUT_LOSS.getKey()).stream().map(BlocklossResult::getBehospitalCode).collect(Collectors.toList());
|
|
|
+ }
|
|
|
+ if (ListUtil.isNotEmpty(lossWayCodeMap.get(LossWayEnum.IN_LOSS.getKey()))) {
|
|
|
+ inLossCodes = lossWayCodeMap.get(LossWayEnum.IN_LOSS.getKey()).stream().map(BlocklossResult::getBehospitalCode).collect(Collectors.toList());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
//=====2.2数据对比
|
|
|
//his与log日志做对比
|
|
|
if (ListUtil.isNotEmpty(hisMedicalRecords)) {
|
|
@@ -207,7 +226,7 @@ public class BlockLossManagementFacade {
|
|
|
hisMedicalRecordDTO.getHisRecs().stream().forEach(hisRecDTO -> {
|
|
|
GetOperationLogDTO medicalRecord = new GetOperationLogDTO();
|
|
|
medicalRecord.setRecId(hisRecDTO.getRecId());
|
|
|
- medicalRecord.setRecId(hisRecDTO.getRecTitle());
|
|
|
+ medicalRecord.setRecTitle(hisRecDTO.getRecTitle());
|
|
|
medicalRecord.setBehospitalCode(hisMedicalRecordDTO.getBehospitalCode());
|
|
|
recs.add(medicalRecord);
|
|
|
});
|
|
@@ -217,11 +236,11 @@ public class BlockLossManagementFacade {
|
|
|
//外部丢失数据集合
|
|
|
List<BlocklossResult> outInserts = new ArrayList<>();
|
|
|
//文书数据对比
|
|
|
- compareHisWithLog(recs, recLogs, "0", outInserts, outLossRecs);
|
|
|
+ compareHisWithLog(recs, recLogs, LossTypeEnum.REC_LOSS.getKey(), outInserts, outLossRecs, hisMedicalRecordMap);
|
|
|
//病案首页数据对比
|
|
|
- compareHisWithLog(medicalRecords, homePageLogs, "1", outInserts, outLossHomepages);
|
|
|
+ compareHisWithLog(medicalRecords, homePageLogs, LossTypeEnum.HOMEPAGE_LOSS.getKey(), outInserts, outLossHomepages, hisMedicalRecordMap);
|
|
|
//病历数据对比
|
|
|
- compareHisWithLog(medicalRecords, behospitalCodeLogs, "2", outInserts, outLossCodes);
|
|
|
+ compareHisWithLog(medicalRecords, behospitalCodeLogs, LossTypeEnum.CODE_LOSS.getKey(), outInserts, outLossCodes, hisMedicalRecordMap);
|
|
|
|
|
|
flag = blocklossResultServiceImpl.saveBatch(outInserts);
|
|
|
}
|
|
@@ -230,13 +249,13 @@ public class BlockLossManagementFacade {
|
|
|
//内部丢失数据集合
|
|
|
List<BlocklossResult> inInserts = new ArrayList<>();
|
|
|
if (ListUtil.isNotEmpty(recLogs)) {
|
|
|
- compareLogWithLocal(recLogs, dataBaseRecIds, "0", inInserts, inLossRecs);
|
|
|
+ compareLogWithLocal(recLogs, dataBaseRecIds, LossTypeEnum.REC_LOSS.getKey(), inInserts, inLossRecs, hisMedicalRecordMap);
|
|
|
}
|
|
|
if (ListUtil.isNotEmpty(homePageLogs)) {
|
|
|
- compareLogWithLocal(homePageLogs, dataBaseHomePageIds, "1", inInserts, inLossHomepages);
|
|
|
+ compareLogWithLocal(homePageLogs, dataBaseHomePageIds, LossTypeEnum.HOMEPAGE_LOSS.getKey(), inInserts, inLossHomepages, hisMedicalRecordMap);
|
|
|
}
|
|
|
if (ListUtil.isNotEmpty(behospitalCodeLogs)) {
|
|
|
- compareLogWithLocal(behospitalCodeLogs, dataBaseBehospitalCodes, "2", inInserts, inLossCodes);
|
|
|
+ compareLogWithLocal(behospitalCodeLogs, dataBaseBehospitalCodes, LossTypeEnum.CODE_LOSS.getKey(), inInserts, inLossCodes, hisMedicalRecordMap);
|
|
|
}
|
|
|
if (ListUtil.isNotEmpty(inInserts)) {
|
|
|
flag = blocklossResultServiceImpl.saveBatch(inInserts);
|
|
@@ -247,28 +266,31 @@ public class BlockLossManagementFacade {
|
|
|
/**
|
|
|
* 日志与入库数据对比
|
|
|
*
|
|
|
- * @param logs 日志记录
|
|
|
- * @param dataBases 入库数据
|
|
|
- * @param type 对比类型:0:文书丢失 1:病案首页丢失 2:患者信息丢失
|
|
|
- * @param inInserts 内部丢失插入集合
|
|
|
- * @param havingLossIds 已经插入的id集合
|
|
|
+ * @param logs 日志记录
|
|
|
+ * @param dataBases 入库数据
|
|
|
+ * @param type 对比类型:0:文书丢失 1:病案首页丢失 2:患者信息丢失
|
|
|
+ * @param inInserts 内部丢失插入集合
|
|
|
+ * @param havingLossIds 已经插入的id集合
|
|
|
+ * @param hisMedicalRecordMap his病历数据map(key-住院序号:value-人的his数据)
|
|
|
* @Return void
|
|
|
*/
|
|
|
private void compareLogWithLocal(List<GetOperationLogDTO> logs, List<String> dataBases, String type,
|
|
|
- List<BlocklossResult> inInserts, List<String> havingLossIds) {
|
|
|
+ List<BlocklossResult> inInserts, List<String> havingLossIds,
|
|
|
+ Map<String, HisMedicalRecordDTO> hisMedicalRecordMap) {
|
|
|
switch (type) {
|
|
|
case "0":
|
|
|
//文书丢失
|
|
|
logs.stream().forEach(rec -> {
|
|
|
//存在记录但是没有入库
|
|
|
if (!dataBases.contains(rec.getRecId())) {
|
|
|
- if (havingLossIds.contains(rec.getRecId())) {
|
|
|
+ if (havingLossIds == null || !havingLossIds.contains(rec.getRecId())) {
|
|
|
BlocklossResult blocklossResult = new BlocklossResult();
|
|
|
blocklossResult.setBehospitalCode(rec.getBehospitalCode());
|
|
|
blocklossResult.setRecId(rec.getRecId());
|
|
|
blocklossResult.setRecTitle(rec.getRecTitle());
|
|
|
blocklossResult.setLossWay(LossWayEnum.IN_LOSS.getKey());
|
|
|
blocklossResult.setLossType(LossTypeEnum.REC_LOSS.getKey());
|
|
|
+ blocklossResult.setBehospitalDate(hisMedicalRecordMap.get(rec.getBehospitalCode()).getBehospitalDate());
|
|
|
//拼装病历数据块丢失明细其他信息
|
|
|
assembleOtherBlocklossResult(blocklossResult);
|
|
|
inInserts.add(blocklossResult);
|
|
@@ -276,37 +298,48 @@ public class BlockLossManagementFacade {
|
|
|
}
|
|
|
});
|
|
|
//判断只插入文书id的情况
|
|
|
- List<String> havingRecIds = medicalRecordContentFacade.list(new QueryWrapper<MedicalRecordContent>()
|
|
|
- .select("rec_id")
|
|
|
- .in("rec_id", dataBases)).stream().map(MedicalRecordContent::getRecId).collect(Collectors.toList());
|
|
|
- List<String> tempList = new ArrayList<>(dataBases);
|
|
|
- tempList.removeAll(havingRecIds);
|
|
|
- Map<String, GetOperationLogDTO> recMap = EntityUtil.makeEntityMap(logs, "recId");
|
|
|
- tempList.stream().forEach(recId -> {
|
|
|
- BlocklossResult blocklossResult = new BlocklossResult();
|
|
|
- blocklossResult.setBehospitalCode(recMap.get(recId).getBehospitalCode());
|
|
|
- blocklossResult.setRecId(recId);
|
|
|
- blocklossResult.setRecTitle(recMap.get(recId).getRecTitle());
|
|
|
- blocklossResult.setLossWay(LossWayEnum.IN_LOSS.getKey());
|
|
|
- blocklossResult.setLossType(LossTypeEnum.REC_LOSS.getKey());
|
|
|
- blocklossResult.setLossCause("文书id插入成功,文书内容没有插入");
|
|
|
- //拼装病历数据块丢失明细其他信息
|
|
|
- assembleOtherBlocklossResult(blocklossResult);
|
|
|
- inInserts.add(blocklossResult);
|
|
|
- });
|
|
|
+ //获取插入的文书
|
|
|
+ if (ListUtil.isNotEmpty(dataBases)) {
|
|
|
+ List<String> havingRecIds = medicalRecordContentFacade.list(new QueryWrapper<MedicalRecordContent>()
|
|
|
+ .select("rec_id")
|
|
|
+ .in("rec_id", dataBases)).stream().map(MedicalRecordContent::getRecId).collect(Collectors.toList());
|
|
|
+ List<String> tempList = new ArrayList<>(dataBases);
|
|
|
+ //移除查出来有内容的文书
|
|
|
+ tempList.removeAll(havingRecIds);
|
|
|
+ Map<String, GetOperationLogDTO> recMap = EntityUtil.makeEntityMap(logs, "recId");
|
|
|
+ //有文书id无内容文书
|
|
|
+ tempList.stream().forEach(recId -> {
|
|
|
+ //没有被记录过
|
|
|
+ if (havingLossIds == null || !havingLossIds.contains(recId)) {
|
|
|
+ BlocklossResult blocklossResult = new BlocklossResult();
|
|
|
+ blocklossResult.setBehospitalCode(recMap.get(recId).getBehospitalCode());
|
|
|
+ blocklossResult.setRecId(recId);
|
|
|
+ blocklossResult.setRecTitle(recMap.get(recId).getRecTitle());
|
|
|
+ blocklossResult.setLossWay(LossWayEnum.IN_LOSS.getKey());
|
|
|
+ blocklossResult.setLossType(LossTypeEnum.REC_LOSS.getKey());
|
|
|
+ blocklossResult.setLossCause("文书id插入成功,文书内容没有插入");
|
|
|
+ blocklossResult.setBehospitalDate(hisMedicalRecordMap.get(recMap.get(recId).getBehospitalCode()).getBehospitalDate());
|
|
|
+ //拼装病历数据块丢失明细其他信息
|
|
|
+ assembleOtherBlocklossResult(blocklossResult);
|
|
|
+ inInserts.add(blocklossResult);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
break;
|
|
|
case "1":
|
|
|
//病案首页丢失
|
|
|
logs.stream().forEach(homePages -> {
|
|
|
//存在记录但是没有入库
|
|
|
if (!dataBases.contains(homePages.getRecId())) {
|
|
|
- if (havingLossIds.contains(homePages.getRecId())) {
|
|
|
+ if (havingLossIds == null || !havingLossIds.contains(homePages.getHomePageId())) {
|
|
|
BlocklossResult blocklossResult = new BlocklossResult();
|
|
|
blocklossResult.setBehospitalCode(homePages.getBehospitalCode());
|
|
|
blocklossResult.setRecId(homePages.getHomePageId());
|
|
|
blocklossResult.setRecTitle("病案首页丢失");
|
|
|
blocklossResult.setLossWay(LossWayEnum.IN_LOSS.getKey());
|
|
|
blocklossResult.setLossType(LossTypeEnum.HOMEPAGE_LOSS.getKey());
|
|
|
+ blocklossResult.setBehospitalDate(hisMedicalRecordMap.get(homePages.getBehospitalCode()).getBehospitalDate());
|
|
|
//拼装病历数据块丢失明细其他信息
|
|
|
assembleOtherBlocklossResult(blocklossResult);
|
|
|
inInserts.add(blocklossResult);
|
|
@@ -319,11 +352,12 @@ public class BlockLossManagementFacade {
|
|
|
logs.stream().forEach(beHehospitalInfo -> {
|
|
|
//存在记录但是没有入库
|
|
|
if (!dataBases.contains(beHehospitalInfo.getBehospitalCode())) {
|
|
|
- if (havingLossIds.contains(beHehospitalInfo.getBehospitalCode())) {
|
|
|
+ if (havingLossIds == null || !havingLossIds.contains(beHehospitalInfo.getBehospitalCode())) {
|
|
|
BlocklossResult blocklossResult = new BlocklossResult();
|
|
|
blocklossResult.setBehospitalCode(beHehospitalInfo.getBehospitalCode());
|
|
|
blocklossResult.setLossWay(LossWayEnum.IN_LOSS.getKey());
|
|
|
blocklossResult.setLossType(LossTypeEnum.CODE_LOSS.getKey());
|
|
|
+ blocklossResult.setBehospitalDate(hisMedicalRecordMap.get(beHehospitalInfo.getBehospitalCode()).getBehospitalDate());
|
|
|
//拼装病历数据块丢失明细其他信息
|
|
|
assembleOtherBlocklossResult(blocklossResult);
|
|
|
inInserts.add(blocklossResult);
|
|
@@ -351,7 +385,7 @@ public class BlockLossManagementFacade {
|
|
|
case "0":
|
|
|
//文书丢失
|
|
|
List<String> redIds = medicalRecordFacade.list(new QueryWrapper<MedicalRecord>()
|
|
|
- .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
|
+ .eq("hospital_id", SysUserUtils.getCurrentHospitalId() != null ? SysUserUtils.getCurrentHospitalId() : 0)
|
|
|
.in("rec_id", lossResultMap.get(lossType).stream().map(BlocklossResult::getRecId).collect(Collectors.toList()))
|
|
|
.in("behospital_code", lossResultMap.get(lossType).stream().map(BlocklossResult::getBehospitalCode).collect(Collectors.toList()))
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey()))
|
|
@@ -362,17 +396,18 @@ public class BlockLossManagementFacade {
|
|
|
.set("solve_time", DateUtil.now())
|
|
|
.set("gmt_modified", DateUtil.now())
|
|
|
.set("status", LossStatusEnum.NOT_LOSS.getKey())
|
|
|
- .set("modifier", SysUserUtils.getCurrentPrincipleId())
|
|
|
+ .set("modifier", SysUserUtils.getCurrentPrincipleId() != null ? SysUserUtils.getCurrentPrincipleId() + "" : "0")
|
|
|
+ .eq("status", LossStatusEnum.IS_LOSS.getKey())
|
|
|
.eq("loss_type", lossType)
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
|
+ .eq("hospital_id", SysUserUtils.getCurrentHospitalId() != null ? SysUserUtils.getCurrentHospitalId() : 0)
|
|
|
.in("rec_id", redIds)));
|
|
|
}
|
|
|
break;
|
|
|
case "1":
|
|
|
//病案首页丢失
|
|
|
List<String> homePages = homePageFacade.list(new QueryWrapper<HomePage>()
|
|
|
- .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
|
+ .eq("hospital_id", SysUserUtils.getCurrentHospitalId() != null ? SysUserUtils.getCurrentHospitalId() : 0)
|
|
|
.in("home_page_id", lossResultMap.get(lossType).stream().map(BlocklossResult::getRecId).collect(Collectors.toList()))
|
|
|
.in("behospital_code", lossResultMap.get(lossType).stream().map(BlocklossResult::getBehospitalCode).collect(Collectors.toList()))
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey()))
|
|
@@ -384,9 +419,10 @@ public class BlockLossManagementFacade {
|
|
|
.set("solve_time", DateUtil.now())
|
|
|
.set("gmt_modified", DateUtil.now())
|
|
|
.set("status", LossStatusEnum.NOT_LOSS.getKey())
|
|
|
- .set("modifier", SysUserUtils.getCurrentPrincipleId())
|
|
|
+ .set("modifier", SysUserUtils.getCurrentPrincipleId() != null ? SysUserUtils.getCurrentPrincipleId() + "" : "0")
|
|
|
+ .eq("status", LossStatusEnum.IS_LOSS.getKey())
|
|
|
.eq("loss_type", lossType)
|
|
|
- .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
|
+ .eq("hospital_id", SysUserUtils.getCurrentHospitalId() != null ? SysUserUtils.getCurrentHospitalId() : 0)
|
|
|
.in("rec_id", homePages)
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())));
|
|
|
}
|
|
@@ -394,7 +430,7 @@ public class BlockLossManagementFacade {
|
|
|
case "2":
|
|
|
//患者信息丢失
|
|
|
List<String> behospitalCodes = behospitalInfoFacade.list(new QueryWrapper<BehospitalInfo>()
|
|
|
- .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
|
+ .eq("hospital_id", SysUserUtils.getCurrentHospitalId() != null ? SysUserUtils.getCurrentHospitalId() : 0)
|
|
|
.in("behospital_code", lossResultMap.get(lossType).stream().map(BlocklossResult::getBehospitalCode).collect(Collectors.toList()))
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey()))
|
|
|
.stream().map(BehospitalInfo::getBehospitalCode).collect(Collectors.toList());
|
|
@@ -404,10 +440,11 @@ public class BlockLossManagementFacade {
|
|
|
.set("solve_time", DateUtil.now())
|
|
|
.set("gmt_modified", DateUtil.now())
|
|
|
.set("status", LossStatusEnum.NOT_LOSS.getKey())
|
|
|
- .set("modifier", SysUserUtils.getCurrentPrincipleId())
|
|
|
+ .set("modifier", SysUserUtils.getCurrentPrincipleId() != null ? SysUserUtils.getCurrentPrincipleId() + "" : "0")
|
|
|
+ .eq("status", LossStatusEnum.IS_LOSS.getKey())
|
|
|
.eq("loss_type", lossType)
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
|
+ .eq("hospital_id", SysUserUtils.getCurrentHospitalId() != null ? SysUserUtils.getCurrentHospitalId() : 0)
|
|
|
.in("behospital_code", behospitalCodes)));
|
|
|
}
|
|
|
break;
|
|
@@ -419,15 +456,21 @@ public class BlockLossManagementFacade {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param medicalRecords his数据
|
|
|
- * @param logs 日志数据
|
|
|
- * @param type 对比类型:0:文书丢失 1:病案首页丢失 2:患者信息丢失
|
|
|
- * @param outInserts 外部丢失插入集合
|
|
|
- * @param havingLossIds 已经插入的id集合
|
|
|
+ * @param medicalRecords his数据
|
|
|
+ * @param logs 日志数据
|
|
|
+ * @param type 对比类型:0:文书丢失 1:病案首页丢失 2:患者信息丢失
|
|
|
+ * @param outInserts 外部丢失插入集合
|
|
|
+ * @param havingLossIds 已经插入的id集合
|
|
|
+ * @param hisMedicalRecordMap his病历数据map(key-住院序号:value-人的his数据)
|
|
|
* @Return void
|
|
|
*/
|
|
|
private void compareHisWithLog(List<GetOperationLogDTO> medicalRecords, List<GetOperationLogDTO> logs,
|
|
|
- String type, List<BlocklossResult> outInserts, List<String> havingLossIds) {
|
|
|
+ String type, List<BlocklossResult> outInserts, List<String> havingLossIds,
|
|
|
+ Map<String, HisMedicalRecordDTO> hisMedicalRecordMap) {
|
|
|
+ //his数据为空直接返回
|
|
|
+ if (ListUtil.isEmpty(medicalRecords)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
switch (type) {
|
|
|
case "0":
|
|
|
List<String> recLogs = logs.stream().map(GetOperationLogDTO::getRecId).collect(Collectors.toList());
|
|
@@ -436,13 +479,14 @@ public class BlockLossManagementFacade {
|
|
|
if (StringUtil.isNotEmpty(medicalRecord.getRecId())) {
|
|
|
if (!recLogs.contains(medicalRecord.getRecId())) {
|
|
|
//该记录没有插入
|
|
|
- if (ListUtil.isNotEmpty(havingLossIds) && !havingLossIds.contains(medicalRecord.getRecId())) {
|
|
|
+ if (havingLossIds == null || ListUtil.isNotEmpty(havingLossIds) && !havingLossIds.contains(medicalRecord.getRecId())) {
|
|
|
BlocklossResult blocklossResult = new BlocklossResult();
|
|
|
blocklossResult.setBehospitalCode(medicalRecord.getBehospitalCode());
|
|
|
blocklossResult.setRecId(medicalRecord.getRecId());
|
|
|
blocklossResult.setRecTitle(medicalRecord.getRecTitle());
|
|
|
blocklossResult.setLossWay(LossWayEnum.OUT_LOSS.getKey());
|
|
|
blocklossResult.setLossType(LossTypeEnum.REC_LOSS.getKey());
|
|
|
+ blocklossResult.setBehospitalDate(hisMedicalRecordMap.get(medicalRecord.getBehospitalCode()).getBehospitalDate());
|
|
|
//拼装病历数据块丢失明细其他信息
|
|
|
assembleOtherBlocklossResult(blocklossResult);
|
|
|
outInserts.add(blocklossResult);
|
|
@@ -456,13 +500,14 @@ public class BlockLossManagementFacade {
|
|
|
medicalRecords.stream().forEach(medicalRecord -> {
|
|
|
//病案首页不存在操作记录
|
|
|
if (StringUtil.isNotEmpty(medicalRecord.getHomePageId()) && !homepageLogs.contains(medicalRecord.getHomePageId())) {
|
|
|
- if (ListUtil.isNotEmpty(havingLossIds) && !havingLossIds.contains(medicalRecord.getHomePageId())) {
|
|
|
+ if (havingLossIds == null || ListUtil.isNotEmpty(havingLossIds) && !havingLossIds.contains(medicalRecord.getHomePageId())) {
|
|
|
BlocklossResult blocklossResult = new BlocklossResult();
|
|
|
blocklossResult.setBehospitalCode(medicalRecord.getBehospitalCode());
|
|
|
blocklossResult.setRecId(medicalRecord.getHomePageId());
|
|
|
blocklossResult.setRecTitle("病案首页丢失");
|
|
|
blocklossResult.setLossWay(LossWayEnum.OUT_LOSS.getKey());
|
|
|
blocklossResult.setLossType(LossTypeEnum.HOMEPAGE_LOSS.getKey());
|
|
|
+ blocklossResult.setBehospitalDate(hisMedicalRecordMap.get(medicalRecord.getBehospitalCode()).getBehospitalDate());
|
|
|
//拼装病历数据块丢失明细其他信息
|
|
|
assembleOtherBlocklossResult(blocklossResult);
|
|
|
outInserts.add(blocklossResult);
|
|
@@ -475,11 +520,12 @@ public class BlockLossManagementFacade {
|
|
|
medicalRecords.stream().forEach(medicalRecord -> {
|
|
|
//病历数据不存在操作记录
|
|
|
if (!behospitalCodeLogs.contains(medicalRecord.getBehospitalCode())) {
|
|
|
- if (ListUtil.isNotEmpty(havingLossIds) && !havingLossIds.contains(medicalRecord.getBehospitalCode())) {
|
|
|
+ if (havingLossIds == null || ListUtil.isNotEmpty(havingLossIds) && !havingLossIds.contains(medicalRecord.getBehospitalCode())) {
|
|
|
BlocklossResult blocklossResult = new BlocklossResult();
|
|
|
blocklossResult.setBehospitalCode(medicalRecord.getBehospitalCode());
|
|
|
blocklossResult.setLossWay(LossWayEnum.OUT_LOSS.getKey());
|
|
|
blocklossResult.setLossType(LossTypeEnum.CODE_LOSS.getKey());
|
|
|
+ blocklossResult.setBehospitalDate(hisMedicalRecordMap.get(medicalRecord.getBehospitalCode()).getBehospitalDate());
|
|
|
//拼装病历数据块丢失明细其他信息
|
|
|
assembleOtherBlocklossResult(blocklossResult);
|
|
|
outInserts.add(blocklossResult);
|
|
@@ -524,9 +570,9 @@ public class BlockLossManagementFacade {
|
|
|
* @Return java.util.List<com.lantone.daqe.dto.HisMedicalRecordDTO>
|
|
|
*/
|
|
|
private List<HisMedicalRecordDTO> getHisMedicalRecords(DataCompareVO dataCompareVO) {
|
|
|
+ //技术服务部接口 /balance/data/getDataCount
|
|
|
//###模拟
|
|
|
-
|
|
|
- return new ArrayList<>();
|
|
|
+ return hisDataManagementFacade.getHisMedicalRecords(dataCompareVO);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -540,33 +586,67 @@ public class BlockLossManagementFacade {
|
|
|
"save/saveHomePages",
|
|
|
"save/saveRecs"));
|
|
|
|
|
|
+ DataCompareVO dataCompareVO = new DataCompareVO();
|
|
|
+ dataCompareVO.setStartDate(blockLossTypeGatherVO.getStartDate());
|
|
|
+ dataCompareVO.setEndDate(blockLossTypeGatherVO.getEndDate());
|
|
|
+ //获取his数据
|
|
|
+ List<HisMedicalRecordDTO> hisMedicalRecords = getHisMedicalRecords(dataCompareVO);
|
|
|
+
|
|
|
BlockLossTypeGatherDTO blockLossTypeGatherDTO = new BlockLossTypeGatherDTO();
|
|
|
+ //his数据量
|
|
|
+ blockLossTypeGatherDTO.setHisNum(getHisMedicalRecordsCount(hisMedicalRecords));
|
|
|
+
|
|
|
//获取该时间段的日志数量
|
|
|
- Integer logNum = operationLogService.getOperationLogNum(blockLossTypeGatherVO).getData();
|
|
|
- blockLossTypeGatherDTO.setLogNum(logNum);
|
|
|
+ //病历数据
|
|
|
+ dataCompareVO.setOperationUrl("save/saveBehospitalCode");
|
|
|
+ List<GetOperationLogDTO> behospitalCodeLogs = getOperationLogs(dataCompareVO);
|
|
|
+ //病案首页数据
|
|
|
+ List<GetOperationLogDTO> homePageLogs = new ArrayList<>();
|
|
|
+ //文书数据
|
|
|
+ List<GetOperationLogDTO> recLogs = new ArrayList<>();
|
|
|
+
|
|
|
+ if (ListUtil.isNotEmpty(behospitalCodeLogs)) {
|
|
|
+ List<String> logCodes = behospitalCodeLogs.stream().map(GetOperationLogDTO::getBehospitalCode).collect(Collectors.toList());
|
|
|
+ dataCompareVO.setBehospitalCodes(logCodes);
|
|
|
+ //病案首页数据
|
|
|
+ dataCompareVO.setOperationUrl("save/saveHomePages");
|
|
|
+ homePageLogs = getOperationLogs(dataCompareVO);
|
|
|
+ //文书数据
|
|
|
+ dataCompareVO.setOperationUrl("save/saveRecs");
|
|
|
+ recLogs = getOperationLogs(dataCompareVO);
|
|
|
+ Integer logNum = logCodes.size() + homePageLogs.size() + recLogs.size();
|
|
|
+ blockLossTypeGatherDTO.setLogNum(logNum);
|
|
|
+ }
|
|
|
+
|
|
|
//获取该时间段的实际数量
|
|
|
- Integer codeNum = behospitalInfoFacade.count(new QueryWrapper<BehospitalInfo>()
|
|
|
- .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
|
- .ge(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getStartDate())
|
|
|
- .le(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getEndDate()));
|
|
|
- Integer homePageNum = homePageFacade.count(new QueryWrapper<HomePage>()
|
|
|
- .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
|
- .ge(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getStartDate())
|
|
|
- .le(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getEndDate()));
|
|
|
- Integer recNum = medicalRecordFacade.count(new QueryWrapper<MedicalRecord>()
|
|
|
- .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
|
- .ge(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getStartDate())
|
|
|
- .le(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getEndDate()));
|
|
|
+ List<String> codes = behospitalInfoFacade.list(new QueryWrapper<BehospitalInfo>()
|
|
|
+ .eq("hospital_id", SysUserUtils.getCurrentHospitalId() != null ? SysUserUtils.getCurrentHospitalId() : 0)
|
|
|
+ .ge(blockLossTypeGatherVO.getStartDate() != null, "behospital_date", blockLossTypeGatherVO.getStartDate())
|
|
|
+ .le(blockLossTypeGatherVO.getEndDate() != null, "behospital_date", blockLossTypeGatherVO.getEndDate()))
|
|
|
+ .stream().map(BehospitalInfo::getBehospitalCode).collect(Collectors.toList());
|
|
|
+
|
|
|
+ Integer codeNum = codes.size();
|
|
|
+ Integer homePageNum = 0;
|
|
|
+ Integer recNum = 0;
|
|
|
+ if (ListUtil.isNotEmpty(codes)) {
|
|
|
+ homePageNum = homePageFacade.count(new QueryWrapper<HomePage>()
|
|
|
+ .eq("hospital_id", SysUserUtils.getCurrentHospitalId() != null ? SysUserUtils.getCurrentHospitalId() : 0)
|
|
|
+ .in("behospital_code", codes));
|
|
|
+ recNum = medicalRecordFacade.count(new QueryWrapper<MedicalRecord>()
|
|
|
+ .eq("hospital_id", SysUserUtils.getCurrentHospitalId() != null ? SysUserUtils.getCurrentHospitalId() : 0)
|
|
|
+ .in("behospital_code", codes));
|
|
|
+ }
|
|
|
+
|
|
|
blockLossTypeGatherDTO.setRealNum(codeNum + homePageNum + recNum);
|
|
|
//获取该时间段的丢失数量
|
|
|
List<BlocklossResult> blocklossResults = blocklossResultFacade.list(new QueryWrapper<BlocklossResult>()
|
|
|
- .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
|
+ .eq("hospital_id", SysUserUtils.getCurrentHospitalId() != null ? SysUserUtils.getCurrentHospitalId() : 0)
|
|
|
.eq("status", LossStatusEnum.IS_LOSS.getKey())
|
|
|
- .ge(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getStartDate())
|
|
|
- .le(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getEndDate()));
|
|
|
+ .ge(blockLossTypeGatherVO.getStartDate() != null, "behospital_date", blockLossTypeGatherVO.getStartDate())
|
|
|
+ .le(blockLossTypeGatherVO.getEndDate() != null, "behospital_date", blockLossTypeGatherVO.getEndDate()));
|
|
|
Integer allLossNum = blocklossResults.size();
|
|
|
blockLossTypeGatherDTO.setAllLossNum(allLossNum);
|
|
|
- blockLossTypeGatherDTO.setHisNum(logNum + allLossNum);
|
|
|
+ // blockLossTypeGatherDTO.setHisNum(codeNum + homePageNum + recNum + allLossNum);
|
|
|
|
|
|
Map<String, List<BlocklossResult>> lossWayMap = EntityUtil.makeEntityListMap(blocklossResults, "lossWay");
|
|
|
//外部丢失
|
|
@@ -611,4 +691,43 @@ public class BlockLossManagementFacade {
|
|
|
}
|
|
|
return blockLossTypeGatherDTO;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取这段时间内his的数据量
|
|
|
+ *
|
|
|
+ * @param hisMedicalRecords
|
|
|
+ * @Return java.lang.Integer
|
|
|
+ */
|
|
|
+ private Integer getHisMedicalRecordsCount(List<HisMedicalRecordDTO> hisMedicalRecords) {
|
|
|
+
|
|
|
+ AtomicReference<Integer> num = new AtomicReference<>(0);
|
|
|
+ if (ListUtil.isNotEmpty(hisMedicalRecords)) {
|
|
|
+ hisMedicalRecords.stream().forEach(hisMedicalRecordDTO -> {
|
|
|
+ //病历+1
|
|
|
+ num.getAndSet(num.get() + 1);
|
|
|
+ //病案首页+1
|
|
|
+ if (StringUtil.isNotEmpty(hisMedicalRecordDTO.getHomePageId())) {
|
|
|
+ num.getAndSet(num.get() + 1);
|
|
|
+ }
|
|
|
+ //文书
|
|
|
+ if (ListUtil.isNotEmpty(hisMedicalRecordDTO.getHisRecs())) {
|
|
|
+ num.getAndSet(num.get() + hisMedicalRecordDTO.getHisRecs().size());
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return num.get();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 数据补录
|
|
|
+ *
|
|
|
+ * @param dataRepariVO
|
|
|
+ * @Return boolean
|
|
|
+ */
|
|
|
+ public boolean dataRepari(DataRepariVO dataRepariVO) {
|
|
|
+ //调用数据补录服务
|
|
|
+
|
|
|
+ return hisDataManagementFacade.dataRepari(dataRepariVO);
|
|
|
+ }
|
|
|
}
|