Commit 6001312e authored by Vasundra Touré's avatar Vasundra Touré
Browse files

updated statistical queries

parent bd27670c
......@@ -5,14 +5,14 @@ PREFIX resource:<https://biomedit.ch/rdf/sphn-resource/>
PREFIX xsd:<http://www.w3.org/2001/XMLSchema#>
PREFIX psss:<https://biomedit.ch/rdf/sphn-ontology/psss#>
PREFIX spo:<https://biomedit.ch/rdf/sphn-ontology/spo#>
PREFIX frailty:<https://biomedit.ch/rdf/sphn-ontology/frailty#>
SELECT ?concept (COUNT(?resource) AS ?sphn_concepts_resources)
(count(distinct ?subject) as ?subject_cnt)
(count(distinct ?case) as ?case_cnt)
(count(distinct ?provider) as ?provider_cnt)
WHERE {
{ ?concept rdfs:subClassOf+ sphn:SPHNConcept } UNION { ?concept rdfs:subClassOf+ psss:SPHNConcept } UNION { ?concept rdfs:subClassOf+ spo:SPHNConcept } UNION { ?concept rdfs:subClassOf+ frailty:SPHNConcept } .
{ ?concept rdfs:subClassOf+ sphn:SPHNConcept } UNION { ?concept rdfs:subClassOf+ psss:PSSSConcept } UNION { ?concept rdfs:subClassOf+ spo:SPOConcept } .
?resource a ?concept .
optional {?resource sphn:hasDataProviderInstitute ?provider}
optional {?resource sphn:hasSubjectPseudoIdentifier ?subject}
......@@ -22,4 +22,4 @@ WHERE {
} group by ?concept order by desc(?sphn_concepts_resources)
#Counts the number of SPHN concepts
\ No newline at end of file
#Counts the number of SPHN concepts
......@@ -11,8 +11,8 @@ SELECT ?concept ?attribute ?range (COUNT(distinct ?value) AS ?sphn_objects_count
(MIN(?value) AS ?min_value) (MAX(?value) AS ?max_value) (AVG(?value) AS ?avg_value)
WHERE {
optional { ?attribute rdfs:range ?range }
{ ?concept rdfs:subClassOf+ sphn:SPHNConcept } UNION { ?concept rdfs:subClassOf+ psss:SPHNConcept } UNION { ?concept rdfs:subClassOf+ spo:SPHNConcept } UNION { ?concept rdfs:subClassOf+ frailty:SPHNConcept } .
{ ?attribute rdfs:subPropertyOf sphn:SPHNAttributeDatatype } UNION { ?attribute rdfs:subPropertyOf spo:SPHNAttributeDatatype } UNION { ?attribute rdfs:subPropertyOf psss:SPHNAttributeDatatype } .
{ ?concept rdfs:subClassOf+ sphn:SPHNConcept } UNION { ?concept rdfs:subClassOf+ psss:PSSSConcept } UNION { ?concept rdfs:subClassOf+ spo:SPOConcept } .
{ ?attribute rdfs:subPropertyOf sphn:SPHNAttributeDatatype } UNION { ?attribute rdfs:subPropertyOf spo:SPOAttributeDatatype } UNION { ?attribute rdfs:subPropertyOf psss:PSSSAttributeDatatype } .
?resource a ?concept .
?resource ?attribute ?value.
} group by ?concept ?attribute ?range
......
......@@ -5,13 +5,12 @@ PREFIX resource:<https://biomedit.ch/rdf/sphn-resource/>
PREFIX xsd:<http://www.w3.org/2001/XMLSchema#>
PREFIX psss:<https://biomedit.ch/rdf/sphn-ontology/psss#>
PREFIX spo:<https://biomedit.ch/rdf/sphn-ontology/spo#>
PREFIX frailty:<https://biomedit.ch/rdf/sphn-ontology/frailty#>
SELECT distinct (?concept as ?sphn_concepts_not_in_use)
WHERE {
{ ?concept rdfs:subClassOf+ sphn:SPHNConcept } UNION { ?concept rdfs:subClassOf+ psss:SPHNConcept } UNION { ?concept rdfs:subClassOf+ spo:SPHNConcept } UNION { ?concept rdfs:subClassOf+ frailty:SPHNConcept } .
{ ?concept rdfs:subClassOf+ sphn:SPHNConcept } UNION { ?concept rdfs:subClassOf+ psss:PSSSConcept } UNION { ?concept rdfs:subClassOf+ spo:SPOConcept } .
filter not exists { ?resource a ?concept } .
}
#Lists all SPHN concepts that are not used in the given resource folder
\ No newline at end of file
#Lists all SPHN concepts that are not used in the given resource folder
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment