|
@@ -8,9 +8,16 @@ import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.jfinal.core.Controller;
|
|
|
+import com.jfinal.kit.PropKit;
|
|
|
import com.jfinal.plugin.activerecord.Db;
|
|
|
import com.jfinal.plugin.activerecord.Record;
|
|
|
+import com.zskk.service.DataService;
|
|
|
+import com.zskk.service.ServiceFactory;
|
|
|
+import com.zskk.service.ThreadPoolService;
|
|
|
+
|
|
|
import okhttp3.FormBody;
|
|
|
import okhttp3.MediaType;
|
|
|
import okhttp3.OkHttpClient;
|
|
@@ -36,6 +43,70 @@ public class ViewController extends Controller {
|
|
|
renderText(e.toString());
|
|
|
}
|
|
|
|
|
|
+ }
|
|
|
+
|
|
|
+ public void testpp() {
|
|
|
+ try {
|
|
|
+ DataService dService = ServiceFactory.getService(DataService.class);
|
|
|
+
|
|
|
+// JSONObject jsonObject = JSON.parseObject(object.toString());
|
|
|
+ Record record = Db.use("connected").findFirst("select * from caller where STUDYUID=?", "1.740423.1264241341.35256.20081.187751821.1908505055");
|
|
|
+ if (record == null) {
|
|
|
+// continue;
|
|
|
+ }
|
|
|
+ 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", "cnb510u72ap7yycu");
|
|
|
+ //报告医生姓名
|
|
|
+ params.put("report_doctor_name", record.getStr("REPORTDOCTOR"));
|
|
|
+ //报告时间
|
|
|
+ params.put("report_datetime",record.getStr("REPORTDATE"));
|
|
|
+ //审核医生姓名
|
|
|
+ params.put("review_doctor_name",record.getStr("REVIEWDOCTOR")==null?"":record.getStr("REVIEWDOCTOR"));
|
|
|
+ //审核时间
|
|
|
+ params.put("review_datetime",record.getStr("REPORTDATE"));
|
|
|
+ //确认医生姓名
|
|
|
+ params.put("confirm_doctor_name",record.getStr("REVIEWDOCTOR")==null?"":record.getStr("REVIEWDOCTOR"));
|
|
|
+ //确认时间
|
|
|
+ params.put("confirm_datetime",record.getStr("REPORTDATE"));
|
|
|
+ //意见建议
|
|
|
+ params.put("impression",record.getStr("DESCRIPTION"));
|
|
|
+ //影像所见
|
|
|
+ params.put("description",record.getStr("IMPRESSION"));
|
|
|
+ //exams表
|
|
|
+ //申请科室
|
|
|
+ params.put("application_department", record.getStr("DEPARTMENT"));
|
|
|
+ //申请医生
|
|
|
+ params.put("application_doctor", record.getStr("CLINICALDOCTOR"));
|
|
|
+ //临床诊断
|
|
|
+ params.put("clin_diag", record.getStr("DIAGNOSIS")==null?"":record.getStr("DIAGNOSIS"));
|
|
|
+ //patient_infos表
|
|
|
+ //患者姓名
|
|
|
+ params.put("name",record.getStr("PATIENTNAME"));
|
|
|
+ //患者手机号
|
|
|
+ params.put("phone", record.getStr("PHONE"));
|
|
|
+ //患者身份证号
|
|
|
+ params.put("card_num", "");
|
|
|
+ params.put("report_result", record.getStr("FITEM_RESULT_CODE").contains("阳")?"2":"1");
|
|
|
+ ThreadPoolService tService = ServiceFactory.getService(ThreadPoolService.class);
|
|
|
+ tService.execute(() -> {
|
|
|
+ dService.saveReport(params);
|
|
|
+ });
|
|
|
+ renderJson(params);
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ // TODO: handle exception
|
|
|
+ renderText(e.toString());
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|