|
@@ -16,9 +16,52 @@ import java.util.List;
|
|
|
* @time: 2020/12/14 13:26
|
|
|
*/
|
|
|
public interface EntityInfoRepository extends Neo4jRepository<EntityBaseInfo,Long> {
|
|
|
- @Query(value = "with {labels} as nlabels\n" +
|
|
|
- "match(n)\n" +
|
|
|
- "where any(label in labels(n) where label in nlabels)\n" +
|
|
|
+ @Query(value = "match(n)\n" +
|
|
|
+ "where " +
|
|
|
+ //"any(label in labels(n) where label in nlabels)\n" +
|
|
|
+ "(case when {label} is not null and {label} <> '' then\n" +
|
|
|
+ "(case {label}\n" +
|
|
|
+ "when '医保疾病名称' then n:医保疾病名称 \n " +
|
|
|
+ "when '实验室检查套餐名' then n:实验室检查套餐名 \n" +
|
|
|
+ "when '实验室检查名称' then n:实验室检查名称 \n" +
|
|
|
+ "when '辅助检查名称' then n:辅助检查名称 \n" +
|
|
|
+ "when '辅助检查子项目名称' then n:辅助检查子项目名称 \n" +
|
|
|
+ "when '药品通用名称' then n:药品通用名称 \n" +
|
|
|
+ "when '医保手术和操作名称' then n:医保手术和操作名称 \n" +
|
|
|
+ "when '疾病' then n:疾病 \n" +
|
|
|
+ "when '实验室检查' then n:实验室检查 \n" +
|
|
|
+ "when '化验细项及结果' then n:化验细项及结果 \n" +
|
|
|
+ "when '实验室检查危急值' then n:实验室检查危急值 \n" +
|
|
|
+ "when '化验提醒指标' then n:化验提醒指标 \n" +
|
|
|
+ "when '化验套餐名称' then n:化验套餐名称 \n" +
|
|
|
+ "when '辅助检查危急值' then n:辅助检查危急值 \n" +
|
|
|
+ "when '辅助检查名称描述' then n:辅助检查名称描述 \n" +
|
|
|
+ "when '辅助检查名称结果' then n:辅助检查名称结果 \n" +
|
|
|
+ "when '辅检提醒指标' then n:辅检提醒指标 \n" +
|
|
|
+ "when '药品代码通用名' then n:药品代码通用名 \n" +
|
|
|
+ "when '药品注册名称' then n:药品注册名称 \n" +
|
|
|
+ "when '药品类别' then n:药品类别 \n" +
|
|
|
+ "when '药品治疗学类别' then n:药品治疗学类别 \n" +
|
|
|
+ "when '药品药理学类别' then n:药品药理学类别 \n" +
|
|
|
+ "when '药品化学物质类别' then n:药品化学物质类别 \n" +
|
|
|
+ "when '服用药品' then n:服用药品 \n" +
|
|
|
+ "when '禁忌医疗器械及物品' then n:禁忌医疗器械及物品 \n" +
|
|
|
+ "when '性别' then n:性别 \n" +
|
|
|
+ "when '体征' then n:体征 \n" +
|
|
|
+ "when '症状' then n:症状 \n" +
|
|
|
+ "when '临床表现' then n:临床表现 \n" +
|
|
|
+ "when '科室' then n:科室 \n" +
|
|
|
+ "when '开单项互斥' then n:开单项互斥 \n" +
|
|
|
+ "when '禁忌人群' then n:禁忌人群 \n" +
|
|
|
+ "when '建议输血提醒' then n:建议输血提醒 \n" +
|
|
|
+ "when '药物过敏原' then n:药物过敏原 \n" +
|
|
|
+ "when '过敏原' then n:过敏原 \n" +
|
|
|
+ "when '食物过敏原' then n:食物过敏原 \n" +
|
|
|
+ "when '输血提醒指标' then n:输血提醒指标 \n" +
|
|
|
+ "else 1 = 1 " +
|
|
|
+ "end)" +
|
|
|
+ "else 1 = 1 " +
|
|
|
+ "end)" +
|
|
|
"and (case when {name} is not null and {name} <> '' " +
|
|
|
"then " +
|
|
|
"((toLower(n.`name`) CONTAINS toLower($name) OR toLower(n.`拼音编码`) CONTAINS toLower($name))) " +
|
|
@@ -39,9 +82,52 @@ public interface EntityInfoRepository extends Neo4jRepository<EntityBaseInfo,Lon
|
|
|
"and not(exists(n.实验室检查指标)) \n" +
|
|
|
"return id(n) as id,n.name as name,n.拼音编码 as pycode,labels(n)[0] as labelType,n.状态 as status,n.静态知识标识 as is_kl\n" +
|
|
|
"order by n.状态 desc, id(n) desc",
|
|
|
- countQuery = "with {labels} as nlabels\n" +
|
|
|
- "match(n)\n" +
|
|
|
- "where any(label in labels(n) where label in nlabels)\n" +
|
|
|
+ countQuery = "match(n)\n" +
|
|
|
+ "where " +
|
|
|
+ //"any(label in labels(n) where label in nlabels)\n" +
|
|
|
+ "(case when {label} is not null and {label} <> '' then\n" +
|
|
|
+ "(case {label}\n" +
|
|
|
+ "when '医保疾病名称' then n:医保疾病名称 \n " +
|
|
|
+ "when '实验室检查套餐名' then n:实验室检查套餐名 \n" +
|
|
|
+ "when '实验室检查名称' then n:实验室检查名称 \n" +
|
|
|
+ "when '辅助检查名称' then n:辅助检查名称 \n" +
|
|
|
+ "when '辅助检查子项目名称' then n:辅助检查子项目名称 \n" +
|
|
|
+ "when '药品通用名称' then n:药品通用名称 \n" +
|
|
|
+ "when '医保手术和操作名称' then n:医保手术和操作名称 \n" +
|
|
|
+ "when '疾病' then n:疾病 \n" +
|
|
|
+ "when '实验室检查' then n:实验室检查 \n" +
|
|
|
+ "when '化验细项及结果' then n:化验细项及结果 \n" +
|
|
|
+ "when '实验室检查危急值' then n:实验室检查危急值 \n" +
|
|
|
+ "when '化验提醒指标' then n:化验提醒指标 \n" +
|
|
|
+ "when '化验套餐名称' then n:化验套餐名称 \n" +
|
|
|
+ "when '辅助检查危急值' then n:辅助检查危急值 \n" +
|
|
|
+ "when '辅助检查名称描述' then n:辅助检查名称描述 \n" +
|
|
|
+ "when '辅助检查名称结果' then n:辅助检查名称结果 \n" +
|
|
|
+ "when '辅检提醒指标' then n:辅检提醒指标 \n" +
|
|
|
+ "when '药品代码通用名' then n:药品代码通用名 \n" +
|
|
|
+ "when '药品注册名称' then n:药品注册名称 \n" +
|
|
|
+ "when '药品类别' then n:药品类别 \n" +
|
|
|
+ "when '药品治疗学类别' then n:药品治疗学类别 \n" +
|
|
|
+ "when '药品药理学类别' then n:药品药理学类别 \n" +
|
|
|
+ "when '药品化学物质类别' then n:药品化学物质类别 \n" +
|
|
|
+ "when '服用药品' then n:服用药品 \n" +
|
|
|
+ "when '禁忌医疗器械及物品' then n:禁忌医疗器械及物品 \n" +
|
|
|
+ "when '性别' then n:性别 \n" +
|
|
|
+ "when '体征' then n:体征 \n" +
|
|
|
+ "when '症状' then n:症状 \n" +
|
|
|
+ "when '临床表现' then n:临床表现 \n" +
|
|
|
+ "when '科室' then n:科室 \n" +
|
|
|
+ "when '开单项互斥' then n:开单项互斥 \n" +
|
|
|
+ "when '禁忌人群' then n:禁忌人群 \n" +
|
|
|
+ "when '建议输血提醒' then n:建议输血提醒 \n" +
|
|
|
+ "when '药物过敏原' then n:药物过敏原 \n" +
|
|
|
+ "when '过敏原' then n:过敏原 \n" +
|
|
|
+ "when '食物过敏原' then n:食物过敏原 \n" +
|
|
|
+ "when '输血提醒指标' then n:输血提醒指标 \n" +
|
|
|
+ "else 1 = 1 " +
|
|
|
+ "end)" +
|
|
|
+ "else 1 = 1 " +
|
|
|
+ "end)" +
|
|
|
"and (case when {name} is not null and {name} <> '' " +
|
|
|
"then " +
|
|
|
"((toLower(n.`name`) CONTAINS toLower($name) OR toLower(n.`拼音编码`) CONTAINS toLower($name))) " +
|
|
@@ -62,6 +148,7 @@ public interface EntityInfoRepository extends Neo4jRepository<EntityBaseInfo,Lon
|
|
|
"and not(exists(n.实验室检查指标)) \n" +
|
|
|
"return count(*)")
|
|
|
Page<EntityInfo> getEntityPage(@Param("labels") List<String> labels,
|
|
|
+ @Param("label") String label,
|
|
|
@Param("name") String name,
|
|
|
@Param("status") Integer status,
|
|
|
@Param("is_kl") Integer is_kl,
|