刘韬 5 роки тому
батько
коміт
5b63176ac3
1 змінених файлів з 23 додано та 23 видалено
  1. 23 23
      DataFusion/src/com/zskk/control/ViewController.java

+ 23 - 23
DataFusion/src/com/zskk/control/ViewController.java

@@ -50,32 +50,32 @@ public class ViewController extends Controller {
 			List<Record> examds = new ArrayList<>();
 			for (Exams exams2 : exams) {
 //				Studies studies = Studies.dao.use("zskk").findById(exams2.getStudyId());
-				Record record = Db.use("connected").findFirst("select * from reportinfo where ACCESSIONNUMBER=?",exams2.getAccessionNum());
+				Record record = Db.use("connected").findFirst("select * from hhris.view_reportinfo where ACCESSIONNUMBER=?",exams2.getAccessionNum());
 				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) {
-//					continue;
-//				}
-//				report.setImpression(new String(record.getStr("DESCRIPTION").getBytes("windows-1252"),"GBK"));
-//				report.setDescription(new String(record.getStr("IMPRESSION").getBytes("windows-1252"),"GBK"));
-//				report.setExamId(exams2.getId());
-//				report.setCreatedAt(new Date());
-//				report.setReportDoctorId(getDoctorIdByName(new String(record.getStr("REPORTDOCTOR").getBytes("windows-1252"),"GBK")));
-//				report.setReviewDoctorId(getDoctorIdByName(new String(record.getStr("REVIEWDOCTOR").getBytes("windows-1252"),"GBK")));
-//				report.setReviewDatetime(parseStringToDate(new String(record.getStr("REPORTDATE").getBytes("windows-1252"),"GBK")));
-//				report.setConfirmDoctorId(getDoctorIdByName(new String(record.getStr("REVIEWDOCTOR").getBytes("windows-1252"),"GBK")));
-//				report.setConfirmDatetime(parseStringToDate(new String(record.getStr("REPORTDATE").getBytes("windows-1252"),"GBK")));
-//				report.save();
-//				PatientInfos patientInfos = PatientInfos.dao.use("zskk").findById(exams2.getPatientId());
-//				patientInfos.setName(new String(record.getStr("PATIENTNAME").getBytes("windows-1252"),"GBK"));
-//				patientInfos.update();
-//				exams2.setClinDoctors(new String(record.getStr("CLINICALDOCTOR").getBytes("windows-1252"),"GBK"));
-//				exams2.setExamStatus(9);
-//				exams2.update();
+				Report report = new Report().use("zskk");
+				report.setId(creatId());
+				report.setReportDatetime(parseStringToDate(record.getStr("REPORTDATE")));
+				if (record.getStr("IMPRESSION") == null && record.getStr("DESCRIPTION") == null) {
+					continue;
+				}
+				report.setImpression(new String(record.getStr("DESCRIPTION").getBytes("windows-1252"),"GBK"));
+				report.setDescription(new String(record.getStr("IMPRESSION").getBytes("windows-1252"),"GBK"));
+				report.setExamId(exams2.getId());
+				report.setCreatedAt(new Date());
+				report.setReportDoctorId(getDoctorIdByName(new String(record.getStr("REPORTDOCTOR").getBytes("windows-1252"),"GBK")));
+				report.setReviewDoctorId(getDoctorIdByName(new String(record.getStr("REVIEWDOCTOR").getBytes("windows-1252"),"GBK")));
+				report.setReviewDatetime(parseStringToDate(new String(record.getStr("REPORTDATE").getBytes("windows-1252"),"GBK")));
+				report.setConfirmDoctorId(getDoctorIdByName(new String(record.getStr("REVIEWDOCTOR").getBytes("windows-1252"),"GBK")));
+				report.setConfirmDatetime(parseStringToDate(new String(record.getStr("REPORTDATE").getBytes("windows-1252"),"GBK")));
+				report.save();
+				PatientInfos patientInfos = PatientInfos.dao.use("zskk").findById(exams2.getPatientId());
+				patientInfos.setName(new String(record.getStr("PATIENTNAME").getBytes("windows-1252"),"GBK"));
+				patientInfos.update();
+				exams2.setClinDoctors(new String(record.getStr("CLINICALDOCTOR").getBytes("windows-1252"),"GBK"));
+				exams2.setExamStatus(9);
+				exams2.update();
 				examds.add(record);
 
 			}