| | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.smartor.domain.HospitalRecord; |
| | | import com.smartor.domain.HospitalUserinfo; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | |
| | | |
| | | //出院时间 A03 消息必填 |
| | | TS[] pv145_dischargeDateTime = pv1.getPv145_DischargeDateTime(); |
| | | TS ts = pv145_dischargeDateTime[0]; |
| | | TS ts = null; |
| | | if (pv145_dischargeDateTime != null && pv145_dischargeDateTime.length > 0) { |
| | | ts = pv145_dischargeDateTime[0]; |
| | | } |
| | | // Date date2 = new Date(Long.valueOf(ts.encode())); |
| | | // SimpleDateFormat sdff = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | // String dischargeDateTime = sdff.format(date2); |
| | |
| | | SimpleDateFormat inputFormat = new SimpleDateFormat("yyyyMMddHHmmss"); // 输入日期格式 |
| | | Date date2 = null; // 解析为Date对象 |
| | | try { |
| | | date2 = inputFormat.parse(ts.encode()); |
| | | if (ObjectUtils.isNotEmpty(ts)) date2 = inputFormat.parse(ts.encode()); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | SimpleDateFormat outputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // 输出日期格式 |
| | | String dischargeDateTime = outputFormat.format(date2); |
| | | String dischargeDateTime = null; |
| | | if (date2 != null) dischargeDateTime = outputFormat.format(date2); |
| | | |
| | | //访问标示 |
| | | String visitIndicator = pv1.getPv151_VisitIndicator().encode(); |
| | |
| | | //数据入库 |
| | | HospitalRecord hospitalRecord = new HospitalRecord(); |
| | | hospitalRecord.setCreateTime(new Date()); |
| | | hospitalRecord.setPatientID(patientID); |
| | | // hospitalRecord.setPatientID(patientID); |
| | | hospitalRecord.setPatientID(id1); |
| | | hospitalRecord.setOpreationTime(new Date()); |
| | | //就诊号 |
| | | hospitalRecord.setOutMedNO(id1); |
| | |
| | | |
| | | HospitalUserinfo hospitalUserinfo = new HospitalUserinfo(); |
| | | // hospitalUserinfo.setCreateTime(null); |
| | | hospitalUserinfo.setPatientID(patientID); |
| | | // hospitalUserinfo.setPatientID(patientID); |
| | | hospitalUserinfo.setPatientID(id1); |
| | | hospitalUserinfo.setRegDate(rkdate); |
| | | hospitalUserinfo.setIdentityID(SSNNumberPatient); |
| | | hospitalUserinfo.setPatName(patientName); |