|
@@ -1,5 +1,6 @@
|
|
|
package com.lantone.qc.kernel;
|
|
|
|
|
|
+import com.google.gson.JsonObject;
|
|
|
import com.lantone.qc.pub.jdbc.MysqlJdbc;
|
|
|
import com.lantone.qc.pub.util.FastJsonUtils;
|
|
|
import com.lantone.qc.pub.util.PropertiesUtil;
|
|
@@ -10,10 +11,7 @@ import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
import java.io.ByteArrayOutputStream;
|
|
|
import java.io.InputStream;
|
|
|
-import java.sql.Connection;
|
|
|
-import java.sql.ResultSet;
|
|
|
-import java.sql.SQLException;
|
|
|
-import java.sql.Statement;
|
|
|
+import java.sql.*;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
@@ -44,8 +42,9 @@ public class TaizDataImportApiTest {
|
|
|
if (cid.equals("taizhou")) {
|
|
|
test.insertPatient(test.loadOraclePatients("BR_INPATIENTINFO_TZ20200330"));
|
|
|
}
|
|
|
- //病人流水号获取
|
|
|
+ //病人流水号获取 病历号--->id
|
|
|
Map<String, String> patientMap = test.loadPatients(hospitalId);
|
|
|
+ //model-->id
|
|
|
Map<String, String> modelMap = test.loadModel();
|
|
|
test.insertPatientText(patientMap, modelMap);
|
|
|
}
|
|
@@ -66,6 +65,16 @@ public class TaizDataImportApiTest {
|
|
|
|
|
|
for (Map.Entry<String, String> entry : patientMap.entrySet()) {
|
|
|
List<PatientText> patientTexts = new ArrayList<>();
|
|
|
+ //病人的病案首页内容
|
|
|
+ String firstPageJson = 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);
|
|
|
+ list.add(firstPageTextMap);
|
|
|
+
|
|
|
if ("changx".equals(cid)) {
|
|
|
patientTexts = loadChangxOraclePatientTexts(entry.getKey());
|
|
|
}
|
|
@@ -164,7 +173,6 @@ System.out.println("******" + patientText.getBljlmc() + "**" + caseMap.get(patie
|
|
|
}
|
|
|
return patientTexts;
|
|
|
}
|
|
|
-
|
|
|
private List<PatientText> loadChangxOraclePatientTexts(String brzyid) {
|
|
|
MysqlJdbc mysqlJdbc = initOracleJdbc();
|
|
|
Connection conn = mysqlJdbc.connect();
|