NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Started revising based on recent meetings with Brad, Joyce, & Denise.

...

Table of Contents
minLevel2

Overview

...

You can view or search for caDSR data by entering a URL in the address bar of a browser and passing parameters in that URL. This page provides examples to get you started, in legacy and caDSR II format: 

  • A URL in legacy format returns only HTML or XML.
  • A URL in caDSR II format returns HTML, XML, or JSON.

Using the API, developers can allow an application to connect to caDSR and search the database. A web browser interface is available to test the API at the Domain Class Browser. The Legacy caDSR REST-like (XML-HTTP) API provide access to content in the caDSR. There are links to the Legacy Java Docs on the Domain Class Browser page. 

...

Info
titleMultiple AND IN Note

You cannot enter multiple "and" or "in" values for search criteria when using the REST (XML-HTTP) API.

(The order of categories is TBD.) 

Examples in caDSR II but not Legacy caDSR

(TBD: Examples 20, 21, 24 will move to here.)

Examples for Value Meaning Concepts

Retrieving the Value Meaning Concept Codes for a Data Element that has an Enumerated Value Domain

...

Retrieving a caDSR item that has Concept using the Concept Code or Name, but restricting the search to only retrieving items if the Concept is the Primary Concept

(TBD: The caDSR II URLs for this section are new.)

To search for data elements using a concept code or name, but restrict the results to only Primary concepts in the Object Class, refer to the following the examples.

  1. Retrieve data elements with Object Class Concept "C19448" (result in XML) but only if the Concept is indicates as the Primary concept. This is done using the Concept's primaryFlag indicator = "Yes".

    Code Block
    titleRetrieve Data Elements - Legacy
    https://cadsrapi.nci.nih.gov/cadsrapi4/GetXML?query=DataElement,DataElementConcept,ObjectClass,ConceptDerivationRule&ComponentConcept[Concept[@preferredName=C19448]][@primaryFlag=Yes]
    
    Code Block
    titleRetrieve Data Elements - caDSR II
    https://cadsrapi.cancer.gov/caDSR5.0/GetXML?query=DataElement,DataElementConcept,ObjectClass,ConceptDerivationRule&ComponentConcept[Concept[@preferredName=C19448],@primaryFlag=Yes] 

    EXTENSION 1: Additionally, you can find all Data Elements where EXTENSION 1: Additionally, you can find all Data Elements where the concept is used either as a primary OR qualifier concept. This is accomplished by removing the last qualifier in the query. Removing this criteria in Example 1 returns 104 results instead of 88.

    Code Block
    titleExtension 1
    [@primaryFlag=Yes]
  2. Retrieve Data Elements with Property having the Primary Concept with the longName E-Mail Address.

    Code Block
    titleRetrieve Data Elements - Legacy
    https://cadsrapi.nci.nih.gov/cadsrapi4/GetXML?query=DataElement,DataElementConcept,Property,ConceptDerivationRule&ComponentConcept[Concept[@longName=E-mail%20Address]][@primaryFlag=Yes]
    
    Code Block
    titleRetrieve Data Elements - caDSR II
    https://cadsrapi.cancer.gov/caDSR5.0/GetXML?query=DataElement,DataElementConcept,Property,ConceptDerivationRule&ComponentConcept[Concept[@longName=E-mail%20Address],@primaryFlag=Yes] 

    EXTENSION 2EXTENSION 2To retrieve the next higher order "type" administered items, remove the name of the item(s) before it in the query argument list. For example, to get Data Element Concepts (DECs) with it's its Property Primary Concept longName E-Mail Address, remove DataElement (the first item in the query argument list in Example 2):

    Retrieve DECs with Property Primary Concept name E-Mail Address.

    Code Block
    titleExtension 2 - Legacy
    https://cadsrapi.nci.nih.gov/cadsrapi4/GetXML?query=DataElementConcept,Property,ConceptDerivationRule&ComponentConcept[Concept[@longName=E-mail%20Address]][@primaryFlag=Yes]
    
    Code Block
    titleExtension 2 - caDSR II
    https://cadsrapi.cancer.gov/caDSR5.0/GetXML?query=DataElementConcept,Property,ConceptDerivationRule&ComponentConcept[Concept[@longName=E-mail%20Address]][@primaryFlag=Yes]
    
  3. Retrieve Data Elements with its ValueDomain having a ValueMeaning with a Retrieve Data Elements with it's ValueDomain having a ValueMeaning with a Primary Concept longName Blood and Blood Products (result in XML).

    Code Block
    titleRetrieve Data Elements - Legacy
    https://cadsrapi.nci.nih.gov/cadsrapi4/GetXML?query=DataElement,EnumeratedValueDomain,ValueDomainPermissibleValue,PermissibleValue,ValueMeaning,ConceptDerivationRule&ComponentConcept[Concept[@longName=Blood and Blood Products]][@primaryFlag=Yes]
    

