|
@ -920,7 +920,7 @@ public class YkyyEntranceService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public JSONArray findYpyf(String pydm) throws Exception {
|
|
public JSONArray findYpyf(String pydm) throws Exception {
|
|
String sql = "select y.ypyf as \"ypyf\",y.pydm as \"pydm\",y.xmmc as \"xmmc\" from v_hlw_ypyf y where 1=1 ";
|
|
|
|
|
|
String sql = "select y.ypyf as \"ypyf\",y.pydm as \"pydm\",y.xmmc as \"xmmc\" from v_hlw_ypyf y where 1=1 and y.pydm is not null";
|
|
if (StringUtils.isNoneBlank(pydm)){
|
|
if (StringUtils.isNoneBlank(pydm)){
|
|
sql+=" and y.pydm='"+pydm+"' ";
|
|
sql+=" and y.pydm='"+pydm+"' ";
|
|
}
|
|
}
|
|
@ -1007,9 +1007,12 @@ public class YkyyEntranceService {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
public JSONArray findIcd10() throws Exception {
|
|
|
|
|
|
public JSONArray findIcd10(String pyCode) throws Exception {
|
|
String sql = "select i.code as \"code\",i.name as \"name\",i.disea_reason as \"disea_reason\",i.death_reason as \"death_reason\",i.py_code as \"py_code\",i.flag as \"flag\",i.add_code as \"add_code\",i.emr as \"emr\" from v_hlw_icd10 i";
|
|
String sql = "select i.code as \"code\",i.name as \"name\",i.disea_reason as \"disea_reason\",i.death_reason as \"death_reason\",i.py_code as \"py_code\",i.flag as \"flag\",i.add_code as \"add_code\",i.emr as \"emr\" from v_hlw_icd10 i";
|
|
JSONArray array = new JSONArray();
|
|
JSONArray array = new JSONArray();
|
|
|
|
if (StringUtils.isNoneBlank(pyCode)){
|
|
|
|
sql +=" where i.py_code like '%"+pyCode+"%'";
|
|
|
|
}
|
|
Map<String,Object> params = new HashedMap();
|
|
Map<String,Object> params = new HashedMap();
|
|
params.put("sql",sql);
|
|
params.put("sql",sql);
|
|
logger.info("ICD10:"+sql);
|
|
logger.info("ICD10:"+sql);
|
|
@ -1020,14 +1023,6 @@ public class YkyyEntranceService {
|
|
Integer status = rs.getInteger("status");
|
|
Integer status = rs.getInteger("status");
|
|
if (status==200){
|
|
if (status==200){
|
|
array = rs.getJSONArray("detailModelList");
|
|
array = rs.getJSONArray("detailModelList");
|
|
ykDictIcd10Dao.deleteAll();
|
|
|
|
for (int i=0;i<array.size();i++){
|
|
|
|
JSONObject object = array.getJSONObject(i);
|
|
|
|
DictIcd10DO dictIcd10DO = new DictIcd10DO();
|
|
|
|
dictIcd10DO.setCode(object.getString("code"));
|
|
|
|
dictIcd10DO.setName(object.getString("name"));
|
|
|
|
ykDictIcd10Dao.save(dictIcd10DO);
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
return array;
|
|
return array;
|
|
}
|
|
}
|
|
@ -1083,6 +1078,32 @@ public class YkyyEntranceService {
|
|
return array;
|
|
return array;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public JSONArray synYkICD10() throws Exception {
|
|
|
|
String sql = "select i.code as \"code\",i.name as \"name\",i.disea_reason as \"disea_reason\",i.death_reason as \"death_reason\",i.py_code as \"py_code\",i.flag as \"flag\",i.add_code as \"add_code\",i.emr as \"emr\" from v_hlw_icd10 i";
|
|
|
|
JSONArray array = new JSONArray();
|
|
|
|
Map<String,Object> params = new HashedMap();
|
|
|
|
params.put("sql",sql);
|
|
|
|
logger.info("ICD10:"+sql);
|
|
|
|
HttpResponse response = HttpUtils.doGet(url,params);
|
|
|
|
String content = response.getContent();
|
|
|
|
logger.info("response:"+content);
|
|
|
|
JSONObject rs = JSON.parseObject(content);
|
|
|
|
Integer status = rs.getInteger("status");
|
|
|
|
if (status==200){
|
|
|
|
array = rs.getJSONArray("detailModelList");
|
|
|
|
ykDictIcd10Dao.deleteAll();
|
|
|
|
for (int i=0;i<array.size();i++){
|
|
|
|
JSONObject object = array.getJSONObject(i);
|
|
|
|
DictIcd10DO dictIcd10DO = new DictIcd10DO();
|
|
|
|
dictIcd10DO.setCode(object.getString("code"));
|
|
|
|
dictIcd10DO.setName(object.getString("name"));
|
|
|
|
dictIcd10DO.setDescription(object.getString("py_code"));
|
|
|
|
ykDictIcd10Dao.save(dictIcd10DO);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return array;
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 根据his Icd10
|
|
* 根据his Icd10
|
|
* @param code
|
|
* @param code
|