NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Enclosed contents of page in Lorenzo's custom macro instead of the standard numbered headings macro.

...

This page includes the following topics.

Custom nh
start-numbering-with2
start-numbering-ath2
Panel
titleContents of This Page

Table of Contents
maxLevel3

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

The following example finds a Form where Public ID = 2392775 and Version=1.0, displaying the basic metadata attributes. 

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

Code Block
https://cadsrapi.cancer.gov/invoke/caDSR/GetXML?query=Form[@publicId=2392775,@version=1]

Find a Form Using Only Public ID

The following example finds a Form with Public ID = 2392775, displaying the basic metadata attributes. Since the version is not known, this query can only be handled via a caDSR REST API query.

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

Code Block
https://cadsrapi.cancer.gov/invoke/caDSR/GetXML?query=Form[@publicId=2392775]

Find a Form Using Public ID, Display All Metadata Associated with Data Elements

The following example finds a Form with Public ID = 2392775, 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=Form[@publicId=2392775]&returnHeavyXML=true

Find All Forms Associated with Particular Data Element Public ID and Version

The following example finds all the Forms associated with the CDE with Public ID = 2183364, Version 1.0, displaying the basic metadata of the Form.

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

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

Get all Modules Associated with a Form Using Form Public ID

The following example gets all the modules for a form with Public ID = 2392775.

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

Code Block
https://cadsrapi.cancer.gov/invoke/caDSR/GetXML?query=Module&Form[@publicId=2392775,@version=1.0]

Get All the Questions for a Module Using Module Public ID and Version

The following example gets all the questions for a module with Public ID = 2392777 and version = 1.0.

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

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

Get All the Data Elements for Question Using Question Public ID and Version

The following example gets all the data elements for a question with Public ID = 2392779 and version = 1.0.

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

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

Retrieve a caDSR Form with All Its Collections ("Flattened")

The following caDSR II examples retrieve a caDSR form with all its collections, or "flattened". This means for a given form, the system returns all Modules, Questions, Valid Values and related instructions in one call. The system returns results as a JSON file. XML and HTML formats are not available for this query. You must specify a version. 

The following example retrieves a form without specifying a protocol:

Code Block
https://cadsrapi.cancer.gov/invoke/form.test/getJSON?query=Form[@publicId=7203785,@version=1]

The following example specifies a protocol: 

Code Block
https://cadsrapi.cancer.gov/invoke/form.test/getJSON?query=Form[Protocol[@preferredName=C3D%20ADOPTER%20TEMPLATES],@publicId=2392775,@version=1]

Return Form by Public ID and Protocol

The following caDSR II example retrieves forms with protocol by public ID.

Code Block
https://cadsrapi.cancer.gov/invoke/caDSR/GetXML?query=Form[Protocol[@preferredName=C3D ADOPTER TEMPLATES],@publicId=2392775]