|
@@ -3,6 +3,7 @@ package com.lantone.qc.kernel;
|
|
|
import com.lantone.qc.pub.jdbc.MysqlJdbc;
|
|
|
import com.lantone.qc.pub.util.FastJsonUtils;
|
|
|
import com.lantone.qc.pub.util.PropertiesUtil;
|
|
|
+import com.lantone.qc.trans.changx.util.CxXmlUtil;
|
|
|
import com.lantone.qc.trans.changx.util.CxXmlUtilTemp;
|
|
|
import com.lantone.qc.trans.taizhou.util.TzXmlUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -58,21 +59,48 @@ public class ChangxDataImportApiTest {
|
|
|
}
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
- String patientId = "ZY010000661273";
|
|
|
-
|
|
|
+// String patientId = "ZY010000661273";
|
|
|
+//
|
|
|
ChangxDataImportApiTest test = new ChangxDataImportApiTest();
|
|
|
- initTableMap();
|
|
|
- //模块映射
|
|
|
- test.loadModelHospital();
|
|
|
- //患者信息
|
|
|
- test.insertPatient(test.loadOraclePatients(tableMap.get("BR_INPATIENTINFO"), patientId));
|
|
|
+ test.dayevent();
|
|
|
+// initTableMap();
|
|
|
+// //模块映射
|
|
|
+// test.loadModelHospital();
|
|
|
+// //患者信息
|
|
|
+// test.insertPatient(test.loadOraclePatients(tableMap.get("BR_INPATIENTINFO"), patientId));
|
|
|
// test.insertDoctor(test.loadOracleDoctorInfos(tableMap.get("GI_USERINFO"), tableMap.get("HI_DEPTINFO")));
|
|
|
|
|
|
- //病人流水号获取 病历号--->id
|
|
|
- Map<String, String> patientMap = test.loadPatients(hospitalId, patientId);
|
|
|
- //model-->id
|
|
|
- Map<String, String> modelMap = test.loadModel();
|
|
|
- test.insertPatientText(patientMap, modelMap);
|
|
|
+// //病人流水号获取 病历号--->id
|
|
|
+// Map<String, String> patientMap = test.loadPatients(hospitalId, patientId);
|
|
|
+// //model-->id
|
|
|
+// Map<String, String> modelMap = test.loadModel();
|
|
|
+// test.insertPatientText(patientMap, modelMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void dayevent() {
|
|
|
+ MysqlJdbc mysqlJdbc = initMysqlJdbc();
|
|
|
+ Connection conn = mysqlJdbc.connect();
|
|
|
+ Statement st = null;
|
|
|
+ ResultSet rs = null;
|
|
|
+ String r1, r2;
|
|
|
+ Map<String, String> map = new HashMap<>();
|
|
|
+ try {
|
|
|
+ st = conn.createStatement();
|
|
|
+ String sql = "select t2.xml_text, t1.behospital_code from med_medical_record t1, med_medical_record_content t2 where t1.rec_id = t2.rec_id and t1.rec_title = '日常病程记录'";
|
|
|
+ rs = st.executeQuery(sql);
|
|
|
+ while (rs.next()) {
|
|
|
+ r1 = rs.getString(1);
|
|
|
+ r2 = rs.getString(2);
|
|
|
+ Map<String, String> xmlNodeValueMap = CxXmlUtil.firstLevelNodeValue(r1);
|
|
|
+ System.out.println(r2 + ":" + xmlNodeValueMap.get("日常病程记录++++文本框"));
|
|
|
+ }
|
|
|
+ } catch (SQLException sqle) {
|
|
|
+ sqle.printStackTrace();
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ } finally {
|
|
|
+ mysqlJdbc.close(rs, st, conn);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private void insertPatient(List<Patient> patients) {
|