Change the request body to a JSON document with these properties:
trial_ids: An array of one or more NCI IDs. (Replaces the current TrialIDs property.)
link_template: A string containing a template for the relative link to a single trial, including the search criteria parameters, but with the actual trial ID replaced by the text .
e.g. /about-cancer/treatment/clinical-trials/search/v?t=C3208&st=C3471&a=24&loc=1&z=20850&zp=100&rl=2&id=<TRIAL_ID>
<TRIAL_ID> is the literal string. The print service will replace this with the trial's NCI ID.
This is the template for a relative URL. The protocol and site hostname are omitted.
new_search_link: The server-relative path of the page the user should use for a new search.
This is either the basic or advanced search page, based on which search led to the result set being printed.
e.g. /about-cancer/treatment/clinical-trials/search/advanced
search_criteria: The JSON representation of the search application's search criteria object.
Criteria which have not been specified may either be omitted or set to NULL.
What's the current functionality?
The trial search criteria are passed as query string parameters.
The request body is a JSON document containing only a TrialIDs property consisting of an array of NCI IDs.
What's the updated acceptance criteria?
Scenario: Print request passes JSON request body for search without search criteria
Given the user navigates to "about-cancer/treatment/clinical-trials/search/r?loc=0&rl=1"
And the user selects the checkbox next to the first list item
And the user selects the checkbox next to the second list item
And the user selects the checkbox next to the third list item
And the user clicks the "Print Selected" button
Then the system makes a request to CTS.Print/GenCache
And the request has a JSON request body with the following key-value pairs
| Key | Value |
| trial_ids | [ firstItem.trialID, secondItem.trialID, thirdItem.trialID ] |
| link_template | /about-cancer/treatment/clinical-trials/search/v?loc=0&rl=1&id=<TRIAL_ID> |
| new_search_link | /about-cancer/treatment/clinical-trials/search |
| search_criteria | NULL |
Scenario: Print request passes JSON request body for search with search criteria
Given the user navigates to "about-cancer/treatment/clinical-trials/search/r?a=29&loc=1&rl=1&t=C4872&z=22202"
And the user selects the checkbox next to the first list item
And the user selects the checkbox next to the second list item
And the user selects the checkbox next to the third list item
And the user clicks the "Print Selected" button
Then the system makes a request to CTS.Print/GenCache
And the request has a JSON request body with the following key-value pairs
| Key | Value |
| trial_ids | [ firstItem.trialID, secondItem.trialID, thirdItem.trialID ] |
| link_template | /about-cancer/treatment/clinical-trials/search/v?a=29&loc=1&rl=1&t=C4872&z=22202&id=<TRIAL_ID> |
| new_search_link | /about-cancer/treatment/clinical-trials/search |
| search_criteria | <SEARCH_CRITERIA_OBJECT> |
Scenario: Print request passes JSON request body from basic search results
Given the user navigates to "about-cancer/treatment/clinical-trials/search/r?loc=0&rl=1"
And the user selects the checkbox next to the first list item
And the user selects the checkbox next to the second list item
And the user selects the checkbox next to the third list item
And the user clicks the "Print Selected" button
Then the system makes a request to CTS.Print/GenCache
And the request has a JSON request body with the key-value pairs
| Key | Value |
| new_search_link | /about-cancer/treatment/clinical-trials/search |
Scenario: Print request passes JSON request body from advanced search results
Given the user navigates to "about-cancer/treatment/clinical-trials/search/r?loc=0&rl=2"
And the user selects the checkbox next to the first list item
And the user selects the checkbox next to the second list item
And the user selects the checkbox next to the third list item
And the user clicks the "Print Selected" button
Then the system makes a request to CTS.Print/GenCache
And the request has a JSON request body with the key-value pairs
| Key | Value |
| new_search_link | /about-cancer/treatment/clinical-trials/search/advanced |
Issue description
Creating the print version of a search results page requires information the react application already has.
https://github.com/NCIOCPL/clinical-trials-search-print/wiki/HTTP-Request
What's the expected change?
trial_ids
: An array of one or more NCI IDs. (Replaces the currentTrialIDs
property.)link_template
: A string containing a template for the relative link to a single trial, including the search criteria parameters, but with the actual trial ID replaced by the text/about-cancer/treatment/clinical-trials/search/v?t=C3208&st=C3471&a=24&loc=1&z=20850&zp=100&rl=2&id=<TRIAL_ID>
<TRIAL_ID>
is the literal string. The print service will replace this with the trial's NCI ID.new_search_link
: The server-relative path of the page the user should use for a new search./about-cancer/treatment/clinical-trials/search/advanced
search_criteria
: The JSON representation of the search application's search criteria object.defaultSCOState
object.NULL
.What's the current functionality?
TrialIDs
property consisting of an array of NCI IDs.What's the updated acceptance criteria?
Additional details / screenshot
search_criteria
property has the same shape as thedefaultSCOState
objectRelated Tickets