|
@@ -5,10 +5,7 @@ import com.jfinal.kit.HashKit;
|
|
|
import com.jfinal.plugin.activerecord.Db;
|
|
|
import com.jfinal.plugin.activerecord.Record;
|
|
|
import com.jfinal.plugin.cron4j.ITask;
|
|
|
-import com.zskk.model.Doctors;
|
|
|
-import com.zskk.model.Exams;
|
|
|
-import com.zskk.model.PatientInfos;
|
|
|
-import com.zskk.model.Report;
|
|
|
+import com.zskk.model.*;
|
|
|
import okhttp3.*;
|
|
|
import org.apache.commons.codec.digest.DigestUtils;
|
|
|
|
|
@@ -29,20 +26,19 @@ public class DataTask implements ITask {
|
|
|
"SELECT * FROM pacsonline.exams where exam_status=3 and institution_id=05400001 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 zskk where accessionNumber=?",
|
|
|
- exams2.getAccessionNum());
|
|
|
+ Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
|
|
|
+ Record record = Db.use("connected").findFirst("select * from zskk where STUDYUID=?",studies.getStudyuid());
|
|
|
if (record == null) {
|
|
|
continue;
|
|
|
}
|
|
|
Report report = new Report().use("zskk");
|
|
|
report.setId(creatId());
|
|
|
- report.setReportDatetime(parseStringToDate(record.getStr("reportdate")));
|
|
|
- if (record.getStr("impression") == null || record.getStr("DESCRIPTION") == null
|
|
|
- || record.getStr("impression").isBlank() || record.getStr("DESCRIPTION").isBlank()) {
|
|
|
+ report.setReportDatetime(parseStringToDate(record.getStr("REPORTDATE")));
|
|
|
+ if (record.getStr("IMPRESSION") == null || record.getStr("DESCRIPTION") == null
|
|
|
+ || record.getStr("IMPRESSION").isBlank() || record.getStr("DESCRIPTION").isBlank()) {
|
|
|
continue;
|
|
|
}
|
|
|
- report.setImpression(record.getStr("impression"));
|
|
|
+ report.setImpression(record.getStr("IMPRESSION"));
|
|
|
report.setDescription(record.getStr("DESCRIPTION"));
|
|
|
report.setExamId(exams2.getId());
|
|
|
report.setCreatedAt(new Date());
|
|
@@ -54,8 +50,8 @@ public class DataTask implements ITask {
|
|
|
report.save();
|
|
|
PatientInfos patientInfos = PatientInfos.dao.use("zskk").findById(exams2.getPatientId());
|
|
|
patientInfos.setName(record.getStr("PATIENTNAME"));
|
|
|
- patientInfos.setPhone(record.getStr("PHONE"));
|
|
|
- patientInfos.setCardNum(record.getStr("IDCARD"));
|
|
|
+ //patientInfos.setPhone(record.getStr("PHONE"));
|
|
|
+ //patientInfos.setCardNum(record.getStr("IDCARD"));
|
|
|
patientInfos.update();
|
|
|
exams2.setExamStatus(9);
|
|
|
exams2.setClinDoctors(record.getStr("CLINICALDOCTOR"));
|