|
@ -284,6 +284,7 @@ public class PmsTreatmentServiceImpl implements PmsTreatmentService { |
|
|
patientQueueRelation.setId(IdUtil.getSnowflakeNextId()); |
|
|
patientQueueRelation.setId(IdUtil.getSnowflakeNextId()); |
|
|
patientQueueRelation.setDelFlag((byte) 0); |
|
|
patientQueueRelation.setDelFlag((byte) 0); |
|
|
patientQueueRelation.setIdCard(pmsTreatment.getIdCard()); |
|
|
patientQueueRelation.setIdCard(pmsTreatment.getIdCard()); |
|
|
|
|
|
patientQueueRelation.setDischargeTime(pmsTreatment.getDischargeTime()); |
|
|
patientQueueRelation.setIdCardType(pmsTreatment.getIdCardType().byteValue()); |
|
|
patientQueueRelation.setIdCardType(pmsTreatment.getIdCardType().byteValue()); |
|
|
patientQueueRelation.setCreateBy(SecurityUtils.getUsername()); |
|
|
patientQueueRelation.setCreateBy(SecurityUtils.getUsername()); |
|
|
patientQueueRelation.setPatientId(pmsTreatment.getPatientId()); |
|
|
patientQueueRelation.setPatientId(pmsTreatment.getPatientId()); |
|
@ -298,6 +299,7 @@ public class PmsTreatmentServiceImpl implements PmsTreatmentService { |
|
|
patientQueueRelation.setIdCard(pmsTreatment.getIdCard()); |
|
|
patientQueueRelation.setIdCard(pmsTreatment.getIdCard()); |
|
|
patientQueueRelation.setIdCardType(pmsTreatment.getIdCardType().byteValue()); |
|
|
patientQueueRelation.setIdCardType(pmsTreatment.getIdCardType().byteValue()); |
|
|
patientQueueRelation.setCreateBy(SecurityUtils.getUsername()); |
|
|
patientQueueRelation.setCreateBy(SecurityUtils.getUsername()); |
|
|
|
|
|
patientQueueRelation.setDischargeTime(pmsTreatment.getDischargeTime()); |
|
|
patientQueueRelation.setPatientId(pmsTreatment.getPatientId()); |
|
|
patientQueueRelation.setPatientId(pmsTreatment.getPatientId()); |
|
|
patientQueueRelation.setQueueId(null); |
|
|
patientQueueRelation.setQueueId(null); |
|
|
patientQueueRelation.setCreateTime(new Date()); |
|
|
patientQueueRelation.setCreateTime(new Date()); |
|
@ -345,8 +347,51 @@ public class PmsTreatmentServiceImpl implements PmsTreatmentService { |
|
|
} else { |
|
|
} else { |
|
|
recordVoMap = MapUtil.newHashMap(); |
|
|
recordVoMap = MapUtil.newHashMap(); |
|
|
} |
|
|
} |
|
|
treatmentRecordVO.setRecordValDict(recordVoMap); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查询公共队列
|
|
|
|
|
|
List<Object> commonFollowupQueue = redisCache.getCacheList("common_followup_queue"); |
|
|
|
|
|
PmsTreatmentRecordExample pmsTreatmentRecordExample = new PmsTreatmentRecordExample(); |
|
|
|
|
|
pmsTreatmentRecordExample.createCriteria().andDelFlagEqualTo((byte) 0).andQuestionCodeEqualTo("JBXX_ZYZD").andTreatmentIdEqualTo(pmsTreatment.getId()); |
|
|
|
|
|
List<PmsTreatmentRecord> pmsTreatmentRecords = pmsTreatmentRecordMapper.selectByExample(pmsTreatmentRecordExample); |
|
|
|
|
|
if (CollectionUtil.isNotEmpty(pmsTreatmentRecords)) { |
|
|
|
|
|
String answer = pmsTreatmentRecords.get(0).getAnswer(); |
|
|
|
|
|
if (StrUtil.isNotEmpty(answer)) { |
|
|
|
|
|
pmsTreatment.setDiagnosisName(answer.replace("!@#", ",")); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
List<PmsTreatmentVo.TreatmentVO.QueueVo> queueVos = fmsFollowupDao.queryQueueListByPatientId(pmsTreatment.getPatientId()); |
|
|
|
|
|
if (CollectionUtil.isNotEmpty(queueVos)) { |
|
|
|
|
|
Map<Long, FmsFollowupVo.FollowupQueueVO> map = new HashMap<>(); |
|
|
|
|
|
if (CollectionUtil.isNotEmpty(commonFollowupQueue)) { |
|
|
|
|
|
List<FmsFollowupVo.FollowupQueueVO> followupQueueVOS1 = BeanUtil.copyToList(commonFollowupQueue, FmsFollowupVo.FollowupQueueVO.class); |
|
|
|
|
|
map = followupQueueVOS1.stream().collect(Collectors.toMap(FmsFollowupVo.FollowupQueueVO::getId, Function.identity())); |
|
|
|
|
|
} |
|
|
|
|
|
List<PmsTreatmentVo.TreatmentVO.QueueVo> list = new ArrayList<>(); |
|
|
|
|
|
for (PmsTreatmentVo.TreatmentVO.QueueVo queueVo : queueVos) { |
|
|
|
|
|
if (queueVo == null || queueVo.getQueueId() == null) { |
|
|
|
|
|
list.add(queueVo); |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
FmsFollowupVo.FollowupQueueVO followupQueueVO = map.get(queueVo.getQueueId()); |
|
|
|
|
|
if (followupQueueVO != null) { |
|
|
|
|
|
queueVo.setQueueName(followupQueueVO.getName()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
queueVos.removeAll(list); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
PmsTreatmentVo.TreatmentRecord treatmentRecord = new PmsTreatmentVo.TreatmentRecord(); |
|
|
|
|
|
List<String> queueIdList = new ArrayList<>(); |
|
|
|
|
|
if (CollectionUtil.isNotEmpty(queueVos)) { |
|
|
|
|
|
for (PmsTreatmentVo.TreatmentVO.QueueVo vo : queueVos) { |
|
|
|
|
|
queueIdList.add(vo.getQueueId() + ""); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
treatmentRecord.setValid(true); |
|
|
|
|
|
treatmentRecord.setAnswerString(queueIdList.stream().collect(Collectors.joining("!@#"))); |
|
|
|
|
|
treatmentRecord.setQuestionCode("SFDL"); |
|
|
|
|
|
recordVoMap.put("SFDL", CollectionUtil.newArrayList(treatmentRecord)); |
|
|
|
|
|
treatmentRecordVO.setRecordValDict(recordVoMap); |
|
|
return treatmentRecordVO; |
|
|
return treatmentRecordVO; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|