|
@@ -22,33 +22,33 @@ public class DataTask implements ITask {
|
|
|
public void run() {
|
|
|
// TODO Auto-generated method stub
|
|
|
try {
|
|
|
- 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");
|
|
|
+ List<Exams> exams = Exams.dao.use("zskk").find("SELECT * FROM pacsonline.exams where exam_status=3 and institution_id=01000001 order by createdAt desc limit 50");
|
|
|
for (Exams exams2 : exams) {
|
|
|
Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
|
|
|
- Record record = Db.use("connected").findFirst("select * from viewname where STUDYUID=?",studies.getStudyuid());
|
|
|
+ Record record = Db.use("connected").findFirst("select * from reportinfo where studyuid=?",studies.getStudyuid());
|
|
|
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("IMPRESSION") == null && record.getStr("DESCRIPTION") == null) {
|
|
|
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.setCreatedAt(new Date());
|
|
|
- report.setReportDoctorId(getDoctorIdByName(record.getStr("REPORTDOCTOR")));
|
|
|
- report.setReviewDoctorId(getDoctorIdByName(record.getStr("REVIEWDOCTOR")));
|
|
|
- report.setReviewDatetime(parseStringToDate(record.getStr("REPORTDATE")));
|
|
|
- report.setConfirmDoctorId(getDoctorIdByName(record.getStr("REVIEWDOCTOR")));
|
|
|
- report.setConfirmDatetime(parseStringToDate(record.getStr("REPORTDATE")));
|
|
|
+ report.setReportDoctorId(getDoctorIdByName(record.getStr("reportdoctor")));
|
|
|
+ report.setReviewDoctorId(getDoctorIdByName(record.getStr("reviewdoctor")));
|
|
|
+ report.setReviewDatetime(parseStringToDate(record.getStr("reportdate")));
|
|
|
+ report.setConfirmDoctorId(getDoctorIdByName(record.getStr("reviewdoctor")));
|
|
|
+ report.setConfirmDatetime(parseStringToDate(record.getStr("reportdate")));
|
|
|
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.setName(record.getStr("patientname"));
|
|
|
+ patientInfos.setPhone(record.getStr("phone"));
|
|
|
+// patientInfos.setCardNum(record.getStr("IDCARD"));
|
|
|
patientInfos.update();
|
|
|
exams2.setExamStatus(9);
|
|
|
exams2.update();
|
|
@@ -70,7 +70,7 @@ public class DataTask implements ITask {
|
|
|
|
|
|
private String creatId() {
|
|
|
UUID id=UUID.randomUUID();
|
|
|
- String[] idd= id.toString().split("-");
|
|
|
+ String[] idd = id.toString().split("-");
|
|
|
return idd[0]+idd[1]+idd[2];
|
|
|
}
|
|
|
|
|
@@ -78,7 +78,7 @@ public class DataTask implements ITask {
|
|
|
if (name == null) {
|
|
|
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=01000001",name);
|
|
|
if (doctors == null) {
|
|
|
return null;
|
|
|
}
|
|
@@ -89,7 +89,7 @@ public class DataTask implements ITask {
|
|
|
if (dateStr == null) {
|
|
|
return new Date();
|
|
|
}
|
|
|
- SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ SimpleDateFormat sdf= new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");
|
|
|
Date date = null;
|
|
|
try {
|
|
|
date = sdf.parse(dateStr);
|