|
@@ -8,6 +8,7 @@ import java.util.Map;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
+import com.jfinal.kit.PropKit;
|
|
import com.jfinal.plugin.activerecord.Db;
|
|
import com.jfinal.plugin.activerecord.Db;
|
|
import com.jfinal.plugin.activerecord.Record;
|
|
import com.jfinal.plugin.activerecord.Record;
|
|
import com.jfinal.plugin.cron4j.ITask;
|
|
import com.jfinal.plugin.cron4j.ITask;
|
|
@@ -21,7 +22,7 @@ public class DataTask implements ITask {
|
|
public void run() {
|
|
public void run() {
|
|
// TODO Auto-generated method stub
|
|
// TODO Auto-generated method stub
|
|
DataService dService = ServiceFactory.getService(DataService.class);
|
|
DataService dService = ServiceFactory.getService(DataService.class);
|
|
- JSONArray jsonArray = dService.getExamList(100);
|
|
|
|
|
|
+ JSONArray jsonArray = dService.getExamList(80);
|
|
for (Object object : jsonArray) {
|
|
for (Object object : jsonArray) {
|
|
JSONObject jsonObject = JSON.parseObject(object.toString());
|
|
JSONObject jsonObject = JSON.parseObject(object.toString());
|
|
Record record = Db.use("connected").findFirst("select * from reportinfo where accessionNumber=?",
|
|
Record record = Db.use("connected").findFirst("select * from reportinfo where accessionNumber=?",
|
|
@@ -29,27 +30,31 @@ public class DataTask implements ITask {
|
|
if (record == null) {
|
|
if (record == null) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
- if (record.getStr("description") == null && record.getStr("impression") == null) {
|
|
|
|
|
|
+ if (record.getStr("description") == null && record.getStr("result") == null) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
Map<String, String> params = new HashMap<>();
|
|
Map<String, String> params = new HashMap<>();
|
|
- params.put("exam_id", jsonObject.getString("id"));
|
|
|
|
|
|
+ params.put("type", "1");
|
|
|
|
+ params.put("institution_id", PropKit.get("institution_id"));
|
|
|
|
+
|
|
|
|
+ params.put("code", jsonObject.getString("id"));
|
|
|
|
+
|
|
// 报告医生姓名
|
|
// 报告医生姓名
|
|
params.put("report_doctor_name", record.getStr("reportdoctor"));
|
|
params.put("report_doctor_name", record.getStr("reportdoctor"));
|
|
// 报告时间
|
|
// 报告时间
|
|
- params.put("report_datetime", parseStringToDate(record.getStr("reportdate")));
|
|
|
|
|
|
+ params.put("report_datetime", record.getStr("reportDate"));
|
|
// 审核医生姓名
|
|
// 审核医生姓名
|
|
params.put("review_doctor_name",
|
|
params.put("review_doctor_name",
|
|
record.getStr("reviewdoctor") == null ? "" : record.getStr("reviewdoctor"));
|
|
record.getStr("reviewdoctor") == null ? "" : record.getStr("reviewdoctor"));
|
|
// 审核时间
|
|
// 审核时间
|
|
- params.put("review_datetime", parseStringToDate(record.getStr("reviewdate")));
|
|
|
|
|
|
+ params.put("review_datetime", record.getStr("reviewdate"));
|
|
// 确认医生姓名
|
|
// 确认医生姓名
|
|
params.put("confirm_doctor_name",
|
|
params.put("confirm_doctor_name",
|
|
record.getStr("reviewdoctor") == null ? "" : record.getStr("reviewdoctor"));
|
|
record.getStr("reviewdoctor") == null ? "" : record.getStr("reviewdoctor"));
|
|
// 确认时间
|
|
// 确认时间
|
|
- params.put("confirm_datetime", parseStringToDate(record.getStr("reviewdate")));
|
|
|
|
|
|
+ params.put("confirm_datetime", record.getStr("reviewdate"));
|
|
// 意见建议
|
|
// 意见建议
|
|
- params.put("impression", record.getStr("impression"));
|
|
|
|
|
|
+ params.put("impression", record.getStr("result"));
|
|
// 影像所见
|
|
// 影像所见
|
|
params.put("description", record.getStr("description"));
|
|
params.put("description", record.getStr("description"));
|
|
// exams表
|
|
// exams表
|
|
@@ -63,19 +68,19 @@ public class DataTask implements ITask {
|
|
params.put("clin_symp", record.getStr("symptom") == null ? "" : record.getStr("symptom"));
|
|
params.put("clin_symp", record.getStr("symptom") == null ? "" : record.getStr("symptom"));
|
|
// patient_infos表
|
|
// patient_infos表
|
|
// 患者姓名
|
|
// 患者姓名
|
|
- params.put("name", record.getStr("patientname"));
|
|
|
|
|
|
+ params.put("name", record.getStr("patientName"));
|
|
// 患者手机号
|
|
// 患者手机号
|
|
params.put("phone", record.getStr("phone") == null ? "" : record.getStr("phone"));
|
|
params.put("phone", record.getStr("phone") == null ? "" : record.getStr("phone"));
|
|
// 患者身份证号
|
|
// 患者身份证号
|
|
- params.put("card_num", record.getStr("idcard") == null ? "" : record.getStr("idcard"));
|
|
|
|
|
|
+ params.put("card_num", record.getStr("IDCard") == null ? "" : record.getStr("IDCard"));
|
|
// 检查结果1阴2阳
|
|
// 检查结果1阴2阳
|
|
- params.put("report_result", record.getStr("result").contains("阳") ? "2" : "1");
|
|
|
|
|
|
+ params.put("report_result", "0");
|
|
// 门诊号住院号
|
|
// 门诊号住院号
|
|
params.put("hopitalized_no", record.getStr("inPatientNum") == null ? "" : record.getStr("inPatientNum"));
|
|
params.put("hopitalized_no", record.getStr("inPatientNum") == null ? "" : record.getStr("inPatientNum"));
|
|
// 门诊号
|
|
// 门诊号
|
|
params.put("out_patient", record.getStr("outPatientNum") == null ? "" : record.getStr("outPatientNum"));
|
|
params.put("out_patient", record.getStr("outPatientNum") == null ? "" : record.getStr("outPatientNum"));
|
|
// 病人ID
|
|
// 病人ID
|
|
- params.put("his_patient_id", record.getStr("patientid") == null ? "" : record.getStr("patientid"));
|
|
|
|
|
|
+ params.put("his_patient_id", record.getStr("patientNum") == null ? "" : record.getStr("patientNum"));
|
|
// 检查方法
|
|
// 检查方法
|
|
params.put("exam_project", record.getStr("project"));
|
|
params.put("exam_project", record.getStr("project"));
|
|
ThreadPoolService tService = ServiceFactory.getService(ThreadPoolService.class);
|
|
ThreadPoolService tService = ServiceFactory.getService(ThreadPoolService.class);
|