| | |
| | | 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; |
| | |
| | | } |
| | | } |
| | | SimpleDateFormat outputFormat2 = new SimpleDateFormat("yyyy-MM-dd"); // 输出日期格式 |
| | | String rkdate =null; |
| | | if(date22!=null) rkdate = outputFormat2.format(date22); |
| | | String rkdate = null; |
| | | if (date22 != null) rkdate = outputFormat2.format(date22); |
| | | |
| | | //账户冻结建议 |
| | | String pv128_interestCode = pv1.getPv128_InterestCode().encode(); |
| | |
| | | |
| | | //出院时间 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); |
| | | //就诊类型描述(门诊、住院...) |
| | | hospitalRecord.setAdmTypeDesc(AdmTypeEnum.getDescByCode(patientClass)); |
| | | //IMP 住院 |
| | | hospitalRecord.setAdmTypeCode("IMP"); |
| | | hospitalRecord.setAdmStatus("患者出院"); |
| | | //入院状态(就诊中、结束就诊...) |
| | | hospitalRecord.setAdmStatus(LevelHospEnum.getDescByCode(pv136_dischargeDisposition)); |
| | | hospitalRecord.setEncOuthostype(LevelHospEnum.getDescByCode(pv136_dischargeDisposition)); |
| | | hospitalRecord.setAdmDate(dischargeDateTime); |
| | | hospitalRecord.setEncPatName(patientName); |
| | | if (StringUtils.isNotEmpty(xb)) { |
| | |
| | | |
| | | 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); |