|
@@ -25,60 +25,47 @@ public class UpdateTask implements ITask {
|
|
|
JSONArray jsonArray = dService.getExamList(100);
|
|
|
for (Object object : jsonArray) {
|
|
|
try {
|
|
|
+
|
|
|
JSONObject jsonObject = JSON.parseObject(object.toString());
|
|
|
String pstr = jsonObject.getString("name");
|
|
|
- Record record = Db.use("connected").findFirst("SELECT * FROM gh_ghjl where name=? order by ghrq desc", pstr);
|
|
|
- String phoneString = "";
|
|
|
+ Record recordid = Db.use("connected").findFirst("SELECT * FROM gh_ghjl where name=? order by ghrq desc", pstr);
|
|
|
+ Record record = Db.use("connected").findFirst("SELECT * FROM View_PACS where LODGENO=?", jsonObject.getString("accession_num"));
|
|
|
+
|
|
|
+ // String phoneString = "";
|
|
|
String idcardString = "";
|
|
|
- if (record != null) {
|
|
|
- phoneString = record.getStr("tel")==null?"":record.getStr("tel");
|
|
|
- idcardString =record.getStr("id");
|
|
|
+ if (recordid != null) {
|
|
|
+// phoneString = record.getStr("tel")==null?"":record.getStr("tel");
|
|
|
+ idcardString =recordid.getStr("id");
|
|
|
}else {
|
|
|
- record = Db.use("connected").findFirst("SELECT * FROM 住院病人信息表 where 姓名=? order by 入院日期 desc", pstr);
|
|
|
- if (record == null) {
|
|
|
+ recordid = Db.use("connected").findFirst("SELECT * FROM 住院病人信息表 where 姓名=? order by 入院日期 desc", pstr);
|
|
|
+ if (recordid == null) {
|
|
|
continue;
|
|
|
}
|
|
|
- idcardString =record.getStr("sfzh");
|
|
|
- phoneString = record.getStr("tel")==null?"":record.getStr("tel");
|
|
|
+ idcardString =recordid.getStr("sfzh");
|
|
|
+// phoneString = record.getStr("tel")==null?"":record.getStr("tel");
|
|
|
|
|
|
}
|
|
|
Map<String, String> params = new HashMap<>();
|
|
|
params.put("exam_id", jsonObject.getString("id"));
|
|
|
- //报告医生姓名
|
|
|
- params.put("report_doctor_name", "");
|
|
|
- //报告时间
|
|
|
- params.put("report_datetime", parseStringToDate());
|
|
|
- //审核医生姓名
|
|
|
- params.put("review_doctor_name", "");
|
|
|
- //审核时间
|
|
|
- params.put("review_datetime", parseStringToDate());
|
|
|
- //确认医生姓名
|
|
|
- params.put("confirm_doctor_name", "");
|
|
|
- //确认时间
|
|
|
- params.put("confirm_datetime", parseStringToDate());
|
|
|
- //意见建议
|
|
|
- params.put("impression", "");
|
|
|
- //影像所见
|
|
|
- params.put("description", "");
|
|
|
//exams表
|
|
|
//申请科室
|
|
|
- params.put("application_department", "");
|
|
|
+ params.put("application_department", record.getStr("LODGESECTION")==null?"":record.getStr("LODGESECTION"));
|
|
|
//申请医生
|
|
|
- params.put("application_doctor", "");
|
|
|
+ params.put("application_doctor", record.getStr("LODGEDOCTOR")==null?"":record.getStr("LODGEDOCTOR"));
|
|
|
//临床诊断
|
|
|
params.put("clin_diag", "");
|
|
|
//症状
|
|
|
params.put("clin_symp", "");
|
|
|
//patient_infos表
|
|
|
//患者姓名
|
|
|
- params.put("name", jsonObject.getString("name"));
|
|
|
+ params.put("name", record.getStr("NAME")==null?"":record.getStr("NAME"));
|
|
|
//患者手机号
|
|
|
- params.put("phone", phoneString);
|
|
|
+ params.put("phone", record.getStr("TELEPHONE")==null?"":record.getStr("TELEPHONE"));
|
|
|
//患者身份证号
|
|
|
params.put("card_num", idcardString);
|
|
|
params.put("report_result", "0");
|
|
|
//门诊号住院号
|
|
|
- params.put("hopitalized_no", "");
|
|
|
+ params.put("hopitalized_no", record.getStr("zyh")==null?"":record.getStr("zyh"));
|
|
|
ThreadPoolService tService = ServiceFactory.getService(ThreadPoolService.class);
|
|
|
tService.execute(() -> {
|
|
|
dService.updatePatientInfo(params);
|