|
@ -382,26 +382,35 @@ public class HcyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
|
|
|
* @param spellCode 拼音码
|
|
|
* @return
|
|
|
*/
|
|
|
public JSONArray selectIcd10Dict(String spellCode) throws Exception {
|
|
|
public JSONArray selectIcd10Dict(String spellCode,String flag) throws Exception {
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
String obj = hcyyEntranceService.GetICD10Dict(spellCode);
|
|
|
if (StringUtils.isNoneBlank(obj)){
|
|
|
|
|
|
}
|
|
|
JSONArray array = JSONArray.parseArray(obj).getJSONArray(0);
|
|
|
for (int i=0;i<array.size();i++){
|
|
|
JSONObject jsonObject = array.getJSONObject(i);
|
|
|
JSONObject object1 = new JSONObject();
|
|
|
object1.put("@action","select");
|
|
|
object1.put("add_code","");
|
|
|
object1.put("code",jsonObject.getString("ICD10_CODE"));
|
|
|
object1.put("d_code",jsonObject.getString(""));
|
|
|
object1.put("name",jsonObject.getString("ICD10_NAME"));
|
|
|
object1.put("py_code",jsonObject.getString("SPELL_CODE"));
|
|
|
object1.put("valid_flag",jsonObject.getString("VALID_FLAG"));
|
|
|
object1.put("icd10_type",jsonObject.getString("ICD10_TYPE"));
|
|
|
object1.put("icd10_class",jsonObject.getString("ICD10_CLASS"));
|
|
|
jsonArray.add(object1);
|
|
|
if (flag.equalsIgnoreCase("2")){
|
|
|
String sql = "select code,name,py_code,d_code from dict_icd10 where 1=1 and flag ='"+flag+"' ";
|
|
|
if (StringUtils.isNoneBlank(spellCode)){
|
|
|
sql += " and (py_code like '%"+spellCode+"%' or name like '%"+spellCode+"%') ";
|
|
|
}
|
|
|
List<Map<String,Object>> mapList = jdbcTemplate.queryForList(sql);
|
|
|
for (int i=0;i<mapList.size();i++){
|
|
|
jsonArray.add(mapList.get(i));
|
|
|
}
|
|
|
logger.info("sql=="+sql);
|
|
|
}else {
|
|
|
String obj = hcyyEntranceService.GetICD10Dict(spellCode);
|
|
|
JSONArray array = JSONArray.parseArray(obj).getJSONArray(0);
|
|
|
for (int i=0;i<array.size();i++){
|
|
|
JSONObject jsonObject = array.getJSONObject(i);
|
|
|
JSONObject object1 = new JSONObject();
|
|
|
object1.put("@action","select");
|
|
|
object1.put("add_code","");
|
|
|
object1.put("code",jsonObject.getString("ICD10_CODE"));
|
|
|
object1.put("d_code",jsonObject.getString(""));
|
|
|
object1.put("name",jsonObject.getString("ICD10_NAME"));
|
|
|
object1.put("py_code",jsonObject.getString("SPELL_CODE"));
|
|
|
object1.put("valid_flag",jsonObject.getString("VALID_FLAG"));
|
|
|
object1.put("icd10_type",jsonObject.getString("ICD10_TYPE"));
|
|
|
object1.put("icd10_class",jsonObject.getString("ICD10_CLASS"));
|
|
|
jsonArray.add(object1);
|
|
|
}
|
|
|
}
|
|
|
return jsonArray;
|
|
|
}
|
|
@ -728,12 +737,12 @@ public class HcyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
|
|
|
jsonObject.put("DEPT_NAME",object1.getString("DEPT_NAME"));
|
|
|
jsonObject.put("TREAT_DATE_TIME",DateUtil.getYyyymmddhhmmss(DateUtil.strToDateLong(object1.getString("VISIT_TIME"))));
|
|
|
jsonObject.put("OPID",object1.getString("EMR_ID"));
|
|
|
String firstFlag = object1.getString("FIRST_FLAG");
|
|
|
/* String firstFlag = object1.getString("FIRST_FLAG");
|
|
|
if (firstFlag.equalsIgnoreCase("复诊")){
|
|
|
jsonObject.put("TREAT_DOCTOR_NAME",object1.getString("RETURN_DOC_SIGN"));
|
|
|
}else if (firstFlag.equalsIgnoreCase("初诊")){
|
|
|
}else if (firstFlag.equalsIgnoreCase("初诊")){*/
|
|
|
jsonObject.put("TREAT_DOCTOR_NAME",object1.getString("DOCTOR_SIGNATURE"));
|
|
|
}
|
|
|
/* }*/
|
|
|
jsonArray.add(jsonObject);
|
|
|
}
|
|
|
return jsonArray;
|