Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clinicaltrials
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
david Chavalarias
clinicaltrials
Commits
45cc46fc
Commit
45cc46fc
authored
Mar 22, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix map filter sql query (*left* join on optional hashtags)
parent
acd30c13
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
dbdatapi.py
services/dbdatapi.py
+7
-5
No files found.
services/dbdatapi.py
View file @
45cc46fc
...
...
@@ -525,7 +525,7 @@ class BipartiteExtractor:
) AS scholars_and_orgs
LEFT JOIN sch_ht
ON uid = luid
JOIN hashtags
LEFT
JOIN hashtags
ON sch_ht.htid = hashtags.htid
GROUP BY luid
) AS sch_org_n_tags
...
...
@@ -533,6 +533,7 @@ class BipartiteExtractor:
-- two step JOIN for keywords
LEFT JOIN sch_kw
ON uid = luid
-- we directly exclude scholars with no keywords here
JOIN keywords
ON sch_kw.kwid = keywords.kwid
...
...
@@ -558,6 +559,9 @@ class BipartiteExtractor:
for
row
in
scholar_rows
:
scholar_array
[
row
[
'luid'
]
]
=
1
# mlog("DEBUG", "getScholarsList: total scholars in subset = ", len(scholar_array))
return
scholar_array
except
Exception
as
error
:
...
...
@@ -660,10 +664,8 @@ class BipartiteExtractor:
lambda
arr
:
Org
(
arr
,
org_class
=
'insts'
),
loads
(
'['
+
res3
[
'insts_list'
]
+
']'
)
))
mlog
(
"DEBUGSQL"
,
"main lab:"
,
labs
[
0
])
mlog
(
"DEBUGSQL"
,
"main inst:"
,
insts
[
0
])
# each lab is an array [name, acronym, location]
# mlog("DEBUGSQL", "res main lab:", labs[0].label)
# mlog("DEBUGSQL", "res main inst:", insts[0].label)
# all detailed node data
ide
=
"D::"
+
res3
[
'initials'
]
+
(
"/
%05
i"
%
int
(
res3
[
'luid'
]));
...
...
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