lexbig/evs api overview ncbo seminar series october 2008
TRANSCRIPT
![Page 1: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/1.jpg)
LexBIG/EVS API Overview
NCBO Seminar Series
October 2008
![Page 2: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/2.jpg)
What is LexBIG?
• A specific API to serve vocabularies based on the LexGrid model, developed for the Cancer Biomedical Informatics Grid (caBIG®) community.
• Open source implementation.• Underpins current NCI Enterprise Vocabulary Services
(EVS).• Represents the next generation EVS API.• Additional contributions and tuning to meet the needs
of the NCBO community, based on development of NCBO BioPortal services.
![Page 3: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/3.jpg)
Other
OBO
Content
Export
ImportOWL
XML
OBO
Text
Protégé
RRF
XML
Representation
LexGridVocabulary
Model
DataRepository
LexBIG Architecture
Tools And Services
Access
Prog
ramm
ing Interfaces
APIs
LexBIG/EVS
…
CTS
App
s
Java
Embed
Web/GridServices
DistributedAPI
App
licatio
nS
erver• Each LexGrid ‘Node’ provides the software, metadata,
indexes, and backing data store to service one or more vocabularies.
• Each LexBIG Installation represents one LexGrid Node and Java API to administer and query data.
File System:Metadata &
Indexes
![Page 4: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/4.jpg)
LexBIG/EVS caGrid Service
LexBIG/EVS Distributed Service
LexBIG/EVS Java API
Conceptual Overview
LexGridModel & Storage
Browsers and Applications
![Page 5: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/5.jpg)
LexBIG/EVS Java API
LexBIG/EVS API
LexGridModel & Storage
![Page 6: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/6.jpg)
LexBIG/EVS API – Characteristics
• API coverage• Administrative FunctionsAdministrative Functions
• Query Code Systems and Available MetadataQuery Code Systems and Available Metadata
• Query Concepts, Concept Properties, and QualificationsQuery Concepts, Concept Properties, and Qualifications
• Query Concept Relationships and QualificationsQuery Concept Relationships and Qualifications
• API characteristics• Conscious separation of service and data classesConscious separation of service and data classes
• Deferred query resolutionDeferred query resolution
• Payload optimizationPayload optimization
• Support iterationSupport iteration
• Defined extension points (loaders, exporters, sort algorithms, filters, Defined extension points (loaders, exporters, sort algorithms, filters, convenience methods)convenience methods)
![Page 7: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/7.jpg)
LexBIG/EVS API – Example
• Prerequisites• ICD-9-CM loaded from UMLS distribution (RRF source files)
LoadUMLSFiles [-s null] [-mf uri] [-v int] [-lp uri] [-nf] -in uri [-t id] [-mh int] [-a]
Example: LoadUMLSFiles -in file:///path/to/directory/ -s “ICD9CM" -nf -a
-s,--sources Comma-delimited list of source vocabularies to load.-mh,--mrhier <int> Process hierarchical relationships stored by the MRHIER file. 0=none, 1=HCD-tagged items (default)-a,--activate ActivateScheme on successful load.-in,--input <uri> URI or path specifying the directory containing the NLM files.-lp,--loadPrefs <uri> URI or path specifying location of the Loader Preferences file.-mf,--manifest <uri> URI or path specifying location of the manifest file.-nf,--noFail If specified, indicates that processing should not stop for recoverable errors.-t,--tag <id> An optional tag ID (e.g. 'PRODUCTION' or 'TEST') to assign.-v,--validate <int> Validation only; no load. If specified, 'nf', 'a' and 't‘ are ignored. 0 to verify files exist.
![Page 8: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/8.jpg)
LexBIG/EVS API – Example
• Let’s query some concepts …
• Target a code system• Define a new LexBIGService as starting point.• Define a concept ‘space’ (a codedNodeSet) for ICD-9-CM, version 2007• Note: Initially unrestricted and unresolved
LexBIGService lbs = new LexBIGServiceImpl();CodedNodeSet cns = lbs.getCodingSchemeConcepts("ICD-9-CM", null);
![Page 9: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/9.jpg)
LexBIG/EVS API – Example
• Prerequisites• ICD-9-CM loaded from UMLS distribution (RRF source files)
• Target a code system• Define a concept ‘space’ (a codedNodeSet) for ICD-9-CM, version 2007• Initially unrestricted and unresolved
• Restrict the space based by adding constraints• Property ‘Semantic Type’ -> exact match -> “Disease or Syndrome”
LexBIGService lbs = new LexBIGServiceImpl();CodedNodeSet cns = lbs.getCodingSchemeConcepts("ICD-9-CM", null);cns.restrictToMatchingProperties( Constructors.createLocalNameList( "Semantic_Type"), null, "Disease or Syndrome", “exactMatch", null);
![Page 10: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/10.jpg)
LexBIG/EVS API – Example
• Prerequisites• ICD-9-CM loaded from UMLS distribution (RRF source files)
• Target a code system• Define a concept ‘space’ (a codedNodeSet) for ICD-9-CM, version 2007• Initially unrestricted and unresolved
• Restrict the space based by adding constraints• Property ‘Semantic Type’ -> exact match -> “Disease or Syndrome”• Primary text match -> sounds like -> ‘infeksion’
LexBIGService lbs = new LexBIGServiceImpl();CodedNodeSet cns = lbs.getCodingSchemeConcepts("ICD-9-CM", null);cns.restrictToMatchingProperties( Constructors.createLocalNameList( "Semantic_Type"), null, "Disease or Syndrome", “exactMatch", null);cns.restrictToMatchingDesignations("infeksion", SearchDesignationOption. PREFERRED_ONLY, “DoubleMetaphoneLuceneQuery”, null);
![Page 11: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/11.jpg)
LexBIG/EVS API – Example
• Prerequisites• ICD-9-CM loaded from UMLS distribution (RRF source files)
• Target a code system• Define a concept ‘space’ (a codedNodeSet) for ICD-9-CM, version 2007• Initially unrestricted and unresolved
• Restrict the space based by adding constraints• Property ‘Semantic Type’ -> exact match -> “Disease or Syndrome”• Primary text match -> sounds like -> ‘infeksion’• Any text stemmed match -> ‘classify’ (to match ‘classified’, ‘classifying’, etc)
LexBIGService lbs = new LexBIGServiceImpl();CodedNodeSet cns = lbs.getCodingSchemeConcepts("ICD-9-CM", null);cns.restrictToMatchingProperties( Constructors.createLocalNameList( "Semantic_Type"), null, "Disease or Syndrome", “exactMatch", null);cns.restrictToMatchingDesignations("infeksion", SearchDesignationOption. PREFERRED_ONLY, “DoubleMetaphoneLuceneQuery”, null);cns.restrictToMatchingDesignations("classify", SearchDesignationOption.ALL, "StemmedLuceneQuery“, null);
![Page 12: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/12.jpg)
LexBIG/EVS API – Example
• Prerequisites• ICD-9-CM loaded from UMLS distribution (RRF source files)
• Target a code system• Define a concept ‘space’ (a codedNodeSet) for ICD-9-CM, version 2007• Initially unrestricted and unresolved
• Restrict the space based by adding constraints• Property ‘Semantic Type’ -> exact match -> “Disease or Syndrome”• Primary text match -> sounds like -> ‘infeksion’• Any text stemmed match -> ‘classify’ (to match ‘classified’, ‘classifying’, etc)• Concept must be active
LexBIGService lbs = new LexBIGServiceImpl();CodedNodeSet cns = lbs.getCodingSchemeConcepts("ICD-9-CM", null);cns.restrictToMatchingProperties( Constructors.createLocalNameList( "Semantic_Type"), null, "Disease or Syndrome", “exactMatch", null);cns.restrictToMatchingDesignations("infeksion", SearchDesignationOption. PREFERRED_ONLY, “DoubleMetaphoneLuceneQuery”, null);cns.restrictToMatchingDesignations("classify", SearchDesignationOption.ALL, "StemmedLuceneQuery“, null);cns.restrictToStatus(ActiveOption.ACTIVE_ONLY, null);
![Page 13: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/13.jpg)
LexBIG/EVS API – Example
• Prerequisites• ICD-9-CM loaded from UMLS distribution (RRF source files)
• Target a code system• Define a concept ‘space’ (a codedNodeSet) for ICD-9-CM, version 2007• Initially unrestricted and unresolved
• Restrict the space based by adding constraints• Property ‘Semantic Type’ -> exact match -> “Disease or Syndrome”• Primary text match -> sounds like -> ‘infeksion’• Any text stemmed match -> ‘classify’ (to match ‘classified’, ‘classifying’, etc)• Must contain a property with name -> ‘UMLS_CUI’• Concept must be active
• Indicate sort preferences and limit number returned• Sort by code, ascending• Limit to top 5
…cns.restrictToStatus(ActiveOption.ACTIVE_ONLY, null);ResolvedConceptReferenceList list = cns.resolveToList( Constructors.createSortOptionList(new String[] { "matchToQuery", "code" }), null, null, 5);
![Page 14: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/14.jpg)
LexBIG/EVS API – Example
• Prerequisites• ICD-9-CM loaded from UMLS distribution (RRF source files)
• Target a code system• Define a concept ‘space’ (a codedNodeSet) for ICD-9-CM, version 2007• Initially unrestricted and unresolved
• Restrict the space based by adding constraints• Property ‘Semantic Type’ -> exact match -> “Disease or Syndrome”• Primary text match -> sounds like -> ‘infeksion’• Any text stemmed match -> ‘classify’ (to match ‘classified’, ‘classifying’, etc)• Must contain a property with name -> ‘UMLS_CUI’• Concept must be active
• Indicate sort preferences and limit number returned• Sort by code, ascending• Limit to top 5
• Resolve!
![Page 15: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/15.jpg)
LexBIG/EVS API – Example 2
• OK, now find some relationships…
• Target a code system• Define an unrestricted graph for a target ontology (e.g. ICD-9-CM)
CodedNodeGraph cng = lbs.getNodeGraph("ICD-9-CM", null, null);
![Page 16: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/16.jpg)
LexBIG/EVS API – Example 2
• OK, now find some relationships…• Target a code system
• Define an unrestricted graph for a target ontology (e.g. ICD-9-CM)• Restrict by adding constraints
• Restrict to hierarchical relationships (UMLS-defined ‘CHD’ = has child)
CodedNodeGraph cng = lbs.getNodeGraph("ICD-9-CM", null, null);cng.restrictToAssociations(Constructors.createNameAndValueList(“CHD"), null);
![Page 17: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/17.jpg)
LexBIG/EVS API – Example 2
• OK, now find some relationships…• Target a code system
• Define an unrestricted graph for a target ontology (e.g. ICD-9-CM)• Restrict by adding constraints
• Restrict to hierarchical relationships (UMLS-defined ‘CHD’ = has child)• Indicate extent of navigation
• Set focal point (008 = ‘Intestinal infections due to other organisms’)• Maximum 2 levels, full reporting at all levels• Moving only in forward direction• No application of filter extensions, etc• Maximum 50 nodes resolved overall
CodedNodeGraph cng = lbs.getNodeGraph("ICD-9-CM", null, null);cng.restrictToAssociations(Constructors.createNameAndValueList(“CHD"), null);cng.resolveAsList( Constructors.createConceptReference("008", "ICD-9-CM"), true, false, 2, 2, null, null, null, null, 50);
![Page 18: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/18.jpg)
LexBIG/EVS API – Example 2
• OK, now find some relationships…• Target a code system
• Define an unrestricted graph for a target ontology (e.g. ICD-9-CM)• Restrict by adding constraints
• Restrict to parent/child relationships (UMLS-defined ‘PAR’ = has parent)• Restrict to the codedNodeSet defined in the previous example
• Indicate extent of navigation• Set focal point (008 = ‘Intestinal infections due to other organisms’)• Maximum 2 levels, moving in forward direction• Maximum 50 nodes resolved overall
• Resolve!
![Page 19: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/19.jpg)
LexBIG/EVS Distributed Service
LexBIG/EVS Java API
LexBIG API - Distributed
LexGridModel & Storage
![Page 20: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/20.jpg)
Database Server
LexBIG/EVS API – Distributed
Distributed LexBIG Server
RMI
LexBIG on Local System
LexBIG Install
Database Server
LexBIG Install
JDBC
JDBC
Direct
Distributed
LexBIG API Proxy
Client System
LexBIG Client Proxy
![Page 21: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/21.jpg)
LexBIG/EVS API – Distributed
// Set the URL (for distributed access) and establish a remote service …
String evsUrl = “http://evsapi.nci.nih.gov/evsapi41/http/remoteService”;
LexBIGService lbSvc = EVSApplicationService.getRemoteInstance(evsUrl);
// Additional code is unchanged …CodedNodeSet cns = lbs.getCodingSchemeConcepts("ICD-9-CM", null);
cns.restrictToMatchingProperties( Constructors.createLocalNameList(
"Semantic_Type"), null, "Disease or Syndrome", “exactMatch", null);
cns.restrictToMatchingDesignations("infeksion", SearchDesignationOption.
PREFERRED_ONLY, “DoubleMetaphoneLuceneQuery”, null);
cns.restrictToMatchingDesignations("classify", SearchDesignationOption.ALL,
"StemmedLuceneQuery“, null);
…
• Same API functions; requires change to service declaration only• Does not expose administration options
![Page 22: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/22.jpg)
LexBIG/EVS caGrid Service
LexBIG/EVS Distributed Service
LexBIG/EVS Java API
LexBIG/EVS API - caGrid
LexGridModel & Storage
![Page 23: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/23.jpg)
Database Server
LexBIG/EVS API - caGrid
Distributed LexBIG Server
RMI
LexBIG on Local System
LexBIG Install
Database Server
LexBIG Install
JDBC
JDBC
Direct
Distributed
Database Server
LexBIG API Proxy
Client System
caGrid Host ServerClient System Distributed LexBIG Server
RMI
LexBIG Install
Grid
JDBCTCP
LexBIG Proxy
LexBIG Client Proxy
LexBIG Client Proxy
![Page 24: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/24.jpg)
Same API Functionality
Client caGrid Service Distributed LexBIGCalls caGrid ‘getSupportedCodingSchemes()’
Calls Distributed LexBIG‘getSupportedCodingSchemes()
Returns result of call to caGrid Service
Results are returned to clientwith all appropriate caGrid security mechanisms
LexBIG/EVS API - caGrid
![Page 25: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/25.jpg)
caCORE SDK APIs
caCORE SDK APIs
LexGridModel & Storage
![Page 26: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/26.jpg)
• Query-by-example (QBE) system
• Based on LexGrid model
• Java Language Binding
• Web Services (SOAP)
• Web Services (REST HTTP / XML)
caCORE EVS Server
Web ServicesWeb Services
XML / HTMLXML / HTML
Java QBEJava QBE
LexBIG Install
DAO
Cache
Service L
ayer
Database Server
JDBC
caCORE SDK APIs
Hibernate
![Page 27: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/27.jpg)
caCORE SDK APIs - Example
SDK-Generated Query by Example User Interface:
![Page 28: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/28.jpg)
caCORE SDK APIs - Example
Example Restful Request (HTML)…
Example Restful Output (HTML shown, XML also available)…
![Page 29: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/29.jpg)
LexBIG/EVS caGrid Service
LexBIG/EVS Distributed Service
LexBIG/EVS Java API
Browsers and Applications
LexGridModel & Storage
Browsers and Applications
![Page 30: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/30.jpg)
User Interfaces - LexBIG GUI
![Page 31: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/31.jpg)
User Interfaces - BioPortal
![Page 32: LexBIG/EVS API Overview NCBO Seminar Series October 2008](https://reader030.vdocument.in/reader030/viewer/2022032702/56649cb05503460f949743fd/html5/thumbnails/32.jpg)
Project Links
• LexEVS Project
http://gforge.nci.nih.gov/projects/lexevs/
• caBIG® Vocabulary Knowledge Center
https://cabig-kc.nci.nih.gov/Vocab/KC/index.php/Main_Page