|
@@ -21,10 +21,10 @@ public class DataTask implements ITask {
|
|
public void run() {
|
|
public void run() {
|
|
// TODO Auto-generated method stub
|
|
// TODO Auto-generated method stub
|
|
try {
|
|
try {
|
|
- List<Exams> exams = Exams.dao.use("zskk").find("SELECT * FROM pacsonline.exams where exam_status=3 and institution_id=73090001 order by createdAt desc limit 50");
|
|
|
|
|
|
+ List<Exams> exams = Exams.dao.use("zskk").find("SELECT * FROM pacsonline.exams where exam_status=3 and institution_id=01600001 order by createdAt desc limit 20");
|
|
for (Exams exams2 : exams) {
|
|
for (Exams exams2 : exams) {
|
|
Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
|
|
Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
|
|
- Record record = Db.use("connected").findFirst("select * from caller where STUDYUID=?",studies.getStudyuid());
|
|
|
|
|
|
+ Record record = Db.use("connected").findFirst("select * from reportinfo where STUDYUID=?",studies.getStudyuid());
|
|
if (record == null) {
|
|
if (record == null) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
@@ -34,13 +34,10 @@ public class DataTask implements ITask {
|
|
if (record.getStr("IMPRESSION") == null && record.getStr("DESCRIPTION") == null) {
|
|
if (record.getStr("IMPRESSION") == null && record.getStr("DESCRIPTION") == null) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
- report.setImpression(record.getStr("DESCRIPTION"));
|
|
|
|
- report.setDescription(record.getStr("IMPRESSION"));
|
|
|
|
|
|
+ report.setImpression(record.getStr("IMPRESSION"));
|
|
|
|
+ report.setDescription(record.getStr("DESCRIPTION"));
|
|
report.setExamId(exams2.getId());
|
|
report.setExamId(exams2.getId());
|
|
report.setCreatedAt(new Date());
|
|
report.setCreatedAt(new Date());
|
|
- if (record.getStr("FITEM_RESULT_CODE") != null) {
|
|
|
|
- report.setReportResult(record.getStr("FITEM_RESULT_CODE").contains("阳")?"2":"1");
|
|
|
|
- }
|
|
|
|
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("REPORTDATE")));
|
|
@@ -49,6 +46,8 @@ public class DataTask implements ITask {
|
|
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"));
|
|
|
|
+ patientInfos.setPhone(record.getStr("PHONE"));
|
|
|
|
+ patientInfos.setCardNum(record.getStr("IDCARD"));
|
|
patientInfos.update();
|
|
patientInfos.update();
|
|
exams2.setExamStatus(9);
|
|
exams2.setExamStatus(9);
|
|
exams2.update();
|
|
exams2.update();
|
|
@@ -74,11 +73,11 @@ public class DataTask implements ITask {
|
|
|
|
|
|
private String getDoctorIdByName(String name) {
|
|
private String getDoctorIdByName(String name) {
|
|
if (name == null) {
|
|
if (name == null) {
|
|
- return "1";
|
|
|
|
|
|
+ return null;
|
|
}
|
|
}
|
|
Doctors doctors = Doctors.dao.use("zskk").findFirst("SELECT * FROM doctors where instr(?,realname) and institution_id=73090001",name);
|
|
Doctors doctors = Doctors.dao.use("zskk").findFirst("SELECT * FROM doctors where instr(?,realname) and institution_id=73090001",name);
|
|
if (doctors == null) {
|
|
if (doctors == null) {
|
|
- return "1";
|
|
|
|
|
|
+ return null;
|
|
}
|
|
}
|
|
return doctors.getId();
|
|
return doctors.getId();
|
|
}
|
|
}
|