query-a826b920ffdaf6c44305144d4cdbd600
Three-layer MEDRS prototype algorithm, run on the SS focus list.
Not federated: the whitelist and blacklist items are given on Wikidata.
The MEDASSESS, MEDDATE and MEDREV jargon refers to section shortcuts on the MEDRS page
at https://en.wikipedia.org/wiki/Wikipedia:Identifying_reliable_sources_(medicine)
i.e WP:MEDASSESS and so on.
This is a minimalist working version of a MEDRS algorithm
that does enough to show where the edge case whitelists and blacklists
can be placed in a SPARQL query.
Those lists are only present in placeholder form with realistic data, but the
VALUES statements can be scaled up into longer lists.
The DOAJ requirement means no "predatory" journals would
appear, with a caveat entered about start time of DOAJ status.
The case analysis can incorporate more than two cases, by using a multiple UNION.
SELECT DISTINCT ?item ?itemLabel ?journalLabel
WHERE {
#Layer 1: Wikidata box-ticking
?item wdt:P5008 wd:Q55439927;
wdt:P31 wd:Q7318358;
#Allows only "review article" under MEDASSESS, so
#doesn't allow systematic reviews tagged as such (needs path pattern).
wdt:P1433 ?journal.
?journal wdt:P5115 [ ].
#Tests only for the presence of the DOAJ property, but could be refined
#to compare publication date with the start time of DOAJ approval.
#Missing DOAJ information means some journals may wrongly be excluded.
#Layer 2: Case analysis for MEDDATE
#Currently "main case" for filtering by publication date no earlier than 2014,
#to add "whitelist case" where MEDDATE is not applied
#Placeholder list of whitelist values held on Wikidata
#Q21092296 is a test item.
{ ?item wdt:P577 ?date.
FILTER (?date >= "2014-01-01T00:00:00Z"^^xsd:dateTime)}
UNION
{VALUES ?item { wd:Q21092296 } }
#Q21092296 is a review, but too old for the five-year criterion
#and not recognised by publication type on PubMed.
#As a demo, it has been tagged "review article" on Wikidata.
#Layer 3: Filter by MEDREV blacklist
MINUS {VALUES ?item { wd:Q26746153 } }
#Q26746153 is for a review "The Potential of Curcumin in Treatment of Spinal Cord Injury"
#that has been deprecated as a source by WikiMed.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Three-layer MEDRS prototype algorithm, run on the SS focus list.
#Not federated: the whitelist and blacklist items are given on Wikidata.
#The MEDASSESS, MEDDATE and MEDREV jargon refers to section shortcuts on the MEDRS page
#at https://en.wikipedia.org/wiki/Wikipedia:Identifying_reliable_sources_(medicine)
#i.e WP:MEDASSESS and so on.
#This is a minimalist working version of a MEDRS algorithm
#that does enough to show where the edge case whitelists and blacklists
#can be placed in a SPARQL query.
#Those lists are only present in placeholder form with realistic data, but the
#VALUES statements can be scaled up into longer lists.
#The DOAJ requirement means no "predatory" journals would
#appear, with a caveat entered about start time of DOAJ status.
#The case analysis can incorporate more than two cases, by using a multiple UNION.
SELECT DISTINCT ?item ?itemLabel ?journalLabel
WHERE {
#Layer 1: Wikidata box-ticking
?item wdt:P5008 wd:Q55439927;
wdt:P31 wd:Q7318358;
#Allows only "review article" under MEDASSESS, so
#doesn't allow systematic reviews tagged as such (needs path pattern).
wdt:P1433 ?journal.
?journal wdt:P5115 [ ].
#Tests only for the presence of the DOAJ property, but could be refined
#to compare publication date with the start time of DOAJ approval.
#Missing DOAJ information means some journals may wrongly be excluded.
#Layer 2: Case analysis for MEDDATE
#Currently "main case" for filtering by publication date no earlier than 2014,
#to add "whitelist case" where MEDDATE is not applied
#Placeholder list of whitelist values held on Wikidata
#Q21092296 is a test item.
{ ?item wdt:P577 ?date.
FILTER (?date >= "2014-01-01T00:00:00Z"^^xsd:dateTime)}
UNION
{VALUES ?item { wd:Q21092296 } }
#Q21092296 is a review, but too old for the five-year criterion
#and not recognised by publication type on PubMed.
#As a demo, it has been tagged "review article" on Wikidata.
#Layer 3: Filter by MEDREV blacklist
MINUS {VALUES ?item { wd:Q26746153 } }
#Q26746153 is for a review "The Potential of Curcumin in Treatment of Spinal Cord Injury"
#that has been deprecated as a source by WikiMed.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?date")
v4("?item"):::projected
v2("?journal")
a1((" "))
c10(["bd:serviceParam"]):::iri
c2(["wd:Q55439927"]):::iri
c4(["wd:Q7318358"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v4 --"wdt:P5008"--> c2
v4 --"wdt:P31"--> c4
v4 --"wdt:P1433"--> v2
v2 --"wdt:P5115"--> a1
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
bind0[/VALUES ?item/]
bind0-->v4
bind00(["wd:Q21092296"])
bind00 --> bind0
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
f1[["?date >= '2014-01-01T00:00:00Z^^xsd:dateTime'"]]
f1 --> v3
v4 --"wdt:P577"--> v3
end
union0r <== or ==> union0l
end
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
bind3[/VALUES ?item/]
bind3-->v4
bind30(["wd:Q26746153"])
bind30 --> bind3
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end