|
@@ -1,5 +1,7 @@
|
|
|
package com.lantone.qc.kernel;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.google.gson.JsonObject;
|
|
|
import com.lantone.qc.pub.jdbc.MysqlJdbc;
|
|
|
import com.lantone.qc.pub.util.FastJsonUtils;
|
|
@@ -66,13 +68,20 @@ public class TaizDataImportApiTest {
|
|
|
for (Map.Entry<String, String> entry : patientMap.entrySet()) {
|
|
|
List<PatientText> patientTexts = new ArrayList<>();
|
|
|
//病人的病案首页内容
|
|
|
- String firstPageJson = DataTest.loadHomePage(entry.getKey());
|
|
|
+ JSONArray firstPageJsonArray = DataTest.loadHomePage(entry.getKey());
|
|
|
Map<String, Object> firstPageTextMap = new HashMap<>();
|
|
|
firstPageTextMap.put("case_number", entry.getKey());
|
|
|
firstPageTextMap.put("case_number_id", patientMap.get(entry.getKey()));
|
|
|
firstPageTextMap.put("hospital_id", hospitalId);
|
|
|
firstPageTextMap.put("mode_id", 6);
|
|
|
- firstPageTextMap.put("text", firstPageJson);
|
|
|
+ firstPageTextMap.put("origin_text", firstPageJsonArray.toString());
|
|
|
+ JSONObject jsonObject = firstPageJsonArray.getJSONObject(0);
|
|
|
+ Map<String, Object> innerMap = jsonObject.getInnerMap();
|
|
|
+ String pagetext = "";
|
|
|
+ for (Map.Entry<String, Object> e : innerMap.entrySet()) {
|
|
|
+ pagetext = pagetext + "【" + e.getKey() + "】:" + e.getValue() + "\n";
|
|
|
+ }
|
|
|
+ firstPageTextMap.put("text", pagetext);
|
|
|
list.add(firstPageTextMap);
|
|
|
|
|
|
if ("changx".equals(cid)) {
|