MATCH (u:Symptom)-[:has_symptom]-(d:Disease)
WHERE u.name IN ['发烧', '咳嗽', '右上腹痛', '头昏', '呕吐', '斑丘疹']
WITH d, COUNT(*) AS relevance
MATCH (d)-[:belongs_to]-(department:Department)
WITH department,d,relevance
MATCH (department)-[:works_in]-(doc:Doctors)
WITH department,d,relevance,doc
MATCH (department)
WHERE doc.working_hospital ='中医院'
RETURN doc.name, d.name, department.name,relevance
ORDER BY relevance DESC LIMIT 10
doc.name | d.name | department.name | relevance |
---|---|---|---|
"周XX" | "老年人支原体肺炎" | "内科" | 3 |
"李X" | "老年人支原体肺炎" | "内科" | 3 |
"应XX" | "小儿埃可及柯萨奇病毒感染" | "内科" | 3 |
"潘XX" | "小儿埃可及柯萨奇病毒感染" | "内科" | 3 |
"楼XX" | "小儿埃可及柯萨奇病毒感染" | "内科" | 3 |
"郑XX" | "小儿埃可及柯萨奇病毒感染" | "内科" | 3 |
"李XX" | "小儿支原体肺炎" | "儿科" | 3 |
"沈XX" | "小儿支原体肺炎" | "儿科" | 3 |
"王XX" | "小儿支原体肺炎" | "儿科" | 3 |
"丁X" | "小儿支原体肺炎" | "中医科" | 3 |
MATCH (u:Symptom)-[:has_symptom]-(d:Disease)
WHERE u.name IN ['发烧', '咳嗽', '右上腹痛', '头昏', '呕吐', '斑丘疹']
WITH d, COUNT(*) AS relevance
MATCH (d)-[:belongs_to]-(department:Department)
RETURN d.name,department.name
ORDER BY relevance DESC LIMIT 10
d.name | department.name |
---|---|
"小儿麻疹" | "传染科" |
"麻疹" | "传染科" |
"类圆线虫病" | "传染科" |
"风疹" | "传染科" |
"旋毛虫病" | "传染科" |
"水痘" | "传染科" |
"老年人支原体肺炎" | "呼吸内科" |
"猫抓病" | "传染科" |
"小儿埃可及柯萨奇病毒感染" | "血液内科" |
"传染性单核细胞增多症" | "传染科" |
MATCH (u:Symptom)-[:has_symptom]-(d:Disease)
WHERE u.name IN ['腱鞘炎','手痛']
WITH d,COUNT(*) AS relevance
// MATCH (d)-[:has_symptom]-(s:Symptom)
// WITH d, relevance, COUNT(s) AS symcount,size(['发烧', '咳嗽']) AS relevance2
// WITH d, relevance,tofloat(relevance) / tofloat(symcount+relevance2) AS relevance_ratio
MATCH (d)-[:belongs_to]-(department:Department)
RETURN department.name,sum(relevance) as s_rel
ORDER BY s_rel DESC