|
@@ -39,15 +39,15 @@ public class DataTask implements ITask {
|
|
|
"SELECT * FROM pacsonline.exams where exam_status=3 and institution_id='62001001' order by createdAt desc limit 30");
|
|
|
for (Exams exams2 : exams) {
|
|
|
try {
|
|
|
- Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
|
|
|
- Record record = Db.use("connected").findFirst("select * from third_view_zskk where STUDYUID=?",
|
|
|
- studies.getStudyuid());
|
|
|
+// Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
|
|
|
+ Record record = Db.use("connected").findFirst("select * from third_view_zskk where studyuid=?",
|
|
|
+ exams2.getPatientNum());
|
|
|
if (record == null) {
|
|
|
continue;
|
|
|
}
|
|
|
Report report = new Report().use("zskk");
|
|
|
report.setId(creatId());
|
|
|
- report.setReportDatetime(parseStringToDate(record.getStr("REPORTDATE")));
|
|
|
+ report.setReportDatetime(parseStringToDate(record.getStr("reportdate")));
|
|
|
if (record.getStr("description") == null || record.getStr("IMPRESSION") == null
|
|
|
|| record.getStr("description").isBlank()) {
|
|
|
continue;
|
|
@@ -58,9 +58,9 @@ public class DataTask implements ITask {
|
|
|
report.setCreatedAt(new Date());
|
|
|
report.setReportDoctorId(getDoctorIdByName(record.getStr("REPORTDOCTOR")));
|
|
|
report.setReviewDoctorId(getDoctorIdByName(record.getStr("REVIEWDOCTOR")));
|
|
|
- report.setReviewDatetime(parseStringToDate(record.getStr("REPORTDATE")));
|
|
|
+ report.setReviewDatetime(parseStringToDate(record.getStr("reportdate")));
|
|
|
report.setConfirmDoctorId(getDoctorIdByName(record.getStr("REVIEWDOCTOR")));
|
|
|
- report.setConfirmDatetime(parseStringToDate(record.getStr("REPORTDATE")));
|
|
|
+ report.setConfirmDatetime(parseStringToDate(record.getStr("reportdate")));
|
|
|
report.save();
|
|
|
PatientInfos patientInfos = PatientInfos.dao.use("zskk").findById(exams2.getPatientId());
|
|
|
patientInfos.setName(record.getStr("PATIENTNAME"));
|
|
@@ -74,7 +74,7 @@ public class DataTask implements ITask {
|
|
|
// exams2.setHopitalizedNo(patString);
|
|
|
// exams2.setClinDoctors(record.getStr("CLINICALDOCTOR"));
|
|
|
exams2.setApplicationDepartment(record.getStr("DEPARTMENT"));
|
|
|
- exams2.setApplicationDoctor(record.getStr("CLINICALDOCTOR"));
|
|
|
+ exams2.setApplicationDoctor(record.getStr("clinicaldoctor"));
|
|
|
// exams2.setClinDiag(record.getStr("diagnosis"));
|
|
|
exams2.update();
|
|
|
// 传云医康 数据
|
|
@@ -106,19 +106,19 @@ public class DataTask implements ITask {
|
|
|
// 阴阳性 1阴性 2阳性
|
|
|
data.put("report_result", "");
|
|
|
// 报告时间 10位时间戳
|
|
|
- data.put("report_datetime", returnSecondTimestamp(record.getStr("REPORTDATE")));
|
|
|
+ data.put("report_datetime", returnSecondTimestamp(record.getStr("reportdate")));
|
|
|
// 报告医生id
|
|
|
data.put("report_doctor_id", record.getStr("REPORTDOCTOR"));
|
|
|
// 报告医生姓名
|
|
|
data.put("report_doctor_name", record.getStr("REPORTDOCTOR"));
|
|
|
// 审核时间
|
|
|
- data.put("review_datetime", returnSecondTimestamp(record.getStr("REPORTDATE")));
|
|
|
+ data.put("review_datetime", returnSecondTimestamp(record.getStr("reportdate")));
|
|
|
// 审核医生id
|
|
|
data.put("review_doctor_id", record.getStr("REVIEWDOCTOR"));
|
|
|
// 审核姓名
|
|
|
data.put("review_doctor_name", record.getStr("REVIEWDOCTOR"));
|
|
|
// 确认时间
|
|
|
- data.put("confirm_datetime", returnSecondTimestamp(record.getStr("REPORTDATE")));
|
|
|
+ data.put("confirm_datetime", returnSecondTimestamp(record.getStr("reportdate")));
|
|
|
// 确认医生id
|
|
|
data.put("confirm_doctor_id", record.getStr("REVIEWDOCTOR"));
|
|
|
// 确认医生姓名
|
|
@@ -254,7 +254,7 @@ public class DataTask implements ITask {
|
|
|
* @date: 2019/12/26 18:26
|
|
|
*/
|
|
|
public String returnSecondTimestamp(String data) throws ParseException {
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
|
return String.valueOf(sdf.parse(data).getTime() / 1000);
|
|
|
}
|
|
@@ -297,7 +297,7 @@ public class DataTask implements ITask {
|
|
|
if (dateStr == null) {
|
|
|
return new Date();
|
|
|
}
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
Date date = null;
|
|
|
try {
|
|
|
date = sdf.parse(dateStr);
|