|
@@ -41,11 +41,7 @@ public interface BillManRepository extends Neo4jRepository<BillItemDetail,Long>
|
|
|
"id(r) as relationId,type(r) as relationName,r.状态 as relationStatus, \n" +
|
|
|
"id(n) as conditionId," +
|
|
|
"(case labels(n)[0] " +
|
|
|
- "when '体征' then n.体征指标 "+
|
|
|
- "when '实验室检查' then n.实验室检查指标 "+
|
|
|
- "when '禁忌人群' then n.禁忌人群指标 "+
|
|
|
- "else n.name " +
|
|
|
- "end )as conditionName," +
|
|
|
+ " n.name as conditionName," +
|
|
|
"labels(n)[0] as conditionType \n" +
|
|
|
"order by id(r) desc",
|
|
|
countQuery = "match(m)-[r]->(n) \n" +
|
|
@@ -73,14 +69,16 @@ public interface BillManRepository extends Neo4jRepository<BillItemDetail,Long>
|
|
|
|
|
|
@Query("MATCH (n) \n" +
|
|
|
"WHERE (toLower(n.`name`) = toLower($name) OR toLower(n.`拼音编码`) = toLower($pycode)) \n" +
|
|
|
- "AND labels(n)[0] in {labels} \n" +
|
|
|
+ //"AND labels(n)[0] in {labels} \n" +
|
|
|
+ "and (n:性别 or n:实验室检查 or n:临床表现 or n:辅助检查名称描述 or n:疾病 or n:服用药品 or n:药物过敏原 or n:食物过敏原 or n:手术 or n:禁忌人群 or n:过敏原 or n:体征 or n:禁忌医疗器械及物品 or n:年龄 or n:给药途径 or n:开单项互斥) \n" +
|
|
|
"AND not(exists(n.禁忌人群指标) or exists(n.实验室检查指标) or exists(n.体征指标)) \n" +
|
|
|
"AND (case {notInIds} is not null and size({notInIds})>0 when true then not(id(n) in {notInIds}) else 1 = 1 end ) \n" +
|
|
|
"RETURN ID(n) as id, n.name as name,n.状态 as status,labels(n)[0] as conditionLabel,n.最小值 as minValue,n.最大值 as maxValue,n.单位 as unit,n.范围 as range \n" +
|
|
|
"union \n" +
|
|
|
"MATCH (n) \n " +
|
|
|
"WHERE (toLower(n.`name`) starts with toLower($name) OR toLower(n.`拼音编码`) starts with toLower($pycode)) \n " +
|
|
|
- "AND labels(n)[0] in {labels} \n" +
|
|
|
+ //"AND labels(n)[0] in {labels} \n" +
|
|
|
+ "and (n:性别 or n:实验室检查 or n:临床表现 or n:辅助检查名称描述 or n:疾病 or n:服用药品 or n:药物过敏原 or n:食物过敏原 or n:手术 or n:禁忌人群 or n:过敏原 or n:体征 or n:禁忌医疗器械及物品 or n:年龄 or n:给药途径 or n:开单项互斥) \n" +
|
|
|
"AND not(exists(n.禁忌人群指标) or exists(n.实验室检查指标) or exists(n.体征指标)) \n" +
|
|
|
"AND (case {notInIds} is not null and size({notInIds})>0 when true then not(id(n) in {notInIds}) else 1 = 1 end ) \n" +
|
|
|
"WITH n SKIP 0 LIMIT $size \n" +
|
|
@@ -88,7 +86,8 @@ public interface BillManRepository extends Neo4jRepository<BillItemDetail,Long>
|
|
|
"union \n" +
|
|
|
"MATCH (n) \n" +
|
|
|
"WHERE (toLower(n.`name`) CONTAINS toLower($name) OR toLower(n.`拼音编码`) CONTAINS toLower($pycode)) \n" +
|
|
|
- "AND labels(n)[0] in {labels} \n" +
|
|
|
+ //"AND labels(n)[0] in {labels} \n" +
|
|
|
+ "and (n:性别 or n:实验室检查 or n:临床表现 or n:辅助检查名称描述 or n:疾病 or n:服用药品 or n:药物过敏原 or n:食物过敏原 or n:手术 or n:禁忌人群 or n:过敏原 or n:体征 or n:禁忌医疗器械及物品 or n:年龄 or n:给药途径 or n:开单项互斥) \n" +
|
|
|
"AND not(exists(n.禁忌人群指标) or exists(n.实验室检查指标) or exists(n.体征指标)) \n" +
|
|
|
"AND (case {notInIds} is not null and size({notInIds})>0 when true then not(id(n) in {notInIds}) else 1 = 1 end ) \n" +
|
|
|
"WITH n SKIP 0 LIMIT $size \n" +
|
|
@@ -151,12 +150,7 @@ public interface BillManRepository extends Neo4jRepository<BillItemDetail,Long>
|
|
|
"type(r) as relationName,\n" +
|
|
|
"r.状态 as relationStatus,\n" +
|
|
|
"id(n) as conditionId,\n" +
|
|
|
- "(case labels(n)[0] " +
|
|
|
- "when '体征' then n.体征指标 "+
|
|
|
- "when '实验室检查' then n.实验室检查指标 "+
|
|
|
- "when '禁忌人群' then n.禁忌人群指标 "+
|
|
|
- "else n.name " +
|
|
|
- "end )as conditionName," +
|
|
|
+ " n.name as conditionName," +
|
|
|
"labels(n)[0] as conditionLabel,\n" +
|
|
|
"n.最小值 as conditionMinValue,\n" +
|
|
|
"n.最大值 as conditionMaxValue,\n" +
|