Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pyvpet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoyanbin
pyvpet
Commits
ea514cf8
Commit
ea514cf8
authored
May 10, 2024
by
haoyanbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
ea81799b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
search.py
app/controller/search.py
+4
-7
docker-compose.yaml
docker-compose.yaml
+2
-0
No files found.
app/controller/search.py
View file @
ea514cf8
...
@@ -76,16 +76,13 @@ def illness_search():
...
@@ -76,16 +76,13 @@ def illness_search():
result
=
[]
result
=
[]
list_illness_data
=
list
(
illness_data
)
list_illness_data
=
list
(
illness_data
)
for
key1
in
list_illness_data
:
for
key1
in
list_illness_data
:
graph_sql2
=
"match (a:`疾病`)-[]->(m:`治疗方案`)-[]->(n:`药品`) where a.name='"
+
key1
+
"' return m,n"
graph_sql2
=
"match (a:`疾病`)-[]->(m:`治疗方案`)-[]->(n:`药品`) where a.name='"
+
key1
+
"' return m,n"
records2
,
_
,
_
=
graph_driver
.
query
(
graph_sql2
)
records2
,
_
,
_
=
graph_driver
.
query
(
graph_sql2
)
# graph_sql3 = "match (a:`疾病`)-[]->(m:`治疗方案`) where a.name='" + key1 + "' return m,n"
# graph_data3 = graph.run(graph_sql3).data()
medicinal
=
{}
medicinal
=
{}
for
val2
in
records2
:
for
val2
in
records2
:
if
val2
[
'm'
][
'name'
]
in
medicinal
.
keys
():
if
val2
[
'm'
][
'name'
]
in
medicinal
.
keys
():
...
@@ -97,9 +94,9 @@ def illness_search():
...
@@ -97,9 +94,9 @@ def illness_search():
result
.
append
(
illness_data
[
key1
])
result
.
append
(
illness_data
[
key1
])
# print(result
)
result_data
=
sorted
(
result
,
key
=
lambda
x
:
x
[
'num'
],
reverse
=
True
)
return
json
.
dumps
(
result
)
return
json
.
dumps
(
result
_data
)
return
"1"
return
"1"
...
...
docker-compose.yaml
View file @
ea514cf8
...
@@ -12,6 +12,8 @@ services:
...
@@ -12,6 +12,8 @@ services:
-
5080:5080
-
5080:5080
networks
:
networks
:
-
diagnosis_network
-
diagnosis_network
volumes
:
-
/docker/pyvpet/:/app/
networks
:
networks
:
diagnosis_network
:
diagnosis_network
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment