Page History
...
Table of Contents | ||
---|---|---|
|
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 | ||
---|---|---|
| ||
You cannot enter multiple " |
(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.
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 title Retrieve Data Elements - Legacy https://cadsrapi.nci.nih.gov/cadsrapi4/GetXML?query=DataElement,DataElementConcept,ObjectClass,ConceptDerivationRule&ComponentConcept[Concept[@preferredName=C19448]][@primaryFlag=Yes]
Code Block title Retrieve 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 title Extension 1 [@primaryFlag=Yes]
Retrieve Data Elements with Property having the Primary Concept with the longName E-Mail Address.
Code Block title Retrieve 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 title Retrieve 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 2: EXTENSION 2: To 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 title Extension 2 - Legacy https://cadsrapi.nci.nih.gov/cadsrapi4/GetXML?query=DataElementConcept,Property,ConceptDerivationRule&ComponentConcept[Concept[@longName=E-mail%20Address]][@primaryFlag=Yes]
Code Block title Extension 2 - caDSR II https://cadsrapi.cancer.gov/caDSR5.0/GetXML?query=DataElementConcept,Property,ConceptDerivationRule&ComponentConcept[Concept[@longName=E-mail%20Address]][@primaryFlag=Yes]
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 title Retrieve 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
Code Block title Retrieve 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 | |||||||
---|---|---|---|---|---|---|---|
| |||||||
Example 14 - Retrieve All ClassSchemeClassSchemeItem Associated with ClassificationSchemeItem and ClassificationSchemeThe following example gets all
Legacy Example 14The URL for the results from the caDSR 4.1.x REST API is
|
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?
...