|
@@ -9,6 +9,7 @@ import java.util.Map;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.jfinal.json.JFinalJson;
|
|
|
import com.jfinal.kit.PropKit;
|
|
|
import com.jfinal.plugin.activerecord.Db;
|
|
|
import com.jfinal.plugin.activerecord.Record;
|
|
@@ -27,6 +28,11 @@ public class USReportTask implements ITask {
|
|
|
|
|
|
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());
|
|
|
for (Record record : records) {
|
|
|
+ Record recordus = Db.use("local").findFirst("select * from usexam where code = ?", record.getStr("DIAGRPTID"));
|
|
|
+ if (recordus != null) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
try {
|
|
|
//创建登记
|
|
|
Map<String, String> params = new HashMap<>();
|
|
@@ -130,85 +136,13 @@ public class USReportTask implements ITask {
|
|
|
//附件类型1.mp4 2.pdf 3.jpeg
|
|
|
annex_params.put("annex_class_code", "3");
|
|
|
dService.saveAnnex(annex_params, record.getStr("RPTURL"));
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-// if (record.getStr("IMPRESSION") == null && record.getStr("DESCRIPTION") == null) {
|
|
|
-// continue;
|
|
|
-// }
|
|
|
-// Map<String, String> params = new HashMap<>();
|
|
|
-// params.put("type", "4");
|
|
|
-//
|
|
|
-// params.put("institution_id", PropKit.get("institution_id"));
|
|
|
-//
|
|
|
-// params.put("code", record.getStr("STUDYUID"));
|
|
|
-// //报告医生姓名
|
|
|
-// 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")==null?"":record.getStr("DEPARTMENT"));
|
|
|
-// //申请医生
|
|
|
-// params.put("application_doctor", record.getStr("CLINICALDOCTOR")==null?"":record.getStr("CLINICALDOCTOR"));
|
|
|
-// //临床诊断
|
|
|
-// params.put("clin_diag", record.getStr("DIAGNOSIS")==null?"":record.getStr("DIAGNOSIS"));
|
|
|
-// //症状
|
|
|
-// params.put("clin_symp", record.getStr("ILLNESS")==null?"":record.getStr("ILLNESS"));
|
|
|
-// //patient_infos表
|
|
|
-// //患者姓名
|
|
|
-// params.put("name", record.getStr("PATIENTNAME"));
|
|
|
-// //患者手机号
|
|
|
-// params.put("phone", record.getStr("PHONE")==null?"":record.getStr("PHONE"));
|
|
|
-// //患者身份证号
|
|
|
-// params.put("card_num", record.getStr("IDCARD")==null?"":record.getStr("IDCARD"));
|
|
|
-// //检查结果1阴2阳
|
|
|
-// params.put("report_result", "0");
|
|
|
-// //门诊号住院号
|
|
|
-// params.put("hopitalized_no", record.getStr("INPATIENTNUM")==null?"":record.getStr("INPATIENTNUM"));
|
|
|
-// params.put("out_patient", record.getStr("OUTPATIENTNUM")==null?"":record.getStr("OUTPATIENTNUM"));
|
|
|
-// //病人ID
|
|
|
-// params.put("his_patient_id", record.getStr("PATIENTID")==null?"":record.getStr("PATIENTID"));
|
|
|
-// //检查方法
|
|
|
-// params.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 "门诊":
|
|
|
-// params.put("patient_source", "3");
|
|
|
-// break;
|
|
|
-// case "体检":
|
|
|
-// params.put("patient_source", "4");
|
|
|
-// break;
|
|
|
-// case "住院":
|
|
|
-// params.put("patient_source", "2");
|
|
|
-// break;
|
|
|
-// default:
|
|
|
-// break;
|
|
|
-// }
|
|
|
-//
|
|
|
-//// ThreadPoolService tService = ServiceFactory.getService(ThreadPoolService.class);
|
|
|
-//// tService.execute(() -> {
|
|
|
-// dService.saveReport(params);
|
|
|
-//// });
|
|
|
+ Record usinfo = new Record().set("code", record.getStr("DIAGRPTID"))
|
|
|
+ .set("status", 0).set("createAt", parseStringToDateTime()).set("updateAt", parseStringToDateTime());
|
|
|
+ Db.use("local").save("usexam", usinfo);
|
|
|
} catch (Exception e) {
|
|
|
// TODO: handle exception
|
|
|
continue;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|