|
@@ -23,27 +23,26 @@ public class DataTask implements ITask {
|
|
for (Exams exams2 : exams) {
|
|
for (Exams exams2 : exams) {
|
|
try {
|
|
try {
|
|
// Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
|
|
// Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
|
|
- Record record3 = Db.use("connected").findFirst("SELECT * FROM zlhis.zskk_reportinfo where 类型='诊断意见' and ACCESSIONNUMBER=?",exams2.getAccessionNum());
|
|
|
|
- Record record2 = Db.use("connected").findFirst("SELECT * FROM zlhis.zskk_reportinfo where 类型='检查所见' and ACCESSIONNUMBER=?",exams2.getAccessionNum());
|
|
|
|
- Record record = Db.use("connected").findFirst("SELECT * FROM zlhis.zskk_reportinfo_1 where ACCESSIONNUMBER=?",exams2.getAccessionNum());
|
|
|
|
|
|
+
|
|
|
|
+ Record record = Db.use("connected").findFirst("SELECT * FROM zlhis.zskk_reportinfo_1 where STUDYUID=?",exams2.getAccessionNum());
|
|
if (record == null) {
|
|
if (record == null) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
Report report = new Report().use("zskk");
|
|
Report report = new Report().use("zskk");
|
|
report.setId(creatId());
|
|
report.setId(creatId());
|
|
- report.setReportDatetime(parseStringToDate(record.getStr("REPORTDATE")));
|
|
|
|
- if (record2.getStr("内容") == null && record3.getStr("内容") == null) {
|
|
|
|
|
|
+ report.setReportDatetime(parseStringToDate(record.getStr("STUDY_DATE")));
|
|
|
|
+ if (report.getStr("IMPRESSION") == null && report.getStr("DESCRIPTION") == null) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
- report.setImpression(record3.getStr("内容"));
|
|
|
|
- report.setDescription(record2.getStr("内容"));
|
|
|
|
|
|
+ report.setImpression(report.getStr("IMPRESSION"));
|
|
|
|
+ report.setDescription(report.getStr("DESCRIPTION"));
|
|
report.setExamId(exams2.getId());
|
|
report.setExamId(exams2.getId());
|
|
report.setCreatedAt(new Date());
|
|
report.setCreatedAt(new Date());
|
|
report.setReportDoctorId(getDoctorIdByName(record.getStr("REPORTDOCTOR")));
|
|
report.setReportDoctorId(getDoctorIdByName(record.getStr("REPORTDOCTOR")));
|
|
report.setReviewDoctorId(getDoctorIdByName(record.getStr("REVIEWDOCTOR")));
|
|
report.setReviewDoctorId(getDoctorIdByName(record.getStr("REVIEWDOCTOR")));
|
|
- report.setReviewDatetime(parseStringToDate(record.getStr("REPORTDATE")));
|
|
|
|
|
|
+ report.setReviewDatetime(parseStringToDate(record.getStr("STUDY_DATE")));
|
|
report.setConfirmDoctorId(getDoctorIdByName(record.getStr("REVIEWDOCTOR")));
|
|
report.setConfirmDoctorId(getDoctorIdByName(record.getStr("REVIEWDOCTOR")));
|
|
- report.setConfirmDatetime(parseStringToDate(record.getStr("REPORTDATE")));
|
|
|
|
|
|
+ report.setConfirmDatetime(parseStringToDate(record.getStr("STUDY_DATE")));
|
|
report.save();
|
|
report.save();
|
|
PatientInfos patientInfos = PatientInfos.dao.use("zskk").findById(exams2.getPatientId());
|
|
PatientInfos patientInfos = PatientInfos.dao.use("zskk").findById(exams2.getPatientId());
|
|
patientInfos.setName(record.getStr("PATIENTNAME"));
|
|
patientInfos.setName(record.getStr("PATIENTNAME"));
|
|
@@ -51,7 +50,7 @@ public class DataTask implements ITask {
|
|
patientInfos.setCardNum(record.getStr("IDCARD"));
|
|
patientInfos.setCardNum(record.getStr("IDCARD"));
|
|
patientInfos.update();
|
|
patientInfos.update();
|
|
exams2.setExamStatus(9);
|
|
exams2.setExamStatus(9);
|
|
- exams2.setApplicationDepartment(record.getStr("DEPARTMENT"));
|
|
|
|
|
|
+ exams2.setApplicationDepartment(record.getStr("DEPATMENT"));
|
|
exams2.setApplicationDoctor(record.getStr("CLINICALDOCTOR"));
|
|
exams2.setApplicationDoctor(record.getStr("CLINICALDOCTOR"));
|
|
exams2.setClinDiag(record.getStr("DIAGNOSIS"));
|
|
exams2.setClinDiag(record.getStr("DIAGNOSIS"));
|
|
exams2.update();
|
|
exams2.update();
|