| | |
| | | @Override |
| | | public List<ServiceThirdData> queryList(ServiceThirdData serviceThirdData) { |
| | | |
| | | log.info("------serviceThirdData的入参:{}", serviceThirdData); |
| | | log.error("------serviceThirdData的入参:{}", serviceThirdData); |
| | | List<ServiceThirdData> serviceThirdDataList = serviceThirdDataMapper.selectServiceThirdDataList(serviceThirdData); |
| | | log.info("------serviceThirdDataList获取数据的数量:{}", serviceThirdDataList.size()); |
| | | log.error("------serviceThirdDataList获取数据的数量:{}", serviceThirdDataList.size()); |
| | | for (ServiceThirdData std : serviceThirdDataList) { |
| | | PipeParser parser = new PipeParser(); |
| | | Message message = null; |
| | |
| | | hospitalUserinfo.setCreateTime(formattedDate); |
| | | |
| | | //只有入院才会往userInfo里写用户信息 |
| | | if (serviceThirdData.getDataType().equals("ADT^A01") && StringUtils.isNotBlank(hospitalUserinfo.getPatientID())) { |
| | | if (serviceThirdData.getDataType().equals("ADT^A03") && StringUtils.isNotBlank(hospitalUserinfo.getPatientID())) { |
| | | //先判断一下,patientid是否已经在表中存在,如果存在,就不插入了,不存在,就插入 |
| | | HospitalUserinfo hospitalUserinfo1 = new HospitalUserinfo(); |
| | | hospitalUserinfo1.setPatientID(hospitalUserinfo.getPatientID()); |
| | |
| | | iHospitalUserinfoService.insertHospitalUserinfo(hospitalUserinfo); |
| | | } else { |
| | | iHospitalUserinfoService.updateHospitalUserinfoByPatientID(hospitalUserinfo); |
| | | hospitalUserinfo.setID(hospitalUserinfos.get(0).getID()); |
| | | } |
| | | } |
| | | |
| | | HospitalRecord hospitalRecord = (HospitalRecord) objectList.get(0); |
| | | log.info("hospitalRecord的值为:{}", hospitalRecord); |
| | | log.error("hospitalRecord的值为:{}", hospitalRecord); |
| | | //如果patientid为空,再存record就成脏数据了 |
| | | if (StringUtils.isNotBlank(hospitalUserinfo.getPatientID())) { |
| | | hospitalRecord.setMessageID(std.getId().toString()); |
| | |
| | | if (StringUtils.isEmpty(hospitalUserinfo.getPatientID())) { |
| | | serviceThirdData2.setRemark("PatientID为空"); |
| | | } |
| | | serviceThirdData2.setUserInfoId(hospitalUserinfo.getID()); |
| | | log.error("serviceThirdData2的参数:{}", serviceThirdData2); |
| | | int ii = serviceThirdDataMapper.updateIsDeal(serviceThirdData2); |
| | | System.out.println("是否修改成功:" + ii); |
| | | log.error("是否修改成功:{}", ii); |
| | | } catch (HL7Exception e) { |
| | | e.printStackTrace(); |
| | | } |