|
@@ -25,67 +25,73 @@ public class DataTask implements ITask {
|
|
|
DataService dService = ServiceFactory.getService(DataService.class);
|
|
|
JSONArray jsonArray = dService.getExamList(50);
|
|
|
for (Object object : jsonArray) {
|
|
|
- JSONObject jsonObject = JSON.parseObject(object.toString());
|
|
|
- Record record = Db.use("local").findFirst("select * from report_xml where number=?", jsonObject.getString("patient_num"));
|
|
|
- if (record == null) {
|
|
|
+ try {
|
|
|
+ JSONObject jsonObject = JSON.parseObject(object.toString());
|
|
|
+ Record record = Db.use("local").findFirst("select * from report_xml where number=?", jsonObject.getString("patient_num"));
|
|
|
+ if (record == null) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ String contString = record.getStr("report_xml");
|
|
|
+ XmlHelper xmlHelper = XmlHelper.of(contString);
|
|
|
+// if (record.getStr("impression") == null && record.getStr("description") == null) {
|
|
|
+// continue;
|
|
|
+// }
|
|
|
+ Map<String, String> params = new HashMap<>();
|
|
|
+ params.put("type", "1");
|
|
|
+
|
|
|
+ params.put("institution_id", PropKit.get("institution_id"));
|
|
|
+
|
|
|
+ params.put("code", jsonObject.getString("id"));
|
|
|
+ //报告医生姓名
|
|
|
+ params.put("report_doctor_name", xmlHelper.getString("/Request/Body/CheckReportDoctor"));
|
|
|
+ //报告时间
|
|
|
+ params.put("report_datetime", parseStringToDate(xmlHelper.getString("/Request/Body/CheckReportDate")));
|
|
|
+ //审核医生姓名
|
|
|
+ params.put("review_doctor_name", xmlHelper.getString("/Request/Body/ReviewDoctorSign"));
|
|
|
+ //审核时间
|
|
|
+ params.put("review_datetime", parseStringToDate(xmlHelper.getString("/Request/Body/CheckReportDate")));
|
|
|
+ //确认医生姓名
|
|
|
+ params.put("confirm_doctor_name", xmlHelper.getString("/Request/Body/ReviewDoctorSign"));
|
|
|
+ //确认时间
|
|
|
+ params.put("confirm_datetime", parseStringToDate(xmlHelper.getString("/Request/Body/CheckReportDate")));
|
|
|
+ //意见建议
|
|
|
+ params.put("impression", xmlHelper.getString("/Request/Body/CheckResultSub"));
|
|
|
+ //影像所见
|
|
|
+ params.put("description", xmlHelper.getString("/Request/Body/CheckReportObj"));
|
|
|
+ //exams表
|
|
|
+ //申请科室
|
|
|
+ params.put("application_department", xmlHelper.getString("/Request/Body/CheckApplyDept"));
|
|
|
+ //申请医生
|
|
|
+ params.put("application_doctor", "");
|
|
|
+ //临床诊断
|
|
|
+ params.put("clin_diag", "");
|
|
|
+ //症状
|
|
|
+ params.put("clin_symp", "");
|
|
|
+ //patient_infos表
|
|
|
+ //患者姓名
|
|
|
+ params.put("name", xmlHelper.getString("/Request/Body/PatientName"));
|
|
|
+ //患者手机号
|
|
|
+ params.put("phone", xmlHelper.getString("/Request/Body/Phone"));
|
|
|
+ //患者身份证号
|
|
|
+ params.put("card_num", xmlHelper.getString("/Request/Body/PatientIDCard"));
|
|
|
+ //检查结果1阴2阳
|
|
|
+ params.put("report_result", "0");
|
|
|
+ //门诊号住院号
|
|
|
+ params.put("hopitalized_no", xmlHelper.getString("/Request/Body/InPatientNO"));
|
|
|
+ params.put("out_patient", xmlHelper.getString("/Request/Body/OutPatientNO"));
|
|
|
+ //病人ID
|
|
|
+ params.put("his_patient_id", xmlHelper.getString("/Request/Body/PatientID"));
|
|
|
+ //检查方法
|
|
|
+ params.put("exam_project", xmlHelper.getString("/Request/Body/CheckProjectName"));
|
|
|
+ ThreadPoolService tService = ServiceFactory.getService(ThreadPoolService.class);
|
|
|
+ tService.execute(() -> {
|
|
|
+ dService.saveReport(params);
|
|
|
+ });
|
|
|
+ } catch (Exception e) {
|
|
|
+ // TODO: handle exception
|
|
|
continue;
|
|
|
}
|
|
|
- String contString = record.getStr("report_xml");
|
|
|
- XmlHelper xmlHelper = XmlHelper.of(contString);
|
|
|
-// if (record.getStr("impression") == null && record.getStr("description") == null) {
|
|
|
-// continue;
|
|
|
-// }
|
|
|
- Map<String, String> params = new HashMap<>();
|
|
|
- params.put("type", "1");
|
|
|
|
|
|
- params.put("institution_id", PropKit.get("institution_id"));
|
|
|
-
|
|
|
- params.put("code", jsonObject.getString("id"));
|
|
|
- //报告医生姓名
|
|
|
- params.put("report_doctor_name", xmlHelper.getString("/Request/Body/CheckReportDoctor"));
|
|
|
- //报告时间
|
|
|
- params.put("report_datetime", parseStringToDate(xmlHelper.getString("/Request/Body/CheckReportDate")));
|
|
|
- //审核医生姓名
|
|
|
- params.put("review_doctor_name", xmlHelper.getString("/Request/Body/ReviewDoctorSign"));
|
|
|
- //审核时间
|
|
|
- params.put("review_datetime", parseStringToDate(xmlHelper.getString("/Request/Body/CheckReportDate")));
|
|
|
- //确认医生姓名
|
|
|
- params.put("confirm_doctor_name", xmlHelper.getString("/Request/Body/ReviewDoctorSign"));
|
|
|
- //确认时间
|
|
|
- params.put("confirm_datetime", parseStringToDate(xmlHelper.getString("/Request/Body/CheckReportDate")));
|
|
|
- //意见建议
|
|
|
- params.put("impression", xmlHelper.getString("/Request/Body/CheckResultSub"));
|
|
|
- //影像所见
|
|
|
- params.put("description", xmlHelper.getString("/Request/Body/CheckReportObj"));
|
|
|
- //exams表
|
|
|
- //申请科室
|
|
|
- params.put("application_department", xmlHelper.getString("/Request/Body/CheckApplyDept"));
|
|
|
- //申请医生
|
|
|
- params.put("application_doctor", "");
|
|
|
- //临床诊断
|
|
|
- params.put("clin_diag", "");
|
|
|
- //症状
|
|
|
- params.put("clin_symp", "");
|
|
|
- //patient_infos表
|
|
|
- //患者姓名
|
|
|
- params.put("name", xmlHelper.getString("/Request/Body/PatientName"));
|
|
|
- //患者手机号
|
|
|
- params.put("phone", xmlHelper.getString("/Request/Body/Phone"));
|
|
|
- //患者身份证号
|
|
|
- params.put("card_num", xmlHelper.getString("/Request/Body/PatientIDCard"));
|
|
|
- //检查结果1阴2阳
|
|
|
- params.put("report_result", "0");
|
|
|
- //门诊号住院号
|
|
|
- params.put("hopitalized_no", xmlHelper.getString("/Request/Body/InPatientNO"));
|
|
|
- params.put("out_patient", xmlHelper.getString("/Request/Body/OutPatientNO"));
|
|
|
- //病人ID
|
|
|
- params.put("his_patient_id", xmlHelper.getString("/Request/Body/PatientID"));
|
|
|
- //检查方法
|
|
|
- params.put("exam_project", xmlHelper.getString("/Request/Body/CheckProjectName"));
|
|
|
- ThreadPoolService tService = ServiceFactory.getService(ThreadPoolService.class);
|
|
|
- tService.execute(() -> {
|
|
|
- dService.saveReport(params);
|
|
|
- });
|
|
|
}
|
|
|
}
|
|
|
|