|
@@ -19,16 +19,53 @@ bolt112.uri=bolt://192.168.3.112
|
|
|
bolt112.user=neo4j
|
|
|
bolt112.passwd=123456
|
|
|
|
|
|
-sql1=with "+newList+" as data unwind data as row\n \
|
|
|
- match (l)-[r:\u8BCA\u65AD\u4F9D\u636E]->(m)\n \
|
|
|
- where l.name= row\n \
|
|
|
- with m,"+fildList+" as data unwind data as row\n \
|
|
|
- match (n)-[r:\u8BCA\u65AD\u4F9D\u636E]->(m)\n \
|
|
|
- where n.name= row\n \
|
|
|
- return m.name as condition, count(distinct r)>=m.path as jundgement, labels(m)[0] as label
|
|
|
+#\u63A8\u786E\u8BCA\u5904\u7406sql
|
|
|
+#\u67E5\u627E\u8FD1\u4E49\u8BCD\u548C\u5316\u9A8C\u548C\u8F85\u68C0\u9879\u76EE
|
|
|
+
|
|
|
+#searchJinyici=with fildList as data unwind data as fild \n \
|
|
|
+#match(d:Disease)-[R1:\u63A8\u8350]->(h)-[r:\u7ED3\u679C]->(l) \n \
|
|
|
+#where l.name=fild \n \
|
|
|
+#return l.name as zi,labels(l)[0] as jin,h.name as fu,labels(h)[0] as da \n \
|
|
|
+#union \n \
|
|
|
+#with fildList as data unwind data as fild \n \
|
|
|
+#match(l)-[r:\u8FD1\u4E49\u8BCD]->(h) \n \
|
|
|
+#where l.name=fild \n \
|
|
|
+#return l.name as zi,labels(l)[0] as jin,h.name as fu,labels(h)[0] as da
|
|
|
+
|
|
|
+searchJinyici=with fildList as data unwind data as fild \n \
|
|
|
+match(l)-[r:\u8FD1\u4E49\u8BCD]->(h) \n \
|
|
|
+where l.name=fild \n \
|
|
|
+return l.name as zi,labels(l)[0] as jin,h.name as fu,labels(h)[0] as da
|
|
|
+#\u67E5\u627E\u80FD\u63A8\u51FA\u8BCA\u65AD\u4F9D\u636E\u7684\u8BCD
|
|
|
+searchCondition=with newList as data unwind data as row\n \
|
|
|
+match (l)-[r:\u8BCA\u65AD\u4F9D\u636E]->(m)\n \
|
|
|
+where l.name= row\n \
|
|
|
+with m,fildList as data unwind data as row\n \
|
|
|
+match (n)-[r:\u8BCA\u65AD\u4F9D\u636E]->(m)\n \
|
|
|
+where n.name= row\n \
|
|
|
+return m.name as condition, count(distinct r)>=m.path as jundgement, labels(m)[0] as label
|
|
|
+#\u67E5\u627E\u786E\u8BCA\u7684\u8BED\u53E5
|
|
|
+searchQuezhen=with fildList as data unwind data as row\n \
|
|
|
+match (n)-[r:\u786E\u8BCA]->(m)\n \
|
|
|
+where n.name=row\n \
|
|
|
+with distinct m,r\n \
|
|
|
+return m.name as name, labels(m)[0] as label,type(r) as relationType
|
|
|
|
|
|
#\u67E5\u627E\u4E00\u4E9B\u8BCD\u662F\u5426\u5728\u56FE\u8C31\u4E2D
|
|
|
searchWords=match(d) where d.name in fildList return distinct d.name as name
|
|
|
#\u6839\u636E\u75BE\u75C5\u67E5\u627E\u76F8\u5E94\u7684Lis Pacs
|
|
|
serchLisPacs=match (d:Disease)-[r1:\u63A8\u8350]->(m)\n \
|
|
|
-where d.name in diseaseNmae return distinct d.name as name,labels(m)[0] as lei,m.name as n
|
|
|
+where d.name in diseaseNmae return distinct d.name as name,labels(m)[0] as lei,m.name as n
|
|
|
+
|
|
|
+#\u66F4\u65B0\u8BCA\u65AD\u4F9D\u636E\u7684path
|
|
|
+updateConditionPath=match (n:Condition)<-[:\u8BCA\u65AD\u4F9D\u636E]-(m) \n \
|
|
|
+ with n,\n \
|
|
|
+ case \n \
|
|
|
+ when n.relation="\u6216" then 1 \n \
|
|
|
+ when n.relation="\u4E14" then count(distinct m) \n \
|
|
|
+ when n.relation="\u4EFB\u4E00" then 1 \n \
|
|
|
+ when n.relation="\u4EFB\u4E8C" then 2 \n \
|
|
|
+ when n.relation="\u4EFB\u4E09" then 3 \n \
|
|
|
+ when n.relation="\u4EFB\u56DB" then 4 \n\
|
|
|
+ else 100 end as a \n \
|
|
|
+ set n.path=a
|