Difference between revisions of "CTS2 RDF Plugin"

From NCBO Wiki
Jump to navigation Jump to search
 
(46 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== CTS2 REST Services ==
 
== CTS2 REST Services ==
 +
 +
=== Known Issues ===
 +
* Unbound predicate queries are expensive to execute on the triple store, and CTS2 requires all Properties of a given subject to be displayed. This will cause all CTS2 Read services to have a delay in returning results.
 +
 +
All Read Services are executed by a SPARQL query similar to:
 +
 +
<code>
 +
<nowiki>
 +
<http://some/uri...> ?p ?o
 +
</nowiki>
 +
</code>
 +
 +
This ends up being a very expensive query to the triple store
 +
 +
* URI Mismatch: Certain portions of the RDF Plugin utilize the NCBO REST service for searching. Sometimes, the URIs returned by the NCBO REST service are not identical to those int the triple store. This will manifest on Entity Read by Name queries.
 +
 +
* URIs for Entities in Views: Some Entities in Views have different URIs then the resource in the actual code system. For instance
 +
 +
{{CTS2_RDF_base}}valueset/SNOMED-ETHNIC-GROUP/definition/SNOMED-ETHNIC-GROUP-43057/resolution/43057
 +
 +
refers to a SNOMEDCT Entity, but Entities have URIs starting with:
 +
 +
<code>
 +
<nowiki>
 +
http://purl.bioontology.org/ontology/SNOMED-Ethnic-Group#
 +
</nowiki>
 +
</code>
  
 
=== CodeSystemCatalogQuery ===
 
=== CodeSystemCatalogQuery ===
* Query: {{CTS2_RDF_base}}codesystems
+
* Query: {{CTS2_RDF_base}}codesystems?maxtoreturn=10
** Query with 'name' filter: {{CTS2_RDF_base}}codesystems?matchvalue=nci&filtercomponent=resourceName
+
* Query with 'name' filter: {{CTS2_RDF_base}}codesystems?matchvalue=go&filtercomponent=resourceName
** Query with 'description' filter: {{CTS2_RDF_base}}codesystems?matchvalue=databases&filtercomponent=resourceSynopsis
+
* Query with 'description' filter: {{CTS2_RDF_base}}codesystems?matchvalue=databases&filtercomponent=resourceSynopsis
** Query with 'keyword' filter: {{CTS2_RDF_base}}codesystems?matchvalue=100&filtercomponent=keyword
+
* Get CodeSystems With Specified Limit: http://informatics.mayo.edu/cts2/services/bioportal-rdf/codesystems?maxtoreturn=5
** ('contains' and 'exactmatch' algorithms supported)
+
* Get CodeSystems With Specified Limit and Page: http://informatics.mayo.edu/cts2/services/bioportal-rdf/codesystems?maxtoreturn=5&page=10
* 'Count' via HEAD call
 
  
 
=== CodeSystemCatalogRead ===
 
=== CodeSystemCatalogRead ===
 
* Read by name: {{CTS2_RDF_base}}codesystem/TGMA
 
* Read by name: {{CTS2_RDF_base}}codesystem/TGMA
* Read by uri: {{CTS2_RDF_base}}codesystembyuri?uri=http://bioportal.bioontology.org/ontologies/1030
+
* Read by uri: {{CTS2_RDF_base}}codesystembyuri?uri=http://bioportal.bioontology.org/ontologies/TGMA
* 'Exists' via HEAD call
+
* Find CodeSystemByURI: {{CTS2_RDF_base}}codesystembyuri?uri=http://bioportal.bioontology.org/ontologies/TGMA
 +
* Find CodeSystemByURI with redirect: {{CTS2_RDF_base}}codesystembyuri?uri=http://bioportal.bioontology.org/ontologies/TGMA&redirect=true
  
 
=== CodeSystemCatalogVersionQuery ===
 
=== CodeSystemCatalogVersionQuery ===
 
* Query: {{CTS2_RDF_base}}codesystemversions
 
* Query: {{CTS2_RDF_base}}codesystemversions
 
* Query code system versions of code system: {{CTS2_RDF_base}}codesystem/SNOMEDCT/versions
 
* Query code system versions of code system: {{CTS2_RDF_base}}codesystem/SNOMEDCT/versions
** Query with 'name' filter: {{CTS2_RDF_base}}codesystemversions?matchvalue=nci&filtercomponent=resourceName
+
* Query with 'name' filter: {{CTS2_RDF_base}}codesystemversions?matchvalue=nci&filtercomponent=resourceName
** Query with 'description' filter: {{CTS2_RDF_base}}codesystemversions?matchvalue=anatomy&filtercomponent=resourceSynopsis
+
* Query with 'description' filter: {{CTS2_RDF_base}}codesystemversions?matchvalue=anatomy&filtercomponent=resourceSynopsis
** ('contains' and 'exactmatch' algorithms supported)
+
* Query by Description (default) {{CTS2_RDF_base}}codesystemversions?matchvalue=bioinformatics
* 'Count' via HEAD call
+
* Query by Name {{CTS2_RDF_base}}codesystemversions?filtercomponent=resourceName&matchvalue=bioa
 +
* Query  by CodeSystem URI {{CTS2_RDF_base}}codesystembyuri/versions?uri=http://bioportal.bioontology.org/ontologies/TGMA
 +
* Query by CodeSystem URI (with redirect) {{CTS2_RDF_base}}codesystembyuri/versions?uri=http://bioportal.bioontology.org/ontologies/TGMA&redirect=true
  
 
=== CodeSystemVersionCatalogRead ===
 
=== CodeSystemVersionCatalogRead ===
* Read by name: {{CTS2_RDF_base}}codesystem/LNC/version/LNC_226_RRF
+
* CodeSystemCatalogRead by Name  {{CTS2_RDF_base}}codesystem/CARO/version/CARO-46255
* Or OfficialResourceVersionId: {{CTS2_RDF_base}}codesystem/LNC/version/226
+
* CodeSystemCatalogRead by Official Version Id  {{CTS2_RDF_base}}codesystem/CL/version/2011-06-03
* 'Exists' via HEAD call
 
  
 
=== EntityDescriptionQuery ===
 
=== EntityDescriptionQuery ===
 
* Query with 'description' {{CTS2_RDF_base}}entities?matchvalue=swelling
 
* Query with 'description' {{CTS2_RDF_base}}entities?matchvalue=swelling
* Get all entities of code system version: {{CTS2_RDF_base}}codesystem/AIR/version/AIR_1993_RRF/entities
+
* Get all entities of code system version: {{CTS2_RDF_base}}codesystem/AIR/version/AIR-42298/entities
* Query entities of code system version with 'keyword' filter: {{CTS2_REST_base}}codesystem/LNC/version/LNC_226_RRF/entities?matchvalue=100
+
* Get all entities of code system version by official version id: {{CTS2_RDF_base}}codesystem/LNC/version/232/entities
** ('contains' and 'exactmatch' algorithms supported)
+
* Query entities of code system version with 'keyword' filter: {{CTS2_RDF_base}}codesystem/LNC/version/232/entities?matchvalue=100
* 'Count' via HEAD call
 
  
 
=== EntityDescriptionRead ===
 
=== EntityDescriptionRead ===
* Read by name: {{CTS2_RDF_base}}codesystem/LNC/version/LNC_226_RRF/entity/LP31957-1
+
* Read by name: {{CTS2_RDF_base}}codesystem/LNC/version/LNC-44774/entity/LNC:LP97322-9
* Or using CSV OfficialResourceVersionId : {{CTS2_REST_base}}codesystem/LNC/version/226/entity/LP31957-1
+
* Read using entity reference {{CTS2_RDF_base}}entity/LNC:LP97322-9
*: NOTE: Does not support Entity lookup by URI (See notes below)
+
* Read using entity references (mutliple Code System Versions) {{CTS2_RDF_base}}entity/obo:IAO_0000030
* 'Exists' via HEAD call
 
  
 
=== ValueSetCatalogQuery ===
 
=== ValueSetCatalogQuery ===
 
* Query: {{CTS2_RDF_base}}valuesets
 
* Query: {{CTS2_RDF_base}}valuesets
** Query with 'about' filter: {{CTS2_RDF_base}}valuesets?matchvalue=FMA_subset&filtercomponent=about
+
* ValueSetCatalogQuery by Description (default) {{CTS2_RDF_base}}valuesets?matchvalue=subtree
** Query with 'name' filter: {{CTS2_RDF_base}}valuesets?matchvalue=set&filtercomponent=resourceName
+
* Query with 'name' filter: {{CTS2_RDF_base}}valuesets?matchvalue=set&filtercomponent=resourceName
** Query with 'description' filter: {{CTS2_RDF_base}}valuesets?matchvalue=anatomy&filtercomponent=resourceSynopsis
+
* Query with 'description' filter: {{CTS2_RDF_base}}valuesets?matchvalue=anatomy&filtercomponent=resourceSynopsis
** Query based on code system restriction: {{CTS2_RDF_base}}valuesets?codesystem=SNOMEDCT
+
* Query based on code system restriction: {{CTS2_RDF_base}}valuesets?codesystem=SNOMEDCT
** ('contains' and 'exactmatch' algorithms supported)
 
* 'Count' via HEAD call
 
  
 
=== ValueSetCatalogRead ===
 
=== ValueSetCatalogRead ===
 
* Read by name: {{CTS2_RDF_base}}valueset/SNOMEDCT-MAS
 
* Read by name: {{CTS2_RDF_base}}valueset/SNOMEDCT-MAS
* 'Exists' via HEAD call
+
* Read by uri {{CTS2_RDF_base}}valuesetbyuri?uri=http://bioportal.bioontology.org/ontologies/SNOMEDCT-TF
 
+
* Read by uri with redirect {{CTS2_RDF_base}}valuesetbyuri?uri=http://bioportal.bioontology.org/ontologies/SNOMEDCT-TF&redirect=true
=== ValueSetDefinitionQuery ===
 
* Read by name: {{CTS2_RDF_base}}valueset/SCTSPA/definitions
 
* 'Exists' via HEAD call
 
  
=== ValueSetDefinitionRead ===
+
=== ResolvedValueSetQuery ===
* Read by name: {{CTS2_RDF_base}}valueset/SCTSPA/definition/42157
+
* Get all ResolvedValueSets {{CTS2_RDF_base}}resolvedvaluesets
* 'Exists' via HEAD call
+
* Get ResolvedValueSet {{CTS2_RDF_base}}valueset/SNOMEDCT-TF/definition/SNOMEDCT-TF-43049/resolution/43049
 
+
* Get ResolvedValueSet (with filter) {{CTS2_RDF_base}}valueset/SNOMEDCT-TF/definition/SNOMEDCT-TF-43049/resolution/43049?matchvalue=toe
=== ValueSetDefinitionResolutionService ===
+
* Get ResolvedValueSet entities {{CTS2_RDF_base}}valueset/SNOMEDCT-TF/definition/SNOMEDCT-TF-43049/resolution/43049/entities
* Read by name: {{CTS2_RDF_base}}valueset/SCTSPA/definition/42157/resolution?resolutiontype=entitydirectory
+
* Get ResolvedValueSet entities (with filter) {{CTS2_RDF_base}}valueset/SNOMEDCT-TF/definition/SNOMEDCT-TF-43049/resolution/43049/entities?matchvalue=toe
* 'Exists' via HEAD call
 
  
 
=== AssociationQuery ===
 
=== AssociationQuery ===
* Query 'sourceOf' associations of entity: {{CTS2_RDF_base}}codesystem/SNOMEDCT/version/SNOMEDCT_2010_01_31_RRF/entity/100001001/sourceof
+
* AssociationQuery (all of CodeSystemVersion)  {{CTS2_RDF_base}}codesystem/ICD9CM/version/ICD9CM-47178/associations
* Query 'children' associations of entity: {{CTS2_RDF_base}}codesystem/MSH/version/MSH_2009_2009_02_13_RRF/entity/D006321/children
+
* AssociationQuery (children{{CTS2_RDF_base}}codesystem/ICD9CM/version/ICD9CM-47178/entity/E008/children
 
+
* AssociationQuery (subjectof)  {{CTS2_RDF_base}}codesystem/ICD9CM/version/ICD9CM-47178/entity/E008/subjectof
=== AdvancedAssociationQuery ===
+
* AssociationQuery (targetof)  {{CTS2_RDF_base}}codesystem/ICD9CM/version/ICD9CM-47178/entity/E008/targetof
* Get root nodes of a code system version: {{CTS2_REST_base}}codesystem/SNOMEDCT/version/SNOMEDCT_2010_01_31_RRF/graph?focus=TOP_NODE&direction=FORWARD
 
* Get graph of focusn node in code system version:{{CTS2_REST_base}}codesystem/SNOMEDCT/version/SNOMEDCT_2010_01_31_RRF/graph?focus=243796009&direction=FORWARD
 
* NOTES: Currently only supports direction=FORWARD and depth=1
 
 
 
 
 
== SVN ==
 
SVN [http://informatics.mayo.edu/svn/trunk/cts2/impl/cts2-rest/ url]
 

Latest revision as of 17:30, 11 June 2012

CTS2 REST Services

Known Issues

  • Unbound predicate queries are expensive to execute on the triple store, and CTS2 requires all Properties of a given subject to be displayed. This will cause all CTS2 Read services to have a delay in returning results.

All Read Services are executed by a SPARQL query similar to:

<http://some/uri...> ?p ?o

This ends up being a very expensive query to the triple store

  • URI Mismatch: Certain portions of the RDF Plugin utilize the NCBO REST service for searching. Sometimes, the URIs returned by the NCBO REST service are not identical to those int the triple store. This will manifest on Entity Read by Name queries.
  • URIs for Entities in Views: Some Entities in Views have different URIs then the resource in the actual code system. For instance

http://informatics.mayo.edu/cts2/services/bioportal-rdf/valueset/SNOMED-ETHNIC-GROUP/definition/SNOMED-ETHNIC-GROUP-43057/resolution/43057

refers to a SNOMEDCT Entity, but Entities have URIs starting with:

http://purl.bioontology.org/ontology/SNOMED-Ethnic-Group#

CodeSystemCatalogQuery

CodeSystemCatalogRead

CodeSystemCatalogVersionQuery

CodeSystemVersionCatalogRead

EntityDescriptionQuery

EntityDescriptionRead

ValueSetCatalogQuery

ValueSetCatalogRead

ResolvedValueSetQuery

AssociationQuery