NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Numbered Headings
start-numbering-with1
start-numbering-ath2
Panel
titleContents of This Page

Table of Contents
maxLevel3

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. 

caDSR II:

Results Displayed in XML

The URL for the results from the caDSR II REST API is

Code Block
https://cadsrapi.cancer.gov/invoke/caDSR/GetXML?query=DataElement[@publicId=62,@version=6]
caDSR II:

Results Displayed in HTML

The URL for the results from the caDSR II REST API is

Code Block
https://cadsrapi.cancer.gov/invoke/caDSR/GetHTML?query=DataElement[@publicId=62,@version=6]
caDSR II:

Results Displayed in JSON

The URL for the results from the caDSR II REST API is

Code Block
https://cadsrapi.cancer.gov/invoke/caDSR/GetJSON?query=DataElement[@publicId=62,@version=6]

Allow Machine-to-machine Retrieval of a Data Element by Public ID and Version

The following caDSR II example allows machine-to-machine retrieval of a data element by public ID and version. (You can test this URL only in a machine-to-machine scenario, not in a browser.)

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/

Find Data Element by Public ID

The following example finds a data element with Public ID = 62, displaying the basic metadata attributes. Since the version is not known, this query can only be handled via a caDSR REST API query getting all versions.

The URL for the results from the caDSR II REST API is

Code Block
https://cadsrapi.cancer.gov/invoke/caDSR/GetHTML?query=DataElement[@publicId=62]

Or the query can retrieve only the latest version.

Code Block
https://cadsrapi.cancer.gov/invoke/caDSR/GetHTML?query=DataElement[@publicId=62,@latestVersionIndicator=yes]

Find Data Element by Public ID, Display All Related Components

The following example finds a data element with Public ID = 62, displaying all the metadata associated with the data element's related components, not just the basic attributes. This is handled in the caDSR REST API using a parameter that produces expanded ("heavy") XML.

The URL for the results from the caDSR II REST API is

Code Block
https://cadsrapi.cancer.gov/invoke/caDSR/GetXML?query=DataElement[@publicId=62]&returnHeavyXML=true

Find DEC Using Public ID, Display All Associated Data Elements

The following example finds all the data elements associated with the DEC with Public ID = 2178546, displaying the basic metadata of the DEC and its data elements.

The URL for the results from the caDSR II REST API is

Code Block
https://cadsrapi.cancer.gov/invoke/caDSR/GetHTML?query=DataElement&DataElementConcept[@publicId=2178546]

Find Data Elements Associated with a Particular DEC Public ID and Version

The following example finds only data elements associated with Version 2.1 of DEC with Public ID = 2178546.

The URL for the results from the caDSR II REST API is

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

Get Data Elements Using Concept Code or Concept Name

The following examples show how to retrieve data elements using either the concept code or the concept name where the concept is the Primary concept of the related caDSR item. In these examples, results are returned in XML. 

Find All Data Elements Where Associated Concept is Primary Concept of Data Element's Object Class

This example shows the use of either the Concept Code (C19448). Results are returned in XML.

The URL for the results from the caDSR II REST API is

Code Block
https://cadsrapi.cancer.gov/invoke/caDSR/GetXML?query=DataElement,DataElementConcept,ObjectClass&ComponentConcept[Concept[@preferredName=C19448],@primaryFlag=Yes]

Find All Data Elements Where Associated Concept is Primary Concept of Data Element's Property

The URL for the results from the caDSR II REST API is

Code Block
https://cadsrapi.cancer.gov/invoke/caDSR/GetXML?query=DataElement,DataElementConcept,Property&ComponentConcept[Concept[@preferredName=C42775],@primaryFlag=Yes]

Find All Data Elements Where Associated Concept is Primary Concept of One of Data Element's Value Domain Value Meanings

The URL for the results from the caDSR II REST API is

Code Block
https://cadsrapi.cancer.gov/invoke/caDSR/GetXML?query=DataElement,ValueDomain,ValueDomainPermissibleValue,PermissibleValue,ValueMeaning&ComponentConcept[Concept[@preferredName=C19448],@primaryFlag=Yes]

Find All Enumerated Permissible Values for a Data Element

The following examples find all enumerated permissible values for a data element using the data element's public ID and version or the data element's public ID (and getting latest version). You must specify either version or latestVersionIndicator. If you specify latestVersionIndicator=No, the query returns all permissible values across all versions of the CDE.

The URL for the results from the caDSR II REST API is

Code Block
https://cadsrapi.cancer.gov/invoke/caDSR/GetXML?query=PermissibleValue,ValueDomainPermissibleValue,ValueDomain&DataElement[@publicId=106,@version=5.1]

https://cadsrapi.cancer.gov/invoke/caDSR/GetXML?query=PermissibleValue,ValueDomainPermissibleValue,ValueDomain&DataElement[@publicId=106,@latestVersionIndicator=Yes]