|
@@ -48,29 +48,24 @@ public class CacheFileManagerTest {
|
|
|
// }
|
|
|
// fw.close();
|
|
|
//疾病科室
|
|
|
-// String 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";
|
|
|
- String sql = "SELECT lib_name FROM kl_concept WHERE is_deleted = 'N' AND lib_type = 70 AND lib_name regexp '[0-9]'";
|
|
|
+ String 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>> libraryList = rsToMap(rs, true);
|
|
|
+ List<Map.Entry<String, String>> libraryList = rsToMap(rs, true);
|
|
|
|
|
|
- FileWriter fw = new FileWriter(path + "src/main/resources/kl_result_mapping_standword.dict");
|
|
|
-// for (Map.Entry<String, String> entry : libraryList) {
|
|
|
-// fw.write(encrypDES.encrytor(entry.getKey() + "|" + entry.getValue()));
|
|
|
-// fw.write("\n");
|
|
|
-// }
|
|
|
- while (rs.next()){
|
|
|
- fw.write(encrypDES.encrytor(rs.getString(1)));
|
|
|
+ FileWriter fw = new FileWriter(path + "src/main/resources/doc_result_mapping_diag.dict");
|
|
|
+ for (Map.Entry<String, String> entry : libraryList) {
|
|
|
+ fw.write(encrypDES.encrytor(entry.getKey() + "|" + entry.getValue()));
|
|
|
fw.write("\n");
|
|
|
}
|
|
|
fw.close();
|
|
|
//性别年龄
|
|
|
- /*sql = "SELECT k1.lib_name, k1.lib_type, kcc.sex_type, kcc.min_age, kcc.max_age " +
|
|
|
+ sql = "SELECT k1.lib_name, k1.lib_type, kcc.sex_type, kcc.min_age, kcc.max_age " +
|
|
|
"FROM kl_concept_common kcc, kl_concept k1 " +
|
|
|
"where kcc.concept_id = k1.id " +
|
|
|
- "and k1.lib_type in (1, 18) and kcc.dept_id is not null;";
|
|
|
+ "and k1.lib_type in (1, 18)";
|
|
|
st = conn.createStatement();
|
|
|
rs = st.executeQuery(sql);
|
|
|
fw = new FileWriter(path + "src/main/resources/doc_result_mapping_filter.dict");
|
|
@@ -88,7 +83,7 @@ public class CacheFileManagerTest {
|
|
|
fw.write(encrypDES.encrytor(r1 + "|" + r2 + "|" + r3 + "|" + r4 + "|" + r5));
|
|
|
fw.write("\n");
|
|
|
}
|
|
|
- fw.close();*/
|
|
|
+ fw.close();
|
|
|
|
|
|
} catch (IOException ioe) {
|
|
|
ioe.printStackTrace();
|