NIH | National Cancer Institute | NCI Wiki  

WIKI MAINTENANCE NOTICE

NCI Wiki will be will be undergoing scheduled maintenance on Monday, June 23rd between 5:00 and 6:00 PM ET.
Wiki will remain available, but users may experience screen refreshes or HTTP 502 errors during the maintenance period. If you encounter these errors, wait 1-2 minutes, then refresh your page.
As a precautionary measure, editors should ensure all work is saved prior to the maintenance period.

If you have any questions or concerns, contact the CBIIT Atlassian Management Team.

Create content

 

Code Files

Distributed Coding Scheme List

Java Code Snippet
import org.LexGrid.LexBIG.DataModel.Collections.CodingSchemeRenderingList;
import org.LexGrid.LexBIG.DataModel.InterfaceElements.CodingSchemeRendering;
import org.LexGrid.LexBIG.Exceptions.LBInvocationException;
import org.LexGrid.LexBIG.caCore.interfaces.LexEVSApplicationService;
import org.LexGrid.LexBIG.caCore.interfaces.LexEVSDistributed;
import org.LexGrid.LexBIG.caCore.interfaces.LexEVSService;

import gov.nih.nci.system.client.ApplicationServiceProvider;
 
    public class RemoteTestClient {
     
    private String serviceUrl = "https://lexevsapi65.nci.nih.gov/lexevsapi65";
    private LexEVSService lexevsService;
     
    public static void main(String args[]) throws Exception {
        RemoteTestClient client = new RemoteTestClient();
        client.queryLexEVSDistributed();
    }
     
    public RemoteTestClient() throws Exception {
        lexevsService = (LexEVSApplicationService)ApplicationServiceProvider
                .getApplicationServiceFromUrl(serviceUrl, "EvsServiceInfo");
    }
     
    public void queryLexEVSDistributed() throws LBInvocationException {
        LexEVSDistributed distributedSvc = lexevsService;
        CodingSchemeRenderingList csrl = distributedSvc.getSupportedCodingSchemes();
        CodingSchemeRendering[] csr = csrl.getCodingSchemeRendering();
        for(int i=0;i<csr.length;i++){
     
            System.out.println("\t\tOutput: " + "Coding Scheme: " + csr[i].getCodingSchemeSummary().getLocalName());
            System.out.println("\t\tOutput: " + "  -- Version: " + csr[i].getCodingSchemeSummary().getRepresentsVersion());
            System.out.println("\t\tOutput: " + "  -- URI: " + csr[i].getCodingSchemeSummary().getCodingSchemeURI());
        }
    }
     
    }

Resolve Coding Scheme

import org.LexGrid.LexBIG.LexBIGService.LexBIGService;
import org.LexGrid.LexBIG.Utility.Constructors;
import org.LexGrid.LexBIG.caCore.interfaces.LexEVSApplicationService;
import org.LexGrid.codingSchemes.CodingScheme;

import gov.nih.nci.system.client.ApplicationServiceProvider;

public class Test {

    LexBIGService lbSvc;

    public void run(String codingScheme, String version) {
        // Set the LexEVS URL (for remote access)
        String evsUrl = "https://lexevsapi65.nci.nih.gov/lexevsapi65";

        // Get the LexBIG service reference from LexEVS Application Service
        try {
            lbSvc = (LexEVSApplicationService) ApplicationServiceProvider.getApplicationServiceFromUrl(evsUrl,
                    "EvsServiceInfo");
        } catch (Exception e1) {
            e1.printStackTrace();
        }
        // Resolve Scheme
        try {
            CodingScheme scheme = lbSvc.resolveCodingScheme(codingScheme,
                    Constructors.createCodingSchemeVersionOrTagFromVersion(version));
            if(scheme != null) {
                System.out.println("Found scheme: " + scheme.getCodingSchemeName());
            }else {
                System.out.println("Scheme not found: " + codingScheme);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }

    }

    /**
     * Main
     */
    public static void main(String[] args) {
        String name = "NCI Thesaurus";
        String version = "18.03d";

        new Test().run(name, version);
    }
}

Coded Node Set Snippet

Java Code Snippet
LexBIGService lbs  = (LexBIGService)ApplicationServiceProvider.getApplicationServiceFromUrl(serviceUrl, "EvsServiceInfo");
CodedNodeSet cns = lbs.getCodingSchemeConcepts(
	String codingScheme,
	org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag);

Coded Node Graph Snippet

Java Code Snippet
LexBIGService lbs  = (LexBIGService)ApplicationServiceProvider.getApplicationServiceFromUrl(serviceUrl, "EvsServiceInfo");    
CodedNodeGraph cng = lbs.getNodeGraph(
	                            String codingScheme, 
	                            org.LexGrid.LexBIG.DataModel.Core.CodingSchemeVersionOrTag, 	
	                            String relationsContainerName (Optional);