| | |
| | | for (ServiceSubtask serviceSubtask : serviceSubtaskList) { |
| | | ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord(); |
| | | serviceSubtaskRecord.setSubtaskId(serviceSubtask.getId()); |
| | | if (ObjectUtils.isNotEmpty((serviceSubtask.getTaskid()))) |
| | | serviceSubtaskRecord.setTaskid(serviceSubtask.getTaskid().toString()); |
| | | serviceSubtask.setServiceSubtaskRecordList(serviceSubtaskRecordService.selectServiceSubtaskRecordList(serviceSubtaskRecord)); |
| | | } |
| | |
| | | @ApiModelProperty(value = "丙肝抗体检 验结果") |
| | | private String BingGanKTJYJGMC; |
| | | |
| | | @ApiModelProperty(value = "作废原因") |
| | | private String ZuoFeiYY; |
| | | |
| | | @ApiModelProperty(value = "作废人 ID") |
| | | private String ZuoFeiRID; |
| | | |
| | | @ApiModelProperty(value = "作废人姓名") |
| | | private String ZuoFeiRXM; |
| | | |
| | | @ApiModelProperty(value = "作废时间") |
| | | private String ZuoFeiSJ; |
| | | |
| | | } |
| | |
| | | import java.lang.reflect.Field; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | |
| | | private PatArchiveMapper patArchiveMapper; |
| | | @Autowired |
| | | private PatMedInhospMapper patMedInhospMapper; |
| | | @Autowired |
| | | private PatMedOperationMapper patMedOperationMapper; |
| | | @Autowired |
| | | private PatMedOperationItemMapper patMedOperationItemMapper; |
| | | @Autowired |
| | | private Icd10AssociationMapper icd10AssociationMapper; |
| | | |
| | |
| | | |
| | | @Override |
| | | public Boolean addOperationInfo(Map dataMap) { |
| | | // |
| | | log.error("ServiceExternalServiceImpl---addOperationInfo的新增的值为:{}", dataMap); |
| | | |
| | | Map yeWuXX = (Map) dataMap.get("YeWuXX"); |
| | | Map<String, Object> BingRenXX = (Map<String, Object>) yeWuXX.get("BingRenXX"); |
| | | ExternalInHospPatientInfo externalInHospPatientInfo = BeanUtil.mapToBean(BingRenXX, ExternalInHospPatientInfo.class, true); |
| | | |
| | | return null; |
| | | //手术信息新增 |
| | | Map<String, Object> ssxx = (Map<String, Object>) yeWuXX.get("ShouShuSQ"); |
| | | //手术更新 |
| | | Map<String, Object> ssgx = (Map<String, Object>) yeWuXX.get("ShouShuGX"); |
| | | //手术撤销 |
| | | Map<String, Object> sscx = (Map<String, Object>) yeWuXX.get("ShouShuCX"); |
| | | ExternalOperationInfo externalOperationInfo = null; |
| | | if (ObjectUtils.isNotEmpty(ssxx)) |
| | | externalOperationInfo = BeanUtil.mapToBean(ssxx, ExternalOperationInfo.class, true); |
| | | else if (ObjectUtils.isNotEmpty(ssgx)) |
| | | externalOperationInfo = BeanUtil.mapToBean(ssgx, ExternalOperationInfo.class, true); |
| | | else if (ObjectUtils.isNotEmpty(sscx)) |
| | | externalOperationInfo = BeanUtil.mapToBean(sscx, ExternalOperationInfo.class, true); |
| | | PatMedOperation patMedOperation = new PatMedOperation(); |
| | | patMedOperation.setPatid(null); |
| | | patMedOperation.setPatcode(externalInHospPatientInfo.getBingRenID()); |
| | | patMedOperation.setPaname(externalInHospPatientInfo.getXingMing()); |
| | | // patMedOperation.setOpreqid(externalOperationInfo.getShenQingDID()); |
| | | patMedOperation.setOpreqcode(externalOperationInfo.getShenQingDID()); |
| | | //查询一下,该患者是否已经有这些数据 |
| | | List<PatMedOperation> patMedOperations = patMedOperationMapper.selectPatMedOperationList(patMedOperation); |
| | | |
| | | patMedOperation.setOpsstatus(null); |
| | | patMedOperation.setOperationcode(externalOperationInfo.getShouShuLBDM()); |
| | | patMedOperation.setOperationname(externalOperationInfo.getShouShuLBMC()); |
| | | patMedOperation.setOperatortime(externalOperationInfo.getYaoQiuSJ()); |
| | | patMedOperation.setOpreqtime(externalOperationInfo.getShenQingSJ()); |
| | | patMedOperation.setReqdoccode(externalOperationInfo.getShenQingYSID()); |
| | | patMedOperation.setReqdocname(externalOperationInfo.getShenQingYSXM()); |
| | | patMedOperation.setReqdeptcode(externalOperationInfo.getShenQingKSID()); |
| | | patMedOperation.setReqdeptname(externalOperationInfo.getShenQingKSMC()); |
| | | patMedOperation.setReqloccode(externalOperationInfo.getShouShuKSID()); |
| | | patMedOperation.setReqlocname(externalOperationInfo.getShouShuKSMC()); |
| | | patMedOperation.setSurgeoncode(externalOperationInfo.getZhuDaoYSID()); |
| | | patMedOperation.setSurgeonname(externalOperationInfo.getSanZhuYSXM()); |
| | | patMedOperation.setFirasscode(externalOperationInfo.getYiZhuID()); |
| | | patMedOperation.setFirassname(externalOperationInfo.getYiZhuMC()); |
| | | patMedOperation.setSecasscode(externalOperationInfo.getErZhuYSID()); |
| | | patMedOperation.setSecassname(externalOperationInfo.getErZhuYSXM()); |
| | | patMedOperation.setThrasscode(externalOperationInfo.getSanZhuYSID()); |
| | | patMedOperation.setThrassname(externalOperationInfo.getSanZhuYSXM()); |
| | | patMedOperation.setCanceltime(null); |
| | | patMedOperation.setCancelreason(null); |
| | | patMedOperation.setCancelcode(null); |
| | | patMedOperation.setCancelname(null); |
| | | patMedOperation.setVisittype(null); |
| | | patMedOperation.setStatus(null); |
| | | patMedOperation.setSchemetime(null); |
| | | patMedOperation.setSchemestatus(null); |
| | | patMedOperation.setDelFlag("0"); |
| | | patMedOperation.setIsupload(null); |
| | | patMedOperation.setUploadTime(null); |
| | | patMedOperation.setOrgid(externalInHospPatientInfo.getZuZhiJGID()); |
| | | patMedOperation.setInhospstate(null); |
| | | patMedOperation.setPatno(externalInHospPatientInfo.getBingRenID()); |
| | | patMedOperation.setPatname(externalInHospPatientInfo.getXingMing()); |
| | | patMedOperation.setVisitid(null); |
| | | patMedOperation.setSerialnum(externalInHospPatientInfo.getZhuYuanHao()); |
| | | patMedOperation.setInhospno(externalInHospPatientInfo.getZhuYuanHao()); |
| | | patMedOperation.setHospitalname(externalInHospPatientInfo.getZuZhiJGMC()); |
| | | patMedOperation.setHospitalcode(externalInHospPatientInfo.getZuZhiJGID()); |
| | | patMedOperation.setDeptid(externalOperationInfo.getShouShuKSID()); |
| | | patMedOperation.setDeptcode(externalOperationInfo.getShouShuKSID()); |
| | | patMedOperation.setDeptname(externalOperationInfo.getShouShuKSMC()); |
| | | patMedOperation.setHospitaldistrictcode(null); |
| | | patMedOperation.setHospitaldistrictname(null); |
| | | patMedOperation.setRoomno(null); |
| | | patMedOperation.setBedNo(null); |
| | | patMedOperation.setDrcode(externalOperationInfo.getZhuDaoYSID()); |
| | | patMedOperation.setDrname(externalOperationInfo.getZhuDaoYSXM()); |
| | | patMedOperation.setNurseId(null); |
| | | patMedOperation.setNurseName(null); |
| | | if (CollectionUtils.isNotEmpty(patMedOperations)) { |
| | | Long id = patMedOperations.get(0).getId(); |
| | | patMedOperation.setId(id); |
| | | patMedOperationMapper.updatePatMedOperation(patMedOperation); |
| | | } else patMedOperationMapper.insertPatMedOperation(patMedOperation); |
| | | log.error("-----patMedOperation的主键id为:{}", patMedOperation.getId()); |
| | | |
| | | if (ObjectUtils.isNotEmpty(ssxx)) { |
| | | Map<String, Object> ShouShuMXList = (Map<String, Object>) ssxx.get("ShouShuMXList"); |
| | | List<ExternalOperationDetail> externalOperationDetails = BeanUtil.mapToBean(ShouShuMXList, List.class, true); |
| | | for (ExternalOperationDetail externalOperationDetail : externalOperationDetails) { |
| | | PatMedOperationItem patMedOperationItem = new PatMedOperationItem(); |
| | | patMedOperationItem.setOpid(patMedOperation.getId()); |
| | | patMedOperationItem.setOpcode(externalOperationDetail.getShouShuMCID()); |
| | | patMedOperationItem.setOpdesc(externalOperationDetail.getShouShuMC()); |
| | | patMedOperationItem.setMainFlag(externalOperationDetail.getZhuShouSBZ()); |
| | | patMedOperationItem.setIncitypecode(externalOperationDetail.getQieKouLBDM()); |
| | | patMedOperationItem.setIncitypedesc(externalOperationDetail.getQieKouLBMC()); |
| | | patMedOperationItem.setOplevelcode(externalOperationDetail.getShouShuJBDM()); |
| | | patMedOperationItem.setOpleveldesc(externalOperationDetail.getShouShuJBMC()); |
| | | patMedOperationItem.setOpposition(externalOperationDetail.getShouShuBW()); |
| | | patMedOperationItem.setDelFlag("0"); |
| | | patMedOperationItem.setOrgid(patMedOperation.getOrgid()); |
| | | patMedOperationItemMapper.insertPatMedOperationItem(patMedOperationItem); |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | //新增患者基本信息 |
| | |
| | | patArchive.setAgeUnit(externalInHospPatientInfo.getNianLingDW()); |
| | | patArchive.setTelcode(externalInHospPatientInfo.getLianXiDH()); |
| | | patArchive.setGuid(externalInHospPatientInfo.getZuZhiJGID()); |
| | | patArchive.setOrgid(externalInHospPatientInfo.getZuZhiJGID()); |
| | | if (ObjectUtils.isNotEmpty(externalInHospPatientLiaisonInfo)) |
| | | patArchive.setRelativetelcode(externalInHospPatientLiaisonInfo.getLianXiRDH()); |
| | | patArchive.setInhospno(externalInHospPatientInfo.getZhuYuanHao()); |
| | |
| | | return true; |
| | | case "SM_SQ_ShenQing": |
| | | log.error("手术申请入参类型为:{}", type); |
| | | addOperationInfo(dataMap); |
| | | return true; |
| | | case "TJ_YW_BaoGaoXX": |
| | | log.error("体检报告入参类型为:{}", type); |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 将问题保存到缓存中 |
| | | * |
| | |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getQuestionCache(ServiceSubTaskCacheReq serviceSubTaskCacheReq, Long flag) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | |
| | | Map<String, Object> scriptInfoByCondition = serviceTaskService.getScriptInfoByCondition(serviceSubTaskQueryReq.getTaskid(), serviceSubTaskQueryReq.getPatid(), serviceSubTaskQueryReq.getIsFinish(), serviceSubTaskQueryReq.getPatfrom()); |
| | | if (ObjectUtils.isNotEmpty(scriptInfoByCondition) && ObjectUtils.isNotEmpty(scriptInfoByCondition.get("script"))) { |
| | | log.error("-----------scriptInfoByCondition的值为:{}",scriptInfoByCondition); |
| | | if (scriptInfoByCondition.get("type").equals("1")) { |
| | | List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVOList = (List) scriptInfoByCondition.get("script"); |
| | | for (IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO : ivrLibaTemplateScriptVOList) { |
| | |
| | | map.put("taskName", scriptInfoByCondition.get("taskName")); |
| | | return map; |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | private Map<String, String> getScriptResult(Long subid, Long pid, Long sid) { |
| | |
| | | public List<ServiceSubtask> patItem(ServiceSubtaskVO serviceSubtaskVO) { |
| | | List<ServiceSubtask> selectServiceSubtaskList = this.selectServiceSubtaskList(serviceSubtaskVO); |
| | | //根据出院 时间倒序 |
| | | // List<ServiceSubtask> sortedServiceSubtaskList = selectServiceSubtaskList.stream().sorted(Comparator.comparing(ServiceSubtask::getEndtime).reversed()).collect(Collectors.toList()); |
| | | return selectServiceSubtaskList; |
| | | List<ServiceSubtask> sortedServiceSubtaskList = selectServiceSubtaskList.stream().sorted(Comparator.comparing(ServiceSubtask::getEndtime, Comparator.nullsLast(Comparator.naturalOrder())).reversed()).collect(Collectors.toList()); |
| | | return sortedServiceSubtaskList; |
| | | } |
| | | |
| | | @Override |
| | |
| | | public List<ServiceSubtaskStatistic> getSfStatistics(ServiceSubtaskCountReq serviceSubtaskCountReq) { |
| | | log.error("getSfStatistics的入参为:{}", serviceSubtaskCountReq); |
| | | List<ServiceSubtaskStatistic> serviceSubtaskStatistics = new ArrayList<>(); |
| | | Map<String, List<ServiceSubtask>> collect = serviceSubtaskMapper.getSfStatistics(serviceSubtaskCountReq).stream().collect(Collectors.groupingBy(ServiceSubtask::getLeavehospitaldistrictname)); |
| | | Map<String, List<ServiceSubtask>> collect = serviceSubtaskMapper.getSfStatistics(serviceSubtaskCountReq).stream().collect(Collectors.groupingBy(subtask -> Optional.ofNullable(subtask.getLeavehospitaldistrictname()).orElse("Unknown"))); |
| | | for (List<ServiceSubtask> serviceSubtaskList : collect.values()) { |
| | | if (CollectionUtils.isEmpty(serviceSubtaskList)) { |
| | | continue; |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatMedOperationItemVo"> |
| | | select id, opid, opcode, opdesc, main_flag, incitypecode, incitypedesc, oplevelcode, opleveldesc, opposition, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pguid, guid, pid |
| | | select id, |
| | | opid, |
| | | opcode, |
| | | opdesc, |
| | | main_flag, |
| | | incitypecode, |
| | | incitypedesc, |
| | | oplevelcode, |
| | | opleveldesc, |
| | | opposition, |
| | | del_flag, |
| | | update_by, |
| | | update_time, |
| | | create_by, |
| | | create_time, |
| | | isupload, |
| | | upload_time, |
| | | orgid, |
| | | pguid, |
| | | guid, |
| | | pid |
| | | from pat_med_operation_item |
| | | </sql> |
| | | |
| | |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertPatMedOperationItem" parameterType="com.smartor.domain.PatMedOperationItem"> |
| | | <insert id="insertPatMedOperationItem" parameterType="com.smartor.domain.PatMedOperationItem" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into pat_med_operation_item |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id, |
| | |
| | | #{id} |
| | | </foreach> |
| | | </update> |
| | | |
| | | |
| | | |
| | | |
| | | </mapper> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatMedOperationVo"> |
| | | select id, patid, patcode, paname, opreqid, opreqcode, opsstatus, operationcode, operationname, operatortime, opreqtime, reqdoccode, reqdocname, reqdeptcode, reqdeptname, reqloccode, reqlocname, remark, surgeoncode, surgeonname, firasscode, firassname, secasscode, secassname, thrasscode, thrassname, canceltime, cancelreason, cancelcode, cancelname, visittype, status, schemetime, schemestatus, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, guid, pguid, pid, inhospstate, patno, patname, visitid, serialnum, inhospno, hospitalname, hospitalcode, deptid, deptcode, deptname, hospitaldistrictcode, hospitaldistrictname, roomno, bed_no, drcode, drname, nurse_id, nurse_name |
| | | select id, |
| | | patid, |
| | | patcode, |
| | | paname, |
| | | opreqid, |
| | | opreqcode, |
| | | opsstatus, |
| | | operationcode, |
| | | operationname, |
| | | operatortime, |
| | | opreqtime, |
| | | reqdoccode, |
| | | reqdocname, |
| | | reqdeptcode, |
| | | reqdeptname, |
| | | reqloccode, |
| | | reqlocname, |
| | | remark, |
| | | surgeoncode, |
| | | surgeonname, |
| | | firasscode, |
| | | firassname, |
| | | secasscode, |
| | | secassname, |
| | | thrasscode, |
| | | thrassname, |
| | | canceltime, |
| | | cancelreason, |
| | | cancelcode, |
| | | cancelname, |
| | | visittype, |
| | | status, |
| | | schemetime, |
| | | schemestatus, |
| | | del_flag, |
| | | update_by, |
| | | update_time, |
| | | create_by, |
| | | create_time, |
| | | isupload, |
| | | upload_time, |
| | | orgid, |
| | | guid, |
| | | pguid, |
| | | pid, |
| | | inhospstate, |
| | | patno, |
| | | patname, |
| | | visitid, |
| | | serialnum, |
| | | inhospno, |
| | | hospitalname, |
| | | hospitalcode, |
| | | deptid, |
| | | deptcode, |
| | | deptname, |
| | | hospitaldistrictcode, |
| | | hospitaldistrictname, |
| | | roomno, |
| | | bed_no, |
| | | drcode, |
| | | drname, |
| | | nurse_id, |
| | | nurse_name |
| | | from pat_med_operation |
| | | </sql> |
| | | |
| | |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertPatMedOperation" parameterType="com.smartor.domain.PatMedOperation"> |
| | | <insert id="insertPatMedOperation" parameterType="com.smartor.domain.PatMedOperation" useGeneratedKeys="true" |
| | | keyProperty="id"> |
| | | insert into pat_med_operation |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id, |
| | |
| | | #{id} |
| | | </foreach> |
| | | </update> |
| | | |
| | | |
| | | |
| | | |
| | | </mapper> |