|
@@ -25,9 +25,9 @@ public class USReportTask implements ITask {
|
|
|
// TODO Auto-generated method stub
|
|
|
DataService dService = ServiceFactory.getService(DataService.class);
|
|
|
|
|
|
- List<Record> records = Db.use("connected").find("SELECT * FROM (select * from reportinfo where STUDYSTATUS = '诊断完成' and MODALITY = 'US' and REVIEWDATE>to_date(?,'YYYY-MM-DD HH24:MI:SS')and rownum < 80)ORDER BY REVIEWDATE DESC", getNowDate());
|
|
|
+ List<Record> records = Db.use("connected").find("select top 10 * from reportinfo where modality = 'US' order by reviewdate desc");
|
|
|
for (Record record : records) {
|
|
|
- Record recordus = Db.use("local").findFirst("select * from usexam where code = ?", record.getStr("DIAGRPTID"));
|
|
|
+ Record recordus = Db.use("local").findFirst("select * from usexam where code = ?", record.getStr("studyuid"));
|
|
|
if (recordus != null) {
|
|
|
continue;
|
|
|
}
|
|
@@ -38,21 +38,21 @@ public class USReportTask implements ITask {
|
|
|
|
|
|
params.put("institution_id", PropKit.get("institution_id"));
|
|
|
|
|
|
- params.put("name", record.getStr("PATIENTNAME"));
|
|
|
+ params.put("name", record.getStr("patientname"));
|
|
|
|
|
|
- params.put("exam_class", record.getStr("MODALITY"));
|
|
|
+ params.put("exam_class", record.getStr("modality"));
|
|
|
|
|
|
- params.put("application_department", record.getStr("DEPARTMENT")==null?"":record.getStr("DEPARTMENT"));
|
|
|
+ params.put("application_department", record.getStr("department")==null?"":record.getStr("department"));
|
|
|
|
|
|
- params.put("phone", record.getStr("PHONE")==null?"":record.getStr("PHONE"));
|
|
|
+ params.put("phone", record.getStr("phone")==null?"":record.getStr("phone"));
|
|
|
|
|
|
params.put("is_dcm", "2");
|
|
|
|
|
|
- params.put("exam_datetime", parseStringToDate(record.getStr("REVIEWDATE")));
|
|
|
+ params.put("exam_datetime", record.getStr("reviewdate"));
|
|
|
|
|
|
- params.put("patient_num", record.getStr("PATIENTID"));
|
|
|
+ params.put("patient_num", record.getStr("patientid"));
|
|
|
|
|
|
- params.put("accession_num", record.getStr("EXAMNO"));
|
|
|
+ params.put("accession_num", record.getStr("accessionNumber"));
|
|
|
|
|
|
String examid = dService.createRegisterInfo(params);
|
|
|
|
|
@@ -66,83 +66,68 @@ public class USReportTask implements ITask {
|
|
|
paramsreport.put("institution_id", PropKit.get("institution_id"));
|
|
|
|
|
|
paramsreport.put("code", examid);
|
|
|
- //报告医生姓名
|
|
|
- paramsreport.put("report_doctor_name", record.getStr("REPORTDOCTOR"));
|
|
|
- //报告时间
|
|
|
- paramsreport.put("report_datetime", record.getStr("REPORTDATE"));
|
|
|
- //审核医生姓名
|
|
|
- paramsreport.put("review_doctor_name", record.getStr("REVIEWDOCTOR"));
|
|
|
- //审核时间
|
|
|
- paramsreport.put("review_datetime", record.getStr("REVIEWDATE"));
|
|
|
- //确认医生姓名
|
|
|
- paramsreport.put("confirm_doctor_name", record.getStr("REVIEWDOCTOR"));
|
|
|
- //确认时间
|
|
|
- paramsreport.put("confirm_datetime", record.getStr("REVIEWDATE"));
|
|
|
- //意见建议
|
|
|
- paramsreport.put("impression", record.getStr("IMPRESSION"));
|
|
|
- //影像所见
|
|
|
- paramsreport.put("description", record.getStr("DESCRIPTION"));
|
|
|
- //exams表
|
|
|
- //申请科室
|
|
|
- paramsreport.put("application_department", record.getStr("DEPARTMENT")==null?"":record.getStr("DEPARTMENT"));
|
|
|
- //申请医生
|
|
|
- paramsreport.put("application_doctor", record.getStr("CLINICALDOCTOR")==null?"":record.getStr("CLINICALDOCTOR"));
|
|
|
- //临床诊断
|
|
|
- paramsreport.put("clin_diag", record.getStr("DIAGNOSIS")==null?"":record.getStr("DIAGNOSIS"));
|
|
|
- //症状
|
|
|
- paramsreport.put("clin_symp", record.getStr("ILLNESS")==null?"":record.getStr("ILLNESS"));
|
|
|
- //patient_infos表
|
|
|
- //患者姓名
|
|
|
- paramsreport.put("name", record.getStr("PATIENTNAME"));
|
|
|
- //患者手机号
|
|
|
- paramsreport.put("phone", record.getStr("PHONE")==null?"":record.getStr("PHONE"));
|
|
|
- //患者身份证号
|
|
|
- paramsreport.put("card_num", record.getStr("IDCARD")==null?"":record.getStr("IDCARD"));
|
|
|
- //检查结果1阴2阳
|
|
|
- paramsreport.put("report_result", "0");
|
|
|
- //门诊号住院号
|
|
|
- paramsreport.put("hopitalized_no", record.getStr("INPATIENTNUM")==null?"":record.getStr("INPATIENTNUM"));
|
|
|
- paramsreport.put("out_patient", record.getStr("OUTPATIENTNUM")==null?"":record.getStr("OUTPATIENTNUM"));
|
|
|
- //病人ID
|
|
|
- paramsreport.put("his_patient_id", record.getStr("PATIENTID")==null?"":record.getStr("PATIENTID"));
|
|
|
- //检查方法
|
|
|
- paramsreport.put("exam_project", record.getStr("PROJECT")==null?"":record.getStr("PROJECT"));
|
|
|
- //1急诊 (out_patient)2住院(hopitalized_no)3门诊(out_patient)4体检(out_patient)
|
|
|
- switch (record.getStr("SOURCE")) {
|
|
|
- case "门诊":
|
|
|
- paramsreport.put("patient_source", "3");
|
|
|
- break;
|
|
|
- case "体检":
|
|
|
- paramsreport.put("patient_source", "4");
|
|
|
- break;
|
|
|
- case "住院":
|
|
|
- paramsreport.put("patient_source", "2");
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- ThreadPoolService tService = ServiceFactory.getService(ThreadPoolService.class);
|
|
|
- tService.execute(() -> {
|
|
|
- dService.saveReport(paramsreport);
|
|
|
- });
|
|
|
-
|
|
|
- //上传报告附件
|
|
|
- Map<String, String> annex_params = new HashMap<>();
|
|
|
- annex_params.put("institution_id", PropKit.get("institution_id"));
|
|
|
- annex_params.put("type", "1");
|
|
|
- annex_params.put("code", examid);
|
|
|
- //附件类型1.mp4 2.pdf 3.jpeg
|
|
|
- annex_params.put("annex_class_code", "3");
|
|
|
- dService.saveAnnex(annex_params, record.getStr("RPTURL"));
|
|
|
- Record usinfo = new Record().set("code", record.getStr("DIAGRPTID"))
|
|
|
- .set("createAt", parseStringToDateTime()).set("updateAt", parseStringToDateTime());
|
|
|
- Db.use("local").save("usexam", usinfo);
|
|
|
+ //报告医生姓名
|
|
|
+ params.put("report_doctor_name", record.getStr("reportdoctor"));
|
|
|
+ //报告时间
|
|
|
+ params.put("report_datetime", record.getStr("reportdate"));
|
|
|
+ //审核医生姓名
|
|
|
+ params.put("review_doctor_name", record.getStr("reviewdoctor"));
|
|
|
+ //审核时间
|
|
|
+ params.put("review_datetime", record.getStr("reviewdate"));
|
|
|
+ //确认医生姓名
|
|
|
+ params.put("confirm_doctor_name", record.getStr("reviewdoctor"));
|
|
|
+ //确认时间
|
|
|
+ params.put("confirm_datetime", record.getStr("reviewdate"));
|
|
|
+ //意见建议
|
|
|
+ params.put("impression", record.getStr("impression"));
|
|
|
+ //影像所见
|
|
|
+ params.put("description", record.getStr("description"));
|
|
|
+ //exams表
|
|
|
+ //申请科室
|
|
|
+ params.put("application_department", record.getStr("department"));
|
|
|
+ //申请医生
|
|
|
+ params.put("application_doctor", record.getStr("clinicaldoctor"));
|
|
|
+ //临床诊断
|
|
|
+ params.put("clin_diag", record.getStr("diagnosis"));
|
|
|
+ //症状
|
|
|
+ params.put("clin_symp", record.getStr("symptom"));
|
|
|
+ //patient_infos表
|
|
|
+ //患者姓名
|
|
|
+ params.put("name", record.getStr("patientname"));
|
|
|
+ //患者手机号
|
|
|
+ params.put("phone", record.getStr("phone"));
|
|
|
+ //患者身份证号
|
|
|
+ params.put("card_num", record.getStr("idcard"));
|
|
|
+ //检查结果1阴2阳
|
|
|
+ params.put("report_result", record.getStr("result").contains("阳")?"2":"1");
|
|
|
+ //住院号
|
|
|
+ params.put("hopitalized_no", record.getStr("inPatientNum"));
|
|
|
+ //门诊号
|
|
|
+ params.put("out_patient", record.getStr("outPatientNum"));
|
|
|
+ //检查方法
|
|
|
+ params.put("exam_project", record.getStr("project"));
|
|
|
+ //病人ID
|
|
|
+ params.put("his_patient_id", record.getStr("patientid"));
|
|
|
+ ThreadPoolService tService = ServiceFactory.getService(ThreadPoolService.class);
|
|
|
+ tService.execute(() -> {
|
|
|
+ dService.saveReport(params);
|
|
|
+ });
|
|
|
} catch (Exception e) {
|
|
|
// TODO: handle exception
|
|
|
continue;
|
|
|
}
|
|
|
- }
|
|
|
+
|
|
|
+ //上传报告附件
|
|
|
+ Map<String, String> annex_params = new HashMap<>();
|
|
|
+ annex_params.put("institution_id", PropKit.get("institution_id"));
|
|
|
+ annex_params.put("type", "4");
|
|
|
+ annex_params.put("code", record.getStr("studyuid"));
|
|
|
+ //附件类型1.mp4 2.pdf 3.jpeg
|
|
|
+ annex_params.put("annex_class_code", "3");
|
|
|
+ dService.saveAnnex(annex_params, record.getStr("report_url"));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
@Override
|