|
@@ -171,6 +171,7 @@ public class CacheFileManager {
|
|
|
Statement st = null;
|
|
|
ResultSet rs = null;
|
|
|
try {
|
|
|
+ //疾病大小类
|
|
|
EncrypDES encrypDES = new EncrypDES();//加密对象
|
|
|
String sql = "SELECT con.lib_name, dis.classify from kl_disease dis, kl_concept con where dis.concept_id = con.id";
|
|
|
st = conn.createStatement();
|
|
@@ -184,7 +185,7 @@ public class CacheFileManager {
|
|
|
fw.write("\n");
|
|
|
}
|
|
|
fw.close();
|
|
|
-
|
|
|
+ //性别年龄
|
|
|
sql = "SELECT k1.lib_name, k1.lib_type, kcc.sex_type, kcc.min_age, kcc.max_age \n" +
|
|
|
"FROM kl_concept_common kcc, kl_concept k1 \n" +
|
|
|
"where kcc.concept_id = k1.id \n" +
|
|
@@ -202,7 +203,7 @@ public class CacheFileManager {
|
|
|
fw.write("\n");
|
|
|
}
|
|
|
fw.close();
|
|
|
-
|
|
|
+ //体征结果转体征指标
|
|
|
sql = "SELECT\n" +
|
|
|
"\ti1.lib_name name1,\n" +
|
|
|
"\ti2.lib_name name2 \n" +
|
|
@@ -221,6 +222,32 @@ public class CacheFileManager {
|
|
|
fw.write("\n");
|
|
|
}
|
|
|
fw.close();
|
|
|
+ //疾病科室信息
|
|
|
+ sql = "SELECT k1.lib_name diag_name, k2.lib_name dept_name FROM kl_concept_common kcc, kl_concept k1, kl_concept k2 " +
|
|
|
+ "where kcc.concept_id = k1.id and kcc.dept_id = k2.id " +
|
|
|
+ "and k1.lib_type = 18 and kcc.dept_id is not null";
|
|
|
+ st = conn.createStatement();
|
|
|
+ rs = st.executeQuery(sql);
|
|
|
+ List<Map.Entry<String, String>> libaryList = rsToMap(rs, true);
|
|
|
+ fw = new FileWriter(path + "common_diag_2_dept.dict");
|
|
|
+ for (Map.Entry<String, String> entry : libaryList) {
|
|
|
+ fw.write(encrypDES.encrytor(entry.getKey() + "|" + entry.getValue()));
|
|
|
+ fw.write("\n");
|
|
|
+ }
|
|
|
+ fw.close();
|
|
|
+
|
|
|
+ sql = "SELECT g.diag_level1,g.diag_level2,g.diag_level3 FROM `kl_disease_normalize` g ";
|
|
|
+ st = conn.createStatement();
|
|
|
+ rs = st.executeQuery(sql);
|
|
|
+ fw = new FileWriter(path + "diag_normalize.dict");
|
|
|
+ while (rs.next()) {
|
|
|
+ r1 = rs.getString(1);
|
|
|
+ r2 = rs.getString(2);
|
|
|
+ r3 = rs.getString(3);
|
|
|
+ fw.write(encrypDES.encrytor(r1+ "|" + r2+ "|" + r3));
|
|
|
+ fw.write("\n");
|
|
|
+ }
|
|
|
+ fw.close();
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
} finally {
|