(Overview section ends here.)

Examples

  1. Code Block
    titleRetrieve Data Elements - caDSR II
    https://cadsrapi.cancer.gov/caDSR5.0/GetXML?query=DataElement,EnumeratedValueDomain,ValueDomainPermissibleValue,PermissibleValue,ValueMeaning,ConceptDerivationRule&ComponentConcept[Concept[@longName=Blood and Blood Products]][@primaryFlag=Yes]
    

Examples for Data Elements

Example 1 - Find Data Element by Public Example 1 - Find Data Element by Public ID and Version

The following examples find a data element where Public ID = 62 and Version=6, displaying the basic metadata attributes. 

...

Code Block
https://cadsrapi.cancer.gov/invoke/caDSR/GetXML?DataElement&DataElementConcept[@publicId=2178546,@version=2.1]

Examples for Forms and Related Items

Example 6 - Find a Form Using Form Public ID and Version, Display Basic Metadata Attributes

...

Code Block
https://cadsrapi.cancer.gov/invoke/caDSR/GetXML?query=DataElement&Question[@publicId=2392779,@version=1.0]

Examples for Other Items

Example Example 13 - Retrieve All Administered Components Associated with ClassSchemeClassSchemeItem with Particular ID

...

Code Block
https://cadsrapi.cancer.gov/invoke/caDSR/GetXML?query=AdministeredComponent,AdministeredComponentClassSchemeItem&ClassSchemeClassSchemeItem[@id=A55C551C-1866-5ED1-E034-080020C9C0E0]
HTML Comment
hiddentrue

Example 14 - Retrieve All ClassSchemeClassSchemeItem Associated with ClassificationSchemeItem and ClassificationScheme

The following example gets all ClassSchemeClassSchemeItem for ClassificationSchemeItem with longName starting with 2014r1 and ClassificationScheme with preferredName starting with NMDP.

Info
titleSpecifying an Association
The association can be specified either through using square brackets '[]' or by using the backslash '\' however, association within the square brackets cannot have further associations as attributes.

Legacy Example 14

The URL for the results from the caDSR 4.1.x REST API is

Code Block
https://cadsrapi.nci.nih.gov/cadsrapi4/GetXML?query=ClassSchemeClassSchemeItem&ClassSchemeClassSchemeItem[ClassificationScheme[@preferredName=NMDP*]]\ClassificationSchemeItem[@longName=2014r1*]

Examples 15-17  - Get Data Elements Using Concept Code or Concept Name

...

Example 24 - REST API Data Element

(TBD: Example 24 will move up because it is very similar to Example 1b.)

The following caDSR II example retrieves allows machine-to-machine retrieval of data elements by public ID and version. 

Code Block
https://cadsrapi.cancer.gov/rad/caDSR.restapi:GetXML_rad/GetXML/query=DataElement[@publicId=62,@version=6]

If you want to create a REST API call from machine to machine or application to application, start your URL as follows: 

Code Block
https://cadsrapi.cancer.gov/rad/caDSR.restapi:GetXML_rad/

Can you retrieve all Data Elements using a common EVS concept code or name, but restrict results to only those where the concept is “Primary” in the CDE’s Object Class?

...