From e9f011e6e921467a20dc01f6d88ac9849a4b5b5b Mon Sep 17 00:00:00 2001 From: Paul Schmiedmayer Date: Sun, 5 May 2024 18:39:38 -0700 Subject: [PATCH] Load Trials from the NCI Trials API (#18) # Load Trials from the NCI Trials API ## :gear: Release Notes - Extends the OpenAPI Spec to include response details - Demonstrates loading trials using all example IDs provided in the API documentation ### Code of Conduct & Contributing Guidelines By submitting creating this pull request, you agree to follow our [Code of Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md): - [x] I agree to follow the [Code of Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md). --- .github/workflows/build-and-test.yml | 1 - NCIClinicalTrialsSearchAPI.json | 8959 +++++++++-------- .../.openapi-generator/FILES | 32 + .../OpenAPIClient/Classes/OpenAPIs/APIs.swift | 2 +- .../Classes/OpenAPIs/APIs/TrialsAPI.swift | 36 +- .../Classes/OpenAPIs/Models/Arm.swift | 44 + .../OpenAPIs/Models/CentralContact.swift | 44 + .../OpenAPIs/Models/Collaborators.swift | 36 + .../Classes/OpenAPIs/Models/Coordinates.swift | 36 + .../Classes/OpenAPIs/Models/Disease.swift | 56 + .../Classes/OpenAPIs/Models/Eligibility.swift | 36 + .../Classes/OpenAPIs/Models/Identifier.swift | 36 + .../OpenAPIs/Models/Intervention.swift | 60 + .../Classes/OpenAPIs/Models/Masking.swift | 52 + .../OpenAPIs/Models/OutcomeMeasure.swift | 44 + .../Classes/OpenAPIs/Models/Site.swift | 104 + .../OpenAPIs/Models/StatusHistory.swift | 36 + .../Models/StructuredEligibility.swift | 68 + .../Classes/OpenAPIs/Models/TrialDetail.swift | 260 + .../TrialDetailCollaboratorsInner.swift | 36 + .../OpenAPIs/Models/TrialResponse.swift | 36 + .../Models/UnstructuredEligibility.swift | 40 + NCIClinicalTrialsSearchAPI/README.md | 18 +- NCIClinicalTrialsSearchAPI/docs/Arm.md | 13 + .../docs/BiomarkersAPI.md | 2 +- .../docs/CentralContact.md | 13 + .../docs/Collaborators.md | 11 + .../docs/Coordinates.md | 11 + NCIClinicalTrialsSearchAPI/docs/Disease.md | 16 + .../docs/DiseasesAPI.md | 2 +- .../docs/Eligibility.md | 11 + NCIClinicalTrialsSearchAPI/docs/Identifier.md | 11 + .../docs/Intervention.md | 17 + .../docs/InterventionsAPI.md | 2 +- NCIClinicalTrialsSearchAPI/docs/Masking.md | 15 + .../docs/OrganizationsAPI.md | 2 +- .../docs/OutcomeMeasure.md | 13 + NCIClinicalTrialsSearchAPI/docs/Site.md | 28 + .../docs/StatusHistory.md | 11 + .../docs/StructuredEligibility.md | 19 + .../docs/TrialDetail.md | 67 + .../docs/TrialDetailCollaboratorsInner.md | 11 + .../docs/TrialResponse.md | 11 + NCIClinicalTrialsSearchAPI/docs/TrialsAPI.md | 20 +- .../docs/UnstructuredEligibility.md | 12 + OwnYourData.xcodeproj/project.pbxproj | 16 +- .../xcshareddata/swiftpm/Package.resolved | 124 +- .../xcschemes/OwnYourData.xcscheme | 4 +- OwnYourData/Account/AccountSetupHeader.swift | 4 +- .../ClinicalTrials/ClinicalTrialsView.swift | 64 + .../NICTrialsAPIDateFormatter.swift | 84 + OwnYourData/Home.swift | 4 +- .../Onboarding/AccountOnboarding.swift | 1 - 53 files changed, 6382 insertions(+), 4309 deletions(-) create mode 100644 NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Arm.swift create mode 100644 NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/CentralContact.swift create mode 100644 NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Collaborators.swift create mode 100644 NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Coordinates.swift create mode 100644 NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Disease.swift create mode 100644 NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Eligibility.swift create mode 100644 NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Identifier.swift create mode 100644 NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Intervention.swift create mode 100644 NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Masking.swift create mode 100644 NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/OutcomeMeasure.swift create mode 100644 NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Site.swift create mode 100644 NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/StatusHistory.swift create mode 100644 NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/StructuredEligibility.swift create mode 100644 NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/TrialDetail.swift create mode 100644 NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/TrialDetailCollaboratorsInner.swift create mode 100644 NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/TrialResponse.swift create mode 100644 NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/UnstructuredEligibility.swift create mode 100644 NCIClinicalTrialsSearchAPI/docs/Arm.md create mode 100644 NCIClinicalTrialsSearchAPI/docs/CentralContact.md create mode 100644 NCIClinicalTrialsSearchAPI/docs/Collaborators.md create mode 100644 NCIClinicalTrialsSearchAPI/docs/Coordinates.md create mode 100644 NCIClinicalTrialsSearchAPI/docs/Disease.md create mode 100644 NCIClinicalTrialsSearchAPI/docs/Eligibility.md create mode 100644 NCIClinicalTrialsSearchAPI/docs/Identifier.md create mode 100644 NCIClinicalTrialsSearchAPI/docs/Intervention.md create mode 100644 NCIClinicalTrialsSearchAPI/docs/Masking.md create mode 100644 NCIClinicalTrialsSearchAPI/docs/OutcomeMeasure.md create mode 100644 NCIClinicalTrialsSearchAPI/docs/Site.md create mode 100644 NCIClinicalTrialsSearchAPI/docs/StatusHistory.md create mode 100644 NCIClinicalTrialsSearchAPI/docs/StructuredEligibility.md create mode 100644 NCIClinicalTrialsSearchAPI/docs/TrialDetail.md create mode 100644 NCIClinicalTrialsSearchAPI/docs/TrialDetailCollaboratorsInner.md create mode 100644 NCIClinicalTrialsSearchAPI/docs/TrialResponse.md create mode 100644 NCIClinicalTrialsSearchAPI/docs/UnstructuredEligibility.md create mode 100644 OwnYourData/ClinicalTrials/NICTrialsAPIDateFormatter.swift diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index db98457..5be6784 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -37,7 +37,6 @@ jobs: with: artifactname: OwnYourData.xcresult runsonlabels: '["macOS", "self-hosted"]' - setupSimulators: true setupfirebaseemulator: true customcommand: "firebase emulators:exec 'fastlane test'" uploadcoveragereport: diff --git a/NCIClinicalTrialsSearchAPI.json b/NCIClinicalTrialsSearchAPI.json index 04cf0b9..788b928 100644 --- a/NCIClinicalTrialsSearchAPI.json +++ b/NCIClinicalTrialsSearchAPI.json @@ -1,4225 +1,4788 @@ { - "openapi":"3.0.0", - "info":{ - "version":"2.1.0", - "title":"NCI Clinical Trials Search API", - "description":"

For information on NCI's efforts to improve how patients and oncologists find information and learn about cancer clinical trials please visit:
https://www.cancer.gov/syndication/api

Fetching Daily Updates

Updates to the API are made daily (the refresh occurs each morning by 7:30 AM ET). The API does not do a diff to track changes, and there is no one field in the underlying database (that the API taps into) which captures when a trial has been modified. The best field to use to see which trials have possibly been changed in the past 24 hours is the record_verification_date field. This field is updated whenever a human auditor verifies a clinical trial record. It is important to note that verification does not necessarily imply that a change was made to the clinical trial record, simply that an auditor took another look at it - but this is inclusive of any instances where the auditor made modifications to the trial.

As an example, to see which clinical trials have been verified by an auditor since 2016-08-25...

Example: trials?record_verification_date_gte=2016-08-25


Authorization

To use API, an API key is required. Request API key


Issues

Please ask questions or report issues to ctrp_support@mail.nih.gov.

", - "termsOfService":"https://www.cancer.gov/syndication/api", - "license":{ - "name":"", - "url":"" - } - }, - "x-amazon-apigateway-integration-cors-headers":{ - "method.response.header.Access-Control-Allow-Methods":"'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT'", - "method.response.header.Access-Control-Allow-Headers":"'Content-Type,Authorization,X-Amz-Date,X-Api-Key,X-Amz-Security-Token'", - "method.response.header.Access-Control-Allow-Origin":"'*'" - }, - "tags":[ - { - "name":"Trials", - "description":"" - }, - { - "name":"Organizations", - "description":"" - }, - { - "name":"Interventions", - "description":"" - }, - { - "name":"Diseases", - "description":"" - }, - { - "name":"Biomarkers", - "description":"" - } - ], - "components":{ - "securitySchemes":{ - "ApiKeyAuth":{ - "type":"apiKey", - "in":"header", - "name":"X-API-KEY" - } - }, - "schemas":{ - "integer_1_to_999":{ - "type":"integer", - "minimum":1, - "maximum":999 - } - }, - "parameters":{ - "id":{ - "in":"query", - "name":"id", - "description":"Search by ID.", - "required":false, - "schema":{ - "type":"string" - } - }, - "trial_status":{ - "in":"query", - "name":"trial_status", - "description":"Possible value: OPEN \n(Equivalent to:
current_trial_status=active&current_trial_status=approved
&current_trial_status=enrolling by invitation
&current_trial_status=in review
&current_trial_status=temporarily closed to accrual
&current_trial_status=temporarily closed to accrual and intervention
&sites.recruitment_status=active&sites.recruitment_status=approved
&sites.recruitment_status=enrolling_by_invitation
&sites.recruitment_status=in_review
&sites.recruitment_status=temporarily_closed_to_accrual
&record_verification_date_gte=<date reflecting 2 years ago> )\n

In other words, for a trial to be considered "OPEN", current_trial_status must be one of:

and sites.recruitment_status must be one of:

and record_verification_date must be a date within the past two years

Currently does not work in combination with:\n embed_and_ and outer_or_ prepends.", - "required":false, - "schema":{ - "type":"string" + "openapi":"3.0.0", + "info":{ + "version":"2.1.0", + "title":"NCI Clinical Trials Search API", + "description":"

For information on NCI's efforts to improve how patients and oncologists find information and learn about cancer clinical trials please visit:
https://www.cancer.gov/syndication/api

Fetching Daily Updates

Updates to the API are made daily (the refresh occurs each morning by 7:30 AM ET). The API does not do a diff to track changes, and there is no one field in the underlying database (that the API taps into) which captures when a trial has been modified. The best field to use to see which trials have possibly been changed in the past 24 hours is the record_verification_date field. This field is updated whenever a human auditor verifies a clinical trial record. It is important to note that verification does not necessarily imply that a change was made to the clinical trial record, simply that an auditor took another look at it - but this is inclusive of any instances where the auditor made modifications to the trial.

As an example, to see which clinical trials have been verified by an auditor since 2016-08-25...

Example: trials?record_verification_date_gte=2016-08-25


Authorization

To use API, an API key is required. Request API key


Issues

Please ask questions or report issues to ctrp_support@mail.nih.gov.

", + "termsOfService":"https://www.cancer.gov/syndication/api", + "license":{ + "name":"", + "url":"" + } + }, + "x-amazon-apigateway-integration-cors-headers":{ + "method.response.header.Access-Control-Allow-Methods":"'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT'", + "method.response.header.Access-Control-Allow-Headers":"'Content-Type,Authorization,X-Amz-Date,X-Api-Key,X-Amz-Security-Token'", + "method.response.header.Access-Control-Allow-Origin":"'*'" + }, + "tags":[ + { + "name":"Trials", + "description":"" + }, + { + "name":"Organizations", + "description":"" + }, + { + "name":"Interventions", + "description":"" + }, + { + "name":"Diseases", + "description":"" + }, + { + "name":"Biomarkers", + "description":"" + } + ], + "components":{ + "securitySchemes":{ + "ApiKeyAuth":{ + "type":"apiKey", + "in":"header", + "name":"X-API-KEY" + } + }, + "schemas":{ + "integer_1_to_999":{ + "type":"integer", + "minimum":1, + "maximum":999 + }, + "TrialResponse": { + "type": "object", + "properties": { + "total": { + "type": "integer" }, - "examples":{ - "":{ - "value":"" - }, - "OPEN ":{ - "value":"OPEN" - }, - "Invalid value (search will result in 500 response code)":{ - "value":"SOMETHING" - } - } - }, - "size_small":{ - "in":"query", - "name":"size", - "description":"Limit the amount of results a supplied amount (default is 10, max is 50). Note that this parameter will be ignored when export parameter is passed.", - "required":false, - "schema":{ - "type":"integer", - "minimum":1, - "maximum":50 + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TrialDetail" + } } - }, - "size":{ - "in":"query", - "name":"size", - "description":"Not using the size parameter, by default, will give you ALL the results AND, in addition, will give you the 'total' field in the results, with the total count of the results. Once you do use the size parameter however, the number of results will be according to the size specified, AND, in addition, the 'total' field will not exist in your results.", - "required":false, - "schema":{ - "type":"integer", - "minimum":1, - "maximum":100 - } - }, - "order":{ - "in":"query", - "name":"order", - "description":"Asc or Desc. Required when using sort.", - "required":false, - "schema":{ - "type":"string" + } + }, + "TrialDetail": { + "type": "object", + "properties": { + "other_ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Identifier" + } }, - "examples":{ - "":{ - "value":"" - }, - "ascending order":{ - "value":"asc" - }, - "descending order":{ - "value":"desc" - } - } - }, - "from":{ - "in":"query", - "name":"from", - "description":"Starting from nth position of results lineup. Start the results from a supplied starting point (default is 0).", - "required":false, - "schema":{ - "type":"integer", - "minimum":1 - } - }, - "current_trial_status":{ - "in":"query", - "name":"current_trial_status", - "description":"", - "required":false, - "schema":{ - "type":"string" + "amendment_date": { + "type": "string", + "format": "date" }, - "examples":{ - "":{ - "value":"" - }, - "Active":{ - "value":"Active" - }, - "Administratively Complete":{ - "value":"Administratively Complete" - }, - "Approved":{ - "value":"Approved" - }, - "Closed to Accrual":{ - "value":"Closed to Accrual" - }, - "Closed to Accrual and Intervention":{ - "value":"Closed to Accrual and Intervention" - }, - "Complete":{ - "value":"Complete" - }, - "INACTIVE":{ - "value":"INACTIVE" - }, - "Enrolling by Invitation":{ - "value":"Enrolling by Invitation" - }, - "Temporarily Closed to Accrual and Intervention":{ - "value":"Temporarily Closed to Accrual and Intervention" - }, - "Temporarily Closed to Accrual":{ - "value":"Temporarily Closed to Accrual" - }, - "In Review":{ - "value":"In Review" - }, - "Withdrawn":{ - "value":"Withdrawn" - } - } - }, - "export":{ - "in":"query", - "name":"export", - "description":"Export all query results into a file. The data will be available to download using a link that will arrive by email.
Supported formats are JSON (export=json) and Excel (export=xls).
Requires email parameter. See also optional filename parameter. Note that size parameter will be ignored during exports.", - "required":false, - "schema":{ - "type":"string" + "keywords": { + "type": ["string", "null"] }, - "examples":{ - "":{ - "value":"" - }, - "Export in JSON format":{ - "value":"json" - }, - "excel (xls)":{ - "value":"xls" - }, - "Invalid value (search will result in 400 response code)":{ - "value":"SOMETHING" - } - } - }, - "filename":{ - "in":"query", - "name":"filename", - "description":"To be used with export to indicate the beginning of the file name for exported data.
If omitted, filename will start with \"report\".", - "required":false, - "schema":{ - "type":"string" - } - }, - "email":{ - "in":"query", - "name":"email", - "description":"Required when using export to indicate the email address for exported data.", - "required":false, - "schema":{ - "type":"string" - } - }, - "generic_contact":{ - "in":"query", - "name":"generic_contact", - "description":"", - "required":false, - "schema":{ - "type":"string" + "dcp_id": { + "type": ["string", "null"] + }, + "interventional_model": { + "type": "string" + }, + "lead_org": { + "type": "string" + }, + "eligibility": { + "$ref": "#/components/schemas/Eligibility" + }, + "sites": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Site" + } + }, + "completion_date_type_code": { + "type": "string" + }, + "detail_description": { + "type": "string" + }, + "official_title": { + "type": "string" + }, + "_phase_sort_order": { + "type": "integer" + }, + "collaborators": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Collaborators" + } + }, + "associated_studies": { + "type": "array", + "items": { + "type": "string" + } + }, + "outcome_measures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OutcomeMeasure" + } + }, + "phase": { + "type": "string" + }, + "central_contact": { + "$ref": "#/components/schemas/CentralContact" + }, + "primary_purpose": { + "type": "string" + }, + "number_of_arms": { + "type": "integer" + }, + "_study_protocol_type_sort_order": { + "type": "integer" + }, + "nct_id": { + "type": "string" + }, + "biomarkers": { + "type": "array", + "items": { + "type": "string" + } + }, + "classification_code": { + "type": ["string", "null"] + }, + "current_trial_status_date": { + "type": "string", + "format": "date" + }, + "diseases": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Disease" + } + }, + "_primary_purpose_sort_order": { + "type": "integer" + }, + "protocol_id": { + "type": "string" + }, + "active_sites_count": { + "type": "integer" + }, + "lead_org_cancer_center": { + "type": ["string", "null"] + }, + "arms": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Arm" + } + }, + "study_model_code": { + "type": ["string", "null"] + }, + "nci_id": { + "type": "string" + }, + "why_study_stopped": { + "type": ["string", "null"] + }, + "brief_summary": { + "type": "string" + }, + "brief_title": { + "type": "string" + }, + "status_history": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StatusHistory" + } + }, + "study_population_description": { + "type": ["string", "null"] + }, + "sampling_method_code": { + "type": ["string", "null"] + }, + "minimum_target_accrual_number": { + "type": "integer" + }, + "prior_therapy": { + "type": "array", + "items": { + "type": "string" + } + }, + "_current_trial_status_sort_order": { + "type": "integer" + }, + "start_date": { + "type": "string", + "format": "date" + }, + "record_verification_date": { + "type": "string", + "format": "date" + }, + "ctep_id": { + "type": "string" + }, + "current_trial_status": { + "type": "string" + }, + "study_model_other_text": { + "type": ["string", "null"] + }, + "masking": { + "$ref": "#/components/schemas/Masking" + }, + "acronym": { + "type": ["string", "null"] + }, + "nci_programs": { + "type": "array", + "items": { + "type": "string" + } + }, + "nci_funded": { + "type": "string" + }, + "anatomic_sites": { + "type": "array", + "items": { + "type": "string" + } + }, + "ccr_id": { + "type": ["string", "null"] + }, + "start_date_type_code": { + "type": "string" + }, + "principal_investigator": { + "type": "string" + }, + "study_source": { + "type": "string" + }, + "completion_date": { + "type": "string", + "format": "date" + }, + "study_subtype_code": { + "type": ["string", "null"] + }, + "study_protocol_type": { + "type": "string" } - }, - "sites.generic_contact":{ - "in":"query", - "name":"sites.generic_contact", - "description":"", - "required":false, - "schema":{ - "type":"string" + } + }, + "Identifier": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" } - }, - "lead_org_cancer_center":{ - "in":"query", - "name":"lead_org_cancer_center", - "description":"Search by Lead Org Cancer Center", - "required":false, - "schema":{ - "type":"string" + } + }, + "Site": { + "type": "object", + "properties": { + "org_state_or_province": { + "type": "string" + }, + "contact_name": { + "type": "string" + }, + "contact_phone": { + "type": "string" + }, + "recruitment_status_date": { + "type": "string", + "format": "date" + }, + "org_address_line_2": { + "type": ["string", "null"] + }, + "org_va": { + "type": "boolean" + }, + "org_address_line_1": { + "type": "string" + }, + "org_tty": { + "type": ["string", "null"] + }, + "org_family": { + "type": ["string", "null"] }, - "examples":{ - "":{ - "value":"" - }, - "Mayo Clinic Cancer Center":{ - "value":"Mayo Clinic Cancer Center" - }, - "Alvin J. Siteman Cancer Center":{ - "value":"Alvin J. Siteman Cancer Center" - }, - "University of Chicago Comprehensive Cancer Center":{ - "value":"University of Chicago Comprehensive Cancer Center" - }, - "MD Anderson Cancer Center":{ - "value":"MD Anderson Cancer Center" - }, - "Roswell Park Cancer Institute":{ - "value":"Roswell Park Cancer Institute" - }, - "Stanford Cancer Institute":{ - "value":"Stanford Cancer Institute" - } + "org_postal_code": { + "type": "string" + }, + "contact_email": { + "type": "string" + }, + "recruitment_status": { + "type": "string" + }, + "org_city": { + "type": "string" + }, + "org_email": { + "type": ["string", "null"] + }, + "org_country": { + "type": "string" + }, + "org_fax": { + "type": "string" + }, + "org_phone": { + "type": "string" + }, + "org_name": { + "type": "string" + }, + "org_coordinates": { + "$ref": "#/components/schemas/Coordinates" } - }, - "nci_funded":{ - "in":"query", - "name":"nci_funded", - "description":"Search by NCI funded", - "required":false, - "schema":{ - "type":"string" + } + }, + "Coordinates": { + "type": "object", + "properties": { + "lon": { + "type": "number" }, - "examples":{ - "":{ - "value":"" - }, - "Indirect":{ - "value":"Indirect" - }, - "Direct":{ - "value":"Direct" - }, - "No":{ - "value":"No" - } + "lat": { + "type": "number" } - } - }, - "responses":{ - "badReq":{ - "description":"Error Bad Request", - "headers":{ - "Access-Control-Allow-Origin":{ - "allowEmptyValue":true, - "example":"http://127.0.0.1", - "schema":{ - "type":"string" - } - } + } + }, + "Collaborators": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "National Cancer Institute" + }, + "functional_role": { + "type": "string", + "example": "FUNDING_SOURCE" + } + } + }, + "Eligibility": { + "type": "object", + "properties": { + "unstructured": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UnstructuredEligibility" + } }, - "content":{ - "application/json":{ - "schema":{ - "type":"object", - "properties":{ - "code":{ - "description":"HTTP status code 400 - Bad Request", - "type":"integer", - "format":"int64", - "x-go-name":"Code" - } - } - } - } + "structured": { + "$ref": "#/components/schemas/StructuredEligibility" } - }, - "forbiddenReq":{ - "description":"Error Forbidden", - "content":{ - "application/json":{ - "schema":{ - "type":"object", - "properties":{ - "code":{ - "description":"HTTP status code 403 - Forbidden", - "type":"integer", - "format":"int64", - "x-go-name":"Code" - } - } - } - } + } + }, + "UnstructuredEligibility": { + "type": "object", + "properties": { + "inclusion_indicator": { + "type": "boolean" + }, + "display_order": { + "type": "integer" + }, + "description": { + "type": "string" } - }, - "notFoundReq":{ - "description":"Error Not Found", - "content":{ - "application/json":{ - "schema":{ - "type":"object", - "properties":{ - "code":{ - "description":"HTTP status code 404 - Not Found", - "type":"integer", - "format":"int64", - "x-go-name":"Code" - } - } - } - } + } + }, + "StructuredEligibility": { + "type": "object", + "properties": { + "max_age": { + "type": "string" + }, + "max_age_number": { + "type": "integer" + }, + "min_age_unit": { + "type": "string" + }, + "max_age_unit": { + "type": "string" + }, + "max_age_in_years": { + "type": "integer" + }, + "gender": { + "type": "string" + }, + "accepts_healthy_volunteers": { + "type": "boolean" + }, + "min_age": { + "type": "string" + }, + "min_age_number": { + "type": "integer" + }, + "min_age_in_years": { + "type": "integer" } - }, - "okResp":{ - "description":"Success response", - "content":{ - "application/json":{ - "schema":{ - "type":"object", - "properties":{ - "code":{ - "description":"HTTP status code 200 - OK", - "type":"integer", - "format":"int64", - "x-go-name":"Code" - } - } - } - } + } + }, + "OutcomeMeasure": { + "type": "object", + "properties": { + "timeframe": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type_code": { + "type": "string" } - } - } - }, - "servers":[ - { - "url":"https://clinicaltrialsapi-int.cancer.gov/api/v2", - "description":"INT Server" - }, - { - "url":"https://clinicaltrialsapi-stage.cancer.gov/api/v2", - "description":"UAT Server" - }, - { - "url":"https://clinicaltrialsapi.cancer.gov/v2", - "description":"Production Server" - }, - { - "url":"http://127.0.0.1:3000/v2", - "description":"Local Test Server" - } - ], - "paths":{ - "/trials/{id}":{ - "get":{ - "tags":[ - "Trials" - ], - "summary":"Get One Trial", - "security":[ - { - "ApiKeyAuth":[ - - ] - } - ], - "description":"

GET trials<id>



Retrieves the clinical trial with supplied nci_id or nct_id. All fields (including nested ones) are returned.


", - "operationId":"getTrialById", - "parameters":[ - { - "in":"path", - "name":"id", - "description":"NCI ID or NCT ID of Trial.", - "required":true, - "schema":{ - "type":"string" - }, - "examples":{ - "valid nci_id: NCI-2019-02616":{ - "value":"NCI-2019-02616" - }, - "valid nct_id: NCT03386721":{ - "value":"NCT03386721" - }, - "non-existent nci_id: NCI-2014-99999 (will result in 404 response code)":{ - "value":"NCI-2014-99999" - }, - "non-existent nct_id: NCT99999999 (will result in 404 response code)":{ - "value":"NCT99999999" - }, - "nci_id 15-00414":{ - "value":"NCI-2015-00414" - }, - "nci_id 16-00376":{ - "value":"NCI-2016-00376" - }, - "nci_id 16-00469":{ - "value":"NCI-2016-00469" - }, - "nci_id 17-00679":{ - "value":"NCI-2017-00679" - }, - "nci_id 18-02229":{ - "value":"NCI-2018-02229" - }, - "nci_id 16-01319":{ - "value":"NCI-2016-01319" - }, - "nci_id 16-01435":{ - "value":"NCI-2016-01435" - }, - "nci_id 17-00223":{ - "value":"NCI-2017-00223" - }, - "nct_id 03391791":{ - "value":"NCT03391791" - }, - "NCT02369029":{ - "value":"NCT02369029" - }, - "NCT02877862":{ - "value":"NCT02877862" - }, - "NCT02565758":{ - "value":"NCT02565758" - }, - "NCT03110159":{ - "value":"NCT03110159" - }, - "NCT02896907":{ - "value":"NCT02896907" - }, - "NCT02816697":{ - "value":"NCT02816697" - }, - "NCT03092856":{ - "value":"NCT03092856" - } - } - } - ], - "responses":{ - "200":{ - "description":"Trial details for the given id.", - "headers":{ - "Access-Control-Allow-Origin":{ - "allowEmptyValue":true, - "example":"http://127.0.0.1", - "schema":{ - "type":"string" - } - } - } - }, - "404":{ - "description":"Not found." - }, - "400":{ - "description":"Bad Request." - }, - "500":{ - "description":"An exception occurred at the backend." - }, - "502":{ - "description":"An exception occurred at the backend." - } + } + }, + "CentralContact": { + "type": "object", + "properties": { + "phone": { + "type": ["string", "null"] + }, + "name": { + "type": ["string", "null"] + }, + "type": { + "type": ["string", "null"] + }, + "email": { + "type": ["string", "null"] } - } - }, - "/trials":{ - "get":{ - "tags":[ - "Trials" - ], - "summary":"Search Trials by GET", - "security":[ - { - "ApiKeyAuth":[ - - ] - } - ], - "description":"

GET trials?<filter_params>


This endpoint filters all clinical trials based upon supplied filter params. Filter params may be any of the fields in the schema and others for more filtering capabilities as described below.

<field_param>: filter results by examining a field by it's default search setting. For example a boolean field will expect true/false, number fields expect numbers and text fields expect text fields. Note that most SHORT text fields are by default set to be searched by exact match except they are case insensive, while LONG text fields like descriptions are by default set to be searched by fulltext as described below. Should one need to search differently, for example by typeahead or exact match including case, the options for doing such are listed below.

<field_param>._fulltext: (note . before _) filter results by examining a field for occurrence of a 'word' equal to the given value or a variation of it.

Example: sites.org_name._fulltext=clinic will find records with org_name: "Sanford Clinic North-Fargo" and "University of Kansas Clinical Research Center" - as the word "clinical" is a variation of the word "clinic".

If you provide a multi-word value, it breaks the given value into words and apply an \"and\" condition regardless of order.

For example: brief_title._fulltext=breast%20cancer will search for records with both "breast" and "cancer" in the brief_title field, in any order.

<field_param>._auto: filter results by examining the beginning of each word for the given value.

Example: lead_org._auto=roches will find records with "University of Rochester NCORP Research Base".

Note: lead_org._fulltext=roches will find "Hoffmann-La Roche" (because roches appears to be plural of roche), but will not find fields containing the word "Rochester", because it's not a variation of "roches".

Multi-word values are not broken into words. The exact given value is applied to the beginning of any word in the field, to create an \"autocomplete\" feature.

<field_param>._raw: filter results by exact, case sensitive match of the field for the given value.


When supplying an array of values for a single filter param, please use the following convention: trials?<field_param>=<field_value_a>&<field_param>=<field_value_b> and note that string field values are not case sensitive (must otherwise must match exactly).

Example: trials?sites.org_state_or_province=CA&sites.org_state_or_province=OR


Prior Therapy Searches

When searching in the trials Endpoint with multiple values for Prior Therapy, the following parameters in the API will treat the values as an OR condition and will return data that satisfies at least one of the condition being searched: inclusion_indicator, name, nci_thesaurus_concept_id, parents, synonyms, type, ancestor_ids

Example


Date and Number Range Searches

For field params which are filtering as ranges (date and long types), please supply _gte or _lte to the end of the field param (depending on if you are filtering on greater than or equal (gte), less than or equal (lte), or both):
trials?<field_param>_gte=<field_value_from>&<field_param>_lte=<field_value_to>

Example: trials?record_verification_date_gte=2016-08-25


Filtering Out Values

Appending _not to a parameter creates a NOT condition. Unlike normally (without the _not), where an OR condition is created, for _not parameters, multiple _not values of the same fields creates an AND condition between them.

Example: trials?current_trial_status_not=Active¤t_trial_status_not=Complete&nci_id_not=NCI-2017-01522

This request will return trials where (the current status is NOT Active AND current status is NOT Complete) AND nci_id is not NCI-2017-01522)


Embedded Searches

Prepending embed_and_ creates a whole new search within a search to give you an embedded AND condition for all the parameters with the prepend. Up to 6 embedded searches are allowed.

Example: trials?sites.org_country=Canada&keyword=Breast Cancer&embed_and_keyword=OSU-14078&embed_and_keyword_field=ccr_id&embed_and_keyword_field=ctep_id&embed_and_keyword_field=dcp_id &embed_and_keyword_field=nci_id&embed_and_keyword_field=nct_id&embed_and_keyword_field=other_ids.value &embed_and_keyword_field=protocol_id&embed_and_embed_and_sites.org_country=Uganda

In this search we have three searches (2 of them embedded) joined with an AND condition due to this embedment:

1. ...there is a match for the keyword search for Breast Cancer using our default configuration for keyword searches, and with a site in Canada.
AND
2. ...there is a match for the keyword search for OSU-14078 using a custom configuration of the keyword fields (rather than using the default)
AND
3. ... there is a site located in Uganda


Parallel Searches

Prepending outer_or_ creates a whole new parallel search with an OR condition between the searches for all the parameters with the prepend. Up to 6 parallel searches are allowed.

Example: trials?lead_org=Breast Cancer Institute&outer_or_diseases.name._fulltext=Breast Cancer&outer_or_outer_or_sites.org_name=Dana Breast Cancer Institute

In this search we have three parallel searches joined with an OR condition:

...the lead organization is Breast Cancer Institute
OR
...the trial has a disease where the disease name is Breast Cancer
OR
...one of the sites has org name \u201cDana Breast Cancer Institute\u201d


Negating Searches

Prepending outer_not_ creates a whole new search for all the parameters with the prepend and then negates the entire query or subquery.

Example: trials?current_trial_status=ACTIVE&primary_purpose=TREATMENT&eligibility.structured.gender=BOTH&diseases.is_lead_disease=true&diseases.nci_thesaurus_concept_id=C4872&embed_and_outer_not_diseases.nci_thesaurus_concept_id=C71732&embed_and_outer_not_diseases.is_lead_disease=true&embed_and_embed_and_outer_not_diseases.nci_thesaurus_concept_id=C53556&embed_and_embed_and_outer_not_diseases.is_lead_disease=true

In this search:

...all the active trials with treatment as the primary purpose accepting both genders where breast cancer (C4872) is a lead disease, And where Triple-Negative Breast Cancer (C71732) is NOT a lead disease, And HER2 Positive Breast Carcinoma (C53556) is NOT a lead disease.


Disease Type Filters

The disease elements in the trials have been tagged by one or more of five different types: maintype, subtype, stage, grade and finding. The API allows users to search by type.

Example: trials?include=none&grade=C9137&grade=C3641&maintype=C4872&maintype=C4878

This request will return trials with (Breast Cancer [C4872] OR Lung Cancer [C4878]) AND (Combined Small Cell Lung Cancer [C9137] OR Stage 0 Breast Cancer [C3641])


Field Aggregations

Aggregations of fields is accomplished by parameter agg_field and supports progressive trials filtering

This functionality is only available at the trials end point. Trials results are given and as usual total and data always belong to the results of the trials search, and within that, Aggregations results are listed in the results under \u201caggregations\u201d field under the trials results. All fields like aggregations.doc_count, refer to the aggregations.

Available Filters for Field Aggregations:

agg_name: If text\u2026. Auto complete for key must match given value. Note that this typeahead functionality is currently not available for the anatomic_sites field.
agg_min_count: doc_count for a given key must be a minimum of a given number amount (this filter will not lower key doc_count)

The \"size\" and \"from\" parameter enhancements for aggregations apply when: aggregations are requested for the trial endpoint, and the parameter\u00a0\"include = none\" is specified. For this request, as before, no trial data is returned and CTS API will return the entire set of the aggregations\u00a0as\u00a0bound by the \"size\" and \"from\" parameters (if included in request).

If the aggregations' request is made for the trials endpoint and the include parameter is not included and/or specified to include data fields (e.g., include=nci_id) then the \"size\" and \"from\" parameters as before apply to the data returned rather than the aggregations.

For Sorting Field Aggregations:

agg_field_sort Default set to 'name'. Currently works only for values name and count.
agg_field_order Default set to 'asc' (alphabetical order) when agg_field_sort is not specified and defaulted to name. Otherwise currently works only for values asc and desc.

Example: /api/v2/trials?agg_field=lead_org&current_trial_status=Active&agg_name=Anderson&include=nci_id&size=1
{\n
      \"total\": 6180,            ← number of trials where the current trial status is Active\n
      \"data\": [{                  ← other data relating to trials from the trails filters\n
           \"nci_id\": \"NCI-2015-01918\" \n
      }],\n
      \"aggregations\": {       ← From 6180 trials we made aggregations and filtered to autocomplete lead_org of “Anderson”\n
           \"doc_count\": 491, ← # of trials where the current trial status is Active that meet the criteria of “Anderson” for aggregations\n
           \"lead_org\": [{        ← actual aggregations for lead org\n
                     \"key\": \"M D Anderson Cancer Center\",    ← key that qualified for the filter\n
                     \"doc_count\": 484    ← actual trials count for lead org with key\n
                },\n
                {\n
                     \"key\": \"University of Texas MD Anderson Cancer Center LAO\",\n
                     \"doc_count\": 7\n
                }\n
          ]\n
     }\n
}


Default Sort Order of Trials


Deprecations

_fulltext: DEPRECATED. Use keyword instead which is configured with the same fields by default.

_fulltext: DEPRECATED. Use ._fulltext where available, as described above.

_trialids: DEPRECATED. Use trial_ids


Below are some examples of filters for trials and configurations of results.

If you are crafting more complicated queries, it might be best to use the POST endpoint of the same name.


", - "operationId":"searchTrialsByGet", - "parameters":[ - { - "$ref":"#/components/parameters/size_small" - }, - { - "$ref":"#/components/parameters/from" - }, - { - "in":"query", - "name":"sort", - "description":"The 'Default Sort Order of Trials' described above, can be overwritten by this param which allows a sort by field. Sorting should be available on most fields as long as they are sortable (i.e not available on objects and list/array fields and fields with list/array parent).
\nNote here that by sorting with the following number fields: ... allows the user to sort by number assigned to a value mapped, as described under the 'Default Sort Order of Trials' section, rather than sorting by alphabetical order of the string values which may have limited value to some.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "use default":{ - "value":"" - }, - "_study_protocol_type_sort_order":{ - "value":"_study_protocol_type_sort_order" - }, - "_primary_purpose_sort_order":{ - "value":"_primary_purpose_sort_order" - }, - "_phase_sort_order":{ - "value":"_phase_sort_order" - }, - "_current_trial_status_sort_order":{ - "value":"_current_trial_status_sort_order" - }, - "nci_id":{ - "value":"nci_id" - }, - "nct_id":{ - "value":"nct_id" - }, - "current_trial_status":{ - "value":"current_trial_status" - }, - "study_protocol_type":{ - "value":"study_protocol_type" - }, - "brief_title":{ - "value":"brief_title" - }, - "official_title":{ - "value":"official_title" - }, - "study_source":{ - "value":"study_source" - }, - "minimum_target_accrual_number":{ - "value":"minimum_target_accrual_number" - }, - "amendment_date":{ - "value":"amendment_date" - }, - "current_trial_status_date":{ - "value":"current_trial_status_date" - }, - "record_verification_date":{ - "value":"record_verification_date" - }, - "eligibility.structured.min_age_in_years":{ - "value":"eligibility.structured.min_age_in_years" - }, - "eligibility.structured.max_age_in_years":{ - "value":"eligibility.structured.max_age_in_years" - }, - "eligibility.structured.min_age_number":{ - "value":"eligibility.structured.min_age_number" - }, - "eligibility.structured.max_age_number":{ - "value":"eligibility.structured.max_age_number" - } - } - }, - { - "$ref":"#/components/parameters/order" - }, - { - "in":"query", - "name":"missing", - "description":"Filter by empty results (i.e by nulls, missing fields, empty array)", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "sites":{ - "value":"sites" - }, - "acronym":{ - "value":"acronym" - }, - "brief_title":{ - "value":"brief_title" - }, - "current_trial_status":{ - "value":"current_trial_status" - } - } - }, - { - "in":"query", - "name":"exists", - "description":"Filter by opposite of missing, and search for existence of field with value", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "sites":{ - "value":"sites" - }, - "acronym":{ - "value":"acronym" - }, - "brief_title":{ - "value":"brief_title" - }, - "current_trial_status":{ - "value":"current_trial_status" - } - } - }, - { - "in":"query", - "name":"include", - "description":"Include only the supplied filter param fields in all results (useful if you want to minimize the payload returned). Use multiple times to include multiple fields.
\nValue DEFAULT is a shortcut to include the following fields: nci_id, nct_id, brief_title, sites.org_name, sites.org_postal_code, eligibility.structured, current_trial_status, sites.org_va, sites.org_country, sites.org_state_or_province, sites.org_city, sites.org_coordinates, sites.recruitment_status and diseases.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "all fields":{ - "value":"" - }, - "no data; just get the count":{ - "value":"none" - }, - "default fields":{ - "value":"DEFAULT" - }, - "nci_id only":{ - "value":"nci_id" - }, - "nct_id only":{ - "value":"nct_id" - }, - "phase":{ - "value":"nct_id" - }, - "current_trial_status":{ - "value":"current_trial_status" - }, - "sites.org_name":{ - "value":"sites.org_name" - }, - "sites.contact_name":{ - "value":"sites.contact_name" - } - } - }, - { - "in":"query", - "name":"exclude", - "description":"Exclude the supplied filter param fields from all results (useful if you want most of the payload returned with the exception of a few fields). Use multiple times to exclude multiple fields. If using with include param, and values are found in both, fields in these values will be included in the results.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "all fields (don't exclude any)":{ - "value":"" - }, - "sites":{ - "value":"sites" - }, - "diseases":{ - "value":"diseases" - } - } - }, - { - "$ref":"#/components/parameters/export" - }, - { - "$ref":"#/components/parameters/email" - }, - { - "$ref":"#/components/parameters/filename" - }, - { - "in":"query", - "name":"_fulltext", - "description":"DEPRECATED. Use keyword together with keyword_field instead.", - "deprecated":true, - "schema":{ - "type":"string" - } - }, - { - "in":"query", - "name":"_fulltext", - "description":"DEPRECATED. Use ._fulltext where available, described above.", - "deprecated":true, - "schema":{ - "type":"string" - } - }, - { - "in":"query", - "name":"_trialids", - "description":"DEPRECATED. Use trial_ids instead.", - "deprecated":true, - "required":false, - "schema":{ - "type":"string" - } - }, - { - "in":"query", - "name":"trial_ids", - "description":"Filter results by examining trial identifiers (ccr_id, ctep_id, dcp_id, nci_id, nct_id, other_ids.value, protocol_id).\n\nExample: trials?trial_ids=nci-2011&trial_ids=NCT00", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "nci-2011":{ - "value":"nci-2011" - }, - "NCT00":{ - "value":"NCT00" - } - } - }, - { - "in":"query", - "name":"keyword", - "description":"Text to be searched in multiple fields. It can be combined with keyword_field.

keyword filter results by examining a variety of text-based fields (By default: *_id, other_ids.value, diseases.name._fulltext, diseases.synonyms._fulltext, brief_title, brief_summary, official_title, detail_description, official_title, brief_title, brief_summary, diseases.name._fulltext, detail_description, sites.org_name._fulltext, collaborators.name._fulltext, principal_investigator._fulltext, sites.contact_name._fulltext, sites.org_city._fulltext, sites.org_state_or_province._fulltext, arms.interventions.name, arms.interventions.synonyms, biomarkers.name, biomarkers.synonyms, prior_therapy.name, prior_therapy.synonyms).

Mutiple keywords (with a maximum of 10 allowed) will give you an OR condition of between values in all configured fields.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "example search keyword: breast cancer":{ - "value":"breast cancer" - } - } - }, - { - "in":"query", - "name":"keyword_field", - "description":"Field(s) to be searched for the text provided in keyword. Use multiple times; once for each field to be searched. For example:
keyword_field=brief_title._fulltext&keyword_field=lead_org._auto. Use keyword_field to override the default fields used by keyword. A maximum of 10 fields is currently allowed.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "brief_title._fulltext":{ - "value":"brief_title._fulltext" - }, - "lead_org._auto":{ - "value":"lead_org._auto" - } - } - }, - { - "in":"query", - "name":"agg_field", - "description":"Field to be used for aggregation. ", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "lead_org":{ - "value":"lead_org" - }, - "current_trial_status":{ - "value":"current_trial_status" - } - } - }, - { - "in":"query", - "name":"agg_name", - "description":"Filter aggregation (use with agg_field). Autocomplete of this value must match the value of the field in agg_field.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Anderson":{ - "value":"Anderson" - } - } - }, - { - "in":"query", - "name":"agg_min_count", - "description":"Filter aggregation (use with agg_field). The number of documents (doc_count) for a given key (agg_field) must be a minimum of a given number amount (this filter will not lower key doc_count).", - "required":false, - "schema":{ - "type":"integer", - "minimum":1 - } - }, - { - "in":"query", - "name":"sites.org_name._fulltext", - "description":"Filter results by examining words that make up organization name e.g 'Mayo'.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Mayo":{ - "value":"Mayo" - }, - "Paducah":{ - "value":"Paducah" - }, - "Green Bay Oncology":{ - "value":"Green Bay Oncology" - }, - "Saint Vincent Hospital":{ - "value":"Saint Vincent Hospital" - } - } - }, - { - "$ref":"#/components/parameters/trial_status" - }, - { - "$ref":"#/components/parameters/nci_funded" - }, - { - "in":"query", - "name":"nci_id", - "description":"Search by NCI ID.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "valid nci_id: NCI-2019-02616":{ - "value":"NCI-2019-02616" - }, - "non-existent nci_id: NCI-2014-99999 (will find 0 results)":{ - "value":"NCI-2014-99999" - }, - "nci_id 16-00376":{ - "value":"NCI-2016-00376" - }, - "nci_id 15-00414":{ - "value":"NCI-2015-00414" - } - } - }, - { - "in":"query", - "name":"nct_id", - "description":"Search by NCT ID.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "valid nct_id: NCT03386721":{ - "value":"NCT03386721" - }, - "non-existent nct_id: NCT99999999 (will find 0 results)":{ - "value":"NCT99999999" - } - } - }, - { - "in":"query", - "name":"protocol_id", - "description":"Search by Protocol ID.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "BNT411-01":{ - "value":"BNT411-01" - }, - "NU 19B03":{ - "value":"NU 19B03" - }, - "2018-0104":{ - "value":"2018-0104" - }, - "AALL1732":{ - "value":"AALL1732" - }, - "CCT5001":{ - "value":"CCT5001" - }, - "ENT0065":{ - "value":"ENT0065" - }, - "14-396":{ - "value":"14-396" - }, - "2015-0835":{ - "value":"2015-0835" - } - } - }, - { - "in":"query", - "name":"ccr_id", - "description":"Search by CCR ID. (No examples available.)", - "required":false, - "schema":{ - "type":"string" - } - }, - { - "in":"query", - "name":"ctep_id", - "description":"Search by CTEP ID", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "A011401":{ - "value":"A011401" - }, - "E4512":{ - "value":"E4512" - }, - "EAY131":{ - "value":"EAY131" - }, - "A081105":{ - "value":"A081105" - }, - "NRG-BR003":{ - "value":"NRG-BR003" - }, - "EA5163":{ - "value":"EA5163" - }, - "A011202":{ - "value":"A011202" - }, - "A081801":{ - "value":"A081801" - }, - "A021703":{ - "value":"A021703" - }, - "S1609":{ - "value":"S1609" - }, - "EA1131":{ - "value":"EA1131" - }, - "A031501":{ - "value":"A031501" - }, - "EA9161":{ - "value":"EA9161" - }, - "NRG-GY009":{ - "value":"NRG-GY009" - }, - "S1418":{ - "value":"S1418" - }, - "A041702":{ - "value":"A041702" - }, - "A031704":{ - "value":"A031704" - }, - "S1801":{ - "value":"S1801" - }, - "S1613":{ - "value":"S1613" - }, - "NRG-GI005":{ - "value":"NRG-GI005" - }, - "S1815":{ - "value":"S1815" - }, - "EA6134":{ - "value":"EA6134" - }, - "EA5181":{ - "value":"EA5181" - }, - "A021502":{ - "value":"A021502" - }, - "EA8153":{ - "value":"EA8153" - }, - "NRG-GY019":{ - "value":"NRG-GY019" - }, - "A051701":{ - "value":"A051701" - }, - "NSABP-B-51":{ - "value":"NSABP-B-51" - }, - "EA3161":{ - "value":"EA3161" - }, - "EA1181":{ - "value":"EA1181" - }, - "NRG-BR004":{ - "value":"NRG-BR004" - }, - "S1826":{ - "value":"S1826" - }, - "EAA173":{ - "value":"EAA173" - }, - "A031702":{ - "value":"A031702" - }, - "S1803":{ - "value":"S1803" - }, - "EA2142":{ - "value":"EA2142" - }, - "EA2186":{ - "value":"EA2186" - }, - "EA6141":{ - "value":"EA6141" - }, - "S1712":{ - "value":"S1712" - }, - "NRG-LU003":{ - "value":"NRG-LU003" - }, - "AGCT1531":{ - "value":"AGCT1531" - }, - "EA3132":{ - "value":"EA3132" - }, - "EA6174":{ - "value":"EA6174" - }, - "EA5191":{ - "value":"EA5191" - }, - "S1929":{ - "value":"S1929" - }, - "EA2182":{ - "value":"EA2182" - }, - "EA4181":{ - "value":"EA4181" - }, - "GOG-0263":{ - "value":"GOG-0263" - }, - "EA2187":{ - "value":"EA2187" - }, - "S1608":{ - "value":"S1608" - } - } - }, - { - "in":"query", - "name":"dcp_id", - "description":"Search by DCP ID. (No examples available.)", - "required":false, - "schema":{ - "type":"string" - } - }, - { - "$ref":"#/components/parameters/current_trial_status" - }, - { - "in":"query", - "name":"phase", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "I":{ - "value":"I" - }, - "II":{ - "value":"II" - }, - "II_III":{ - "value":"II_III" - }, - "III":{ - "value":"III" - } - } - }, - { - "in":"query", - "name":"study_protocol_type", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Interventional":{ - "value":"Interventional" - } - } - }, - { - "in":"query", - "name":"nci_programs", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "NCORP (NCI Community Oncology Research Program)":{ - "value":"NCORP" - }, - "NCTN (National Clinical Trials Network)":{ - "value":"NCTN" - }, - "ETCTN (Experimental Therapeutics Clinical Trials Network)":{ - "value":"ETCTN" - } - } - }, - { - "in":"query", - "name":"brief_title", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Weight Loss Interventions":{ - "value":"Weight Loss Interventions" - }, - "Breast Cancer Recurrence":{ - "value":"Breast Cancer Recurrence" - }, - "Advanced Refractory Solid Tumors":{ - "value":"Advanced Refractory Solid Tumors" - }, - "Rare Tumors":{ - "value":"Rare Tumors" - }, - "Chronic Lymphocytic Leukemia":{ - "value":"Chronic Lymphocytic Leukemia" - }, - "Irinotecan Hydrochloride":{ - "value":"Irinotecan Hydrochloride" - } - } - }, - { - "in":"query", - "name":"brief_summary", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Weight Loss Interventions":{ - "value":"Weight Loss Interventions" - }, - "Breast Cancer Recurrence":{ - "value":"Breast Cancer Recurrence" - }, - "Advanced Refractory Solid Tumors":{ - "value":"Advanced Refractory Solid Tumors" - }, - "Rare Tumors":{ - "value":"Rare Tumors" - }, - "Chronic Lymphocytic Leukemia":{ - "value":"Chronic Lymphocytic Leukemia" - }, - "Irinotecan Hydrochloride":{ - "value":"Irinotecan Hydrochloride" - } - } - }, - { - "in":"query", - "name":"official_title", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Weight Loss Interventions":{ - "value":"Weight Loss Interventions" - }, - "Breast Cancer Recurrence":{ - "value":"Breast Cancer Recurrence" - }, - "Advanced Refractory Solid Tumors":{ - "value":"Advanced Refractory Solid Tumors" - }, - "Rare Tumors":{ - "value":"Rare Tumors" - }, - "Chronic Lymphocytic Leukemia":{ - "value":"Chronic Lymphocytic Leukemia" - }, - "Irinotecan Hydrochloride":{ - "value":"Irinotecan Hydrochloride" - } - } - }, - { - "in":"query", - "name":"primary_purpose", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "TREATMENT":{ - "value":"TREATMENT" - } - } - }, - { - "in":"query", - "name":"accepts_healthy_volunteers_indicator", - "description":"DEPRECATED. Use eligibility.structured.accepts_healthy_volunteers instead.", - "deprecated":true, - "required":false, - "schema":{ - "type":"string" - } - }, - { - "in":"query", - "name":"eligibility.structured.accepts_healthy_volunteers", - "description":"", - "required":false, - "schema":{ - "type":"boolean" - }, - "examples":{ - "":{ - "value":"" - }, - "true":{ - "value":"true" - }, - "false":{ - "value":"false" - } - } - }, - { - "in":"query", - "name":"acronym", - "description":"", - "required":false, - "schema":{ - "type":"string" - } - }, - { - "in":"query", - "name":"amendment_date", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "2019-07-18T00:00:00":{ - "value":"2019-07-18T00:00:00" - }, - "2020-11-10T00:00:00":{ - "value":"2020-11-10T00:00:00" - }, - "2020-11-18":{ - "value":"2020-11-18" - }, - "2020-10-22":{ - "value":"2020-10-22" - }, - "2019-08-15":{ - "value":"2019-08-15" - }, - "2014-09-15":{ - "value":"2014-09-15" - } - } - }, - { - "in":"query", - "name":"anatomic_sites", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Non-Hodgkin's Lymphoma":{ - "value":"Non-Hodgkin's Lymphoma" - }, - "Stomach":{ - "value":"Stomach" - }, - "Esophagus":{ - "value":"Esophagus" - }, - "Brain and Nervous System":{ - "value":"Brain and Nervous System" - }, - "Lung":{ - "value":"Lung" - }, - "Pancreas":{ - "value":"Pancreas" - }, - "Kidney":{ - "value":"Kidney" - }, - "Multiple":{ - "value":"Multiple" - } - } - }, - { - "in":"query", - "name":"arms.description", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Patients undergo radiation therapy once daily":{ - "value":"undergo radiation therapy once daily" - }, - "Patients undergo observation":{ - "value":"Patients undergo observation" - }, - "Patients receive standard of care carboplatin":{ - "value":"Patients receive standard of care carboplatin" - }, - "Patients undergo 3D-CRT":{ - "value":"Patients undergo 3D-CRT" - }, - "Patients receive chemoradiotherapy":{ - "value":"Patients receive chemoradiotherapy" - } - } - }, - { - "in":"query", - "name":"arms.name", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Arm I":{ - "value":"Arm I" - }, - "Arm A":{ - "value":"Arm A" - }, - "Low Risk Group":{ - "value":"Low Risk Group" - }, - "High Risk Group":{ - "value":"High Risk Group" - }, - "radiation therapy":{ - "value":"radiation therapy" - } - } - }, - { - "in":"query", - "name":"arms.type", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "EXPERIMENTAL":{ - "value":"EXPERIMENTAL" - }, - "PLACEBO_COMPARATOR":{ - "value":"PLACEBO_COMPARATOR" - }, - "ACTIVE_COMPARATOR":{ - "value":"ACTIVE_COMPARATOR" - } - } - }, - { - "in":"query", - "name":"arms.interventions.nci_thesaurus_concept_id", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "C81934":{ - "value":"C81934" - }, - "C349":{ - "value":"C349" - }, - "C491":{ - "value":"C491" - }, - "C408":{ - "value":"C408" - }, - "C633":{ - "value":"C633" - } - } - }, - { - "in":"query", - "name":"arms.interventions.description", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Patients undergo radiation therapy once daily":{ - "value":"undergo radiation therapy once daily" - }, - "Patients undergo observation":{ - "value":"Patients undergo observation" - }, - "Patients receive standard of care carboplatin":{ - "value":"Patients receive standard of care carboplatin" - }, - "Patients undergo 3D-CRT":{ - "value":"Patients undergo 3D-CRT" - }, - "Patients receive chemoradiotherapy":{ - "value":"Patients receive chemoradiotherapy" - } - } - }, - { - "in":"query", - "name":"arms.interventions.name", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Ibrutinib":{ - "value":"Ibrutinib" - }, - "Carmustine":{ - "value":"Carmustine" - }, - "Etoposide":{ - "value":"Etoposide" - }, - "Cytarabine":{ - "value":"Cytarabine" - }, - "Melphalan":{ - "value":"Melphalan" - }, - "Pharmacogenomic Study":{ - "value":"Pharmacogenomic Study" - } - } - }, - { - "in":"query", - "name":"arms.interventions.type", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Drug":{ - "value":"Drug" - }, - "Procedure / Surgery":{ - "value":"Procedure / Surgery" - }, - "Other":{ - "value":"Other" - } - } - }, - { - "in":"query", - "name":"arms.interventions.synonyms", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Imbruvica":{ - "value":"Imbruvica" - }, - "Lastet":{ - "value":"Lastet" - }, - "Melphalanum":{ - "value":"Melphalanum" - }, - "Anti-Tumor Agents":{ - "value":"Anti-Tumor Agents" - }, - "Anti-Cancer Agents":{ - "value":"Anti-Cancer Agents" - }, - "Enzyme Antagonist":{ - "value":"Enzyme Antagonist" - }, - "Immunosuppressive Agents":{ - "value":"Immunosuppressive Agents" - } - } - }, - { - "in":"query", - "name":"associated_studies.study_id", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "NCI-2015-00668":{ - "value":"NCI-2015-00668" - }, - "NCI-2014-02057":{ - "value":"NCI-2014-02057" - }, - "NCI-2017-01251":{ - "value":"NCI-2017-01251" - } - } - }, - { - "in":"query", - "name":"associated_studies.study_id_type", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "NCI":{ - "value":"NCI" - } - } - }, - { - "in":"query", - "name":"eligibility.structured.gender", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "BOTH":{ - "value":"BOTH" - }, - "FEMALE":{ - "value":"FEMALE" - }, - "MALE":{ - "value":"MALE" - } - } - }, - { - "in":"query", - "name":"eligibility.structured.min_age_in_years_lte", - "description":"", - "required":false, - "schema":{ - "$ref":"#/components/schemas/integer_1_to_999" - } - }, - { - "in":"query", - "name":"eligibility.structured.min_age_in_years_gte", - "description":"", - "required":false, - "schema":{ - "$ref":"#/components/schemas/integer_1_to_999" - } - }, - { - "in":"query", - "name":"eligibility.structured.max_age_in_years_lte", - "description":"", - "required":false, - "schema":{ - "$ref":"#/components/schemas/integer_1_to_999" - } - }, - { - "in":"query", - "name":"eligibility.structured.max_age_in_years_gte", - "description":"", - "required":false, - "schema":{ - "$ref":"#/components/schemas/integer_1_to_999" - } - }, - { - "in":"query", - "name":"eligibility.structured.min_age_unit", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Years":{ - "value":"Years" - }, - "Months":{ - "value":"Months" - } - } - }, - { - "in":"query", - "name":"eligibility.structured.min_age_number_lte", - "description":"", - "required":false, - "schema":{ - "$ref":"#/components/schemas/integer_1_to_999" - } - }, - { - "in":"query", - "name":"eligibility.structured.min_age_number_gte", - "description":"", - "required":false, - "schema":{ - "$ref":"#/components/schemas/integer_1_to_999" - } - }, - { - "in":"query", - "name":"eligibility.structured.max_age_unit", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Years":{ - "value":"Years" - }, - "Months":{ - "value":"Months" - } - } - }, - { - "in":"query", - "name":"eligibility.structured.max_age_number_lte", - "description":"", - "required":false, - "schema":{ - "$ref":"#/components/schemas/integer_1_to_999" - } - }, - { - "in":"query", - "name":"eligibility.structured.max_age_number_gte", - "description":"", - "required":false, - "schema":{ - "$ref":"#/components/schemas/integer_1_to_999" - } - }, - { - "in":"query", - "name":"current_trial_status_date_lte", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "2020-11-18":{ - "value":"2020-11-18" - }, - "2020-10-22":{ - "value":"2020-10-22" - }, - "2019-08-15":{ - "value":"2019-08-15" - }, - "2014-09-15":{ - "value":"2014-09-15" - } - } - }, - { - "in":"query", - "name":"current_trial_status_date_gte", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "2020-11-18":{ - "value":"2020-11-18" - }, - "2020-10-22":{ - "value":"2020-10-22" - }, - "2019-08-15":{ - "value":"2019-08-15" - }, - "2014-09-15":{ - "value":"2014-09-15" - } - } - }, - { - "in":"query", - "name":"record_verification_date_lte", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "2020-11-18":{ - "value":"2020-11-18" - }, - "2020-10-22":{ - "value":"2020-10-22" - }, - "2019-08-15":{ - "value":"2019-08-15" - }, - "2014-09-15":{ - "value":"2014-09-15" - } - } - }, - { - "in":"query", - "name":"record_verification_date_gte", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "2020-11-18":{ - "value":"2020-11-18" - }, - "2020-10-22":{ - "value":"2020-10-22" - }, - "2019-08-15":{ - "value":"2019-08-15" - }, - "2014-09-15":{ - "value":"2014-09-15" - } - } - }, - { - "in":"query", - "name":"sites.org_coordinates_lat", - "description":"Organization's Latitude - for example: 43.7029. Geolocation Search only works to find sites in the United States.", - "required":false, - "schema":{ - "type":"number", - "minimum":-999, - "maximum":999 - }, - "examples":{ - "":{ - "value":"" - }, - "43.7029":{ - "value":"43.7029" - } - } - }, - { - "in":"query", - "name":"sites.org_coordinates_lon", - "description":"Organization's Longitude - for example: -72.2895. Geolocation Search only works to find sites in the United States.", - "required":false, - "schema":{ - "type":"number", - "minimum":-999, - "maximum":999 - }, - "examples":{ - "":{ - "value":"" - }, - "-72.2895":{ - "value":"-72.2895" - } - } - }, - { - "in":"query", - "name":"sites.org_coordinates_dist", - "description":"The radius around the provided zip code. Accepts these units of measurements [NM, nmi, nauticalmiles, mi, miles, yd, yards, ft, feet, in, inch, km, kilometers, cm, centimeters, mm, milimeters, m, meters]. If not provided defaults to 25mi.

Use of invalid postal codes, or non-US postal codes will return a 400 error.", - "required":false, - "schema":{ - "type":"string" - } - }, - { - "in":"query", - "name":"sites.contact_email", - "description":"", - "required":false, - "schema":{ - "type":"string" - } - }, - { - "in":"query", - "name":"sites.contact_name", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Anthony John Jaslowski":{ - "value":"Anthony John Jaslowski" - }, - "Dwight L. Fitch":{ - "value":"Dwight L. Fitch" - }, - "Site Public Contact":{ - "value":"Site Public Contact" - } - } - }, - { - "in":"query", - "name":"sites.contact_name._auto", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Anthony John Jaslowski":{ - "value":"Anthony John Jaslowski" - }, - "Dwight L. Fitch":{ - "value":"Dwight L. Fitch" - }, - "Site Public Contact":{ - "value":"Site Public Contact" - } - } - }, - { - "in":"query", - "name":"sites.contact_name._raw", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Anthony John Jaslowski":{ - "value":"Anthony John Jaslowski" - }, - "Dwight L. Fitch":{ - "value":"Dwight L. Fitch" - }, - "Site Public Contact":{ - "value":"Site Public Contact" - } - } - }, - { - "in":"query", - "name":"sites.contact_phone", - "description":"", - "required":false, - "schema":{ - "type":"string" - } - }, - { - "in":"query", - "name":"sites.org_address_line_1", - "description":"", - "required":false, - "schema":{ - "type":"string" - } - }, - { - "in":"query", - "name":"sites.org_address_line_2", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Suite 100":{ - "value":"Suite 100" - }, - "MIND Building Suite 110":{ - "value":"MIND Building Suite 110" - }, - "MidOalkland Medical Center Suite 106":{ - "value":"MidOalkland Medical Center Suite 106" - } - } - }, - { - "in":"query", - "name":"sites.org_city", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Antwerpen":{ - "value":"Antwerpen" - }, - "Aurora":{ - "value":"Aurora" - }, - "Bern":{ - "value":"Bern" - }, - "Montreal":{ - "value":"Montreal" - }, - "Vienna":{ - "value":"Vienna" - }, - "Villejuif":{ - "value":"Villejuif" - }, - "Winnipeg":{ - "value":"Winnipeg" - } - } - }, - { - "in":"query", - "name":"sites.org_postal_code", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Washington DC":{ - "value":"20470" - }, - "Bethesda Maryland":{ - "value":"20890" - }, - "Groningen Netherlands":{ - "value":"9700 GZ" - }, - "Montreal Canada":{ - "value":"H2L 4M1" - }, - "Rockville Maryland":{ - "value":"20850-2062" - }, - "Aurora Colorado":{ - "value":"80012" - } - } - }, - { - "in":"query", - "name":"sites.org_state_or_province", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "AL - Alabama":{ - "value":"AL" - }, - "CA - California":{ - "value":"CA" - }, - "CO - Colorado":{ - "value":"CO" - }, - "DC - District of Columbia":{ - "value":"DC" - }, - "FL - Florida":{ - "value":"FL" - }, - "MD - Maryland":{ - "value":"MD" - }, - "NY - New York":{ - "value":"NY" - }, - "WI - Wisconsin":{ - "value":"WI" - }, - "Ontario":{ - "value":"Ontario" - } - } - }, - { - "in":"query", - "name":"sites.org_country", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Canada":{ - "value":"Canada" - }, - "Italy":{ - "value":"Italy" - }, - "Netherlands":{ - "value":"Netherlands" - }, - "Switzerland":{ - "value":"Switzerland" - }, - "United States":{ - "value":"United States" - } - } - }, - { - "in":"query", - "name":"sites.org_country._raw", - "description":"Country name (case sensitive)", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Canada":{ - "value":"Canada" - }, - "Italy":{ - "value":"Italy" - }, - "Netherlands":{ - "value":"Netherlands" - }, - "Switzerland":{ - "value":"Switzerland" - }, - "United States":{ - "value":"United States" - } - } - }, - { - "in":"query", - "name":"sites.org_email", - "description":"", - "required":false, - "schema":{ - "type":"string" - } - }, - { - "in":"query", - "name":"sites.org_family", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Mayo Clinic Cancer Center":{ - "value":"Mayo Clinic Cancer Center" - }, - "Alvin J. Siteman Cancer Center":{ - "value":"Alvin J. Siteman Cancer Center" - }, - "University of Chicago Comprehensive Cancer Center":{ - "value":"University of Chicago Comprehensive Cancer Center" - }, - "MD Anderson Cancer Center":{ - "value":"MD Anderson Cancer Center" - }, - "Roswell Park Cancer Institute":{ - "value":"Roswell Park Cancer Institute" - }, - "Stanford Cancer Institute":{ - "value":"Stanford Cancer Institute" - } - } - }, - { - "in":"query", - "name":"sites.org_fax", - "description":"", - "required":false, - "schema":{ - "type":"string" - } - }, - { - "in":"query", - "name":"sites.org_name", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Alegemeen Ziekenhuis Middelheim, Antwerpen Belgium":{ - "value":"Alegemeen Ziekenhuis Middelheim" - }, - "Cancer Trials Support Unit, Rockville Maryland":{ - "value":"Cancer Trials Support Unit" - }, - "CancerCare Manitoba, Winnipeg Canada":{ - "value":"CancerCare Manitoba" - }, - "Henry Ford Hospital, Detroit MI":{ - "value":"Henry Ford Hospital" - }, - "Centre Leon Berard, Lyon France":{ - "value":"Centre Leon Berard" - } - } - }, - { - "in":"query", - "name":"sites.org_name._auto", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Alegemeen Ziekenhuis Middelheim, Antwerpen Belgium":{ - "value":"Alegemeen Ziekenhuis Middelheim" - }, - "Cancer Trials Support Unit, Rockville Maryland":{ - "value":"Cancer Trials Support Unit" - }, - "CancerCare Manitoba, Winnipeg Canada":{ - "value":"CancerCare Manitoba" - }, - "Henry Ford Hospital, Detroit MI":{ - "value":"Henry Ford Hospital" - }, - "Centre Leon Berard, Lyon France":{ - "value":"Centre Leon Berard" - } - } - }, - { - "in":"query", - "name":"sites.org_name._raw", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Alegemeen Ziekenhuis Middelheim, Antwerpen Belgium":{ - "value":"Alegemeen Ziekenhuis Middelheim" - }, - "Cancer Trials Support Unit, Rockville Maryland":{ - "value":"Cancer Trials Support Unit" - }, - "CancerCare Manitoba, Winnipeg Canada":{ - "value":"CancerCare Manitoba" - }, - "Henry Ford Hospital, Detroit MI":{ - "value":"Henry Ford Hospital" - }, - "Centre Leon Berard, Lyon France":{ - "value":"Centre Leon Berard" - } - } - }, - { - "in":"query", - "name":"sites.org_phone", - "description":"", - "required":false, - "schema":{ - "type":"string" - } - }, - { - "in":"query", - "name":"sites.recruitment_status", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "ACTIVE":{ - "value":"ACTIVE" - }, - "INACTIVE":{ - "value":"INACTIVE" - }, - "CLOSED_TO_ACCRUAL":{ - "value":"CLOSED_TO_ACCRUAL" - }, - "TEMPORARILY_CLOSED_TO_ACCRUAL":{ - "value":"TEMPORARILY_CLOSED_TO_ACCRUAL" - } - } - }, - { - "in":"query", - "name":"sites.recruitment_status_date", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "2020-11-18":{ - "value":"2020-11-18" - }, - "2020-10-22":{ - "value":"2020-10-22" - }, - "2019-08-15":{ - "value":"2019-08-15" - }, - "2014-09-15":{ - "value":"2014-09-15" - } - } - }, - { - "in":"query", - "name":"sites.recruitment_status_date_lte", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "2020-11-18":{ - "value":"2020-11-18" - }, - "2020-10-22":{ - "value":"2020-10-22" - }, - "2019-08-15":{ - "value":"2019-08-15" - }, - "2014-09-15":{ - "value":"2014-09-15" - } - } - }, - { - "in":"query", - "name":"sites.recruitment_status_date_gte", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "2020-11-18":{ - "value":"2020-11-18" - }, - "2020-10-22":{ - "value":"2020-10-22" - }, - "2019-08-15":{ - "value":"2019-08-15" - }, - "2014-09-15":{ - "value":"2014-09-15" - } - } - }, - { - "$ref":"#/components/parameters/lead_org_cancer_center" - } - ], - "responses":{ - "200":{ - "description":"The list of results matching given search criteria." - }, - "400":{ - "description":"Bad Request." - }, - "500":{ - "description":"An exception occurred at the backend." - }, - "502":{ - "description":"An exception occurred at the backend." - } + } + }, + "Arm": { + "type": "object", + "properties": { + "interventions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Intervention" + } + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" } - }, - "post":{ - "tags":[ - "Trials" - ], - "summary":"Search Trials by POST", - "security":[ - { - "ApiKeyAuth":[ - - ] - } - ], - "description":"

POST trials

Same as the GET endpoint, but allows you to craft a JSON body as the request.

Example:

curl -XPOST 'https://clinicaltrialsapi.cancer.gov/v2/trials' -H 'Content-Type: application/json' -d '{
\"sites.org_state_or_province\": [\"CA\", \"OR\"],
\"record_verification_date_gte\": \"2016-06-01\",
\"include\": [\"nci_id\"]
}'
", - "operationId":"searchTrialsByPost", - "requestBody":{ - "description":"Query in JSON format", - "required":true, - "content":{ - "application/json":{ - "schema":{ - "type":"object" - }, - "examples":{ - "":{ - "value":"" - }, - "Organizations in CO or OR since 2016-06-01, show only nci_id and nct_id":{ - "value":{ - "sites.org_state_or_province":[ - "CA", - "OR" - ], - "record_verification_date_gte":"2016-06-01", - "include":[ - "nci_id", - "nct_id" - ] - } - }, - "equivalent of \"_trial_ids=OSU-14078\" from v1":{ - "value":{ - "keyword":"OSU-14078", - "keyword_field":[ - "ccr_id", - "ctep_id", - "dcp_id", - "nci_id", - "nct_id", - "other_ids.value", - "protocol_id" - ], - "include":[ - "ccr_id", - "ctep_id", - "dcp_id", - "nci_id", - "nct_id", - "other_ids.value", - "protocol_id" - ] - } - }, - "Search for \"breast cancer\" in brief title or in lead_org":{ - "value":{ - "keyword":"breast cancer", - "keyword_field":[ - "brief_title._fulltext", - "lead_org._auto" - ], - "include":[ - "nci_id", - "nct_id", - "brief_title", - "lead_org" - ] - } - }, - "Export all trial information as json file":{ - "value":{ - "export":"true", - "export_type":"json", - "filename":"all_trials", - "email":"user@your-email.com" - } - }, - "Export nci_id, brief title, and lead organization information for all trials related to breast cancer as excel file":{ - "value":{ - "export":"true", - "export_type":"excel", - "filename":"breast_cancer_trials", - "email":"user@your-email.com", - "keyword":"breast cancer", - "include":[ - "nci_id", - "brief_title", - "lead_org" - ] - } - } - } - } - } + } + }, + "Intervention": { + "type": "object", + "properties": { + "inclusion_indicator": { + "type": "string" + }, + "synonyms": { + "type": "array", + "items": { + "type": "string" + } + }, + "nci_thesaurus_concept_id": { + "type": "string" }, - "responses":{ - "200":{ - "description":"The list of results matching given search criteria." - }, - "400":{ - "description":"Bad Request." - }, - "500":{ - "description":"Exception occurred at the backend (except EntityNotFoundException)." - }, - "502":{ - "description":"An exception occurred at the backend." - } + "name": { + "type": "string" + }, + "description": { + "type": ["string", "null"] + }, + "type": { + "type": "string" + }, + "category": { + "type": "string" + }, + "parents": { + "type": "array", + "items": { + "type": "string" + } } - } - }, - "/interventions":{ - "get":{ - "tags":[ - "Interventions" - ], - "summary":"Search Interventions by GET", - "security":[ - { - "ApiKeyAuth":[ - - ] - } - ], - "description":"

GET interventions?<filter_params>

The interventions endpoint is intended for typeaheads and other use cases where it is necessary to search for available interventions which can later be used to filter clinical trial results. Interventions are matched partially by supplying a string to the name field and may be filtered by other fields through parameters described below. Results are sorted by a combination of in alphabetical order by default i.e sort is set to name and order is set to asc.

Example interventions?category=agent%20category&name=Therapeutic

Progressive Filtering functionality: All trial fields parameters described at the /trials endpoint are usable here to filter the trials from which you want to aggregate. For example, if you request /interventions?maintype=C4872 this will give you all interventions that are in trials where Breast Cancer(C4872) is among the diseases in each trial. Note that maintype is a trials endpoint parameter related to diseases.nci_thesaurus_concept_id.

When searching in the interventions Endpoint with multiple values for the following parameters (codes, category, type), API will treat values as an OR condition and will return data that contains one or the other that is being searched.

Examples

codes and code parameters will be used interchangeably within CTS API V2


", - "operationId":"searchInterventionsByGet", - "parameters":[ - { - "in":"query", - "name":"name", - "description":"Note that name checks for values assigned to name as well as values assigned to synonyms.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "D-Glucose-1,2-13C2":{ - "value":"D-Glucose-1,2-13C2" - }, - "Carcinoma":{ - "value":"Carcinoma" - }, - "Acute Lymphoblastic Leukemia in Remission":{ - "value":"Acute Lymphoblastic Leukemia in Remission" - }, - "Cutaneous Mastocytosis":{ - "value":"Cutaneous Mastocytosis" - }, - "Cutaneous Angiosarcoma":{ - "value":"Cutaneous Angiosarcoma" - }, - "1,2-Carbon C 13-labeled Glucose":{ - "value":"1,2-Carbon C 13-labeled Glucose" - }, - "Monoclonal Antibody":{ - "value":"Monoclonal Antibody" - }, - "Antineoplastic Antibody":{ - "value":"Antineoplastic Antibody" - }, - "Baltaleucel":{ - "value":"Baltaleucel" - }, - "Basiliximab":{ - "value":"Basiliximab" - }, - "Cancer Vaccine":{ - "value":"Cancer Vaccine" - }, - "Chemoradiotherapy":{ - "value":"Chemoradiotherapy" - }, - "Computer-Assisted":{ - "value":"Computer-Assisted" - }, - "Computer-Assisted Smoking Cessation Intervention":{ - "value":"Computer-Assisted Smoking Cessation Intervention" - }, - "Diary":{ - "value":"Diary" - }, - "EGFR":{ - "value":"EGFR" - }, - "EGFR-targeting Agent":{ - "value":"EGFR-targeting Agent" - }, - "Flaxseed":{ - "value":"Flaxseed" - }, - "Gemcitabine":{ - "value":"Gemcitabine" - }, - "Intubation":{ - "value":"Intubation" - }, - "Music Therapy":{ - "value":"Music Therapy" - }, - "PDGFR":{ - "value":"PDGFR" - }, - "Polyvalent":{ - "value":"Polyvalent" - }, - "Psychosocial":{ - "value":"Psychosocial" - }, - "Scale":{ - "value":"Scale" - }, - "Smoking":{ - "value":"Smoking" - }, - "Study":{ - "value":"Study" - }, - "Thalidomide":{ - "value":"Thalidomide" - }, - "Vaccin":{ - "value":"Vaccin" - }, - "Zalifrelimab":{ - "value":"Zalifrelimab" - } - } - }, - { - "in":"query", - "name":"category", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "none":{ - "value":"none" - }, - "agent":{ - "value":"agent" - }, - "agent category":{ - "value":"agent category" - }, - "other":{ - "value":"other" - } - } - }, - { - "in":"query", - "name":"type", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "behavioral":{ - "value":"behavioral" - }, - "biological":{ - "value":"biological" - }, - "biological/vaccine":{ - "value":"biological/vaccine" - }, - "drug":{ - "value":"drug" - }, - "genetic":{ - "value":"genetic" - }, - "procedure":{ - "value":"procedure" - }, - "procedure/surgery":{ - "value":"procedure/surgery" - }, - "radiation":{ - "value":"radiation" - }, - "surgery":{ - "value":"surgery" - }, - "vaccine":{ - "value":"vaccine" - }, - "other":{ - "value":"other" - } - } - }, - { - "in":"query", - "name":"codes", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "C82414":{ - "value":"C82414" - }, - "C171257":{ - "value":"C171257" - }, - "C129967":{ - "value":"C129967" - }, - "C17934":{ - "value":"C17934" - }, - "C124648":{ - "value":"C124648" - }, - "C94726":{ - "value":"C94726" - }, - "C274":{ - "value":"C274" - }, - "C130058":{ - "value":"C130058" - }, - "C62533":{ - "value":"C62533" - }, - "C3588":{ - "value":"C3588" - }, - "C3211":{ - "value":"C3211" - }, - "C3208":{ - "value":"C3208" - }, - "C131085":{ - "value":"C131085" - }, - "C27134":{ - "value":"C27134" - }, - "C27859":{ - "value":"C27859" - } - } - }, - { - "in":"query", - "name":"include", - "description":"Include only this field(s) in trials and exclude others. Use multiple times to include multiple fields. (Useful if you want to minimize the payload returned)", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "all fields":{ - "value":"" - }, - "no data; just get the count":{ - "value":"none" - }, - "name":{ - "value":"name" - }, - "category":{ - "value":"category" - }, - "codes":{ - "value":"codes" - }, - "type":{ - "value":"type" - }, - "synonyms":{ - "value":"synonyms" - }, - "count":{ - "value":"count" - } - } - }, - { - "in":"query", - "name":"sort", - "description":"Default set to 'name'. Currently works only for name and count.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "use default":{ - "value":"" - }, - "name":{ - "value":"name" - }, - "count":{ - "value":"count" - }, - "category (Not available. Will result in 400 response code)":{ - "value":"category" - }, - "code (Not available. Will result in 400 response code)":{ - "value":"code" - }, - "type (Not available. Will result in 400 response code)":{ - "value":"type" - }, - "parent_ids (Not available. Will result in 400 response code)":{ - "value":"parent_ids" - } - } - }, - { - "$ref":"#/components/parameters/order" - }, - { - "$ref":"#/components/parameters/size" - } - ], - "responses":{ - "200":{ - "description":"The list matching given search criteria." - }, - "400":{ - "description":"Bad Request." - }, - "500":{ - "description":"An exception occurred at the backend." - }, - "502":{ - "description":"An exception occurred at the backend." - } + } + }, + "Disease": { + "type": "object", + "properties": { + "inclusion_indicator": { + "type": "string" + }, + "is_lead_disease": { + "type": "boolean" + }, + "synonyms": { + "type": "array", + "items": { + "type": "string" + } + }, + "nci_thesaurus_concept_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "array", + "items": { + "type": "string" + } + }, + "parents": { + "type": "array", + "items": { + "type": "string" + } } - } - }, - "/diseases":{ - "get":{ - "tags":[ - "Diseases" - ], - "summary":"Search Diseases by GET", - "security":[ - { - "ApiKeyAuth":[ - - ] - } - ], - "description":"

GET diseases?<filter_params>

The diseases endpoint is intended for typeaheads and other use cases where it is necessary to search for available diseases which can later be used to filter clinical trial results. Diseases are matched partially by supplying a string to the name field and may be filtered by other fields through parameters described below. Results are sorted by a combination of in alphabetical order by default i.e sort is set to name and order is set to asc.

Example: diseases?type_not=subtype&type=maintype&name=He

Progressive Filtering functionality: All trial fields parameters described at the /trials endpoint are usable here to filter the trials from which you want to aggregate. For example, if you request /diseases?maintype=C4872 this will give you all diseases that are in trials where Breast Cancer(C4872) is among the diseases in each trial. Note that maintype is a trials endpoint parameter related to diseases.nci_thesaurus_concept_id.

When searching in the Diseases Endpoint with multiple values for the following parameters (codes, ancestor_ids, parent_ids, type), API will treat values as an OR condition and will return data that satisfies at least one of the condition being searched.

Examples

codes and code parameters will be used interchangeably within CTS API V2


", - "operationId":"searchDiseasesByGet", - "parameters":[ - { - "in":"query", - "name":"name", - "description":"Note that name checks for values assigned to name as well as values assigned to synonyms.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Myeloid Leukemia":{ - "value":"Myeloid Leukemia" - }, - "Carcinoma":{ - "value":"Carcinoma" - }, - "Acute Lymphoblastic Leukemia in Remission":{ - "value":"Acute Lymphoblastic Leukemia in Remission" - }, - "Cutaneous Mastocytosis":{ - "value":"Cutaneous Mastocytosis" - }, - "Cutaneous Angiosarcoma":{ - "value":"Cutaneous Angiosarcoma" - } - } - }, - { - "in":"query", - "name":"type", - "description":"Type of Disease - Note that multiple values for type creates an 'OR' condition for the result set. Results will meet one of the type values requested. Use 'type' and 'type_not' together to further filter results.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "finding":{ - "value":"finding" - }, - "maintype":{ - "value":"maintype" - }, - "subtype":{ - "value":"subtype" - }, - "stage":{ - "value":"stage" - }, - "grade":{ - "value":"grade" - } - } - }, - { - "in":"query", - "name":"type_not", - "description":"This will do the opposite of 'type' above and exclude rather than include. Note that multiple values for type creates an 'AND' condition for the result set. Results will meet all menu_not values requested. Use 'type' and 'type_not' together to further filter results.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "finding":{ - "value":"finding" - }, - "maintype":{ - "value":"maintype" - }, - "subtype":{ - "value":"subtype" - }, - "stage":{ - "value":"stage" - }, - "grade":{ - "value":"grade" - } - } - }, - { - "in":"query", - "name":"parent_ids", - "description":"Setting the parent_id value will get you a direct child along a disease path.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "C3211":{ - "value":"C3211" - }, - "C3208":{ - "value":"C3208" - }, - "C3172":{ - "value":"C3208" - }, - "C27134":{ - "value":"C27134" - }, - "C27859":{ - "value":"C27859" - } - } - }, - { - "in":"query", - "name":"ancestor_ids", - "description":"Setting an ancestor_ids value will get you any of the children along a disease path.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "C3211":{ - "value":"C3211" - }, - "C3208":{ - "value":"C3208" - }, - "C3172":{ - "value":"C3172" - }, - "C27134":{ - "value":"C27134" - }, - "C27859":{ - "value":"C27859" - } - } - }, - { - "in":"query", - "name":"codes", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "C5192":{ - "value":"C5192" - }, - "C3588":{ - "value":"C3588" - }, - "C3211":{ - "value":"C3211" - }, - "C3208":{ - "value":"C3208" - }, - "C131085":{ - "value":"C131085" - }, - "C27134":{ - "value":"C27134" - }, - "C27859":{ - "value":"C27859" - } - } - }, - { - "in":"query", - "name":"include", - "description":"Include only this field(s) in trials and exclude others. Use multiple times to include multiple fields. (Useful if you want to minimize the payload returned)", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "all fields":{ - "value":"" - }, - "no data; just get the count":{ - "value":"none" - }, - "name":{ - "value":"name" - }, - "code":{ - "value":"code" - }, - "codes":{ - "value":"codes" - }, - "type":{ - "value":"type" - }, - "parent_ids":{ - "value":"parent_ids" - }, - "ancestor_ids":{ - "value":"ancestor_ids" - }, - "synonym":{ - "value":"synonym" - }, - "synonyms":{ - "value":"synonyms" - }, - "count":{ - "value":"count" - } - } - }, - { - "in":"query", - "name":"sort", - "description":"Default set to 'name'. Currently works only for name and count.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "use default":{ - "value":"" - }, - "name":{ - "value":"name" - }, - "count":{ - "value":"count" - }, - "code (Not available. Will result in 400 response code)":{ - "value":"code" - }, - "type (Not available. Will result in 400 response code)":{ - "value":"type" - }, - "parent_ids (Not available. Will result in 400 response code)":{ - "value":"parent_ids" - } - } - }, - { - "$ref":"#/components/parameters/order" - }, - { - "$ref":"#/components/parameters/size" - } - ], - "responses":{ - "200":{ - "description":"The list matching given search criteria." - }, - "400":{ - "description":"Bad Request." - }, - "500":{ - "description":"An exception occurred at the backend." - }, - "502":{ - "description":"An exception occurred at the backend." - } + } + }, + "StatusHistory": { + "type": "object", + "properties": { + "status_date": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" } - } - }, - "/organizations":{ - "get":{ - "tags":[ - "Organizations" - ], - "summary":"Search Organizations by GET", - "security":[ - { - "ApiKeyAuth":[ - - ] - } - ], - "description":"

GET organizations?<filter_params>

The organizations endpoint is intended for typeaheads and other use cases where it is necessary to search for available organizations which can later be used to filter clinical trial results. Organizations are matched partially by supplying a string to the name field and may be filtered by other fields through parameters described below. Results are sorted by a combination of in alphabetical order by default i.e sort is set to name and order is set to asc.

Example: organizations?org_city=Las Vegas&org_country=United States&name=University

Progressive Filtering functionality: All trial fields parameters described at the /trials endpoint are usable here to filter the trials from which you want to aggregate. For example, if you request /organizations?maintype=C4872 this will give you all organizations that are in trials where Breast Cancer(C4872) is among the diseases in each trial. Note that maintype is a trials endpoint parameter related to diseases.nci_thesaurus_concept_id.


", - "operationId":"searchOrganizationsByGet", - "parameters":[ - { - "in":"query", - "name":"name", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Alegemeen Ziekenhuis Middelheim, Antwerpen Belgium":{ - "value":"Alegemeen Ziekenhuis Middelheim" - }, - "Cancer Trials Support Unit, Rockville Maryland":{ - "value":"Cancer Trials Support Unit" - }, - "CancerCare Manitoba, Winnipeg Canada":{ - "value":"CancerCare Manitoba" - }, - "Henry Ford Hospital, Detroit MI":{ - "value":"Henry Ford Hospital" - }, - "Centre Leon Berard, Lyon France":{ - "value":"Centre Leon Berard" - } - } - }, - { - "in":"query", - "name":"contact_name", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Anthony John Jaslowski":{ - "value":"Anthony John Jaslowski" - }, - "Dwight L. Fitch":{ - "value":"Dwight L. Fitch" - }, - "Site Public Contact":{ - "value":"Site Public Contact" - } - } - }, - { - "in":"query", - "name":"contact_email", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "info@westernstatesncorp.org":{ - "value":"info@westernstatesncorp.org" - }, - "clinical.trials@daytonncorp.org":{ - "value":"clinical.trials@daytonncorp.org" - } - } - }, - { - "in":"query", - "name":"contact_phone", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "800-398-3996":{ - "value":"800-398-3996" - }, - "626-564-3455":{ - "value":"626-564-3455" - }, - "800-611-1811":{ - "value":"800-611-1811" - } - } - }, - { - "in":"query", - "name":"org_address_line_1", - "description":"", - "required":false, - "schema":{ - "type":"string" - } - }, - { - "in":"query", - "name":"org_address_line_2", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Suite 100":{ - "value":"Suite 100" - }, - "MIND Building Suite 110":{ - "value":"MIND Building Suite 110" - }, - "MidOalkland Medical Center Suite 106":{ - "value":"MidOalkland Medical Center Suite 106" - } - } - }, - { - "in":"query", - "name":"org_city", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Antwerpen":{ - "value":"Antwerpen" - }, - "Aurora":{ - "value":"Aurora" - }, - "Bern":{ - "value":"Bern" - }, - "Montreal":{ - "value":"Montreal" - }, - "Vienna":{ - "value":"Vienna" - }, - "Villejuif":{ - "value":"Villejuif" - }, - "Winnipeg":{ - "value":"Winnipeg" - } - } - }, - { - "in":"query", - "name":"org_country", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Canada":{ - "value":"Canada" - }, - "Italy":{ - "value":"Italy" - }, - "Netherlands":{ - "value":"Netherlands" - }, - "Switzerland":{ - "value":"Switzerland" - }, - "United States":{ - "value":"United States" - } - } - }, - { - "in":"query", - "name":"org_email", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "info@westernstatesncorp.org":{ - "value":"info@westernstatesncorp.org" - }, - "clinical.trials@daytonncorp.org":{ - "value":"clinical.trials@daytonncorp.org" - } - } - }, - { - "in":"query", - "name":"org_phone", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "800-398-3996":{ - "value":"800-398-3996" - }, - "626-564-3455":{ - "value":"626-564-3455" - }, - "800-611-1811":{ - "value":"800-611-1811" - } - } - }, - { - "in":"query", - "name":"org_fax", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "317-831-9292":{ - "value":"317-831-9292" - } - } - }, - { - "in":"query", - "name":"org_tty", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "800-735-2258":{ - "value":"800-735-2258" - } - } - }, - { - "in":"query", - "name":"org_state_or_province", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "AL - Alabama":{ - "value":"AL" - }, - "CA - California":{ - "value":"CA" - }, - "CO - Colorado":{ - "value":"CO" - }, - "DC - District of Columbia":{ - "value":"DC" - }, - "FL - Florida":{ - "value":"FL" - }, - "MD - Maryland":{ - "value":"MD" - }, - "NY - New York":{ - "value":"NY" - }, - "WI - Wisconsin":{ - "value":"WI" - }, - "Ontario":{ - "value":"Ontario" - } - } - }, - { - "in":"query", - "name":"org_va", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "true":{ - "value":"true" - }, - "false":{ - "value":"false" - } - } - }, - { - "in":"query", - "name":"org_postal_code", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Washington DC":{ - "value":"20470" - }, - "Bethesda Maryland":{ - "value":"20890" - }, - "Groningen Netherlands":{ - "value":"9700 GZ" - }, - "Montreal Canada":{ - "value":"H2L 4M1" - }, - "Rockville Maryland":{ - "value":"20850-2062" - }, - "Aurora Colorado":{ - "value":"80012" - } - } - }, - { - "in":"query", - "name":"org_family", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Mayo Clinic Cancer Center":{ - "value":"Mayo Clinic Cancer Center" - }, - "Alvin J. Siteman Cancer Center":{ - "value":"Alvin J. Siteman Cancer Center" - }, - "University of Chicago Comprehensive Cancer Center":{ - "value":"University of Chicago Comprehensive Cancer Center" - }, - "MD Anderson Cancer Center":{ - "value":"MD Anderson Cancer Center" - }, - "Roswell Park Cancer Institute":{ - "value":"Roswell Park Cancer Institute" - }, - "Stanford Cancer Institute":{ - "value":"Stanford Cancer Institute" - } - } - }, - { - "in":"query", - "name":"org_coordinates_lat", - "description":"Organization's Latitude - for example: 43.7029", - "required":false, - "schema":{ - "type":"number", - "minimum":-999, - "maximum":999 - }, - "examples":{ - "":{ - "value":"" - }, - "Kaiser Permanente-Glenlake Medical Center":{ - "value":"33.9325" - }, - "Riverside Methodist Hospital":{ - "value":"40.0525" - }, - "Baptist MD Anderson Cancer Center":{ - "value":"30.291" - } - } - }, - { - "in":"query", - "name":"org_coordinates_lon", - "description":"Organization's Longitude - for example: -72.2895", - "required":false, - "schema":{ - "type":"number", - "minimum":-999, - "maximum":999 - }, - "examples":{ - "":{ - "value":"" - }, - "Kaiser Permanente-Glenlake Medical Center":{ - "value":"-84.3852" - }, - "Riverside Methodist Hospital":{ - "value":"-83.02" - }, - "Baptist MD Anderson Cancer Center":{ - "value":"-81.6318" - } - } - }, - { - "in":"query", - "name":"org_coordinates_dist", - "description":"The radius around a given geolocation. The geolocation can be provided by using both org_coordinates_lon and org_coordinates_lat, as described above, OR by specifying the zip code org_postal_code, at which point the geolocation will be calculated for you. We only support miles or kilometers for distance: for example org_coordinates_dist=25mi or org_coordinates_dist=25km. Geolocation Search only works to find sites in the United States. If not provided with geolocation parameters, currently defaults to 0.67mi to provide 'at location' results.", - "required":false, - "schema":{ - "type":"string" - } - }, - { - "in":"query", - "name":"include", - "description":"Include only this field(s) in trials and exclude others. Use multiple times to include multiple fields. (Useful if you want to minimize the payload returned)", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "all fields":{ - "value":"" - }, - "no data; just get the count":{ - "value":"none" - }, - "name":{ - "value":"name" - }, - "contact_name":{ - "value":"contact_name" - }, - "contact_email":{ - "value":"contact_email" - }, - "contact_phone":{ - "value":"contact_phone" - }, - "org_address_line_1":{ - "value":"org_address_line_1" - }, - "org_address_line_2":{ - "value":"org_address_line_2" - }, - "org_city":{ - "value":"org_city" - }, - "org_country":{ - "value":"org_country" - }, - "org_email":{ - "value":"org_email" - }, - "recruitment_status":{ - "value":"recruitment_status" - }, - "recruitment_status_date":{ - "value":"recruitment_status_date" - }, - "org_phone":{ - "value":"org_phone" - }, - "org_fax":{ - "value":"org_fax" - }, - "org_tty":{ - "value":"org_tty" - }, - "org_state_or_province":{ - "value":"org_state_or_province" - }, - "org_va":{ - "value":"org_va" - }, - "org_postal_code":{ - "value":"org_postal_code" - }, - "org_family":{ - "value":"org_family" - }, - "org_coordinates":{ - "value":"org_coordinates" - } - } - }, - { - "in":"query", - "name":"sort", - "description":"Default set to 'name'. Currently works only for name.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "use default":{ - "value":"" - }, - "name":{ - "value":"name" - }, - "count":{ - "value":"count" - }, - "contact_name (Not available. Will result in 400 response code)":{ - "value":"contact_name" - }, - "contact_email (Not available. Will result in 400 response code)":{ - "value":"contact_email" - }, - "org_country (Not available. Will result in 400 response code)":{ - "value":"org_country" - }, - "org_state_or_province (Not available. Will result in 400 response code)":{ - "value":"org_state_or_province" - } - } - }, - { - "$ref":"#/components/parameters/order" - }, - { - "$ref":"#/components/parameters/size" - } - ], - "responses":{ - "200":{ - "description":"The list matching given search criteria." - }, - "400":{ - "description":"Bad Request." - }, - "500":{ - "description":"An exception occurred at the backend." - }, - "502":{ - "description":"An exception occurred at the backend." - } + } + }, + "Masking": { + "type": "object", + "properties": { + "role_caregiver": { + "type": ["string", "null"] + }, + "masking": { + "type": ["string", "null"] + }, + "role_investigator": { + "type": ["string", "null"] + }, + "role_outcome_assessor": { + "type": ["string", "null"] + }, + "role_subject": { + "type": ["string", "null"] + }, + "allocation_code": { + "type": "string" } - } - }, - "/biomarkers":{ - "get":{ - "tags":[ - "Biomarkers" - ], - "summary":"Search Biomarkers by GET", - "security":[ - { - "ApiKeyAuth":[ - - ] - } - ], - "description":"

GET biomarkers?<filter_params>

The biomarkers endpoint is intended for typeaheads and other use cases where it is necessary to search for available biomarkers which can later be used to filter clinical trial results. Biomarkers are matched partially by supplying a string to the name field and may be filtered by other fields through parameters described below. Results are sorted by a combination of in alphabetical order by default i.e sort is set to name and order is set to asc.

Example: biomarkers?eligibility_criterion=inclusion&name=estrogen

Progressive Filtering functionality: All trial fields parameters described at the /trials endpoint are usable here to filter the trials from which you want to aggregate. For example, if you request /biomarkers?maintype=C4872 this will give you all biomarkers that are in trials where Breast Cancer(C4872) is among the diseases in each trial. Note that maintype is a trials endpoint parameter related to diseases.nci_thesaurus_concept_id.


", - "operationId":"searchBiomarkersByGet", - "parameters":[ - { - "in":"query", - "name":"name", - "description":"Note that name checks for values assigned to name as well as values assigned to synonyms.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "ALK Positive":{ - "value":"ALK Positive" - }, - "Chromosome":{ - "value":"Chromosome" - }, - "DNA Structure":{ - "value":"DNA Structure" - }, - "Kinases":{ - "value":"Kinases" - }, - "Finding":{ - "value":"Finding" - } - } - }, - { - "in":"query", - "name":"eligibility_criterion", - "description":"Eligibility criterion - inclusion or exclusion.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "inclusion":{ - "value":"inclusion" - }, - "exclusion":{ - "value":"exclusion" + } + } + }, + "parameters":{ + "id":{ + "in":"query", + "name":"id", + "description":"Search by ID.", + "required":false, + "schema":{ + "type":"string" + } + }, + "trial_status":{ + "in":"query", + "name":"trial_status", + "description":"Possible value: OPEN \n(Equivalent to:
current_trial_status=active&current_trial_status=approved
&current_trial_status=enrolling by invitation
&current_trial_status=in review
&current_trial_status=temporarily closed to accrual
&current_trial_status=temporarily closed to accrual and intervention
&sites.recruitment_status=active&sites.recruitment_status=approved
&sites.recruitment_status=enrolling_by_invitation
&sites.recruitment_status=in_review
&sites.recruitment_status=temporarily_closed_to_accrual
&record_verification_date_gte=<date reflecting 2 years ago> )\n

In other words, for a trial to be considered "OPEN", current_trial_status must be one of:

and sites.recruitment_status must be one of:

and record_verification_date must be a date within the past two years

Currently does not work in combination with:\n embed_and_ and outer_or_ prepends.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "OPEN ":{ + "value":"OPEN" + }, + "Invalid value (search will result in 500 response code)":{ + "value":"SOMETHING" + } + } + }, + "size_small":{ + "in":"query", + "name":"size", + "description":"Limit the amount of results a supplied amount (default is 10, max is 50). Note that this parameter will be ignored when export parameter is passed.", + "required":false, + "schema":{ + "type":"integer", + "minimum":1, + "maximum":50 + } + }, + "size":{ + "in":"query", + "name":"size", + "description":"Not using the size parameter, by default, will give you ALL the results AND, in addition, will give you the 'total' field in the results, with the total count of the results. Once you do use the size parameter however, the number of results will be according to the size specified, AND, in addition, the 'total' field will not exist in your results.", + "required":false, + "schema":{ + "type":"integer", + "minimum":1, + "maximum":100 + } + }, + "order":{ + "in":"query", + "name":"order", + "description":"Asc or Desc. Required when using sort.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "ascending order":{ + "value":"asc" + }, + "descending order":{ + "value":"desc" + } + } + }, + "from":{ + "in":"query", + "name":"from", + "description":"Starting from nth position of results lineup. Start the results from a supplied starting point (default is 0).", + "required":false, + "schema":{ + "type":"integer", + "minimum":1 + } + }, + "current_trial_status":{ + "in":"query", + "name":"current_trial_status", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Active":{ + "value":"Active" + }, + "Administratively Complete":{ + "value":"Administratively Complete" + }, + "Approved":{ + "value":"Approved" + }, + "Closed to Accrual":{ + "value":"Closed to Accrual" + }, + "Closed to Accrual and Intervention":{ + "value":"Closed to Accrual and Intervention" + }, + "Complete":{ + "value":"Complete" + }, + "INACTIVE":{ + "value":"INACTIVE" + }, + "Enrolling by Invitation":{ + "value":"Enrolling by Invitation" + }, + "Temporarily Closed to Accrual and Intervention":{ + "value":"Temporarily Closed to Accrual and Intervention" + }, + "Temporarily Closed to Accrual":{ + "value":"Temporarily Closed to Accrual" + }, + "In Review":{ + "value":"In Review" + }, + "Withdrawn":{ + "value":"Withdrawn" + } + } + }, + "export":{ + "in":"query", + "name":"export", + "description":"Export all query results into a file. The data will be available to download using a link that will arrive by email.
Supported formats are JSON (export=json) and Excel (export=xls).
Requires email parameter. See also optional filename parameter. Note that size parameter will be ignored during exports.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Export in JSON format":{ + "value":"json" + }, + "excel (xls)":{ + "value":"xls" + }, + "Invalid value (search will result in 400 response code)":{ + "value":"SOMETHING" + } + } + }, + "filename":{ + "in":"query", + "name":"filename", + "description":"To be used with export to indicate the beginning of the file name for exported data.
If omitted, filename will start with \"report\".", + "required":false, + "schema":{ + "type":"string" + } + }, + "email":{ + "in":"query", + "name":"email", + "description":"Required when using export to indicate the email address for exported data.", + "required":false, + "schema":{ + "type":"string" + } + }, + "generic_contact":{ + "in":"query", + "name":"generic_contact", + "description":"", + "required":false, + "schema":{ + "type":"string" + } + }, + "sites.generic_contact":{ + "in":"query", + "name":"sites.generic_contact", + "description":"", + "required":false, + "schema":{ + "type":"string" + } + }, + "lead_org_cancer_center":{ + "in":"query", + "name":"lead_org_cancer_center", + "description":"Search by Lead Org Cancer Center", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Mayo Clinic Cancer Center":{ + "value":"Mayo Clinic Cancer Center" + }, + "Alvin J. Siteman Cancer Center":{ + "value":"Alvin J. Siteman Cancer Center" + }, + "University of Chicago Comprehensive Cancer Center":{ + "value":"University of Chicago Comprehensive Cancer Center" + }, + "MD Anderson Cancer Center":{ + "value":"MD Anderson Cancer Center" + }, + "Roswell Park Cancer Institute":{ + "value":"Roswell Park Cancer Institute" + }, + "Stanford Cancer Institute":{ + "value":"Stanford Cancer Institute" + } + } + }, + "nci_funded":{ + "in":"query", + "name":"nci_funded", + "description":"Search by NCI funded", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Indirect":{ + "value":"Indirect" + }, + "Direct":{ + "value":"Direct" + }, + "No":{ + "value":"No" + } + } + } + }, + "responses":{ + "badReq":{ + "description":"Error Bad Request", + "headers":{ + "Access-Control-Allow-Origin":{ + "allowEmptyValue":true, + "example":"http://127.0.0.1", + "schema":{ + "type":"string" + } + } + }, + "content":{ + "application/json":{ + "schema":{ + "type":"object", + "properties":{ + "code":{ + "description":"HTTP status code 400 - Bad Request", + "type":"integer", + "format":"int64", + "x-go-name":"Code" + } + } + } + } + } + }, + "forbiddenReq":{ + "description":"Error Forbidden", + "content":{ + "application/json":{ + "schema":{ + "type":"object", + "properties":{ + "code":{ + "description":"HTTP status code 403 - Forbidden", + "type":"integer", + "format":"int64", + "x-go-name":"Code" + } + } + } + } + } + }, + "notFoundReq":{ + "description":"Error Not Found", + "content":{ + "application/json":{ + "schema":{ + "type":"object", + "properties":{ + "code":{ + "description":"HTTP status code 404 - Not Found", + "type":"integer", + "format":"int64", + "x-go-name":"Code" + } + } + } + } + } + }, + "okResp":{ + "description":"Success response", + "content":{ + "application/json":{ + "schema":{ + "type":"object", + "properties":{ + "code":{ + "description":"HTTP status code 200 - OK", + "type":"integer", + "format":"int64", + "x-go-name":"Code" + } + } + } + } + } + } + } + }, + "servers":[ + { + "url":"https://clinicaltrialsapi.cancer.gov/api/v2", + "description":"Production Server" + } + ], + "paths":{ + "/trials/{id}":{ + "get":{ + "tags":[ + "Trials" + ], + "summary":"Get One Trial", + "security":[ + { + "ApiKeyAuth":[ + + ] + } + ], + "description":"

GET trials<id>



Retrieves the clinical trial with supplied nci_id or nct_id. All fields (including nested ones) are returned.


", + "operationId":"getTrialById", + "parameters":[ + { + "in":"path", + "name":"id", + "description":"NCI ID or NCT ID of Trial.", + "required":true, + "schema":{ + "type":"string" + }, + "examples":{ + "valid nci_id: NCI-2019-02616":{ + "value":"NCI-2019-02616" + }, + "valid nct_id: NCT03386721":{ + "value":"NCT03386721" + }, + "non-existent nci_id: NCI-2014-99999 (will result in 404 response code)":{ + "value":"NCI-2014-99999" + }, + "non-existent nct_id: NCT99999999 (will result in 404 response code)":{ + "value":"NCT99999999" + }, + "nci_id 15-00414":{ + "value":"NCI-2015-00414" + }, + "nci_id 16-00376":{ + "value":"NCI-2016-00376" + }, + "nci_id 16-00469":{ + "value":"NCI-2016-00469" + }, + "nci_id 17-00679":{ + "value":"NCI-2017-00679" + }, + "nci_id 18-02229":{ + "value":"NCI-2018-02229" + }, + "nci_id 16-01319":{ + "value":"NCI-2016-01319" + }, + "nci_id 16-01435":{ + "value":"NCI-2016-01435" + }, + "nci_id 17-00223":{ + "value":"NCI-2017-00223" + }, + "nct_id 03391791":{ + "value":"NCT03391791" + }, + "NCT02369029":{ + "value":"NCT02369029" + }, + "NCT02877862":{ + "value":"NCT02877862" + }, + "NCT02565758":{ + "value":"NCT02565758" + }, + "NCT03110159":{ + "value":"NCT03110159" + }, + "NCT02896907":{ + "value":"NCT02896907" + }, + "NCT02816697":{ + "value":"NCT02816697" + }, + "NCT03092856":{ + "value":"NCT03092856" + } + } + } + ], + "responses":{ + "200":{ + "description":"Trial details for the given id.", + "headers":{ + "Access-Control-Allow-Origin":{ + "allowEmptyValue":true, + "example":"http://127.0.0.1", + "schema":{ + "type":"string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TrialDetail" } - } - }, - { - "in":"query", - "name":"type", - "description":"Type of Biomarker - Note that multiple values for type creates an 'OR' condition for the result set. Results will meet one of the type values requested. Use 'type' and 'type_not' together to further filter results.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "reference_gene":{ - "value":"reference_gene" - }, - "branch":{ - "value":"branch" + } + } + }, + "404":{ + "description":"Not found." + }, + "400":{ + "description":"Bad Request." + }, + "500":{ + "description":"An exception occurred at the backend." + }, + "502":{ + "description":"An exception occurred at the backend." + } + } + } + }, + "/trials":{ + "get":{ + "tags":[ + "Trials" + ], + "summary":"Search Trials by GET", + "security":[ + { + "ApiKeyAuth":[ + + ] + } + ], + "description":"

GET trials?<filter_params>


This endpoint filters all clinical trials based upon supplied filter params. Filter params may be any of the fields in the schema and others for more filtering capabilities as described below.

<field_param>: filter results by examining a field by it's default search setting. For example a boolean field will expect true/false, number fields expect numbers and text fields expect text fields. Note that most SHORT text fields are by default set to be searched by exact match except they are case insensive, while LONG text fields like descriptions are by default set to be searched by fulltext as described below. Should one need to search differently, for example by typeahead or exact match including case, the options for doing such are listed below.

<field_param>._fulltext: (note . before _) filter results by examining a field for occurrence of a 'word' equal to the given value or a variation of it.

Example: sites.org_name._fulltext=clinic will find records with org_name: "Sanford Clinic North-Fargo" and "University of Kansas Clinical Research Center" - as the word "clinical" is a variation of the word "clinic".

If you provide a multi-word value, it breaks the given value into words and apply an \"and\" condition regardless of order.

For example: brief_title._fulltext=breast%20cancer will search for records with both "breast" and "cancer" in the brief_title field, in any order.

<field_param>._auto: filter results by examining the beginning of each word for the given value.

Example: lead_org._auto=roches will find records with "University of Rochester NCORP Research Base".

Note: lead_org._fulltext=roches will find "Hoffmann-La Roche" (because roches appears to be plural of roche), but will not find fields containing the word "Rochester", because it's not a variation of "roches".

Multi-word values are not broken into words. The exact given value is applied to the beginning of any word in the field, to create an \"autocomplete\" feature.

<field_param>._raw: filter results by exact, case sensitive match of the field for the given value.


When supplying an array of values for a single filter param, please use the following convention: trials?<field_param>=<field_value_a>&<field_param>=<field_value_b> and note that string field values are not case sensitive (must otherwise must match exactly).

Example: trials?sites.org_state_or_province=CA&sites.org_state_or_province=OR


Prior Therapy Searches

When searching in the trials Endpoint with multiple values for Prior Therapy, the following parameters in the API will treat the values as an OR condition and will return data that satisfies at least one of the condition being searched: inclusion_indicator, name, nci_thesaurus_concept_id, parents, synonyms, type, ancestor_ids

Example


Date and Number Range Searches

For field params which are filtering as ranges (date and long types), please supply _gte or _lte to the end of the field param (depending on if you are filtering on greater than or equal (gte), less than or equal (lte), or both):
trials?<field_param>_gte=<field_value_from>&<field_param>_lte=<field_value_to>

Example: trials?record_verification_date_gte=2016-08-25


Filtering Out Values

Appending _not to a parameter creates a NOT condition. Unlike normally (without the _not), where an OR condition is created, for _not parameters, multiple _not values of the same fields creates an AND condition between them.

Example: trials?current_trial_status_not=Active¤t_trial_status_not=Complete&nci_id_not=NCI-2017-01522

This request will return trials where (the current status is NOT Active AND current status is NOT Complete) AND nci_id is not NCI-2017-01522)


Embedded Searches

Prepending embed_and_ creates a whole new search within a search to give you an embedded AND condition for all the parameters with the prepend. Up to 6 embedded searches are allowed.

Example: trials?sites.org_country=Canada&keyword=Breast Cancer&embed_and_keyword=OSU-14078&embed_and_keyword_field=ccr_id&embed_and_keyword_field=ctep_id&embed_and_keyword_field=dcp_id &embed_and_keyword_field=nci_id&embed_and_keyword_field=nct_id&embed_and_keyword_field=other_ids.value &embed_and_keyword_field=protocol_id&embed_and_embed_and_sites.org_country=Uganda

In this search we have three searches (2 of them embedded) joined with an AND condition due to this embedment:

1. ...there is a match for the keyword search for Breast Cancer using our default configuration for keyword searches, and with a site in Canada.
AND
2. ...there is a match for the keyword search for OSU-14078 using a custom configuration of the keyword fields (rather than using the default)
AND
3. ... there is a site located in Uganda


Parallel Searches

Prepending outer_or_ creates a whole new parallel search with an OR condition between the searches for all the parameters with the prepend. Up to 6 parallel searches are allowed.

Example: trials?lead_org=Breast Cancer Institute&outer_or_diseases.name._fulltext=Breast Cancer&outer_or_outer_or_sites.org_name=Dana Breast Cancer Institute

In this search we have three parallel searches joined with an OR condition:

...the lead organization is Breast Cancer Institute
OR
...the trial has a disease where the disease name is Breast Cancer
OR
...one of the sites has org name \u201cDana Breast Cancer Institute\u201d


Negating Searches

Prepending outer_not_ creates a whole new search for all the parameters with the prepend and then negates the entire query or subquery.

Example: trials?current_trial_status=ACTIVE&primary_purpose=TREATMENT&eligibility.structured.gender=BOTH&diseases.is_lead_disease=true&diseases.nci_thesaurus_concept_id=C4872&embed_and_outer_not_diseases.nci_thesaurus_concept_id=C71732&embed_and_outer_not_diseases.is_lead_disease=true&embed_and_embed_and_outer_not_diseases.nci_thesaurus_concept_id=C53556&embed_and_embed_and_outer_not_diseases.is_lead_disease=true

In this search:

...all the active trials with treatment as the primary purpose accepting both genders where breast cancer (C4872) is a lead disease, And where Triple-Negative Breast Cancer (C71732) is NOT a lead disease, And HER2 Positive Breast Carcinoma (C53556) is NOT a lead disease.


Disease Type Filters

The disease elements in the trials have been tagged by one or more of five different types: maintype, subtype, stage, grade and finding. The API allows users to search by type.

Example: trials?include=none&grade=C9137&grade=C3641&maintype=C4872&maintype=C4878

This request will return trials with (Breast Cancer [C4872] OR Lung Cancer [C4878]) AND (Combined Small Cell Lung Cancer [C9137] OR Stage 0 Breast Cancer [C3641])


Field Aggregations

Aggregations of fields is accomplished by parameter agg_field and supports progressive trials filtering

This functionality is only available at the trials end point. Trials results are given and as usual total and data always belong to the results of the trials search, and within that, Aggregations results are listed in the results under \u201caggregations\u201d field under the trials results. All fields like aggregations.doc_count, refer to the aggregations.

Available Filters for Field Aggregations:

agg_name: If text\u2026. Auto complete for key must match given value. Note that this typeahead functionality is currently not available for the anatomic_sites field.
agg_min_count: doc_count for a given key must be a minimum of a given number amount (this filter will not lower key doc_count)

The \"size\" and \"from\" parameter enhancements for aggregations apply when: aggregations are requested for the trial endpoint, and the parameter\u00a0\"include = none\" is specified. For this request, as before, no trial data is returned and CTS API will return the entire set of the aggregations\u00a0as\u00a0bound by the \"size\" and \"from\" parameters (if included in request).

If the aggregations' request is made for the trials endpoint and the include parameter is not included and/or specified to include data fields (e.g., include=nci_id) then the \"size\" and \"from\" parameters as before apply to the data returned rather than the aggregations.

For Sorting Field Aggregations:

agg_field_sort Default set to 'name'. Currently works only for values name and count.
agg_field_order Default set to 'asc' (alphabetical order) when agg_field_sort is not specified and defaulted to name. Otherwise currently works only for values asc and desc.

Example: /api/v2/trials?agg_field=lead_org&current_trial_status=Active&agg_name=Anderson&include=nci_id&size=1
{\n
      \"total\": 6180,            ← number of trials where the current trial status is Active\n
      \"data\": [{                  ← other data relating to trials from the trails filters\n
           \"nci_id\": \"NCI-2015-01918\" \n
      }],\n
      \"aggregations\": {       ← From 6180 trials we made aggregations and filtered to autocomplete lead_org of “Anderson”\n
           \"doc_count\": 491, ← # of trials where the current trial status is Active that meet the criteria of “Anderson” for aggregations\n
           \"lead_org\": [{        ← actual aggregations for lead org\n
                     \"key\": \"M D Anderson Cancer Center\",    ← key that qualified for the filter\n
                     \"doc_count\": 484    ← actual trials count for lead org with key\n
                },\n
                {\n
                     \"key\": \"University of Texas MD Anderson Cancer Center LAO\",\n
                     \"doc_count\": 7\n
                }\n
          ]\n
     }\n
}


Default Sort Order of Trials


Deprecations

_fulltext: DEPRECATED. Use keyword instead which is configured with the same fields by default.

_fulltext: DEPRECATED. Use ._fulltext where available, as described above.

_trialids: DEPRECATED. Use trial_ids


Below are some examples of filters for trials and configurations of results.

If you are crafting more complicated queries, it might be best to use the POST endpoint of the same name.


", + "operationId":"searchTrialsByGet", + "parameters":[ + { + "$ref":"#/components/parameters/size_small" + }, + { + "$ref":"#/components/parameters/from" + }, + { + "in":"query", + "name":"sort", + "description":"The 'Default Sort Order of Trials' described above, can be overwritten by this param which allows a sort by field. Sorting should be available on most fields as long as they are sortable (i.e not available on objects and list/array fields and fields with list/array parent).
\nNote here that by sorting with the following number fields: ... allows the user to sort by number assigned to a value mapped, as described under the 'Default Sort Order of Trials' section, rather than sorting by alphabetical order of the string values which may have limited value to some.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "use default":{ + "value":"" + }, + "_study_protocol_type_sort_order":{ + "value":"_study_protocol_type_sort_order" + }, + "_primary_purpose_sort_order":{ + "value":"_primary_purpose_sort_order" + }, + "_phase_sort_order":{ + "value":"_phase_sort_order" + }, + "_current_trial_status_sort_order":{ + "value":"_current_trial_status_sort_order" + }, + "nci_id":{ + "value":"nci_id" + }, + "nct_id":{ + "value":"nct_id" + }, + "current_trial_status":{ + "value":"current_trial_status" + }, + "study_protocol_type":{ + "value":"study_protocol_type" + }, + "brief_title":{ + "value":"brief_title" + }, + "official_title":{ + "value":"official_title" + }, + "study_source":{ + "value":"study_source" + }, + "minimum_target_accrual_number":{ + "value":"minimum_target_accrual_number" + }, + "amendment_date":{ + "value":"amendment_date" + }, + "current_trial_status_date":{ + "value":"current_trial_status_date" + }, + "record_verification_date":{ + "value":"record_verification_date" + }, + "eligibility.structured.min_age_in_years":{ + "value":"eligibility.structured.min_age_in_years" + }, + "eligibility.structured.max_age_in_years":{ + "value":"eligibility.structured.max_age_in_years" + }, + "eligibility.structured.min_age_number":{ + "value":"eligibility.structured.min_age_number" + }, + "eligibility.structured.max_age_number":{ + "value":"eligibility.structured.max_age_number" + } + } + }, + { + "$ref":"#/components/parameters/order" + }, + { + "in":"query", + "name":"missing", + "description":"Filter by empty results (i.e by nulls, missing fields, empty array)", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "sites":{ + "value":"sites" + }, + "acronym":{ + "value":"acronym" + }, + "brief_title":{ + "value":"brief_title" + }, + "current_trial_status":{ + "value":"current_trial_status" + } + } + }, + { + "in":"query", + "name":"exists", + "description":"Filter by opposite of missing, and search for existence of field with value", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "sites":{ + "value":"sites" + }, + "acronym":{ + "value":"acronym" + }, + "brief_title":{ + "value":"brief_title" + }, + "current_trial_status":{ + "value":"current_trial_status" + } + } + }, + { + "in":"query", + "name":"include", + "description":"Include only the supplied filter param fields in all results (useful if you want to minimize the payload returned). Use multiple times to include multiple fields.
\nValue DEFAULT is a shortcut to include the following fields: nci_id, nct_id, brief_title, sites.org_name, sites.org_postal_code, eligibility.structured, current_trial_status, sites.org_va, sites.org_country, sites.org_state_or_province, sites.org_city, sites.org_coordinates, sites.recruitment_status and diseases.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "all fields":{ + "value":"" + }, + "no data; just get the count":{ + "value":"none" + }, + "default fields":{ + "value":"DEFAULT" + }, + "nci_id only":{ + "value":"nci_id" + }, + "nct_id only":{ + "value":"nct_id" + }, + "phase":{ + "value":"nct_id" + }, + "current_trial_status":{ + "value":"current_trial_status" + }, + "sites.org_name":{ + "value":"sites.org_name" + }, + "sites.contact_name":{ + "value":"sites.contact_name" + } + } + }, + { + "in":"query", + "name":"exclude", + "description":"Exclude the supplied filter param fields from all results (useful if you want most of the payload returned with the exception of a few fields). Use multiple times to exclude multiple fields. If using with include param, and values are found in both, fields in these values will be included in the results.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "all fields (don't exclude any)":{ + "value":"" + }, + "sites":{ + "value":"sites" + }, + "diseases":{ + "value":"diseases" + } + } + }, + { + "$ref":"#/components/parameters/export" + }, + { + "$ref":"#/components/parameters/email" + }, + { + "$ref":"#/components/parameters/filename" + }, + { + "in":"query", + "name":"_fulltext", + "description":"DEPRECATED. Use keyword together with keyword_field instead.", + "deprecated":true, + "schema":{ + "type":"string" + } + }, + { + "in":"query", + "name":"_fulltext", + "description":"DEPRECATED. Use ._fulltext where available, described above.", + "deprecated":true, + "schema":{ + "type":"string" + } + }, + { + "in":"query", + "name":"_trialids", + "description":"DEPRECATED. Use trial_ids instead.", + "deprecated":true, + "required":false, + "schema":{ + "type":"string" + } + }, + { + "in":"query", + "name":"trial_ids", + "description":"Filter results by examining trial identifiers (ccr_id, ctep_id, dcp_id, nci_id, nct_id, other_ids.value, protocol_id).\n\nExample: trials?trial_ids=nci-2011&trial_ids=NCT00", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "nci-2011":{ + "value":"nci-2011" + }, + "NCT00":{ + "value":"NCT00" + } + } + }, + { + "in":"query", + "name":"keyword", + "description":"Text to be searched in multiple fields. It can be combined with keyword_field.

keyword filter results by examining a variety of text-based fields (By default: *_id, other_ids.value, diseases.name._fulltext, diseases.synonyms._fulltext, brief_title, brief_summary, official_title, detail_description, official_title, brief_title, brief_summary, diseases.name._fulltext, detail_description, sites.org_name._fulltext, collaborators.name._fulltext, principal_investigator._fulltext, sites.contact_name._fulltext, sites.org_city._fulltext, sites.org_state_or_province._fulltext, arms.interventions.name, arms.interventions.synonyms, biomarkers.name, biomarkers.synonyms, prior_therapy.name, prior_therapy.synonyms).

Mutiple keywords (with a maximum of 10 allowed) will give you an OR condition of between values in all configured fields.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "example search keyword: breast cancer":{ + "value":"breast cancer" + } + } + }, + { + "in":"query", + "name":"keyword_field", + "description":"Field(s) to be searched for the text provided in keyword. Use multiple times; once for each field to be searched. For example:
keyword_field=brief_title._fulltext&keyword_field=lead_org._auto. Use keyword_field to override the default fields used by keyword. A maximum of 10 fields is currently allowed.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "brief_title._fulltext":{ + "value":"brief_title._fulltext" + }, + "lead_org._auto":{ + "value":"lead_org._auto" + } + } + }, + { + "in":"query", + "name":"agg_field", + "description":"Field to be used for aggregation. ", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "lead_org":{ + "value":"lead_org" + }, + "current_trial_status":{ + "value":"current_trial_status" + } + } + }, + { + "in":"query", + "name":"agg_name", + "description":"Filter aggregation (use with agg_field). Autocomplete of this value must match the value of the field in agg_field.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Anderson":{ + "value":"Anderson" + } + } + }, + { + "in":"query", + "name":"agg_min_count", + "description":"Filter aggregation (use with agg_field). The number of documents (doc_count) for a given key (agg_field) must be a minimum of a given number amount (this filter will not lower key doc_count).", + "required":false, + "schema":{ + "type":"integer", + "minimum":1 + } + }, + { + "in":"query", + "name":"sites.org_name._fulltext", + "description":"Filter results by examining words that make up organization name e.g 'Mayo'.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Mayo":{ + "value":"Mayo" + }, + "Paducah":{ + "value":"Paducah" + }, + "Green Bay Oncology":{ + "value":"Green Bay Oncology" + }, + "Saint Vincent Hospital":{ + "value":"Saint Vincent Hospital" + } + } + }, + { + "$ref":"#/components/parameters/trial_status" + }, + { + "$ref":"#/components/parameters/nci_funded" + }, + { + "in":"query", + "name":"nci_id", + "description":"Search by NCI ID.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "valid nci_id: NCI-2019-02616":{ + "value":"NCI-2019-02616" + }, + "non-existent nci_id: NCI-2014-99999 (will find 0 results)":{ + "value":"NCI-2014-99999" + }, + "nci_id 16-00376":{ + "value":"NCI-2016-00376" + }, + "nci_id 15-00414":{ + "value":"NCI-2015-00414" + } + } + }, + { + "in":"query", + "name":"nct_id", + "description":"Search by NCT ID.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "valid nct_id: NCT03386721":{ + "value":"NCT03386721" + }, + "non-existent nct_id: NCT99999999 (will find 0 results)":{ + "value":"NCT99999999" + } + } + }, + { + "in":"query", + "name":"protocol_id", + "description":"Search by Protocol ID.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "BNT411-01":{ + "value":"BNT411-01" + }, + "NU 19B03":{ + "value":"NU 19B03" + }, + "2018-0104":{ + "value":"2018-0104" + }, + "AALL1732":{ + "value":"AALL1732" + }, + "CCT5001":{ + "value":"CCT5001" + }, + "ENT0065":{ + "value":"ENT0065" + }, + "14-396":{ + "value":"14-396" + }, + "2015-0835":{ + "value":"2015-0835" + } + } + }, + { + "in":"query", + "name":"ccr_id", + "description":"Search by CCR ID. (No examples available.)", + "required":false, + "schema":{ + "type":"string" + } + }, + { + "in":"query", + "name":"ctep_id", + "description":"Search by CTEP ID", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "A011401":{ + "value":"A011401" + }, + "E4512":{ + "value":"E4512" + }, + "EAY131":{ + "value":"EAY131" + }, + "A081105":{ + "value":"A081105" + }, + "NRG-BR003":{ + "value":"NRG-BR003" + }, + "EA5163":{ + "value":"EA5163" + }, + "A011202":{ + "value":"A011202" + }, + "A081801":{ + "value":"A081801" + }, + "A021703":{ + "value":"A021703" + }, + "S1609":{ + "value":"S1609" + }, + "EA1131":{ + "value":"EA1131" + }, + "A031501":{ + "value":"A031501" + }, + "EA9161":{ + "value":"EA9161" + }, + "NRG-GY009":{ + "value":"NRG-GY009" + }, + "S1418":{ + "value":"S1418" + }, + "A041702":{ + "value":"A041702" + }, + "A031704":{ + "value":"A031704" + }, + "S1801":{ + "value":"S1801" + }, + "S1613":{ + "value":"S1613" + }, + "NRG-GI005":{ + "value":"NRG-GI005" + }, + "S1815":{ + "value":"S1815" + }, + "EA6134":{ + "value":"EA6134" + }, + "EA5181":{ + "value":"EA5181" + }, + "A021502":{ + "value":"A021502" + }, + "EA8153":{ + "value":"EA8153" + }, + "NRG-GY019":{ + "value":"NRG-GY019" + }, + "A051701":{ + "value":"A051701" + }, + "NSABP-B-51":{ + "value":"NSABP-B-51" + }, + "EA3161":{ + "value":"EA3161" + }, + "EA1181":{ + "value":"EA1181" + }, + "NRG-BR004":{ + "value":"NRG-BR004" + }, + "S1826":{ + "value":"S1826" + }, + "EAA173":{ + "value":"EAA173" + }, + "A031702":{ + "value":"A031702" + }, + "S1803":{ + "value":"S1803" + }, + "EA2142":{ + "value":"EA2142" + }, + "EA2186":{ + "value":"EA2186" + }, + "EA6141":{ + "value":"EA6141" + }, + "S1712":{ + "value":"S1712" + }, + "NRG-LU003":{ + "value":"NRG-LU003" + }, + "AGCT1531":{ + "value":"AGCT1531" + }, + "EA3132":{ + "value":"EA3132" + }, + "EA6174":{ + "value":"EA6174" + }, + "EA5191":{ + "value":"EA5191" + }, + "S1929":{ + "value":"S1929" + }, + "EA2182":{ + "value":"EA2182" + }, + "EA4181":{ + "value":"EA4181" + }, + "GOG-0263":{ + "value":"GOG-0263" + }, + "EA2187":{ + "value":"EA2187" + }, + "S1608":{ + "value":"S1608" + } + } + }, + { + "in":"query", + "name":"dcp_id", + "description":"Search by DCP ID. (No examples available.)", + "required":false, + "schema":{ + "type":"string" + } + }, + { + "$ref":"#/components/parameters/current_trial_status" + }, + { + "in":"query", + "name":"phase", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "I":{ + "value":"I" + }, + "II":{ + "value":"II" + }, + "II_III":{ + "value":"II_III" + }, + "III":{ + "value":"III" + } + } + }, + { + "in":"query", + "name":"study_protocol_type", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Interventional":{ + "value":"Interventional" + } + } + }, + { + "in":"query", + "name":"nci_programs", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "NCORP (NCI Community Oncology Research Program)":{ + "value":"NCORP" + }, + "NCTN (National Clinical Trials Network)":{ + "value":"NCTN" + }, + "ETCTN (Experimental Therapeutics Clinical Trials Network)":{ + "value":"ETCTN" + } + } + }, + { + "in":"query", + "name":"brief_title", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Weight Loss Interventions":{ + "value":"Weight Loss Interventions" + }, + "Breast Cancer Recurrence":{ + "value":"Breast Cancer Recurrence" + }, + "Advanced Refractory Solid Tumors":{ + "value":"Advanced Refractory Solid Tumors" + }, + "Rare Tumors":{ + "value":"Rare Tumors" + }, + "Chronic Lymphocytic Leukemia":{ + "value":"Chronic Lymphocytic Leukemia" + }, + "Irinotecan Hydrochloride":{ + "value":"Irinotecan Hydrochloride" + } + } + }, + { + "in":"query", + "name":"brief_summary", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Weight Loss Interventions":{ + "value":"Weight Loss Interventions" + }, + "Breast Cancer Recurrence":{ + "value":"Breast Cancer Recurrence" + }, + "Advanced Refractory Solid Tumors":{ + "value":"Advanced Refractory Solid Tumors" + }, + "Rare Tumors":{ + "value":"Rare Tumors" + }, + "Chronic Lymphocytic Leukemia":{ + "value":"Chronic Lymphocytic Leukemia" + }, + "Irinotecan Hydrochloride":{ + "value":"Irinotecan Hydrochloride" + } + } + }, + { + "in":"query", + "name":"official_title", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Weight Loss Interventions":{ + "value":"Weight Loss Interventions" + }, + "Breast Cancer Recurrence":{ + "value":"Breast Cancer Recurrence" + }, + "Advanced Refractory Solid Tumors":{ + "value":"Advanced Refractory Solid Tumors" + }, + "Rare Tumors":{ + "value":"Rare Tumors" + }, + "Chronic Lymphocytic Leukemia":{ + "value":"Chronic Lymphocytic Leukemia" + }, + "Irinotecan Hydrochloride":{ + "value":"Irinotecan Hydrochloride" + } + } + }, + { + "in":"query", + "name":"primary_purpose", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "TREATMENT":{ + "value":"TREATMENT" + } + } + }, + { + "in":"query", + "name":"accepts_healthy_volunteers_indicator", + "description":"DEPRECATED. Use eligibility.structured.accepts_healthy_volunteers instead.", + "deprecated":true, + "required":false, + "schema":{ + "type":"string" + } + }, + { + "in":"query", + "name":"eligibility.structured.accepts_healthy_volunteers", + "description":"", + "required":false, + "schema":{ + "type":"boolean" + }, + "examples":{ + "":{ + "value":"" + }, + "true":{ + "value":"true" + }, + "false":{ + "value":"false" + } + } + }, + { + "in":"query", + "name":"acronym", + "description":"", + "required":false, + "schema":{ + "type":"string" + } + }, + { + "in":"query", + "name":"amendment_date", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "2019-07-18T00:00:00":{ + "value":"2019-07-18T00:00:00" + }, + "2020-11-10T00:00:00":{ + "value":"2020-11-10T00:00:00" + }, + "2020-11-18":{ + "value":"2020-11-18" + }, + "2020-10-22":{ + "value":"2020-10-22" + }, + "2019-08-15":{ + "value":"2019-08-15" + }, + "2014-09-15":{ + "value":"2014-09-15" + } + } + }, + { + "in":"query", + "name":"anatomic_sites", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Non-Hodgkin's Lymphoma":{ + "value":"Non-Hodgkin's Lymphoma" + }, + "Stomach":{ + "value":"Stomach" + }, + "Esophagus":{ + "value":"Esophagus" + }, + "Brain and Nervous System":{ + "value":"Brain and Nervous System" + }, + "Lung":{ + "value":"Lung" + }, + "Pancreas":{ + "value":"Pancreas" + }, + "Kidney":{ + "value":"Kidney" + }, + "Multiple":{ + "value":"Multiple" + } + } + }, + { + "in":"query", + "name":"arms.description", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Patients undergo radiation therapy once daily":{ + "value":"undergo radiation therapy once daily" + }, + "Patients undergo observation":{ + "value":"Patients undergo observation" + }, + "Patients receive standard of care carboplatin":{ + "value":"Patients receive standard of care carboplatin" + }, + "Patients undergo 3D-CRT":{ + "value":"Patients undergo 3D-CRT" + }, + "Patients receive chemoradiotherapy":{ + "value":"Patients receive chemoradiotherapy" + } + } + }, + { + "in":"query", + "name":"arms.name", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Arm I":{ + "value":"Arm I" + }, + "Arm A":{ + "value":"Arm A" + }, + "Low Risk Group":{ + "value":"Low Risk Group" + }, + "High Risk Group":{ + "value":"High Risk Group" + }, + "radiation therapy":{ + "value":"radiation therapy" + } + } + }, + { + "in":"query", + "name":"arms.type", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "EXPERIMENTAL":{ + "value":"EXPERIMENTAL" + }, + "PLACEBO_COMPARATOR":{ + "value":"PLACEBO_COMPARATOR" + }, + "ACTIVE_COMPARATOR":{ + "value":"ACTIVE_COMPARATOR" + } + } + }, + { + "in":"query", + "name":"arms.interventions.nci_thesaurus_concept_id", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "C81934":{ + "value":"C81934" + }, + "C349":{ + "value":"C349" + }, + "C491":{ + "value":"C491" + }, + "C408":{ + "value":"C408" + }, + "C633":{ + "value":"C633" + } + } + }, + { + "in":"query", + "name":"arms.interventions.description", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Patients undergo radiation therapy once daily":{ + "value":"undergo radiation therapy once daily" + }, + "Patients undergo observation":{ + "value":"Patients undergo observation" + }, + "Patients receive standard of care carboplatin":{ + "value":"Patients receive standard of care carboplatin" + }, + "Patients undergo 3D-CRT":{ + "value":"Patients undergo 3D-CRT" + }, + "Patients receive chemoradiotherapy":{ + "value":"Patients receive chemoradiotherapy" + } + } + }, + { + "in":"query", + "name":"arms.interventions.name", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Ibrutinib":{ + "value":"Ibrutinib" + }, + "Carmustine":{ + "value":"Carmustine" + }, + "Etoposide":{ + "value":"Etoposide" + }, + "Cytarabine":{ + "value":"Cytarabine" + }, + "Melphalan":{ + "value":"Melphalan" + }, + "Pharmacogenomic Study":{ + "value":"Pharmacogenomic Study" + } + } + }, + { + "in":"query", + "name":"arms.interventions.type", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Drug":{ + "value":"Drug" + }, + "Procedure / Surgery":{ + "value":"Procedure / Surgery" + }, + "Other":{ + "value":"Other" + } + } + }, + { + "in":"query", + "name":"arms.interventions.synonyms", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Imbruvica":{ + "value":"Imbruvica" + }, + "Lastet":{ + "value":"Lastet" + }, + "Melphalanum":{ + "value":"Melphalanum" + }, + "Anti-Tumor Agents":{ + "value":"Anti-Tumor Agents" + }, + "Anti-Cancer Agents":{ + "value":"Anti-Cancer Agents" + }, + "Enzyme Antagonist":{ + "value":"Enzyme Antagonist" + }, + "Immunosuppressive Agents":{ + "value":"Immunosuppressive Agents" + } + } + }, + { + "in":"query", + "name":"associated_studies.study_id", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "NCI-2015-00668":{ + "value":"NCI-2015-00668" + }, + "NCI-2014-02057":{ + "value":"NCI-2014-02057" + }, + "NCI-2017-01251":{ + "value":"NCI-2017-01251" + } + } + }, + { + "in":"query", + "name":"associated_studies.study_id_type", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "NCI":{ + "value":"NCI" + } + } + }, + { + "in":"query", + "name":"eligibility.structured.gender", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "BOTH":{ + "value":"BOTH" + }, + "FEMALE":{ + "value":"FEMALE" + }, + "MALE":{ + "value":"MALE" + } + } + }, + { + "in":"query", + "name":"eligibility.structured.min_age_in_years_lte", + "description":"", + "required":false, + "schema":{ + "$ref":"#/components/schemas/integer_1_to_999" + } + }, + { + "in":"query", + "name":"eligibility.structured.min_age_in_years_gte", + "description":"", + "required":false, + "schema":{ + "$ref":"#/components/schemas/integer_1_to_999" + } + }, + { + "in":"query", + "name":"eligibility.structured.max_age_in_years_lte", + "description":"", + "required":false, + "schema":{ + "$ref":"#/components/schemas/integer_1_to_999" + } + }, + { + "in":"query", + "name":"eligibility.structured.max_age_in_years_gte", + "description":"", + "required":false, + "schema":{ + "$ref":"#/components/schemas/integer_1_to_999" + } + }, + { + "in":"query", + "name":"eligibility.structured.min_age_unit", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Years":{ + "value":"Years" + }, + "Months":{ + "value":"Months" + } + } + }, + { + "in":"query", + "name":"eligibility.structured.min_age_number_lte", + "description":"", + "required":false, + "schema":{ + "$ref":"#/components/schemas/integer_1_to_999" + } + }, + { + "in":"query", + "name":"eligibility.structured.min_age_number_gte", + "description":"", + "required":false, + "schema":{ + "$ref":"#/components/schemas/integer_1_to_999" + } + }, + { + "in":"query", + "name":"eligibility.structured.max_age_unit", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Years":{ + "value":"Years" + }, + "Months":{ + "value":"Months" + } + } + }, + { + "in":"query", + "name":"eligibility.structured.max_age_number_lte", + "description":"", + "required":false, + "schema":{ + "$ref":"#/components/schemas/integer_1_to_999" + } + }, + { + "in":"query", + "name":"eligibility.structured.max_age_number_gte", + "description":"", + "required":false, + "schema":{ + "$ref":"#/components/schemas/integer_1_to_999" + } + }, + { + "in":"query", + "name":"current_trial_status_date_lte", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "2020-11-18":{ + "value":"2020-11-18" + }, + "2020-10-22":{ + "value":"2020-10-22" + }, + "2019-08-15":{ + "value":"2019-08-15" + }, + "2014-09-15":{ + "value":"2014-09-15" + } + } + }, + { + "in":"query", + "name":"current_trial_status_date_gte", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "2020-11-18":{ + "value":"2020-11-18" + }, + "2020-10-22":{ + "value":"2020-10-22" + }, + "2019-08-15":{ + "value":"2019-08-15" + }, + "2014-09-15":{ + "value":"2014-09-15" + } + } + }, + { + "in":"query", + "name":"record_verification_date_lte", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "2020-11-18":{ + "value":"2020-11-18" + }, + "2020-10-22":{ + "value":"2020-10-22" + }, + "2019-08-15":{ + "value":"2019-08-15" + }, + "2014-09-15":{ + "value":"2014-09-15" + } + } + }, + { + "in":"query", + "name":"record_verification_date_gte", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "2020-11-18":{ + "value":"2020-11-18" + }, + "2020-10-22":{ + "value":"2020-10-22" + }, + "2019-08-15":{ + "value":"2019-08-15" + }, + "2014-09-15":{ + "value":"2014-09-15" + } + } + }, + { + "in":"query", + "name":"sites.org_coordinates_lat", + "description":"Organization's Latitude - for example: 43.7029. Geolocation Search only works to find sites in the United States.", + "required":false, + "schema":{ + "type":"number", + "minimum":-999, + "maximum":999 + }, + "examples":{ + "":{ + "value":"" + }, + "43.7029":{ + "value":"43.7029" + } + } + }, + { + "in":"query", + "name":"sites.org_coordinates_lon", + "description":"Organization's Longitude - for example: -72.2895. Geolocation Search only works to find sites in the United States.", + "required":false, + "schema":{ + "type":"number", + "minimum":-999, + "maximum":999 + }, + "examples":{ + "":{ + "value":"" + }, + "-72.2895":{ + "value":"-72.2895" + } + } + }, + { + "in":"query", + "name":"sites.org_coordinates_dist", + "description":"The radius around the provided zip code. Accepts these units of measurements [NM, nmi, nauticalmiles, mi, miles, yd, yards, ft, feet, in, inch, km, kilometers, cm, centimeters, mm, milimeters, m, meters]. If not provided defaults to 25mi.

Use of invalid postal codes, or non-US postal codes will return a 400 error.", + "required":false, + "schema":{ + "type":"string" + } + }, + { + "in":"query", + "name":"sites.contact_email", + "description":"", + "required":false, + "schema":{ + "type":"string" + } + }, + { + "in":"query", + "name":"sites.contact_name", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Anthony John Jaslowski":{ + "value":"Anthony John Jaslowski" + }, + "Dwight L. Fitch":{ + "value":"Dwight L. Fitch" + }, + "Site Public Contact":{ + "value":"Site Public Contact" + } + } + }, + { + "in":"query", + "name":"sites.contact_name._auto", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Anthony John Jaslowski":{ + "value":"Anthony John Jaslowski" + }, + "Dwight L. Fitch":{ + "value":"Dwight L. Fitch" + }, + "Site Public Contact":{ + "value":"Site Public Contact" + } + } + }, + { + "in":"query", + "name":"sites.contact_name._raw", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Anthony John Jaslowski":{ + "value":"Anthony John Jaslowski" + }, + "Dwight L. Fitch":{ + "value":"Dwight L. Fitch" + }, + "Site Public Contact":{ + "value":"Site Public Contact" + } + } + }, + { + "in":"query", + "name":"sites.contact_phone", + "description":"", + "required":false, + "schema":{ + "type":"string" + } + }, + { + "in":"query", + "name":"sites.org_address_line_1", + "description":"", + "required":false, + "schema":{ + "type":"string" + } + }, + { + "in":"query", + "name":"sites.org_address_line_2", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Suite 100":{ + "value":"Suite 100" + }, + "MIND Building Suite 110":{ + "value":"MIND Building Suite 110" + }, + "MidOalkland Medical Center Suite 106":{ + "value":"MidOalkland Medical Center Suite 106" + } + } + }, + { + "in":"query", + "name":"sites.org_city", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Antwerpen":{ + "value":"Antwerpen" + }, + "Aurora":{ + "value":"Aurora" + }, + "Bern":{ + "value":"Bern" + }, + "Montreal":{ + "value":"Montreal" + }, + "Vienna":{ + "value":"Vienna" + }, + "Villejuif":{ + "value":"Villejuif" + }, + "Winnipeg":{ + "value":"Winnipeg" + } + } + }, + { + "in":"query", + "name":"sites.org_postal_code", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Washington DC":{ + "value":"20470" + }, + "Bethesda Maryland":{ + "value":"20890" + }, + "Groningen Netherlands":{ + "value":"9700 GZ" + }, + "Montreal Canada":{ + "value":"H2L 4M1" + }, + "Rockville Maryland":{ + "value":"20850-2062" + }, + "Aurora Colorado":{ + "value":"80012" + } + } + }, + { + "in":"query", + "name":"sites.org_state_or_province", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "AL - Alabama":{ + "value":"AL" + }, + "CA - California":{ + "value":"CA" + }, + "CO - Colorado":{ + "value":"CO" + }, + "DC - District of Columbia":{ + "value":"DC" + }, + "FL - Florida":{ + "value":"FL" + }, + "MD - Maryland":{ + "value":"MD" + }, + "NY - New York":{ + "value":"NY" + }, + "WI - Wisconsin":{ + "value":"WI" + }, + "Ontario":{ + "value":"Ontario" + } + } + }, + { + "in":"query", + "name":"sites.org_country", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Canada":{ + "value":"Canada" + }, + "Italy":{ + "value":"Italy" + }, + "Netherlands":{ + "value":"Netherlands" + }, + "Switzerland":{ + "value":"Switzerland" + }, + "United States":{ + "value":"United States" + } + } + }, + { + "in":"query", + "name":"sites.org_country._raw", + "description":"Country name (case sensitive)", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Canada":{ + "value":"Canada" + }, + "Italy":{ + "value":"Italy" + }, + "Netherlands":{ + "value":"Netherlands" + }, + "Switzerland":{ + "value":"Switzerland" + }, + "United States":{ + "value":"United States" + } + } + }, + { + "in":"query", + "name":"sites.org_email", + "description":"", + "required":false, + "schema":{ + "type":"string" + } + }, + { + "in":"query", + "name":"sites.org_family", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Mayo Clinic Cancer Center":{ + "value":"Mayo Clinic Cancer Center" + }, + "Alvin J. Siteman Cancer Center":{ + "value":"Alvin J. Siteman Cancer Center" + }, + "University of Chicago Comprehensive Cancer Center":{ + "value":"University of Chicago Comprehensive Cancer Center" + }, + "MD Anderson Cancer Center":{ + "value":"MD Anderson Cancer Center" + }, + "Roswell Park Cancer Institute":{ + "value":"Roswell Park Cancer Institute" + }, + "Stanford Cancer Institute":{ + "value":"Stanford Cancer Institute" + } + } + }, + { + "in":"query", + "name":"sites.org_fax", + "description":"", + "required":false, + "schema":{ + "type":"string" + } + }, + { + "in":"query", + "name":"sites.org_name", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Alegemeen Ziekenhuis Middelheim, Antwerpen Belgium":{ + "value":"Alegemeen Ziekenhuis Middelheim" + }, + "Cancer Trials Support Unit, Rockville Maryland":{ + "value":"Cancer Trials Support Unit" + }, + "CancerCare Manitoba, Winnipeg Canada":{ + "value":"CancerCare Manitoba" + }, + "Henry Ford Hospital, Detroit MI":{ + "value":"Henry Ford Hospital" + }, + "Centre Leon Berard, Lyon France":{ + "value":"Centre Leon Berard" + } + } + }, + { + "in":"query", + "name":"sites.org_name._auto", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Alegemeen Ziekenhuis Middelheim, Antwerpen Belgium":{ + "value":"Alegemeen Ziekenhuis Middelheim" + }, + "Cancer Trials Support Unit, Rockville Maryland":{ + "value":"Cancer Trials Support Unit" + }, + "CancerCare Manitoba, Winnipeg Canada":{ + "value":"CancerCare Manitoba" + }, + "Henry Ford Hospital, Detroit MI":{ + "value":"Henry Ford Hospital" + }, + "Centre Leon Berard, Lyon France":{ + "value":"Centre Leon Berard" + } + } + }, + { + "in":"query", + "name":"sites.org_name._raw", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Alegemeen Ziekenhuis Middelheim, Antwerpen Belgium":{ + "value":"Alegemeen Ziekenhuis Middelheim" + }, + "Cancer Trials Support Unit, Rockville Maryland":{ + "value":"Cancer Trials Support Unit" + }, + "CancerCare Manitoba, Winnipeg Canada":{ + "value":"CancerCare Manitoba" + }, + "Henry Ford Hospital, Detroit MI":{ + "value":"Henry Ford Hospital" + }, + "Centre Leon Berard, Lyon France":{ + "value":"Centre Leon Berard" + } + } + }, + { + "in":"query", + "name":"sites.org_phone", + "description":"", + "required":false, + "schema":{ + "type":"string" + } + }, + { + "in":"query", + "name":"sites.recruitment_status", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "ACTIVE":{ + "value":"ACTIVE" + }, + "INACTIVE":{ + "value":"INACTIVE" + }, + "CLOSED_TO_ACCRUAL":{ + "value":"CLOSED_TO_ACCRUAL" + }, + "TEMPORARILY_CLOSED_TO_ACCRUAL":{ + "value":"TEMPORARILY_CLOSED_TO_ACCRUAL" + } + } + }, + { + "in":"query", + "name":"sites.recruitment_status_date", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "2020-11-18":{ + "value":"2020-11-18" + }, + "2020-10-22":{ + "value":"2020-10-22" + }, + "2019-08-15":{ + "value":"2019-08-15" + }, + "2014-09-15":{ + "value":"2014-09-15" + } + } + }, + { + "in":"query", + "name":"sites.recruitment_status_date_lte", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "2020-11-18":{ + "value":"2020-11-18" + }, + "2020-10-22":{ + "value":"2020-10-22" + }, + "2019-08-15":{ + "value":"2019-08-15" + }, + "2014-09-15":{ + "value":"2014-09-15" + } + } + }, + { + "in":"query", + "name":"sites.recruitment_status_date_gte", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "2020-11-18":{ + "value":"2020-11-18" + }, + "2020-10-22":{ + "value":"2020-10-22" + }, + "2019-08-15":{ + "value":"2019-08-15" + }, + "2014-09-15":{ + "value":"2014-09-15" + } + } + }, + { + "$ref":"#/components/parameters/lead_org_cancer_center" + } + ], + "responses":{ + "200":{ + "description":"The list of results matching given search criteria.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TrialResponse" } - } - }, - { - "in":"query", - "name":"type_not", - "description":"This will do the opposite of 'type' above and exclude rather than include. Note that multiple values for type creates an 'AND' condition for the result set. Results will meet all menu_not values requested. Use 'type' and 'type_not' together to further filter results.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "reference_gene":{ - "value":"reference_gene" - }, - "branch":{ - "value":"branch" + } + } + }, + "400":{ + "description":"Bad Request." + }, + "500":{ + "description":"An exception occurred at the backend." + }, + "502":{ + "description":"An exception occurred at the backend." + } + } + }, + "post":{ + "tags":[ + "Trials" + ], + "summary":"Search Trials by POST", + "security":[ + { + "ApiKeyAuth":[ + + ] + } + ], + "description":"

POST trials

Same as the GET endpoint, but allows you to craft a JSON body as the request.

Example:

curl -XPOST 'https://clinicaltrialsapi.cancer.gov/v2/trials' -H 'Content-Type: application/json' -d '{
\"sites.org_state_or_province\": [\"CA\", \"OR\"],
\"record_verification_date_gte\": \"2016-06-01\",
\"include\": [\"nci_id\"]
}'
", + "operationId":"searchTrialsByPost", + "requestBody":{ + "description":"Query in JSON format", + "required":true, + "content":{ + "application/json":{ + "schema":{ + "type":"object" + }, + "examples":{ + "":{ + "value":"" + }, + "Organizations in CO or OR since 2016-06-01, show only nci_id and nct_id":{ + "value":{ + "sites.org_state_or_province":[ + "CA", + "OR" + ], + "record_verification_date_gte":"2016-06-01", + "include":[ + "nci_id", + "nct_id" + ] + } + }, + "equivalent of \"_trial_ids=OSU-14078\" from v1":{ + "value":{ + "keyword":"OSU-14078", + "keyword_field":[ + "ccr_id", + "ctep_id", + "dcp_id", + "nci_id", + "nct_id", + "other_ids.value", + "protocol_id" + ], + "include":[ + "ccr_id", + "ctep_id", + "dcp_id", + "nci_id", + "nct_id", + "other_ids.value", + "protocol_id" + ] + } + }, + "Search for \"breast cancer\" in brief title or in lead_org":{ + "value":{ + "keyword":"breast cancer", + "keyword_field":[ + "brief_title._fulltext", + "lead_org._auto" + ], + "include":[ + "nci_id", + "nct_id", + "brief_title", + "lead_org" + ] + } + }, + "Export all trial information as json file":{ + "value":{ + "export":"true", + "export_type":"json", + "filename":"all_trials", + "email":"user@your-email.com" + } + }, + "Export nci_id, brief title, and lead organization information for all trials related to breast cancer as excel file":{ + "value":{ + "export":"true", + "export_type":"excel", + "filename":"breast_cancer_trials", + "email":"user@your-email.com", + "keyword":"breast cancer", + "include":[ + "nci_id", + "brief_title", + "lead_org" + ] + } + } + } + } + } + }, + "responses":{ + "200":{ + "description":"The list of results matching given search criteria.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TrialResponse" } - } - }, - { - "in":"query", - "name":"parent_ids", - "description":"Setting the parent_id value will get you a direct child along a biomarker path.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "C98357":{ - "value":"C98357" - }, - "C25871":{ - "value":"C25871" - }, - "C98303":{ - "value":"C98303" - }, - "C131912":{ - "value":"C131912" - } - } - }, - { - "in":"query", - "name":"ancestor_ids", - "description":"Setting an ancestor_ids value will get you any of the children along a biomarker path.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "C98357":{ - "value":"C98357" - }, - "C25871":{ - "value":"C25871" - }, - "C98303":{ - "value":"C98303" - }, - "C131912":{ - "value":"C131912" - } - } - }, - { - "in":"query", - "name":"codes", - "description":"", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "C3367":{ - "value":"C3367" - }, - "C7057":{ - "value":"C7057" - }, - "C25871":{ - "value":"C25871" - }, - "C98303":{ - "value":"C98303" - }, - "C131912":{ - "value":"C131912" - } - } - }, - { - "in":"query", - "name":"assay_purpose", - "description":"Why the biomarker is being measured", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "":{ - "value":"" - }, - "Eligibility Criterion - Exclusion":{ - "value":"Eligibility Criterion - Exclusion" - }, - "Eligibility Criterion - Inclusion":{ - "value":"Eligibility Criterion - Inclusion" - } - } - }, - { - "in":"query", - "name":"semantic_types", - "description":"Broad subject categories that provide a consistent categorization of all concepts represented", - "required":false, - "schema":{ - "type":"string" - } - }, - { - "in":"query", - "name":"include", - "description":"Include only this field(s) in trials and exclude others. Use multiple times to include multiple fields. (Useful if you want to minimize the payload returned)", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "all fields":{ - "value":"" - }, - "no data; just get the count":{ - "value":"none" - }, - "name":{ - "value":"name" - }, - "eligibility_criterion":{ - "value":"eligibility_criterion" - }, - "codes":{ - "value":"codes" - }, - "type":{ - "value":"type" - }, - "parent_ids":{ - "value":"parent_ids" - }, - "ancestor_ids":{ - "value":"ancestor_ids" - }, - "synonyms":{ - "value":"synonyms" - }, - "count":{ - "value":"count" - } - } - }, - { - "in":"query", - "name":"sort", - "description":"Default set to 'name'. Currently works only for name and count.", - "required":false, - "schema":{ - "type":"string" - }, - "examples":{ - "use default":{ - "value":"" - }, - "name":{ - "value":"name" - }, - "count":{ - "value":"count" - }, - "code (Not available. Will result in 400 response code)":{ - "value":"code" - }, - "type (Not available. Will result in 400 response code)":{ - "value":"type" - }, - "parent_ids (Not available. Will result in 400 response code)":{ - "value":"parent_ids" - } - } - }, - { - "$ref":"#/components/parameters/order" - }, - { - "$ref":"#/components/parameters/size" - } - ], - "responses":{ - "200":{ - "description":"The list matching given search criteria." - }, - "400":{ - "description":"Bad Request." - }, - "500":{ - "description":"An exception occurred at the backend." - }, - "502":{ - "description":"An exception occurred at the backend." - } - } - } - } - } - } \ No newline at end of file + } + } + }, + "400":{ + "description":"Bad Request." + }, + "500":{ + "description":"Exception occurred at the backend (except EntityNotFoundException)." + }, + "502":{ + "description":"An exception occurred at the backend." + } + } + } + }, + "/interventions":{ + "get":{ + "tags":[ + "Interventions" + ], + "summary":"Search Interventions by GET", + "security":[ + { + "ApiKeyAuth":[ + + ] + } + ], + "description":"

GET interventions?<filter_params>

The interventions endpoint is intended for typeaheads and other use cases where it is necessary to search for available interventions which can later be used to filter clinical trial results. Interventions are matched partially by supplying a string to the name field and may be filtered by other fields through parameters described below. Results are sorted by a combination of in alphabetical order by default i.e sort is set to name and order is set to asc.

Example interventions?category=agent%20category&name=Therapeutic

Progressive Filtering functionality: All trial fields parameters described at the /trials endpoint are usable here to filter the trials from which you want to aggregate. For example, if you request /interventions?maintype=C4872 this will give you all interventions that are in trials where Breast Cancer(C4872) is among the diseases in each trial. Note that maintype is a trials endpoint parameter related to diseases.nci_thesaurus_concept_id.

When searching in the interventions Endpoint with multiple values for the following parameters (codes, category, type), API will treat values as an OR condition and will return data that contains one or the other that is being searched.

Examples

  • codes=C78203&codes=C141136, API will return codes = C78203 OR codes = C141136
  • category=agent&category=agent%20category&&category=other, API will return category = agent OR category = agent category OR category = other
  • type=drug&type=genetic, API will return type = drug OR type = genetic

codes and code parameters will be used interchangeably within CTS API V2


", + "operationId":"searchInterventionsByGet", + "parameters":[ + { + "in":"query", + "name":"name", + "description":"Note that name checks for values assigned to name as well as values assigned to synonyms.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "D-Glucose-1,2-13C2":{ + "value":"D-Glucose-1,2-13C2" + }, + "Carcinoma":{ + "value":"Carcinoma" + }, + "Acute Lymphoblastic Leukemia in Remission":{ + "value":"Acute Lymphoblastic Leukemia in Remission" + }, + "Cutaneous Mastocytosis":{ + "value":"Cutaneous Mastocytosis" + }, + "Cutaneous Angiosarcoma":{ + "value":"Cutaneous Angiosarcoma" + }, + "1,2-Carbon C 13-labeled Glucose":{ + "value":"1,2-Carbon C 13-labeled Glucose" + }, + "Monoclonal Antibody":{ + "value":"Monoclonal Antibody" + }, + "Antineoplastic Antibody":{ + "value":"Antineoplastic Antibody" + }, + "Baltaleucel":{ + "value":"Baltaleucel" + }, + "Basiliximab":{ + "value":"Basiliximab" + }, + "Cancer Vaccine":{ + "value":"Cancer Vaccine" + }, + "Chemoradiotherapy":{ + "value":"Chemoradiotherapy" + }, + "Computer-Assisted":{ + "value":"Computer-Assisted" + }, + "Computer-Assisted Smoking Cessation Intervention":{ + "value":"Computer-Assisted Smoking Cessation Intervention" + }, + "Diary":{ + "value":"Diary" + }, + "EGFR":{ + "value":"EGFR" + }, + "EGFR-targeting Agent":{ + "value":"EGFR-targeting Agent" + }, + "Flaxseed":{ + "value":"Flaxseed" + }, + "Gemcitabine":{ + "value":"Gemcitabine" + }, + "Intubation":{ + "value":"Intubation" + }, + "Music Therapy":{ + "value":"Music Therapy" + }, + "PDGFR":{ + "value":"PDGFR" + }, + "Polyvalent":{ + "value":"Polyvalent" + }, + "Psychosocial":{ + "value":"Psychosocial" + }, + "Scale":{ + "value":"Scale" + }, + "Smoking":{ + "value":"Smoking" + }, + "Study":{ + "value":"Study" + }, + "Thalidomide":{ + "value":"Thalidomide" + }, + "Vaccin":{ + "value":"Vaccin" + }, + "Zalifrelimab":{ + "value":"Zalifrelimab" + } + } + }, + { + "in":"query", + "name":"category", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "none":{ + "value":"none" + }, + "agent":{ + "value":"agent" + }, + "agent category":{ + "value":"agent category" + }, + "other":{ + "value":"other" + } + } + }, + { + "in":"query", + "name":"type", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "behavioral":{ + "value":"behavioral" + }, + "biological":{ + "value":"biological" + }, + "biological/vaccine":{ + "value":"biological/vaccine" + }, + "drug":{ + "value":"drug" + }, + "genetic":{ + "value":"genetic" + }, + "procedure":{ + "value":"procedure" + }, + "procedure/surgery":{ + "value":"procedure/surgery" + }, + "radiation":{ + "value":"radiation" + }, + "surgery":{ + "value":"surgery" + }, + "vaccine":{ + "value":"vaccine" + }, + "other":{ + "value":"other" + } + } + }, + { + "in":"query", + "name":"codes", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "C82414":{ + "value":"C82414" + }, + "C171257":{ + "value":"C171257" + }, + "C129967":{ + "value":"C129967" + }, + "C17934":{ + "value":"C17934" + }, + "C124648":{ + "value":"C124648" + }, + "C94726":{ + "value":"C94726" + }, + "C274":{ + "value":"C274" + }, + "C130058":{ + "value":"C130058" + }, + "C62533":{ + "value":"C62533" + }, + "C3588":{ + "value":"C3588" + }, + "C3211":{ + "value":"C3211" + }, + "C3208":{ + "value":"C3208" + }, + "C131085":{ + "value":"C131085" + }, + "C27134":{ + "value":"C27134" + }, + "C27859":{ + "value":"C27859" + } + } + }, + { + "in":"query", + "name":"include", + "description":"Include only this field(s) in trials and exclude others. Use multiple times to include multiple fields. (Useful if you want to minimize the payload returned)", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "all fields":{ + "value":"" + }, + "no data; just get the count":{ + "value":"none" + }, + "name":{ + "value":"name" + }, + "category":{ + "value":"category" + }, + "codes":{ + "value":"codes" + }, + "type":{ + "value":"type" + }, + "synonyms":{ + "value":"synonyms" + }, + "count":{ + "value":"count" + } + } + }, + { + "in":"query", + "name":"sort", + "description":"Default set to 'name'. Currently works only for name and count.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "use default":{ + "value":"" + }, + "name":{ + "value":"name" + }, + "count":{ + "value":"count" + }, + "category (Not available. Will result in 400 response code)":{ + "value":"category" + }, + "code (Not available. Will result in 400 response code)":{ + "value":"code" + }, + "type (Not available. Will result in 400 response code)":{ + "value":"type" + }, + "parent_ids (Not available. Will result in 400 response code)":{ + "value":"parent_ids" + } + } + }, + { + "$ref":"#/components/parameters/order" + }, + { + "$ref":"#/components/parameters/size" + } + ], + "responses":{ + "200":{ + "description":"The list matching given search criteria." + }, + "400":{ + "description":"Bad Request." + }, + "500":{ + "description":"An exception occurred at the backend." + }, + "502":{ + "description":"An exception occurred at the backend." + } + } + } + }, + "/diseases":{ + "get":{ + "tags":[ + "Diseases" + ], + "summary":"Search Diseases by GET", + "security":[ + { + "ApiKeyAuth":[ + + ] + } + ], + "description":"

GET diseases?<filter_params>

The diseases endpoint is intended for typeaheads and other use cases where it is necessary to search for available diseases which can later be used to filter clinical trial results. Diseases are matched partially by supplying a string to the name field and may be filtered by other fields through parameters described below. Results are sorted by a combination of in alphabetical order by default i.e sort is set to name and order is set to asc.

Example: diseases?type_not=subtype&type=maintype&name=He

Progressive Filtering functionality: All trial fields parameters described at the /trials endpoint are usable here to filter the trials from which you want to aggregate. For example, if you request /diseases?maintype=C4872 this will give you all diseases that are in trials where Breast Cancer(C4872) is among the diseases in each trial. Note that maintype is a trials endpoint parameter related to diseases.nci_thesaurus_concept_id.

When searching in the Diseases Endpoint with multiple values for the following parameters (codes, ancestor_ids, parent_ids, type), API will treat values as an OR condition and will return data that satisfies at least one of the condition being searched.

Examples
  • codes=C8285&codes=C8286, API will return codes = C8285 OR codes = C8286.
  • ancestor_ids=C4878&ancestor_ids=C4912, API will return ancestor_id = C4878 OR ancestor_ids = C4912.
  • parent_ids=C9039&parent_ids=C3099, API will return parent_ids = C9039 OR parent_ids = C3099.
  • type=maintype&type=subtype, API will return type = maintype OR type = subtype

codes and code parameters will be used interchangeably within CTS API V2


", + "operationId":"searchDiseasesByGet", + "parameters":[ + { + "in":"query", + "name":"name", + "description":"Note that name checks for values assigned to name as well as values assigned to synonyms.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Myeloid Leukemia":{ + "value":"Myeloid Leukemia" + }, + "Carcinoma":{ + "value":"Carcinoma" + }, + "Acute Lymphoblastic Leukemia in Remission":{ + "value":"Acute Lymphoblastic Leukemia in Remission" + }, + "Cutaneous Mastocytosis":{ + "value":"Cutaneous Mastocytosis" + }, + "Cutaneous Angiosarcoma":{ + "value":"Cutaneous Angiosarcoma" + } + } + }, + { + "in":"query", + "name":"type", + "description":"Type of Disease - Note that multiple values for type creates an 'OR' condition for the result set. Results will meet one of the type values requested. Use 'type' and 'type_not' together to further filter results.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "finding":{ + "value":"finding" + }, + "maintype":{ + "value":"maintype" + }, + "subtype":{ + "value":"subtype" + }, + "stage":{ + "value":"stage" + }, + "grade":{ + "value":"grade" + } + } + }, + { + "in":"query", + "name":"type_not", + "description":"This will do the opposite of 'type' above and exclude rather than include. Note that multiple values for type creates an 'AND' condition for the result set. Results will meet all menu_not values requested. Use 'type' and 'type_not' together to further filter results.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "finding":{ + "value":"finding" + }, + "maintype":{ + "value":"maintype" + }, + "subtype":{ + "value":"subtype" + }, + "stage":{ + "value":"stage" + }, + "grade":{ + "value":"grade" + } + } + }, + { + "in":"query", + "name":"parent_ids", + "description":"Setting the parent_id value will get you a direct child along a disease path.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "C3211":{ + "value":"C3211" + }, + "C3208":{ + "value":"C3208" + }, + "C3172":{ + "value":"C3208" + }, + "C27134":{ + "value":"C27134" + }, + "C27859":{ + "value":"C27859" + } + } + }, + { + "in":"query", + "name":"ancestor_ids", + "description":"Setting an ancestor_ids value will get you any of the children along a disease path.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "C3211":{ + "value":"C3211" + }, + "C3208":{ + "value":"C3208" + }, + "C3172":{ + "value":"C3172" + }, + "C27134":{ + "value":"C27134" + }, + "C27859":{ + "value":"C27859" + } + } + }, + { + "in":"query", + "name":"codes", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "C5192":{ + "value":"C5192" + }, + "C3588":{ + "value":"C3588" + }, + "C3211":{ + "value":"C3211" + }, + "C3208":{ + "value":"C3208" + }, + "C131085":{ + "value":"C131085" + }, + "C27134":{ + "value":"C27134" + }, + "C27859":{ + "value":"C27859" + } + } + }, + { + "in":"query", + "name":"include", + "description":"Include only this field(s) in trials and exclude others. Use multiple times to include multiple fields. (Useful if you want to minimize the payload returned)", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "all fields":{ + "value":"" + }, + "no data; just get the count":{ + "value":"none" + }, + "name":{ + "value":"name" + }, + "code":{ + "value":"code" + }, + "codes":{ + "value":"codes" + }, + "type":{ + "value":"type" + }, + "parent_ids":{ + "value":"parent_ids" + }, + "ancestor_ids":{ + "value":"ancestor_ids" + }, + "synonym":{ + "value":"synonym" + }, + "synonyms":{ + "value":"synonyms" + }, + "count":{ + "value":"count" + } + } + }, + { + "in":"query", + "name":"sort", + "description":"Default set to 'name'. Currently works only for name and count.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "use default":{ + "value":"" + }, + "name":{ + "value":"name" + }, + "count":{ + "value":"count" + }, + "code (Not available. Will result in 400 response code)":{ + "value":"code" + }, + "type (Not available. Will result in 400 response code)":{ + "value":"type" + }, + "parent_ids (Not available. Will result in 400 response code)":{ + "value":"parent_ids" + } + } + }, + { + "$ref":"#/components/parameters/order" + }, + { + "$ref":"#/components/parameters/size" + } + ], + "responses":{ + "200":{ + "description":"The list matching given search criteria." + }, + "400":{ + "description":"Bad Request." + }, + "500":{ + "description":"An exception occurred at the backend." + }, + "502":{ + "description":"An exception occurred at the backend." + } + } + } + }, + "/organizations":{ + "get":{ + "tags":[ + "Organizations" + ], + "summary":"Search Organizations by GET", + "security":[ + { + "ApiKeyAuth":[ + + ] + } + ], + "description":"

GET organizations?<filter_params>

The organizations endpoint is intended for typeaheads and other use cases where it is necessary to search for available organizations which can later be used to filter clinical trial results. Organizations are matched partially by supplying a string to the name field and may be filtered by other fields through parameters described below. Results are sorted by a combination of in alphabetical order by default i.e sort is set to name and order is set to asc.

Example: organizations?org_city=Las Vegas&org_country=United States&name=University

Progressive Filtering functionality: All trial fields parameters described at the /trials endpoint are usable here to filter the trials from which you want to aggregate. For example, if you request /organizations?maintype=C4872 this will give you all organizations that are in trials where Breast Cancer(C4872) is among the diseases in each trial. Note that maintype is a trials endpoint parameter related to diseases.nci_thesaurus_concept_id.


", + "operationId":"searchOrganizationsByGet", + "parameters":[ + { + "in":"query", + "name":"name", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Alegemeen Ziekenhuis Middelheim, Antwerpen Belgium":{ + "value":"Alegemeen Ziekenhuis Middelheim" + }, + "Cancer Trials Support Unit, Rockville Maryland":{ + "value":"Cancer Trials Support Unit" + }, + "CancerCare Manitoba, Winnipeg Canada":{ + "value":"CancerCare Manitoba" + }, + "Henry Ford Hospital, Detroit MI":{ + "value":"Henry Ford Hospital" + }, + "Centre Leon Berard, Lyon France":{ + "value":"Centre Leon Berard" + } + } + }, + { + "in":"query", + "name":"contact_name", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Anthony John Jaslowski":{ + "value":"Anthony John Jaslowski" + }, + "Dwight L. Fitch":{ + "value":"Dwight L. Fitch" + }, + "Site Public Contact":{ + "value":"Site Public Contact" + } + } + }, + { + "in":"query", + "name":"contact_email", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "info@westernstatesncorp.org":{ + "value":"info@westernstatesncorp.org" + }, + "clinical.trials@daytonncorp.org":{ + "value":"clinical.trials@daytonncorp.org" + } + } + }, + { + "in":"query", + "name":"contact_phone", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "800-398-3996":{ + "value":"800-398-3996" + }, + "626-564-3455":{ + "value":"626-564-3455" + }, + "800-611-1811":{ + "value":"800-611-1811" + } + } + }, + { + "in":"query", + "name":"org_address_line_1", + "description":"", + "required":false, + "schema":{ + "type":"string" + } + }, + { + "in":"query", + "name":"org_address_line_2", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Suite 100":{ + "value":"Suite 100" + }, + "MIND Building Suite 110":{ + "value":"MIND Building Suite 110" + }, + "MidOalkland Medical Center Suite 106":{ + "value":"MidOalkland Medical Center Suite 106" + } + } + }, + { + "in":"query", + "name":"org_city", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Antwerpen":{ + "value":"Antwerpen" + }, + "Aurora":{ + "value":"Aurora" + }, + "Bern":{ + "value":"Bern" + }, + "Montreal":{ + "value":"Montreal" + }, + "Vienna":{ + "value":"Vienna" + }, + "Villejuif":{ + "value":"Villejuif" + }, + "Winnipeg":{ + "value":"Winnipeg" + } + } + }, + { + "in":"query", + "name":"org_country", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Canada":{ + "value":"Canada" + }, + "Italy":{ + "value":"Italy" + }, + "Netherlands":{ + "value":"Netherlands" + }, + "Switzerland":{ + "value":"Switzerland" + }, + "United States":{ + "value":"United States" + } + } + }, + { + "in":"query", + "name":"org_email", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "info@westernstatesncorp.org":{ + "value":"info@westernstatesncorp.org" + }, + "clinical.trials@daytonncorp.org":{ + "value":"clinical.trials@daytonncorp.org" + } + } + }, + { + "in":"query", + "name":"org_phone", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "800-398-3996":{ + "value":"800-398-3996" + }, + "626-564-3455":{ + "value":"626-564-3455" + }, + "800-611-1811":{ + "value":"800-611-1811" + } + } + }, + { + "in":"query", + "name":"org_fax", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "317-831-9292":{ + "value":"317-831-9292" + } + } + }, + { + "in":"query", + "name":"org_tty", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "800-735-2258":{ + "value":"800-735-2258" + } + } + }, + { + "in":"query", + "name":"org_state_or_province", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "AL - Alabama":{ + "value":"AL" + }, + "CA - California":{ + "value":"CA" + }, + "CO - Colorado":{ + "value":"CO" + }, + "DC - District of Columbia":{ + "value":"DC" + }, + "FL - Florida":{ + "value":"FL" + }, + "MD - Maryland":{ + "value":"MD" + }, + "NY - New York":{ + "value":"NY" + }, + "WI - Wisconsin":{ + "value":"WI" + }, + "Ontario":{ + "value":"Ontario" + } + } + }, + { + "in":"query", + "name":"org_va", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "true":{ + "value":"true" + }, + "false":{ + "value":"false" + } + } + }, + { + "in":"query", + "name":"org_postal_code", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Washington DC":{ + "value":"20470" + }, + "Bethesda Maryland":{ + "value":"20890" + }, + "Groningen Netherlands":{ + "value":"9700 GZ" + }, + "Montreal Canada":{ + "value":"H2L 4M1" + }, + "Rockville Maryland":{ + "value":"20850-2062" + }, + "Aurora Colorado":{ + "value":"80012" + } + } + }, + { + "in":"query", + "name":"org_family", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Mayo Clinic Cancer Center":{ + "value":"Mayo Clinic Cancer Center" + }, + "Alvin J. Siteman Cancer Center":{ + "value":"Alvin J. Siteman Cancer Center" + }, + "University of Chicago Comprehensive Cancer Center":{ + "value":"University of Chicago Comprehensive Cancer Center" + }, + "MD Anderson Cancer Center":{ + "value":"MD Anderson Cancer Center" + }, + "Roswell Park Cancer Institute":{ + "value":"Roswell Park Cancer Institute" + }, + "Stanford Cancer Institute":{ + "value":"Stanford Cancer Institute" + } + } + }, + { + "in":"query", + "name":"org_coordinates_lat", + "description":"Organization's Latitude - for example: 43.7029", + "required":false, + "schema":{ + "type":"number", + "minimum":-999, + "maximum":999 + }, + "examples":{ + "":{ + "value":"" + }, + "Kaiser Permanente-Glenlake Medical Center":{ + "value":"33.9325" + }, + "Riverside Methodist Hospital":{ + "value":"40.0525" + }, + "Baptist MD Anderson Cancer Center":{ + "value":"30.291" + } + } + }, + { + "in":"query", + "name":"org_coordinates_lon", + "description":"Organization's Longitude - for example: -72.2895", + "required":false, + "schema":{ + "type":"number", + "minimum":-999, + "maximum":999 + }, + "examples":{ + "":{ + "value":"" + }, + "Kaiser Permanente-Glenlake Medical Center":{ + "value":"-84.3852" + }, + "Riverside Methodist Hospital":{ + "value":"-83.02" + }, + "Baptist MD Anderson Cancer Center":{ + "value":"-81.6318" + } + } + }, + { + "in":"query", + "name":"org_coordinates_dist", + "description":"The radius around a given geolocation. The geolocation can be provided by using both org_coordinates_lon and org_coordinates_lat, as described above, OR by specifying the zip code org_postal_code, at which point the geolocation will be calculated for you. We only support miles or kilometers for distance: for example org_coordinates_dist=25mi or org_coordinates_dist=25km. Geolocation Search only works to find sites in the United States. If not provided with geolocation parameters, currently defaults to 0.67mi to provide 'at location' results.", + "required":false, + "schema":{ + "type":"string" + } + }, + { + "in":"query", + "name":"include", + "description":"Include only this field(s) in trials and exclude others. Use multiple times to include multiple fields. (Useful if you want to minimize the payload returned)", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "all fields":{ + "value":"" + }, + "no data; just get the count":{ + "value":"none" + }, + "name":{ + "value":"name" + }, + "contact_name":{ + "value":"contact_name" + }, + "contact_email":{ + "value":"contact_email" + }, + "contact_phone":{ + "value":"contact_phone" + }, + "org_address_line_1":{ + "value":"org_address_line_1" + }, + "org_address_line_2":{ + "value":"org_address_line_2" + }, + "org_city":{ + "value":"org_city" + }, + "org_country":{ + "value":"org_country" + }, + "org_email":{ + "value":"org_email" + }, + "recruitment_status":{ + "value":"recruitment_status" + }, + "recruitment_status_date":{ + "value":"recruitment_status_date" + }, + "org_phone":{ + "value":"org_phone" + }, + "org_fax":{ + "value":"org_fax" + }, + "org_tty":{ + "value":"org_tty" + }, + "org_state_or_province":{ + "value":"org_state_or_province" + }, + "org_va":{ + "value":"org_va" + }, + "org_postal_code":{ + "value":"org_postal_code" + }, + "org_family":{ + "value":"org_family" + }, + "org_coordinates":{ + "value":"org_coordinates" + } + } + }, + { + "in":"query", + "name":"sort", + "description":"Default set to 'name'. Currently works only for name.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "use default":{ + "value":"" + }, + "name":{ + "value":"name" + }, + "count":{ + "value":"count" + }, + "contact_name (Not available. Will result in 400 response code)":{ + "value":"contact_name" + }, + "contact_email (Not available. Will result in 400 response code)":{ + "value":"contact_email" + }, + "org_country (Not available. Will result in 400 response code)":{ + "value":"org_country" + }, + "org_state_or_province (Not available. Will result in 400 response code)":{ + "value":"org_state_or_province" + } + } + }, + { + "$ref":"#/components/parameters/order" + }, + { + "$ref":"#/components/parameters/size" + } + ], + "responses":{ + "200":{ + "description":"The list matching given search criteria." + }, + "400":{ + "description":"Bad Request." + }, + "500":{ + "description":"An exception occurred at the backend." + }, + "502":{ + "description":"An exception occurred at the backend." + } + } + } + }, + "/biomarkers":{ + "get":{ + "tags":[ + "Biomarkers" + ], + "summary":"Search Biomarkers by GET", + "security":[ + { + "ApiKeyAuth":[ + + ] + } + ], + "description":"

GET biomarkers?<filter_params>

The biomarkers endpoint is intended for typeaheads and other use cases where it is necessary to search for available biomarkers which can later be used to filter clinical trial results. Biomarkers are matched partially by supplying a string to the name field and may be filtered by other fields through parameters described below. Results are sorted by a combination of in alphabetical order by default i.e sort is set to name and order is set to asc.

Example: biomarkers?eligibility_criterion=inclusion&name=estrogen

Progressive Filtering functionality: All trial fields parameters described at the /trials endpoint are usable here to filter the trials from which you want to aggregate. For example, if you request /biomarkers?maintype=C4872 this will give you all biomarkers that are in trials where Breast Cancer(C4872) is among the diseases in each trial. Note that maintype is a trials endpoint parameter related to diseases.nci_thesaurus_concept_id.


", + "operationId":"searchBiomarkersByGet", + "parameters":[ + { + "in":"query", + "name":"name", + "description":"Note that name checks for values assigned to name as well as values assigned to synonyms.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "ALK Positive":{ + "value":"ALK Positive" + }, + "Chromosome":{ + "value":"Chromosome" + }, + "DNA Structure":{ + "value":"DNA Structure" + }, + "Kinases":{ + "value":"Kinases" + }, + "Finding":{ + "value":"Finding" + } + } + }, + { + "in":"query", + "name":"eligibility_criterion", + "description":"Eligibility criterion - inclusion or exclusion.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "inclusion":{ + "value":"inclusion" + }, + "exclusion":{ + "value":"exclusion" + } + } + }, + { + "in":"query", + "name":"type", + "description":"Type of Biomarker - Note that multiple values for type creates an 'OR' condition for the result set. Results will meet one of the type values requested. Use 'type' and 'type_not' together to further filter results.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "reference_gene":{ + "value":"reference_gene" + }, + "branch":{ + "value":"branch" + } + } + }, + { + "in":"query", + "name":"type_not", + "description":"This will do the opposite of 'type' above and exclude rather than include. Note that multiple values for type creates an 'AND' condition for the result set. Results will meet all menu_not values requested. Use 'type' and 'type_not' together to further filter results.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "reference_gene":{ + "value":"reference_gene" + }, + "branch":{ + "value":"branch" + } + } + }, + { + "in":"query", + "name":"parent_ids", + "description":"Setting the parent_id value will get you a direct child along a biomarker path.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "C98357":{ + "value":"C98357" + }, + "C25871":{ + "value":"C25871" + }, + "C98303":{ + "value":"C98303" + }, + "C131912":{ + "value":"C131912" + } + } + }, + { + "in":"query", + "name":"ancestor_ids", + "description":"Setting an ancestor_ids value will get you any of the children along a biomarker path.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "C98357":{ + "value":"C98357" + }, + "C25871":{ + "value":"C25871" + }, + "C98303":{ + "value":"C98303" + }, + "C131912":{ + "value":"C131912" + } + } + }, + { + "in":"query", + "name":"codes", + "description":"", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "C3367":{ + "value":"C3367" + }, + "C7057":{ + "value":"C7057" + }, + "C25871":{ + "value":"C25871" + }, + "C98303":{ + "value":"C98303" + }, + "C131912":{ + "value":"C131912" + } + } + }, + { + "in":"query", + "name":"assay_purpose", + "description":"Why the biomarker is being measured", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "":{ + "value":"" + }, + "Eligibility Criterion - Exclusion":{ + "value":"Eligibility Criterion - Exclusion" + }, + "Eligibility Criterion - Inclusion":{ + "value":"Eligibility Criterion - Inclusion" + } + } + }, + { + "in":"query", + "name":"semantic_types", + "description":"Broad subject categories that provide a consistent categorization of all concepts represented", + "required":false, + "schema":{ + "type":"string" + } + }, + { + "in":"query", + "name":"include", + "description":"Include only this field(s) in trials and exclude others. Use multiple times to include multiple fields. (Useful if you want to minimize the payload returned)", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "all fields":{ + "value":"" + }, + "no data; just get the count":{ + "value":"none" + }, + "name":{ + "value":"name" + }, + "eligibility_criterion":{ + "value":"eligibility_criterion" + }, + "codes":{ + "value":"codes" + }, + "type":{ + "value":"type" + }, + "parent_ids":{ + "value":"parent_ids" + }, + "ancestor_ids":{ + "value":"ancestor_ids" + }, + "synonyms":{ + "value":"synonyms" + }, + "count":{ + "value":"count" + } + } + }, + { + "in":"query", + "name":"sort", + "description":"Default set to 'name'. Currently works only for name and count.", + "required":false, + "schema":{ + "type":"string" + }, + "examples":{ + "use default":{ + "value":"" + }, + "name":{ + "value":"name" + }, + "count":{ + "value":"count" + }, + "code (Not available. Will result in 400 response code)":{ + "value":"code" + }, + "type (Not available. Will result in 400 response code)":{ + "value":"type" + }, + "parent_ids (Not available. Will result in 400 response code)":{ + "value":"parent_ids" + } + } + }, + { + "$ref":"#/components/parameters/order" + }, + { + "$ref":"#/components/parameters/size" + } + ], + "responses":{ + "200":{ + "description":"The list matching given search criteria." + }, + "400":{ + "description":"Bad Request." + }, + "500":{ + "description":"An exception occurred at the backend." + }, + "502":{ + "description":"An exception occurred at the backend." + } + } + } + } + } +} \ No newline at end of file diff --git a/NCIClinicalTrialsSearchAPI/.openapi-generator/FILES b/NCIClinicalTrialsSearchAPI/.openapi-generator/FILES index d11b538..9a05b42 100644 --- a/NCIClinicalTrialsSearchAPI/.openapi-generator/FILES +++ b/NCIClinicalTrialsSearchAPI/.openapi-generator/FILES @@ -15,16 +15,48 @@ OpenAPIClient/Classes/OpenAPIs/Extensions.swift OpenAPIClient/Classes/OpenAPIs/JSONDataEncoding.swift OpenAPIClient/Classes/OpenAPIs/JSONEncodingHelper.swift OpenAPIClient/Classes/OpenAPIs/Models.swift +OpenAPIClient/Classes/OpenAPIs/Models/Arm.swift +OpenAPIClient/Classes/OpenAPIs/Models/CentralContact.swift +OpenAPIClient/Classes/OpenAPIs/Models/Collaborators.swift +OpenAPIClient/Classes/OpenAPIs/Models/Coordinates.swift +OpenAPIClient/Classes/OpenAPIs/Models/Disease.swift +OpenAPIClient/Classes/OpenAPIs/Models/Eligibility.swift +OpenAPIClient/Classes/OpenAPIs/Models/Identifier.swift +OpenAPIClient/Classes/OpenAPIs/Models/Intervention.swift +OpenAPIClient/Classes/OpenAPIs/Models/Masking.swift +OpenAPIClient/Classes/OpenAPIs/Models/OutcomeMeasure.swift +OpenAPIClient/Classes/OpenAPIs/Models/Site.swift +OpenAPIClient/Classes/OpenAPIs/Models/StatusHistory.swift +OpenAPIClient/Classes/OpenAPIs/Models/StructuredEligibility.swift +OpenAPIClient/Classes/OpenAPIs/Models/TrialDetail.swift +OpenAPIClient/Classes/OpenAPIs/Models/TrialResponse.swift +OpenAPIClient/Classes/OpenAPIs/Models/UnstructuredEligibility.swift OpenAPIClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift OpenAPIClient/Classes/OpenAPIs/SynchronizedDictionary.swift OpenAPIClient/Classes/OpenAPIs/URLSessionImplementations.swift OpenAPIClient/Classes/OpenAPIs/Validation.swift Package.swift README.md +docs/Arm.md docs/BiomarkersAPI.md +docs/CentralContact.md +docs/Collaborators.md +docs/Coordinates.md +docs/Disease.md docs/DiseasesAPI.md +docs/Eligibility.md +docs/Identifier.md +docs/Intervention.md docs/InterventionsAPI.md +docs/Masking.md docs/OrganizationsAPI.md +docs/OutcomeMeasure.md +docs/Site.md +docs/StatusHistory.md +docs/StructuredEligibility.md +docs/TrialDetail.md +docs/TrialResponse.md docs/TrialsAPI.md +docs/UnstructuredEligibility.md git_push.sh project.yml diff --git a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/APIs.swift b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/APIs.swift index 716a394..f6a5fc8 100644 --- a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/APIs.swift +++ b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/APIs.swift @@ -9,7 +9,7 @@ import Foundation import FoundationNetworking #endif open class OpenAPIClientAPI { - public static var basePath = "https://clinicaltrialsapi-int.cancer.gov/api/v2" + public static var basePath = "https://clinicaltrialsapi.cancer.gov/api/v2" public static var customHeaders: [String: String] = [:] public static var credential: URLCredential? public static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory() diff --git a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/APIs/TrialsAPI.swift b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/APIs/TrialsAPI.swift index b533de5..616d0f3 100644 --- a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/APIs/TrialsAPI.swift +++ b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/APIs/TrialsAPI.swift @@ -20,11 +20,11 @@ open class TrialsAPI { - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func getTrialById(id: String, apiResponseQueue: DispatchQueue = OpenAPIClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { + open class func getTrialById(id: String, apiResponseQueue: DispatchQueue = OpenAPIClientAPI.apiResponseQueue, completion: @escaping ((_ data: TrialDetail?, _ error: Error?) -> Void)) -> RequestTask { return getTrialByIdWithRequestBuilder(id: id).execute(apiResponseQueue) { result in switch result { - case .success: - completion((), nil) + case let .success(response): + completion(response.body, nil) case let .failure(error): completion(nil, error) } @@ -40,9 +40,9 @@ open class TrialsAPI { - name: ApiKeyAuth - responseHeaders: [Access-Control-Allow-Origin(String)] - parameter id: (path) NCI ID or NCT ID of Trial. - - returns: RequestBuilder + - returns: RequestBuilder */ - open class func getTrialByIdWithRequestBuilder(id: String) -> RequestBuilder { + open class func getTrialByIdWithRequestBuilder(id: String) -> RequestBuilder { var localVariablePath = "/trials/{id}" let idPreEscape = "\(APIHelper.mapValueToPathItem(id))" let idPostEscape = idPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -58,7 +58,7 @@ open class TrialsAPI { let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - let localVariableRequestBuilder: RequestBuilder.Type = OpenAPIClientAPI.requestBuilderFactory.getNonDecodableBuilder() + let localVariableRequestBuilder: RequestBuilder.Type = OpenAPIClientAPI.requestBuilderFactory.getBuilder() return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) } @@ -164,11 +164,11 @@ open class TrialsAPI { - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func searchTrialsByGet(size: Int? = nil, from: Int? = nil, sort: String? = nil, order: String? = nil, missing: String? = nil, exists: String? = nil, include: String? = nil, exclude: String? = nil, export: String? = nil, email: String? = nil, filename: String? = nil, fulltext: String? = nil, fieldParamFulltext: String? = nil, trialids: String? = nil, trialIds: String? = nil, keyword: String? = nil, keywordField: String? = nil, aggField: String? = nil, aggName: String? = nil, aggMinCount: Int? = nil, sitesOrgNameFulltext: String? = nil, trialStatus: String? = nil, nciFunded: String? = nil, nciId: String? = nil, nctId: String? = nil, protocolId: String? = nil, ccrId: String? = nil, ctepId: String? = nil, dcpId: String? = nil, currentTrialStatus: String? = nil, phase: String? = nil, studyProtocolType: String? = nil, nciPrograms: String? = nil, briefTitle: String? = nil, briefSummary: String? = nil, officialTitle: String? = nil, primaryPurpose: String? = nil, acceptsHealthyVolunteersIndicator: String? = nil, eligibilityStructuredAcceptsHealthyVolunteers: Bool? = nil, acronym: String? = nil, amendmentDate: String? = nil, anatomicSites: String? = nil, armsDescription: String? = nil, armsName: String? = nil, armsType: String? = nil, armsInterventionsNciThesaurusConceptId: String? = nil, armsInterventionsDescription: String? = nil, armsInterventionsName: String? = nil, armsInterventionsType: String? = nil, armsInterventionsSynonyms: String? = nil, associatedStudiesStudyId: String? = nil, associatedStudiesStudyIdType: String? = nil, eligibilityStructuredGender: String? = nil, eligibilityStructuredMinAgeInYearsLte: Int? = nil, eligibilityStructuredMinAgeInYearsGte: Int? = nil, eligibilityStructuredMaxAgeInYearsLte: Int? = nil, eligibilityStructuredMaxAgeInYearsGte: Int? = nil, eligibilityStructuredMinAgeUnit: String? = nil, eligibilityStructuredMinAgeNumberLte: Int? = nil, eligibilityStructuredMinAgeNumberGte: Int? = nil, eligibilityStructuredMaxAgeUnit: String? = nil, eligibilityStructuredMaxAgeNumberLte: Int? = nil, eligibilityStructuredMaxAgeNumberGte: Int? = nil, currentTrialStatusDateLte: String? = nil, currentTrialStatusDateGte: String? = nil, recordVerificationDateLte: String? = nil, recordVerificationDateGte: String? = nil, sitesOrgCoordinatesLat: Double? = nil, sitesOrgCoordinatesLon: Double? = nil, sitesOrgCoordinatesDist: String? = nil, sitesContactEmail: String? = nil, sitesContactName: String? = nil, sitesContactNameAuto: String? = nil, sitesContactNameRaw: String? = nil, sitesContactPhone: String? = nil, sitesOrgAddressLine1: String? = nil, sitesOrgAddressLine2: String? = nil, sitesOrgCity: String? = nil, sitesOrgPostalCode: String? = nil, sitesOrgStateOrProvince: String? = nil, sitesOrgCountry: String? = nil, sitesOrgCountryRaw: String? = nil, sitesOrgEmail: String? = nil, sitesOrgFamily: String? = nil, sitesOrgFax: String? = nil, sitesOrgName: String? = nil, sitesOrgNameAuto: String? = nil, sitesOrgNameRaw: String? = nil, sitesOrgPhone: String? = nil, sitesRecruitmentStatus: String? = nil, sitesRecruitmentStatusDate: String? = nil, sitesRecruitmentStatusDateLte: String? = nil, sitesRecruitmentStatusDateGte: String? = nil, leadOrgCancerCenter: String? = nil, apiResponseQueue: DispatchQueue = OpenAPIClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { + open class func searchTrialsByGet(size: Int? = nil, from: Int? = nil, sort: String? = nil, order: String? = nil, missing: String? = nil, exists: String? = nil, include: String? = nil, exclude: String? = nil, export: String? = nil, email: String? = nil, filename: String? = nil, fulltext: String? = nil, fieldParamFulltext: String? = nil, trialids: String? = nil, trialIds: String? = nil, keyword: String? = nil, keywordField: String? = nil, aggField: String? = nil, aggName: String? = nil, aggMinCount: Int? = nil, sitesOrgNameFulltext: String? = nil, trialStatus: String? = nil, nciFunded: String? = nil, nciId: String? = nil, nctId: String? = nil, protocolId: String? = nil, ccrId: String? = nil, ctepId: String? = nil, dcpId: String? = nil, currentTrialStatus: String? = nil, phase: String? = nil, studyProtocolType: String? = nil, nciPrograms: String? = nil, briefTitle: String? = nil, briefSummary: String? = nil, officialTitle: String? = nil, primaryPurpose: String? = nil, acceptsHealthyVolunteersIndicator: String? = nil, eligibilityStructuredAcceptsHealthyVolunteers: Bool? = nil, acronym: String? = nil, amendmentDate: String? = nil, anatomicSites: String? = nil, armsDescription: String? = nil, armsName: String? = nil, armsType: String? = nil, armsInterventionsNciThesaurusConceptId: String? = nil, armsInterventionsDescription: String? = nil, armsInterventionsName: String? = nil, armsInterventionsType: String? = nil, armsInterventionsSynonyms: String? = nil, associatedStudiesStudyId: String? = nil, associatedStudiesStudyIdType: String? = nil, eligibilityStructuredGender: String? = nil, eligibilityStructuredMinAgeInYearsLte: Int? = nil, eligibilityStructuredMinAgeInYearsGte: Int? = nil, eligibilityStructuredMaxAgeInYearsLte: Int? = nil, eligibilityStructuredMaxAgeInYearsGte: Int? = nil, eligibilityStructuredMinAgeUnit: String? = nil, eligibilityStructuredMinAgeNumberLte: Int? = nil, eligibilityStructuredMinAgeNumberGte: Int? = nil, eligibilityStructuredMaxAgeUnit: String? = nil, eligibilityStructuredMaxAgeNumberLte: Int? = nil, eligibilityStructuredMaxAgeNumberGte: Int? = nil, currentTrialStatusDateLte: String? = nil, currentTrialStatusDateGte: String? = nil, recordVerificationDateLte: String? = nil, recordVerificationDateGte: String? = nil, sitesOrgCoordinatesLat: Double? = nil, sitesOrgCoordinatesLon: Double? = nil, sitesOrgCoordinatesDist: String? = nil, sitesContactEmail: String? = nil, sitesContactName: String? = nil, sitesContactNameAuto: String? = nil, sitesContactNameRaw: String? = nil, sitesContactPhone: String? = nil, sitesOrgAddressLine1: String? = nil, sitesOrgAddressLine2: String? = nil, sitesOrgCity: String? = nil, sitesOrgPostalCode: String? = nil, sitesOrgStateOrProvince: String? = nil, sitesOrgCountry: String? = nil, sitesOrgCountryRaw: String? = nil, sitesOrgEmail: String? = nil, sitesOrgFamily: String? = nil, sitesOrgFax: String? = nil, sitesOrgName: String? = nil, sitesOrgNameAuto: String? = nil, sitesOrgNameRaw: String? = nil, sitesOrgPhone: String? = nil, sitesRecruitmentStatus: String? = nil, sitesRecruitmentStatusDate: String? = nil, sitesRecruitmentStatusDateLte: String? = nil, sitesRecruitmentStatusDateGte: String? = nil, leadOrgCancerCenter: String? = nil, apiResponseQueue: DispatchQueue = OpenAPIClientAPI.apiResponseQueue, completion: @escaping ((_ data: TrialResponse?, _ error: Error?) -> Void)) -> RequestTask { return searchTrialsByGetWithRequestBuilder(size: size, from: from, sort: sort, order: order, missing: missing, exists: exists, include: include, exclude: exclude, export: export, email: email, filename: filename, fulltext: fulltext, fieldParamFulltext: fieldParamFulltext, trialids: trialids, trialIds: trialIds, keyword: keyword, keywordField: keywordField, aggField: aggField, aggName: aggName, aggMinCount: aggMinCount, sitesOrgNameFulltext: sitesOrgNameFulltext, trialStatus: trialStatus, nciFunded: nciFunded, nciId: nciId, nctId: nctId, protocolId: protocolId, ccrId: ccrId, ctepId: ctepId, dcpId: dcpId, currentTrialStatus: currentTrialStatus, phase: phase, studyProtocolType: studyProtocolType, nciPrograms: nciPrograms, briefTitle: briefTitle, briefSummary: briefSummary, officialTitle: officialTitle, primaryPurpose: primaryPurpose, acceptsHealthyVolunteersIndicator: acceptsHealthyVolunteersIndicator, eligibilityStructuredAcceptsHealthyVolunteers: eligibilityStructuredAcceptsHealthyVolunteers, acronym: acronym, amendmentDate: amendmentDate, anatomicSites: anatomicSites, armsDescription: armsDescription, armsName: armsName, armsType: armsType, armsInterventionsNciThesaurusConceptId: armsInterventionsNciThesaurusConceptId, armsInterventionsDescription: armsInterventionsDescription, armsInterventionsName: armsInterventionsName, armsInterventionsType: armsInterventionsType, armsInterventionsSynonyms: armsInterventionsSynonyms, associatedStudiesStudyId: associatedStudiesStudyId, associatedStudiesStudyIdType: associatedStudiesStudyIdType, eligibilityStructuredGender: eligibilityStructuredGender, eligibilityStructuredMinAgeInYearsLte: eligibilityStructuredMinAgeInYearsLte, eligibilityStructuredMinAgeInYearsGte: eligibilityStructuredMinAgeInYearsGte, eligibilityStructuredMaxAgeInYearsLte: eligibilityStructuredMaxAgeInYearsLte, eligibilityStructuredMaxAgeInYearsGte: eligibilityStructuredMaxAgeInYearsGte, eligibilityStructuredMinAgeUnit: eligibilityStructuredMinAgeUnit, eligibilityStructuredMinAgeNumberLte: eligibilityStructuredMinAgeNumberLte, eligibilityStructuredMinAgeNumberGte: eligibilityStructuredMinAgeNumberGte, eligibilityStructuredMaxAgeUnit: eligibilityStructuredMaxAgeUnit, eligibilityStructuredMaxAgeNumberLte: eligibilityStructuredMaxAgeNumberLte, eligibilityStructuredMaxAgeNumberGte: eligibilityStructuredMaxAgeNumberGte, currentTrialStatusDateLte: currentTrialStatusDateLte, currentTrialStatusDateGte: currentTrialStatusDateGte, recordVerificationDateLte: recordVerificationDateLte, recordVerificationDateGte: recordVerificationDateGte, sitesOrgCoordinatesLat: sitesOrgCoordinatesLat, sitesOrgCoordinatesLon: sitesOrgCoordinatesLon, sitesOrgCoordinatesDist: sitesOrgCoordinatesDist, sitesContactEmail: sitesContactEmail, sitesContactName: sitesContactName, sitesContactNameAuto: sitesContactNameAuto, sitesContactNameRaw: sitesContactNameRaw, sitesContactPhone: sitesContactPhone, sitesOrgAddressLine1: sitesOrgAddressLine1, sitesOrgAddressLine2: sitesOrgAddressLine2, sitesOrgCity: sitesOrgCity, sitesOrgPostalCode: sitesOrgPostalCode, sitesOrgStateOrProvince: sitesOrgStateOrProvince, sitesOrgCountry: sitesOrgCountry, sitesOrgCountryRaw: sitesOrgCountryRaw, sitesOrgEmail: sitesOrgEmail, sitesOrgFamily: sitesOrgFamily, sitesOrgFax: sitesOrgFax, sitesOrgName: sitesOrgName, sitesOrgNameAuto: sitesOrgNameAuto, sitesOrgNameRaw: sitesOrgNameRaw, sitesOrgPhone: sitesOrgPhone, sitesRecruitmentStatus: sitesRecruitmentStatus, sitesRecruitmentStatusDate: sitesRecruitmentStatusDate, sitesRecruitmentStatusDateLte: sitesRecruitmentStatusDateLte, sitesRecruitmentStatusDateGte: sitesRecruitmentStatusDateGte, leadOrgCancerCenter: leadOrgCancerCenter).execute(apiResponseQueue) { result in switch result { - case .success: - completion((), nil) + case let .success(response): + completion(response.body, nil) case let .failure(error): completion(nil, error) } @@ -276,9 +276,9 @@ open class TrialsAPI { - parameter sitesRecruitmentStatusDateLte: (query) (optional) - parameter sitesRecruitmentStatusDateGte: (query) (optional) - parameter leadOrgCancerCenter: (query) Search by Lead Org Cancer Center (optional) - - returns: RequestBuilder + - returns: RequestBuilder */ - open class func searchTrialsByGetWithRequestBuilder(size: Int? = nil, from: Int? = nil, sort: String? = nil, order: String? = nil, missing: String? = nil, exists: String? = nil, include: String? = nil, exclude: String? = nil, export: String? = nil, email: String? = nil, filename: String? = nil, fulltext: String? = nil, fieldParamFulltext: String? = nil, trialids: String? = nil, trialIds: String? = nil, keyword: String? = nil, keywordField: String? = nil, aggField: String? = nil, aggName: String? = nil, aggMinCount: Int? = nil, sitesOrgNameFulltext: String? = nil, trialStatus: String? = nil, nciFunded: String? = nil, nciId: String? = nil, nctId: String? = nil, protocolId: String? = nil, ccrId: String? = nil, ctepId: String? = nil, dcpId: String? = nil, currentTrialStatus: String? = nil, phase: String? = nil, studyProtocolType: String? = nil, nciPrograms: String? = nil, briefTitle: String? = nil, briefSummary: String? = nil, officialTitle: String? = nil, primaryPurpose: String? = nil, acceptsHealthyVolunteersIndicator: String? = nil, eligibilityStructuredAcceptsHealthyVolunteers: Bool? = nil, acronym: String? = nil, amendmentDate: String? = nil, anatomicSites: String? = nil, armsDescription: String? = nil, armsName: String? = nil, armsType: String? = nil, armsInterventionsNciThesaurusConceptId: String? = nil, armsInterventionsDescription: String? = nil, armsInterventionsName: String? = nil, armsInterventionsType: String? = nil, armsInterventionsSynonyms: String? = nil, associatedStudiesStudyId: String? = nil, associatedStudiesStudyIdType: String? = nil, eligibilityStructuredGender: String? = nil, eligibilityStructuredMinAgeInYearsLte: Int? = nil, eligibilityStructuredMinAgeInYearsGte: Int? = nil, eligibilityStructuredMaxAgeInYearsLte: Int? = nil, eligibilityStructuredMaxAgeInYearsGte: Int? = nil, eligibilityStructuredMinAgeUnit: String? = nil, eligibilityStructuredMinAgeNumberLte: Int? = nil, eligibilityStructuredMinAgeNumberGte: Int? = nil, eligibilityStructuredMaxAgeUnit: String? = nil, eligibilityStructuredMaxAgeNumberLte: Int? = nil, eligibilityStructuredMaxAgeNumberGte: Int? = nil, currentTrialStatusDateLte: String? = nil, currentTrialStatusDateGte: String? = nil, recordVerificationDateLte: String? = nil, recordVerificationDateGte: String? = nil, sitesOrgCoordinatesLat: Double? = nil, sitesOrgCoordinatesLon: Double? = nil, sitesOrgCoordinatesDist: String? = nil, sitesContactEmail: String? = nil, sitesContactName: String? = nil, sitesContactNameAuto: String? = nil, sitesContactNameRaw: String? = nil, sitesContactPhone: String? = nil, sitesOrgAddressLine1: String? = nil, sitesOrgAddressLine2: String? = nil, sitesOrgCity: String? = nil, sitesOrgPostalCode: String? = nil, sitesOrgStateOrProvince: String? = nil, sitesOrgCountry: String? = nil, sitesOrgCountryRaw: String? = nil, sitesOrgEmail: String? = nil, sitesOrgFamily: String? = nil, sitesOrgFax: String? = nil, sitesOrgName: String? = nil, sitesOrgNameAuto: String? = nil, sitesOrgNameRaw: String? = nil, sitesOrgPhone: String? = nil, sitesRecruitmentStatus: String? = nil, sitesRecruitmentStatusDate: String? = nil, sitesRecruitmentStatusDateLte: String? = nil, sitesRecruitmentStatusDateGte: String? = nil, leadOrgCancerCenter: String? = nil) -> RequestBuilder { + open class func searchTrialsByGetWithRequestBuilder(size: Int? = nil, from: Int? = nil, sort: String? = nil, order: String? = nil, missing: String? = nil, exists: String? = nil, include: String? = nil, exclude: String? = nil, export: String? = nil, email: String? = nil, filename: String? = nil, fulltext: String? = nil, fieldParamFulltext: String? = nil, trialids: String? = nil, trialIds: String? = nil, keyword: String? = nil, keywordField: String? = nil, aggField: String? = nil, aggName: String? = nil, aggMinCount: Int? = nil, sitesOrgNameFulltext: String? = nil, trialStatus: String? = nil, nciFunded: String? = nil, nciId: String? = nil, nctId: String? = nil, protocolId: String? = nil, ccrId: String? = nil, ctepId: String? = nil, dcpId: String? = nil, currentTrialStatus: String? = nil, phase: String? = nil, studyProtocolType: String? = nil, nciPrograms: String? = nil, briefTitle: String? = nil, briefSummary: String? = nil, officialTitle: String? = nil, primaryPurpose: String? = nil, acceptsHealthyVolunteersIndicator: String? = nil, eligibilityStructuredAcceptsHealthyVolunteers: Bool? = nil, acronym: String? = nil, amendmentDate: String? = nil, anatomicSites: String? = nil, armsDescription: String? = nil, armsName: String? = nil, armsType: String? = nil, armsInterventionsNciThesaurusConceptId: String? = nil, armsInterventionsDescription: String? = nil, armsInterventionsName: String? = nil, armsInterventionsType: String? = nil, armsInterventionsSynonyms: String? = nil, associatedStudiesStudyId: String? = nil, associatedStudiesStudyIdType: String? = nil, eligibilityStructuredGender: String? = nil, eligibilityStructuredMinAgeInYearsLte: Int? = nil, eligibilityStructuredMinAgeInYearsGte: Int? = nil, eligibilityStructuredMaxAgeInYearsLte: Int? = nil, eligibilityStructuredMaxAgeInYearsGte: Int? = nil, eligibilityStructuredMinAgeUnit: String? = nil, eligibilityStructuredMinAgeNumberLte: Int? = nil, eligibilityStructuredMinAgeNumberGte: Int? = nil, eligibilityStructuredMaxAgeUnit: String? = nil, eligibilityStructuredMaxAgeNumberLte: Int? = nil, eligibilityStructuredMaxAgeNumberGte: Int? = nil, currentTrialStatusDateLte: String? = nil, currentTrialStatusDateGte: String? = nil, recordVerificationDateLte: String? = nil, recordVerificationDateGte: String? = nil, sitesOrgCoordinatesLat: Double? = nil, sitesOrgCoordinatesLon: Double? = nil, sitesOrgCoordinatesDist: String? = nil, sitesContactEmail: String? = nil, sitesContactName: String? = nil, sitesContactNameAuto: String? = nil, sitesContactNameRaw: String? = nil, sitesContactPhone: String? = nil, sitesOrgAddressLine1: String? = nil, sitesOrgAddressLine2: String? = nil, sitesOrgCity: String? = nil, sitesOrgPostalCode: String? = nil, sitesOrgStateOrProvince: String? = nil, sitesOrgCountry: String? = nil, sitesOrgCountryRaw: String? = nil, sitesOrgEmail: String? = nil, sitesOrgFamily: String? = nil, sitesOrgFax: String? = nil, sitesOrgName: String? = nil, sitesOrgNameAuto: String? = nil, sitesOrgNameRaw: String? = nil, sitesOrgPhone: String? = nil, sitesRecruitmentStatus: String? = nil, sitesRecruitmentStatusDate: String? = nil, sitesRecruitmentStatusDateLte: String? = nil, sitesRecruitmentStatusDateGte: String? = nil, leadOrgCancerCenter: String? = nil) -> RequestBuilder { let localVariablePath = "/trials" let localVariableURLString = OpenAPIClientAPI.basePath + localVariablePath let localVariableParameters: [String: Any]? = nil @@ -387,7 +387,7 @@ open class TrialsAPI { let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - let localVariableRequestBuilder: RequestBuilder.Type = OpenAPIClientAPI.requestBuilderFactory.getNonDecodableBuilder() + let localVariableRequestBuilder: RequestBuilder.Type = OpenAPIClientAPI.requestBuilderFactory.getBuilder() return localVariableRequestBuilder.init(method: "GET", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) } @@ -400,11 +400,11 @@ open class TrialsAPI { - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func searchTrialsByPost(body: AnyCodable, apiResponseQueue: DispatchQueue = OpenAPIClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) -> RequestTask { + open class func searchTrialsByPost(body: AnyCodable, apiResponseQueue: DispatchQueue = OpenAPIClientAPI.apiResponseQueue, completion: @escaping ((_ data: TrialResponse?, _ error: Error?) -> Void)) -> RequestTask { return searchTrialsByPostWithRequestBuilder(body: body).execute(apiResponseQueue) { result in switch result { - case .success: - completion((), nil) + case let .success(response): + completion(response.body, nil) case let .failure(error): completion(nil, error) } @@ -419,9 +419,9 @@ open class TrialsAPI { - type: apiKey X-API-KEY (HEADER) - name: ApiKeyAuth - parameter body: (body) Query in JSON format - - returns: RequestBuilder + - returns: RequestBuilder */ - open class func searchTrialsByPostWithRequestBuilder(body: AnyCodable) -> RequestBuilder { + open class func searchTrialsByPostWithRequestBuilder(body: AnyCodable) -> RequestBuilder { let localVariablePath = "/trials" let localVariableURLString = OpenAPIClientAPI.basePath + localVariablePath let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) @@ -434,7 +434,7 @@ open class TrialsAPI { let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) - let localVariableRequestBuilder: RequestBuilder.Type = OpenAPIClientAPI.requestBuilderFactory.getNonDecodableBuilder() + let localVariableRequestBuilder: RequestBuilder.Type = OpenAPIClientAPI.requestBuilderFactory.getBuilder() return localVariableRequestBuilder.init(method: "POST", URLString: (localVariableUrlComponents?.string ?? localVariableURLString), parameters: localVariableParameters, headers: localVariableHeaderParameters, requiresAuthentication: true) } diff --git a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Arm.swift b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Arm.swift new file mode 100644 index 0000000..e80083c --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Arm.swift @@ -0,0 +1,44 @@ +// +// Arm.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct Arm: Codable, JSONEncodable, Hashable { + + public var interventions: [Intervention]? + public var name: String? + public var description: String? + public var type: String? + + public init(interventions: [Intervention]? = nil, name: String? = nil, description: String? = nil, type: String? = nil) { + self.interventions = interventions + self.name = name + self.description = description + self.type = type + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case interventions + case name + case description + case type + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(interventions, forKey: .interventions) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(description, forKey: .description) + try container.encodeIfPresent(type, forKey: .type) + } +} + diff --git a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/CentralContact.swift b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/CentralContact.swift new file mode 100644 index 0000000..3d21573 --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/CentralContact.swift @@ -0,0 +1,44 @@ +// +// CentralContact.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct CentralContact: Codable, JSONEncodable, Hashable { + + public var phone: AnyCodable? + public var name: AnyCodable? + public var type: AnyCodable? + public var email: AnyCodable? + + public init(phone: AnyCodable? = nil, name: AnyCodable? = nil, type: AnyCodable? = nil, email: AnyCodable? = nil) { + self.phone = phone + self.name = name + self.type = type + self.email = email + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case phone + case name + case type + case email + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(phone, forKey: .phone) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(type, forKey: .type) + try container.encodeIfPresent(email, forKey: .email) + } +} + diff --git a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Collaborators.swift b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Collaborators.swift new file mode 100644 index 0000000..7f93561 --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Collaborators.swift @@ -0,0 +1,36 @@ +// +// Collaborators.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct Collaborators: Codable, JSONEncodable, Hashable { + + public var name: String? + public var functionalRole: String? + + public init(name: String? = nil, functionalRole: String? = nil) { + self.name = name + self.functionalRole = functionalRole + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case functionalRole = "functional_role" + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(functionalRole, forKey: .functionalRole) + } +} + diff --git a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Coordinates.swift b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Coordinates.swift new file mode 100644 index 0000000..9bbe59a --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Coordinates.swift @@ -0,0 +1,36 @@ +// +// Coordinates.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct Coordinates: Codable, JSONEncodable, Hashable { + + public var lon: Double? + public var lat: Double? + + public init(lon: Double? = nil, lat: Double? = nil) { + self.lon = lon + self.lat = lat + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case lon + case lat + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(lon, forKey: .lon) + try container.encodeIfPresent(lat, forKey: .lat) + } +} + diff --git a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Disease.swift b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Disease.swift new file mode 100644 index 0000000..2fd0d89 --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Disease.swift @@ -0,0 +1,56 @@ +// +// Disease.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct Disease: Codable, JSONEncodable, Hashable { + + public var inclusionIndicator: String? + public var isLeadDisease: Bool? + public var synonyms: [String]? + public var nciThesaurusConceptId: String? + public var name: String? + public var type: [String]? + public var parents: [String]? + + public init(inclusionIndicator: String? = nil, isLeadDisease: Bool? = nil, synonyms: [String]? = nil, nciThesaurusConceptId: String? = nil, name: String? = nil, type: [String]? = nil, parents: [String]? = nil) { + self.inclusionIndicator = inclusionIndicator + self.isLeadDisease = isLeadDisease + self.synonyms = synonyms + self.nciThesaurusConceptId = nciThesaurusConceptId + self.name = name + self.type = type + self.parents = parents + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case inclusionIndicator = "inclusion_indicator" + case isLeadDisease = "is_lead_disease" + case synonyms + case nciThesaurusConceptId = "nci_thesaurus_concept_id" + case name + case type + case parents + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(inclusionIndicator, forKey: .inclusionIndicator) + try container.encodeIfPresent(isLeadDisease, forKey: .isLeadDisease) + try container.encodeIfPresent(synonyms, forKey: .synonyms) + try container.encodeIfPresent(nciThesaurusConceptId, forKey: .nciThesaurusConceptId) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(type, forKey: .type) + try container.encodeIfPresent(parents, forKey: .parents) + } +} + diff --git a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Eligibility.swift b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Eligibility.swift new file mode 100644 index 0000000..bd8a6aa --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Eligibility.swift @@ -0,0 +1,36 @@ +// +// Eligibility.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct Eligibility: Codable, JSONEncodable, Hashable { + + public var unstructured: [UnstructuredEligibility]? + public var structured: StructuredEligibility? + + public init(unstructured: [UnstructuredEligibility]? = nil, structured: StructuredEligibility? = nil) { + self.unstructured = unstructured + self.structured = structured + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case unstructured + case structured + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(unstructured, forKey: .unstructured) + try container.encodeIfPresent(structured, forKey: .structured) + } +} + diff --git a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Identifier.swift b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Identifier.swift new file mode 100644 index 0000000..7a809c3 --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Identifier.swift @@ -0,0 +1,36 @@ +// +// Identifier.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct Identifier: Codable, JSONEncodable, Hashable { + + public var name: String? + public var value: String? + + public init(name: String? = nil, value: String? = nil) { + self.name = name + self.value = value + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case value + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(value, forKey: .value) + } +} + diff --git a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Intervention.swift b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Intervention.swift new file mode 100644 index 0000000..ddb3f05 --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Intervention.swift @@ -0,0 +1,60 @@ +// +// Intervention.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct Intervention: Codable, JSONEncodable, Hashable { + + public var inclusionIndicator: String? + public var synonyms: [String]? + public var nciThesaurusConceptId: String? + public var name: String? + public var description: AnyCodable? + public var type: String? + public var category: String? + public var parents: [String]? + + public init(inclusionIndicator: String? = nil, synonyms: [String]? = nil, nciThesaurusConceptId: String? = nil, name: String? = nil, description: AnyCodable? = nil, type: String? = nil, category: String? = nil, parents: [String]? = nil) { + self.inclusionIndicator = inclusionIndicator + self.synonyms = synonyms + self.nciThesaurusConceptId = nciThesaurusConceptId + self.name = name + self.description = description + self.type = type + self.category = category + self.parents = parents + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case inclusionIndicator = "inclusion_indicator" + case synonyms + case nciThesaurusConceptId = "nci_thesaurus_concept_id" + case name + case description + case type + case category + case parents + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(inclusionIndicator, forKey: .inclusionIndicator) + try container.encodeIfPresent(synonyms, forKey: .synonyms) + try container.encodeIfPresent(nciThesaurusConceptId, forKey: .nciThesaurusConceptId) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(description, forKey: .description) + try container.encodeIfPresent(type, forKey: .type) + try container.encodeIfPresent(category, forKey: .category) + try container.encodeIfPresent(parents, forKey: .parents) + } +} + diff --git a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Masking.swift b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Masking.swift new file mode 100644 index 0000000..5ae3242 --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Masking.swift @@ -0,0 +1,52 @@ +// +// Masking.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct Masking: Codable, JSONEncodable, Hashable { + + public var roleCaregiver: AnyCodable? + public var masking: AnyCodable? + public var roleInvestigator: AnyCodable? + public var roleOutcomeAssessor: AnyCodable? + public var roleSubject: AnyCodable? + public var allocationCode: String? + + public init(roleCaregiver: AnyCodable? = nil, masking: AnyCodable? = nil, roleInvestigator: AnyCodable? = nil, roleOutcomeAssessor: AnyCodable? = nil, roleSubject: AnyCodable? = nil, allocationCode: String? = nil) { + self.roleCaregiver = roleCaregiver + self.masking = masking + self.roleInvestigator = roleInvestigator + self.roleOutcomeAssessor = roleOutcomeAssessor + self.roleSubject = roleSubject + self.allocationCode = allocationCode + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case roleCaregiver = "role_caregiver" + case masking + case roleInvestigator = "role_investigator" + case roleOutcomeAssessor = "role_outcome_assessor" + case roleSubject = "role_subject" + case allocationCode = "allocation_code" + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(roleCaregiver, forKey: .roleCaregiver) + try container.encodeIfPresent(masking, forKey: .masking) + try container.encodeIfPresent(roleInvestigator, forKey: .roleInvestigator) + try container.encodeIfPresent(roleOutcomeAssessor, forKey: .roleOutcomeAssessor) + try container.encodeIfPresent(roleSubject, forKey: .roleSubject) + try container.encodeIfPresent(allocationCode, forKey: .allocationCode) + } +} + diff --git a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/OutcomeMeasure.swift b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/OutcomeMeasure.swift new file mode 100644 index 0000000..7faf0bc --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/OutcomeMeasure.swift @@ -0,0 +1,44 @@ +// +// OutcomeMeasure.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct OutcomeMeasure: Codable, JSONEncodable, Hashable { + + public var timeframe: String? + public var name: String? + public var description: String? + public var typeCode: String? + + public init(timeframe: String? = nil, name: String? = nil, description: String? = nil, typeCode: String? = nil) { + self.timeframe = timeframe + self.name = name + self.description = description + self.typeCode = typeCode + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case timeframe + case name + case description + case typeCode = "type_code" + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(timeframe, forKey: .timeframe) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(description, forKey: .description) + try container.encodeIfPresent(typeCode, forKey: .typeCode) + } +} + diff --git a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Site.swift b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Site.swift new file mode 100644 index 0000000..db787c3 --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/Site.swift @@ -0,0 +1,104 @@ +// +// Site.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct Site: Codable, JSONEncodable, Hashable { + + public var orgStateOrProvince: String? + public var contactName: String? + public var contactPhone: String? + public var recruitmentStatusDate: Date? + public var orgAddressLine2: AnyCodable? + public var orgVa: Bool? + public var orgAddressLine1: String? + public var orgTty: AnyCodable? + public var orgFamily: AnyCodable? + public var orgPostalCode: String? + public var contactEmail: String? + public var recruitmentStatus: String? + public var orgCity: String? + public var orgEmail: AnyCodable? + public var orgCountry: String? + public var orgFax: String? + public var orgPhone: String? + public var orgName: String? + public var orgCoordinates: Coordinates? + + public init(orgStateOrProvince: String? = nil, contactName: String? = nil, contactPhone: String? = nil, recruitmentStatusDate: Date? = nil, orgAddressLine2: AnyCodable? = nil, orgVa: Bool? = nil, orgAddressLine1: String? = nil, orgTty: AnyCodable? = nil, orgFamily: AnyCodable? = nil, orgPostalCode: String? = nil, contactEmail: String? = nil, recruitmentStatus: String? = nil, orgCity: String? = nil, orgEmail: AnyCodable? = nil, orgCountry: String? = nil, orgFax: String? = nil, orgPhone: String? = nil, orgName: String? = nil, orgCoordinates: Coordinates? = nil) { + self.orgStateOrProvince = orgStateOrProvince + self.contactName = contactName + self.contactPhone = contactPhone + self.recruitmentStatusDate = recruitmentStatusDate + self.orgAddressLine2 = orgAddressLine2 + self.orgVa = orgVa + self.orgAddressLine1 = orgAddressLine1 + self.orgTty = orgTty + self.orgFamily = orgFamily + self.orgPostalCode = orgPostalCode + self.contactEmail = contactEmail + self.recruitmentStatus = recruitmentStatus + self.orgCity = orgCity + self.orgEmail = orgEmail + self.orgCountry = orgCountry + self.orgFax = orgFax + self.orgPhone = orgPhone + self.orgName = orgName + self.orgCoordinates = orgCoordinates + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case orgStateOrProvince = "org_state_or_province" + case contactName = "contact_name" + case contactPhone = "contact_phone" + case recruitmentStatusDate = "recruitment_status_date" + case orgAddressLine2 = "org_address_line_2" + case orgVa = "org_va" + case orgAddressLine1 = "org_address_line_1" + case orgTty = "org_tty" + case orgFamily = "org_family" + case orgPostalCode = "org_postal_code" + case contactEmail = "contact_email" + case recruitmentStatus = "recruitment_status" + case orgCity = "org_city" + case orgEmail = "org_email" + case orgCountry = "org_country" + case orgFax = "org_fax" + case orgPhone = "org_phone" + case orgName = "org_name" + case orgCoordinates = "org_coordinates" + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(orgStateOrProvince, forKey: .orgStateOrProvince) + try container.encodeIfPresent(contactName, forKey: .contactName) + try container.encodeIfPresent(contactPhone, forKey: .contactPhone) + try container.encodeIfPresent(recruitmentStatusDate, forKey: .recruitmentStatusDate) + try container.encodeIfPresent(orgAddressLine2, forKey: .orgAddressLine2) + try container.encodeIfPresent(orgVa, forKey: .orgVa) + try container.encodeIfPresent(orgAddressLine1, forKey: .orgAddressLine1) + try container.encodeIfPresent(orgTty, forKey: .orgTty) + try container.encodeIfPresent(orgFamily, forKey: .orgFamily) + try container.encodeIfPresent(orgPostalCode, forKey: .orgPostalCode) + try container.encodeIfPresent(contactEmail, forKey: .contactEmail) + try container.encodeIfPresent(recruitmentStatus, forKey: .recruitmentStatus) + try container.encodeIfPresent(orgCity, forKey: .orgCity) + try container.encodeIfPresent(orgEmail, forKey: .orgEmail) + try container.encodeIfPresent(orgCountry, forKey: .orgCountry) + try container.encodeIfPresent(orgFax, forKey: .orgFax) + try container.encodeIfPresent(orgPhone, forKey: .orgPhone) + try container.encodeIfPresent(orgName, forKey: .orgName) + try container.encodeIfPresent(orgCoordinates, forKey: .orgCoordinates) + } +} + diff --git a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/StatusHistory.swift b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/StatusHistory.swift new file mode 100644 index 0000000..05dc3ad --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/StatusHistory.swift @@ -0,0 +1,36 @@ +// +// StatusHistory.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct StatusHistory: Codable, JSONEncodable, Hashable { + + public var statusDate: Date? + public var status: String? + + public init(statusDate: Date? = nil, status: String? = nil) { + self.statusDate = statusDate + self.status = status + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case statusDate = "status_date" + case status + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(statusDate, forKey: .statusDate) + try container.encodeIfPresent(status, forKey: .status) + } +} + diff --git a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/StructuredEligibility.swift b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/StructuredEligibility.swift new file mode 100644 index 0000000..8686f7f --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/StructuredEligibility.swift @@ -0,0 +1,68 @@ +// +// StructuredEligibility.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct StructuredEligibility: Codable, JSONEncodable, Hashable { + + public var maxAge: String? + public var maxAgeNumber: Int? + public var minAgeUnit: String? + public var maxAgeUnit: String? + public var maxAgeInYears: Int? + public var gender: String? + public var acceptsHealthyVolunteers: Bool? + public var minAge: String? + public var minAgeNumber: Int? + public var minAgeInYears: Int? + + public init(maxAge: String? = nil, maxAgeNumber: Int? = nil, minAgeUnit: String? = nil, maxAgeUnit: String? = nil, maxAgeInYears: Int? = nil, gender: String? = nil, acceptsHealthyVolunteers: Bool? = nil, minAge: String? = nil, minAgeNumber: Int? = nil, minAgeInYears: Int? = nil) { + self.maxAge = maxAge + self.maxAgeNumber = maxAgeNumber + self.minAgeUnit = minAgeUnit + self.maxAgeUnit = maxAgeUnit + self.maxAgeInYears = maxAgeInYears + self.gender = gender + self.acceptsHealthyVolunteers = acceptsHealthyVolunteers + self.minAge = minAge + self.minAgeNumber = minAgeNumber + self.minAgeInYears = minAgeInYears + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case maxAge = "max_age" + case maxAgeNumber = "max_age_number" + case minAgeUnit = "min_age_unit" + case maxAgeUnit = "max_age_unit" + case maxAgeInYears = "max_age_in_years" + case gender + case acceptsHealthyVolunteers = "accepts_healthy_volunteers" + case minAge = "min_age" + case minAgeNumber = "min_age_number" + case minAgeInYears = "min_age_in_years" + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(maxAge, forKey: .maxAge) + try container.encodeIfPresent(maxAgeNumber, forKey: .maxAgeNumber) + try container.encodeIfPresent(minAgeUnit, forKey: .minAgeUnit) + try container.encodeIfPresent(maxAgeUnit, forKey: .maxAgeUnit) + try container.encodeIfPresent(maxAgeInYears, forKey: .maxAgeInYears) + try container.encodeIfPresent(gender, forKey: .gender) + try container.encodeIfPresent(acceptsHealthyVolunteers, forKey: .acceptsHealthyVolunteers) + try container.encodeIfPresent(minAge, forKey: .minAge) + try container.encodeIfPresent(minAgeNumber, forKey: .minAgeNumber) + try container.encodeIfPresent(minAgeInYears, forKey: .minAgeInYears) + } +} + diff --git a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/TrialDetail.swift b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/TrialDetail.swift new file mode 100644 index 0000000..6f0b399 --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/TrialDetail.swift @@ -0,0 +1,260 @@ +// +// TrialDetail.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct TrialDetail: Codable, JSONEncodable, Hashable { + + public var otherIds: [Identifier]? + public var amendmentDate: Date? + public var keywords: AnyCodable? + public var dcpId: AnyCodable? + public var interventionalModel: String? + public var leadOrg: String? + public var eligibility: Eligibility? + public var sites: [Site]? + public var completionDateTypeCode: String? + public var detailDescription: String? + public var officialTitle: String? + public var phaseSortOrder: Int? + public var collaborators: [Collaborators]? + public var associatedStudies: [String]? + public var outcomeMeasures: [OutcomeMeasure]? + public var phase: String? + public var centralContact: CentralContact? + public var primaryPurpose: String? + public var numberOfArms: Int? + public var studyProtocolTypeSortOrder: Int? + public var nctId: String? + public var biomarkers: [String]? + public var classificationCode: AnyCodable? + public var currentTrialStatusDate: Date? + public var diseases: [Disease]? + public var primaryPurposeSortOrder: Int? + public var protocolId: String? + public var activeSitesCount: Int? + public var leadOrgCancerCenter: AnyCodable? + public var arms: [Arm]? + public var studyModelCode: AnyCodable? + public var nciId: String? + public var whyStudyStopped: AnyCodable? + public var briefSummary: String? + public var briefTitle: String? + public var statusHistory: [StatusHistory]? + public var studyPopulationDescription: AnyCodable? + public var samplingMethodCode: AnyCodable? + public var minimumTargetAccrualNumber: Int? + public var priorTherapy: [String]? + public var currentTrialStatusSortOrder: Int? + public var startDate: Date? + public var recordVerificationDate: Date? + public var ctepId: String? + public var currentTrialStatus: String? + public var studyModelOtherText: AnyCodable? + public var masking: Masking? + public var acronym: AnyCodable? + public var nciPrograms: [String]? + public var nciFunded: String? + public var anatomicSites: [String]? + public var ccrId: AnyCodable? + public var startDateTypeCode: String? + public var principalInvestigator: String? + public var studySource: String? + public var completionDate: Date? + public var studySubtypeCode: AnyCodable? + public var studyProtocolType: String? + + public init(otherIds: [Identifier]? = nil, amendmentDate: Date? = nil, keywords: AnyCodable? = nil, dcpId: AnyCodable? = nil, interventionalModel: String? = nil, leadOrg: String? = nil, eligibility: Eligibility? = nil, sites: [Site]? = nil, completionDateTypeCode: String? = nil, detailDescription: String? = nil, officialTitle: String? = nil, phaseSortOrder: Int? = nil, collaborators: [Collaborators]? = nil, associatedStudies: [String]? = nil, outcomeMeasures: [OutcomeMeasure]? = nil, phase: String? = nil, centralContact: CentralContact? = nil, primaryPurpose: String? = nil, numberOfArms: Int? = nil, studyProtocolTypeSortOrder: Int? = nil, nctId: String? = nil, biomarkers: [String]? = nil, classificationCode: AnyCodable? = nil, currentTrialStatusDate: Date? = nil, diseases: [Disease]? = nil, primaryPurposeSortOrder: Int? = nil, protocolId: String? = nil, activeSitesCount: Int? = nil, leadOrgCancerCenter: AnyCodable? = nil, arms: [Arm]? = nil, studyModelCode: AnyCodable? = nil, nciId: String? = nil, whyStudyStopped: AnyCodable? = nil, briefSummary: String? = nil, briefTitle: String? = nil, statusHistory: [StatusHistory]? = nil, studyPopulationDescription: AnyCodable? = nil, samplingMethodCode: AnyCodable? = nil, minimumTargetAccrualNumber: Int? = nil, priorTherapy: [String]? = nil, currentTrialStatusSortOrder: Int? = nil, startDate: Date? = nil, recordVerificationDate: Date? = nil, ctepId: String? = nil, currentTrialStatus: String? = nil, studyModelOtherText: AnyCodable? = nil, masking: Masking? = nil, acronym: AnyCodable? = nil, nciPrograms: [String]? = nil, nciFunded: String? = nil, anatomicSites: [String]? = nil, ccrId: AnyCodable? = nil, startDateTypeCode: String? = nil, principalInvestigator: String? = nil, studySource: String? = nil, completionDate: Date? = nil, studySubtypeCode: AnyCodable? = nil, studyProtocolType: String? = nil) { + self.otherIds = otherIds + self.amendmentDate = amendmentDate + self.keywords = keywords + self.dcpId = dcpId + self.interventionalModel = interventionalModel + self.leadOrg = leadOrg + self.eligibility = eligibility + self.sites = sites + self.completionDateTypeCode = completionDateTypeCode + self.detailDescription = detailDescription + self.officialTitle = officialTitle + self.phaseSortOrder = phaseSortOrder + self.collaborators = collaborators + self.associatedStudies = associatedStudies + self.outcomeMeasures = outcomeMeasures + self.phase = phase + self.centralContact = centralContact + self.primaryPurpose = primaryPurpose + self.numberOfArms = numberOfArms + self.studyProtocolTypeSortOrder = studyProtocolTypeSortOrder + self.nctId = nctId + self.biomarkers = biomarkers + self.classificationCode = classificationCode + self.currentTrialStatusDate = currentTrialStatusDate + self.diseases = diseases + self.primaryPurposeSortOrder = primaryPurposeSortOrder + self.protocolId = protocolId + self.activeSitesCount = activeSitesCount + self.leadOrgCancerCenter = leadOrgCancerCenter + self.arms = arms + self.studyModelCode = studyModelCode + self.nciId = nciId + self.whyStudyStopped = whyStudyStopped + self.briefSummary = briefSummary + self.briefTitle = briefTitle + self.statusHistory = statusHistory + self.studyPopulationDescription = studyPopulationDescription + self.samplingMethodCode = samplingMethodCode + self.minimumTargetAccrualNumber = minimumTargetAccrualNumber + self.priorTherapy = priorTherapy + self.currentTrialStatusSortOrder = currentTrialStatusSortOrder + self.startDate = startDate + self.recordVerificationDate = recordVerificationDate + self.ctepId = ctepId + self.currentTrialStatus = currentTrialStatus + self.studyModelOtherText = studyModelOtherText + self.masking = masking + self.acronym = acronym + self.nciPrograms = nciPrograms + self.nciFunded = nciFunded + self.anatomicSites = anatomicSites + self.ccrId = ccrId + self.startDateTypeCode = startDateTypeCode + self.principalInvestigator = principalInvestigator + self.studySource = studySource + self.completionDate = completionDate + self.studySubtypeCode = studySubtypeCode + self.studyProtocolType = studyProtocolType + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case otherIds = "other_ids" + case amendmentDate = "amendment_date" + case keywords + case dcpId = "dcp_id" + case interventionalModel = "interventional_model" + case leadOrg = "lead_org" + case eligibility + case sites + case completionDateTypeCode = "completion_date_type_code" + case detailDescription = "detail_description" + case officialTitle = "official_title" + case phaseSortOrder = "_phase_sort_order" + case collaborators + case associatedStudies = "associated_studies" + case outcomeMeasures = "outcome_measures" + case phase + case centralContact = "central_contact" + case primaryPurpose = "primary_purpose" + case numberOfArms = "number_of_arms" + case studyProtocolTypeSortOrder = "_study_protocol_type_sort_order" + case nctId = "nct_id" + case biomarkers + case classificationCode = "classification_code" + case currentTrialStatusDate = "current_trial_status_date" + case diseases + case primaryPurposeSortOrder = "_primary_purpose_sort_order" + case protocolId = "protocol_id" + case activeSitesCount = "active_sites_count" + case leadOrgCancerCenter = "lead_org_cancer_center" + case arms + case studyModelCode = "study_model_code" + case nciId = "nci_id" + case whyStudyStopped = "why_study_stopped" + case briefSummary = "brief_summary" + case briefTitle = "brief_title" + case statusHistory = "status_history" + case studyPopulationDescription = "study_population_description" + case samplingMethodCode = "sampling_method_code" + case minimumTargetAccrualNumber = "minimum_target_accrual_number" + case priorTherapy = "prior_therapy" + case currentTrialStatusSortOrder = "_current_trial_status_sort_order" + case startDate = "start_date" + case recordVerificationDate = "record_verification_date" + case ctepId = "ctep_id" + case currentTrialStatus = "current_trial_status" + case studyModelOtherText = "study_model_other_text" + case masking + case acronym + case nciPrograms = "nci_programs" + case nciFunded = "nci_funded" + case anatomicSites = "anatomic_sites" + case ccrId = "ccr_id" + case startDateTypeCode = "start_date_type_code" + case principalInvestigator = "principal_investigator" + case studySource = "study_source" + case completionDate = "completion_date" + case studySubtypeCode = "study_subtype_code" + case studyProtocolType = "study_protocol_type" + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(otherIds, forKey: .otherIds) + try container.encodeIfPresent(amendmentDate, forKey: .amendmentDate) + try container.encodeIfPresent(keywords, forKey: .keywords) + try container.encodeIfPresent(dcpId, forKey: .dcpId) + try container.encodeIfPresent(interventionalModel, forKey: .interventionalModel) + try container.encodeIfPresent(leadOrg, forKey: .leadOrg) + try container.encodeIfPresent(eligibility, forKey: .eligibility) + try container.encodeIfPresent(sites, forKey: .sites) + try container.encodeIfPresent(completionDateTypeCode, forKey: .completionDateTypeCode) + try container.encodeIfPresent(detailDescription, forKey: .detailDescription) + try container.encodeIfPresent(officialTitle, forKey: .officialTitle) + try container.encodeIfPresent(phaseSortOrder, forKey: .phaseSortOrder) + try container.encodeIfPresent(collaborators, forKey: .collaborators) + try container.encodeIfPresent(associatedStudies, forKey: .associatedStudies) + try container.encodeIfPresent(outcomeMeasures, forKey: .outcomeMeasures) + try container.encodeIfPresent(phase, forKey: .phase) + try container.encodeIfPresent(centralContact, forKey: .centralContact) + try container.encodeIfPresent(primaryPurpose, forKey: .primaryPurpose) + try container.encodeIfPresent(numberOfArms, forKey: .numberOfArms) + try container.encodeIfPresent(studyProtocolTypeSortOrder, forKey: .studyProtocolTypeSortOrder) + try container.encodeIfPresent(nctId, forKey: .nctId) + try container.encodeIfPresent(biomarkers, forKey: .biomarkers) + try container.encodeIfPresent(classificationCode, forKey: .classificationCode) + try container.encodeIfPresent(currentTrialStatusDate, forKey: .currentTrialStatusDate) + try container.encodeIfPresent(diseases, forKey: .diseases) + try container.encodeIfPresent(primaryPurposeSortOrder, forKey: .primaryPurposeSortOrder) + try container.encodeIfPresent(protocolId, forKey: .protocolId) + try container.encodeIfPresent(activeSitesCount, forKey: .activeSitesCount) + try container.encodeIfPresent(leadOrgCancerCenter, forKey: .leadOrgCancerCenter) + try container.encodeIfPresent(arms, forKey: .arms) + try container.encodeIfPresent(studyModelCode, forKey: .studyModelCode) + try container.encodeIfPresent(nciId, forKey: .nciId) + try container.encodeIfPresent(whyStudyStopped, forKey: .whyStudyStopped) + try container.encodeIfPresent(briefSummary, forKey: .briefSummary) + try container.encodeIfPresent(briefTitle, forKey: .briefTitle) + try container.encodeIfPresent(statusHistory, forKey: .statusHistory) + try container.encodeIfPresent(studyPopulationDescription, forKey: .studyPopulationDescription) + try container.encodeIfPresent(samplingMethodCode, forKey: .samplingMethodCode) + try container.encodeIfPresent(minimumTargetAccrualNumber, forKey: .minimumTargetAccrualNumber) + try container.encodeIfPresent(priorTherapy, forKey: .priorTherapy) + try container.encodeIfPresent(currentTrialStatusSortOrder, forKey: .currentTrialStatusSortOrder) + try container.encodeIfPresent(startDate, forKey: .startDate) + try container.encodeIfPresent(recordVerificationDate, forKey: .recordVerificationDate) + try container.encodeIfPresent(ctepId, forKey: .ctepId) + try container.encodeIfPresent(currentTrialStatus, forKey: .currentTrialStatus) + try container.encodeIfPresent(studyModelOtherText, forKey: .studyModelOtherText) + try container.encodeIfPresent(masking, forKey: .masking) + try container.encodeIfPresent(acronym, forKey: .acronym) + try container.encodeIfPresent(nciPrograms, forKey: .nciPrograms) + try container.encodeIfPresent(nciFunded, forKey: .nciFunded) + try container.encodeIfPresent(anatomicSites, forKey: .anatomicSites) + try container.encodeIfPresent(ccrId, forKey: .ccrId) + try container.encodeIfPresent(startDateTypeCode, forKey: .startDateTypeCode) + try container.encodeIfPresent(principalInvestigator, forKey: .principalInvestigator) + try container.encodeIfPresent(studySource, forKey: .studySource) + try container.encodeIfPresent(completionDate, forKey: .completionDate) + try container.encodeIfPresent(studySubtypeCode, forKey: .studySubtypeCode) + try container.encodeIfPresent(studyProtocolType, forKey: .studyProtocolType) + } +} + diff --git a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/TrialDetailCollaboratorsInner.swift b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/TrialDetailCollaboratorsInner.swift new file mode 100644 index 0000000..525c483 --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/TrialDetailCollaboratorsInner.swift @@ -0,0 +1,36 @@ +// +// TrialDetailCollaboratorsInner.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct TrialDetailCollaboratorsInner: Codable, JSONEncodable, Hashable { + + public var name: String? + public var functionalRole: String? + + public init(name: String? = nil, functionalRole: String? = nil) { + self.name = name + self.functionalRole = functionalRole + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case functionalRole = "functional_role" + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(name, forKey: .name) + try container.encodeIfPresent(functionalRole, forKey: .functionalRole) + } +} + diff --git a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/TrialResponse.swift b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/TrialResponse.swift new file mode 100644 index 0000000..f49ac9d --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/TrialResponse.swift @@ -0,0 +1,36 @@ +// +// TrialResponse.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct TrialResponse: Codable, JSONEncodable, Hashable { + + public var total: Int? + public var data: [TrialDetail]? + + public init(total: Int? = nil, data: [TrialDetail]? = nil) { + self.total = total + self.data = data + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case total + case data + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(total, forKey: .total) + try container.encodeIfPresent(data, forKey: .data) + } +} + diff --git a/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/UnstructuredEligibility.swift b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/UnstructuredEligibility.swift new file mode 100644 index 0000000..11b600b --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/OpenAPIClient/Classes/OpenAPIs/Models/UnstructuredEligibility.swift @@ -0,0 +1,40 @@ +// +// UnstructuredEligibility.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if canImport(AnyCodable) +import AnyCodable +#endif + +public struct UnstructuredEligibility: Codable, JSONEncodable, Hashable { + + public var inclusionIndicator: Bool? + public var displayOrder: Int? + public var description: String? + + public init(inclusionIndicator: Bool? = nil, displayOrder: Int? = nil, description: String? = nil) { + self.inclusionIndicator = inclusionIndicator + self.displayOrder = displayOrder + self.description = description + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case inclusionIndicator = "inclusion_indicator" + case displayOrder = "display_order" + case description + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encodeIfPresent(inclusionIndicator, forKey: .inclusionIndicator) + try container.encodeIfPresent(displayOrder, forKey: .displayOrder) + try container.encodeIfPresent(description, forKey: .description) + } +} + diff --git a/NCIClinicalTrialsSearchAPI/README.md b/NCIClinicalTrialsSearchAPI/README.md index e3ab202..f40e50c 100644 --- a/NCIClinicalTrialsSearchAPI/README.md +++ b/NCIClinicalTrialsSearchAPI/README.md @@ -21,7 +21,7 @@ Run `pod install` ## Documentation for API Endpoints -All URIs are relative to *https://clinicaltrialsapi-int.cancer.gov/api/v2* +All URIs are relative to *https://clinicaltrialsapi.cancer.gov/api/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- @@ -36,6 +36,22 @@ Class | Method | HTTP request | Description ## Documentation For Models + - [Arm](docs/Arm.md) + - [CentralContact](docs/CentralContact.md) + - [Collaborators](docs/Collaborators.md) + - [Coordinates](docs/Coordinates.md) + - [Disease](docs/Disease.md) + - [Eligibility](docs/Eligibility.md) + - [Identifier](docs/Identifier.md) + - [Intervention](docs/Intervention.md) + - [Masking](docs/Masking.md) + - [OutcomeMeasure](docs/OutcomeMeasure.md) + - [Site](docs/Site.md) + - [StatusHistory](docs/StatusHistory.md) + - [StructuredEligibility](docs/StructuredEligibility.md) + - [TrialDetail](docs/TrialDetail.md) + - [TrialResponse](docs/TrialResponse.md) + - [UnstructuredEligibility](docs/UnstructuredEligibility.md) diff --git a/NCIClinicalTrialsSearchAPI/docs/Arm.md b/NCIClinicalTrialsSearchAPI/docs/Arm.md new file mode 100644 index 0000000..c5d690f --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/docs/Arm.md @@ -0,0 +1,13 @@ +# Arm + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**interventions** | [Intervention] | | [optional] +**name** | **String** | | [optional] +**description** | **String** | | [optional] +**type** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/NCIClinicalTrialsSearchAPI/docs/BiomarkersAPI.md b/NCIClinicalTrialsSearchAPI/docs/BiomarkersAPI.md index fe38253..fde3a07 100644 --- a/NCIClinicalTrialsSearchAPI/docs/BiomarkersAPI.md +++ b/NCIClinicalTrialsSearchAPI/docs/BiomarkersAPI.md @@ -1,6 +1,6 @@ # BiomarkersAPI -All URIs are relative to *https://clinicaltrialsapi-int.cancer.gov/api/v2* +All URIs are relative to *https://clinicaltrialsapi.cancer.gov/api/v2* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/NCIClinicalTrialsSearchAPI/docs/CentralContact.md b/NCIClinicalTrialsSearchAPI/docs/CentralContact.md new file mode 100644 index 0000000..b6440b9 --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/docs/CentralContact.md @@ -0,0 +1,13 @@ +# CentralContact + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**phone** | **AnyCodable** | | [optional] +**name** | **AnyCodable** | | [optional] +**type** | **AnyCodable** | | [optional] +**email** | **AnyCodable** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/NCIClinicalTrialsSearchAPI/docs/Collaborators.md b/NCIClinicalTrialsSearchAPI/docs/Collaborators.md new file mode 100644 index 0000000..257fa42 --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/docs/Collaborators.md @@ -0,0 +1,11 @@ +# Collaborators + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | [optional] +**functionalRole** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/NCIClinicalTrialsSearchAPI/docs/Coordinates.md b/NCIClinicalTrialsSearchAPI/docs/Coordinates.md new file mode 100644 index 0000000..123828a --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/docs/Coordinates.md @@ -0,0 +1,11 @@ +# Coordinates + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lon** | **Double** | | [optional] +**lat** | **Double** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/NCIClinicalTrialsSearchAPI/docs/Disease.md b/NCIClinicalTrialsSearchAPI/docs/Disease.md new file mode 100644 index 0000000..1f0f2f6 --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/docs/Disease.md @@ -0,0 +1,16 @@ +# Disease + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inclusionIndicator** | **String** | | [optional] +**isLeadDisease** | **Bool** | | [optional] +**synonyms** | **[String]** | | [optional] +**nciThesaurusConceptId** | **String** | | [optional] +**name** | **String** | | [optional] +**type** | **[String]** | | [optional] +**parents** | **[String]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/NCIClinicalTrialsSearchAPI/docs/DiseasesAPI.md b/NCIClinicalTrialsSearchAPI/docs/DiseasesAPI.md index dbffee0..0ce397b 100644 --- a/NCIClinicalTrialsSearchAPI/docs/DiseasesAPI.md +++ b/NCIClinicalTrialsSearchAPI/docs/DiseasesAPI.md @@ -1,6 +1,6 @@ # DiseasesAPI -All URIs are relative to *https://clinicaltrialsapi-int.cancer.gov/api/v2* +All URIs are relative to *https://clinicaltrialsapi.cancer.gov/api/v2* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/NCIClinicalTrialsSearchAPI/docs/Eligibility.md b/NCIClinicalTrialsSearchAPI/docs/Eligibility.md new file mode 100644 index 0000000..28a868f --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/docs/Eligibility.md @@ -0,0 +1,11 @@ +# Eligibility + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unstructured** | [UnstructuredEligibility] | | [optional] +**structured** | [**StructuredEligibility**](StructuredEligibility.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/NCIClinicalTrialsSearchAPI/docs/Identifier.md b/NCIClinicalTrialsSearchAPI/docs/Identifier.md new file mode 100644 index 0000000..3bf7344 --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/docs/Identifier.md @@ -0,0 +1,11 @@ +# Identifier + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | [optional] +**value** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/NCIClinicalTrialsSearchAPI/docs/Intervention.md b/NCIClinicalTrialsSearchAPI/docs/Intervention.md new file mode 100644 index 0000000..b4c2312 --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/docs/Intervention.md @@ -0,0 +1,17 @@ +# Intervention + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inclusionIndicator** | **String** | | [optional] +**synonyms** | **[String]** | | [optional] +**nciThesaurusConceptId** | **String** | | [optional] +**name** | **String** | | [optional] +**description** | **AnyCodable** | | [optional] +**type** | **String** | | [optional] +**category** | **String** | | [optional] +**parents** | **[String]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/NCIClinicalTrialsSearchAPI/docs/InterventionsAPI.md b/NCIClinicalTrialsSearchAPI/docs/InterventionsAPI.md index e100e46..62080e2 100644 --- a/NCIClinicalTrialsSearchAPI/docs/InterventionsAPI.md +++ b/NCIClinicalTrialsSearchAPI/docs/InterventionsAPI.md @@ -1,6 +1,6 @@ # InterventionsAPI -All URIs are relative to *https://clinicaltrialsapi-int.cancer.gov/api/v2* +All URIs are relative to *https://clinicaltrialsapi.cancer.gov/api/v2* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/NCIClinicalTrialsSearchAPI/docs/Masking.md b/NCIClinicalTrialsSearchAPI/docs/Masking.md new file mode 100644 index 0000000..79cc81e --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/docs/Masking.md @@ -0,0 +1,15 @@ +# Masking + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**roleCaregiver** | **AnyCodable** | | [optional] +**masking** | **AnyCodable** | | [optional] +**roleInvestigator** | **AnyCodable** | | [optional] +**roleOutcomeAssessor** | **AnyCodable** | | [optional] +**roleSubject** | **AnyCodable** | | [optional] +**allocationCode** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/NCIClinicalTrialsSearchAPI/docs/OrganizationsAPI.md b/NCIClinicalTrialsSearchAPI/docs/OrganizationsAPI.md index ae3dddb..7591f3b 100644 --- a/NCIClinicalTrialsSearchAPI/docs/OrganizationsAPI.md +++ b/NCIClinicalTrialsSearchAPI/docs/OrganizationsAPI.md @@ -1,6 +1,6 @@ # OrganizationsAPI -All URIs are relative to *https://clinicaltrialsapi-int.cancer.gov/api/v2* +All URIs are relative to *https://clinicaltrialsapi.cancer.gov/api/v2* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/NCIClinicalTrialsSearchAPI/docs/OutcomeMeasure.md b/NCIClinicalTrialsSearchAPI/docs/OutcomeMeasure.md new file mode 100644 index 0000000..02c8cee --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/docs/OutcomeMeasure.md @@ -0,0 +1,13 @@ +# OutcomeMeasure + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**timeframe** | **String** | | [optional] +**name** | **String** | | [optional] +**description** | **String** | | [optional] +**typeCode** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/NCIClinicalTrialsSearchAPI/docs/Site.md b/NCIClinicalTrialsSearchAPI/docs/Site.md new file mode 100644 index 0000000..b122836 --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/docs/Site.md @@ -0,0 +1,28 @@ +# Site + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**orgStateOrProvince** | **String** | | [optional] +**contactName** | **String** | | [optional] +**contactPhone** | **String** | | [optional] +**recruitmentStatusDate** | **Date** | | [optional] +**orgAddressLine2** | **AnyCodable** | | [optional] +**orgVa** | **Bool** | | [optional] +**orgAddressLine1** | **String** | | [optional] +**orgTty** | **AnyCodable** | | [optional] +**orgFamily** | **AnyCodable** | | [optional] +**orgPostalCode** | **String** | | [optional] +**contactEmail** | **String** | | [optional] +**recruitmentStatus** | **String** | | [optional] +**orgCity** | **String** | | [optional] +**orgEmail** | **AnyCodable** | | [optional] +**orgCountry** | **String** | | [optional] +**orgFax** | **String** | | [optional] +**orgPhone** | **String** | | [optional] +**orgName** | **String** | | [optional] +**orgCoordinates** | [**Coordinates**](Coordinates.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/NCIClinicalTrialsSearchAPI/docs/StatusHistory.md b/NCIClinicalTrialsSearchAPI/docs/StatusHistory.md new file mode 100644 index 0000000..999ca85 --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/docs/StatusHistory.md @@ -0,0 +1,11 @@ +# StatusHistory + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**statusDate** | **Date** | | [optional] +**status** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/NCIClinicalTrialsSearchAPI/docs/StructuredEligibility.md b/NCIClinicalTrialsSearchAPI/docs/StructuredEligibility.md new file mode 100644 index 0000000..e1873d3 --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/docs/StructuredEligibility.md @@ -0,0 +1,19 @@ +# StructuredEligibility + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**maxAge** | **String** | | [optional] +**maxAgeNumber** | **Int** | | [optional] +**minAgeUnit** | **String** | | [optional] +**maxAgeUnit** | **String** | | [optional] +**maxAgeInYears** | **Int** | | [optional] +**gender** | **String** | | [optional] +**acceptsHealthyVolunteers** | **Bool** | | [optional] +**minAge** | **String** | | [optional] +**minAgeNumber** | **Int** | | [optional] +**minAgeInYears** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/NCIClinicalTrialsSearchAPI/docs/TrialDetail.md b/NCIClinicalTrialsSearchAPI/docs/TrialDetail.md new file mode 100644 index 0000000..31bab52 --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/docs/TrialDetail.md @@ -0,0 +1,67 @@ +# TrialDetail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**otherIds** | [Identifier] | | [optional] +**amendmentDate** | **Date** | | [optional] +**keywords** | **AnyCodable** | | [optional] +**dcpId** | **AnyCodable** | | [optional] +**interventionalModel** | **String** | | [optional] +**leadOrg** | **String** | | [optional] +**eligibility** | [**Eligibility**](Eligibility.md) | | [optional] +**sites** | [Site] | | [optional] +**completionDateTypeCode** | **String** | | [optional] +**detailDescription** | **String** | | [optional] +**officialTitle** | **String** | | [optional] +**phaseSortOrder** | **Int** | | [optional] +**collaborators** | [Collaborators] | | [optional] +**associatedStudies** | **[String]** | | [optional] +**outcomeMeasures** | [OutcomeMeasure] | | [optional] +**phase** | **String** | | [optional] +**centralContact** | [**CentralContact**](CentralContact.md) | | [optional] +**primaryPurpose** | **String** | | [optional] +**numberOfArms** | **Int** | | [optional] +**studyProtocolTypeSortOrder** | **Int** | | [optional] +**nctId** | **String** | | [optional] +**biomarkers** | **[String]** | | [optional] +**classificationCode** | **AnyCodable** | | [optional] +**currentTrialStatusDate** | **Date** | | [optional] +**diseases** | [Disease] | | [optional] +**primaryPurposeSortOrder** | **Int** | | [optional] +**protocolId** | **String** | | [optional] +**activeSitesCount** | **Int** | | [optional] +**leadOrgCancerCenter** | **AnyCodable** | | [optional] +**arms** | [Arm] | | [optional] +**studyModelCode** | **AnyCodable** | | [optional] +**nciId** | **String** | | [optional] +**whyStudyStopped** | **AnyCodable** | | [optional] +**briefSummary** | **String** | | [optional] +**briefTitle** | **String** | | [optional] +**statusHistory** | [StatusHistory] | | [optional] +**studyPopulationDescription** | **AnyCodable** | | [optional] +**samplingMethodCode** | **AnyCodable** | | [optional] +**minimumTargetAccrualNumber** | **Int** | | [optional] +**priorTherapy** | **[String]** | | [optional] +**currentTrialStatusSortOrder** | **Int** | | [optional] +**startDate** | **Date** | | [optional] +**recordVerificationDate** | **Date** | | [optional] +**ctepId** | **String** | | [optional] +**currentTrialStatus** | **String** | | [optional] +**studyModelOtherText** | **AnyCodable** | | [optional] +**masking** | [**Masking**](Masking.md) | | [optional] +**acronym** | **AnyCodable** | | [optional] +**nciPrograms** | **[String]** | | [optional] +**nciFunded** | **String** | | [optional] +**anatomicSites** | **[String]** | | [optional] +**ccrId** | **AnyCodable** | | [optional] +**startDateTypeCode** | **String** | | [optional] +**principalInvestigator** | **String** | | [optional] +**studySource** | **String** | | [optional] +**completionDate** | **Date** | | [optional] +**studySubtypeCode** | **AnyCodable** | | [optional] +**studyProtocolType** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/NCIClinicalTrialsSearchAPI/docs/TrialDetailCollaboratorsInner.md b/NCIClinicalTrialsSearchAPI/docs/TrialDetailCollaboratorsInner.md new file mode 100644 index 0000000..7d8fc9a --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/docs/TrialDetailCollaboratorsInner.md @@ -0,0 +1,11 @@ +# TrialDetailCollaboratorsInner + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | [optional] +**functionalRole** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/NCIClinicalTrialsSearchAPI/docs/TrialResponse.md b/NCIClinicalTrialsSearchAPI/docs/TrialResponse.md new file mode 100644 index 0000000..bece6fa --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/docs/TrialResponse.md @@ -0,0 +1,11 @@ +# TrialResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **Int** | | [optional] +**data** | [TrialDetail] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/NCIClinicalTrialsSearchAPI/docs/TrialsAPI.md b/NCIClinicalTrialsSearchAPI/docs/TrialsAPI.md index b9d67a4..b494734 100644 --- a/NCIClinicalTrialsSearchAPI/docs/TrialsAPI.md +++ b/NCIClinicalTrialsSearchAPI/docs/TrialsAPI.md @@ -1,6 +1,6 @@ # TrialsAPI -All URIs are relative to *https://clinicaltrialsapi-int.cancer.gov/api/v2* +All URIs are relative to *https://clinicaltrialsapi.cancer.gov/api/v2* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -11,7 +11,7 @@ Method | HTTP request | Description # **getTrialById** ```swift - open class func getTrialById(id: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) + open class func getTrialById(id: String, completion: @escaping (_ data: TrialDetail?, _ error: Error?) -> Void) ``` Get One Trial @@ -46,7 +46,7 @@ Name | Type | Description | Notes ### Return type -Void (empty response body) +[**TrialDetail**](TrialDetail.md) ### Authorization @@ -55,13 +55,13 @@ Void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: Not defined + - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **searchTrialsByGet** ```swift - open class func searchTrialsByGet(size: Int? = nil, from: Int? = nil, sort: String? = nil, order: String? = nil, missing: String? = nil, exists: String? = nil, include: String? = nil, exclude: String? = nil, export: String? = nil, email: String? = nil, filename: String? = nil, fulltext: String? = nil, fieldParamFulltext: String? = nil, trialids: String? = nil, trialIds: String? = nil, keyword: String? = nil, keywordField: String? = nil, aggField: String? = nil, aggName: String? = nil, aggMinCount: Int? = nil, sitesOrgNameFulltext: String? = nil, trialStatus: String? = nil, nciFunded: String? = nil, nciId: String? = nil, nctId: String? = nil, protocolId: String? = nil, ccrId: String? = nil, ctepId: String? = nil, dcpId: String? = nil, currentTrialStatus: String? = nil, phase: String? = nil, studyProtocolType: String? = nil, nciPrograms: String? = nil, briefTitle: String? = nil, briefSummary: String? = nil, officialTitle: String? = nil, primaryPurpose: String? = nil, acceptsHealthyVolunteersIndicator: String? = nil, eligibilityStructuredAcceptsHealthyVolunteers: Bool? = nil, acronym: String? = nil, amendmentDate: String? = nil, anatomicSites: String? = nil, armsDescription: String? = nil, armsName: String? = nil, armsType: String? = nil, armsInterventionsNciThesaurusConceptId: String? = nil, armsInterventionsDescription: String? = nil, armsInterventionsName: String? = nil, armsInterventionsType: String? = nil, armsInterventionsSynonyms: String? = nil, associatedStudiesStudyId: String? = nil, associatedStudiesStudyIdType: String? = nil, eligibilityStructuredGender: String? = nil, eligibilityStructuredMinAgeInYearsLte: Int? = nil, eligibilityStructuredMinAgeInYearsGte: Int? = nil, eligibilityStructuredMaxAgeInYearsLte: Int? = nil, eligibilityStructuredMaxAgeInYearsGte: Int? = nil, eligibilityStructuredMinAgeUnit: String? = nil, eligibilityStructuredMinAgeNumberLte: Int? = nil, eligibilityStructuredMinAgeNumberGte: Int? = nil, eligibilityStructuredMaxAgeUnit: String? = nil, eligibilityStructuredMaxAgeNumberLte: Int? = nil, eligibilityStructuredMaxAgeNumberGte: Int? = nil, currentTrialStatusDateLte: String? = nil, currentTrialStatusDateGte: String? = nil, recordVerificationDateLte: String? = nil, recordVerificationDateGte: String? = nil, sitesOrgCoordinatesLat: Double? = nil, sitesOrgCoordinatesLon: Double? = nil, sitesOrgCoordinatesDist: String? = nil, sitesContactEmail: String? = nil, sitesContactName: String? = nil, sitesContactNameAuto: String? = nil, sitesContactNameRaw: String? = nil, sitesContactPhone: String? = nil, sitesOrgAddressLine1: String? = nil, sitesOrgAddressLine2: String? = nil, sitesOrgCity: String? = nil, sitesOrgPostalCode: String? = nil, sitesOrgStateOrProvince: String? = nil, sitesOrgCountry: String? = nil, sitesOrgCountryRaw: String? = nil, sitesOrgEmail: String? = nil, sitesOrgFamily: String? = nil, sitesOrgFax: String? = nil, sitesOrgName: String? = nil, sitesOrgNameAuto: String? = nil, sitesOrgNameRaw: String? = nil, sitesOrgPhone: String? = nil, sitesRecruitmentStatus: String? = nil, sitesRecruitmentStatusDate: String? = nil, sitesRecruitmentStatusDateLte: String? = nil, sitesRecruitmentStatusDateGte: String? = nil, leadOrgCancerCenter: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) + open class func searchTrialsByGet(size: Int? = nil, from: Int? = nil, sort: String? = nil, order: String? = nil, missing: String? = nil, exists: String? = nil, include: String? = nil, exclude: String? = nil, export: String? = nil, email: String? = nil, filename: String? = nil, fulltext: String? = nil, fieldParamFulltext: String? = nil, trialids: String? = nil, trialIds: String? = nil, keyword: String? = nil, keywordField: String? = nil, aggField: String? = nil, aggName: String? = nil, aggMinCount: Int? = nil, sitesOrgNameFulltext: String? = nil, trialStatus: String? = nil, nciFunded: String? = nil, nciId: String? = nil, nctId: String? = nil, protocolId: String? = nil, ccrId: String? = nil, ctepId: String? = nil, dcpId: String? = nil, currentTrialStatus: String? = nil, phase: String? = nil, studyProtocolType: String? = nil, nciPrograms: String? = nil, briefTitle: String? = nil, briefSummary: String? = nil, officialTitle: String? = nil, primaryPurpose: String? = nil, acceptsHealthyVolunteersIndicator: String? = nil, eligibilityStructuredAcceptsHealthyVolunteers: Bool? = nil, acronym: String? = nil, amendmentDate: String? = nil, anatomicSites: String? = nil, armsDescription: String? = nil, armsName: String? = nil, armsType: String? = nil, armsInterventionsNciThesaurusConceptId: String? = nil, armsInterventionsDescription: String? = nil, armsInterventionsName: String? = nil, armsInterventionsType: String? = nil, armsInterventionsSynonyms: String? = nil, associatedStudiesStudyId: String? = nil, associatedStudiesStudyIdType: String? = nil, eligibilityStructuredGender: String? = nil, eligibilityStructuredMinAgeInYearsLte: Int? = nil, eligibilityStructuredMinAgeInYearsGte: Int? = nil, eligibilityStructuredMaxAgeInYearsLte: Int? = nil, eligibilityStructuredMaxAgeInYearsGte: Int? = nil, eligibilityStructuredMinAgeUnit: String? = nil, eligibilityStructuredMinAgeNumberLte: Int? = nil, eligibilityStructuredMinAgeNumberGte: Int? = nil, eligibilityStructuredMaxAgeUnit: String? = nil, eligibilityStructuredMaxAgeNumberLte: Int? = nil, eligibilityStructuredMaxAgeNumberGte: Int? = nil, currentTrialStatusDateLte: String? = nil, currentTrialStatusDateGte: String? = nil, recordVerificationDateLte: String? = nil, recordVerificationDateGte: String? = nil, sitesOrgCoordinatesLat: Double? = nil, sitesOrgCoordinatesLon: Double? = nil, sitesOrgCoordinatesDist: String? = nil, sitesContactEmail: String? = nil, sitesContactName: String? = nil, sitesContactNameAuto: String? = nil, sitesContactNameRaw: String? = nil, sitesContactPhone: String? = nil, sitesOrgAddressLine1: String? = nil, sitesOrgAddressLine2: String? = nil, sitesOrgCity: String? = nil, sitesOrgPostalCode: String? = nil, sitesOrgStateOrProvince: String? = nil, sitesOrgCountry: String? = nil, sitesOrgCountryRaw: String? = nil, sitesOrgEmail: String? = nil, sitesOrgFamily: String? = nil, sitesOrgFax: String? = nil, sitesOrgName: String? = nil, sitesOrgNameAuto: String? = nil, sitesOrgNameRaw: String? = nil, sitesOrgPhone: String? = nil, sitesRecruitmentStatus: String? = nil, sitesRecruitmentStatusDate: String? = nil, sitesRecruitmentStatusDateLte: String? = nil, sitesRecruitmentStatusDateGte: String? = nil, leadOrgCancerCenter: String? = nil, completion: @escaping (_ data: TrialResponse?, _ error: Error?) -> Void) ``` Search Trials by GET @@ -282,7 +282,7 @@ Name | Type | Description | Notes ### Return type -Void (empty response body) +[**TrialResponse**](TrialResponse.md) ### Authorization @@ -291,13 +291,13 @@ Void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: Not defined + - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **searchTrialsByPost** ```swift - open class func searchTrialsByPost(body: AnyCodable, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) + open class func searchTrialsByPost(body: AnyCodable, completion: @escaping (_ data: TrialResponse?, _ error: Error?) -> Void) ``` Search Trials by POST @@ -332,7 +332,7 @@ Name | Type | Description | Notes ### Return type -Void (empty response body) +[**TrialResponse**](TrialResponse.md) ### Authorization @@ -341,7 +341,7 @@ Void (empty response body) ### HTTP request headers - **Content-Type**: application/json - - **Accept**: Not defined + - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/NCIClinicalTrialsSearchAPI/docs/UnstructuredEligibility.md b/NCIClinicalTrialsSearchAPI/docs/UnstructuredEligibility.md new file mode 100644 index 0000000..8147593 --- /dev/null +++ b/NCIClinicalTrialsSearchAPI/docs/UnstructuredEligibility.md @@ -0,0 +1,12 @@ +# UnstructuredEligibility + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inclusionIndicator** | **Bool** | | [optional] +**displayOrder** | **Int** | | [optional] +**description** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/OwnYourData.xcodeproj/project.pbxproj b/OwnYourData.xcodeproj/project.pbxproj index d0afc1d..5940a15 100644 --- a/OwnYourData.xcodeproj/project.pbxproj +++ b/OwnYourData.xcodeproj/project.pbxproj @@ -7,8 +7,8 @@ objects = { /* Begin PBXBuildFile section */ - 2F1AC9DF2B4E840E00C24973 /* OwnYourData.docc in Sources */ = {isa = PBXBuildFile; fileRef = 2F1AC9DE2B4E840E00C24973 /* OwnYourData.docc */; }; 2F31CE882B91D6E9002B0B29 /* OpenAPIClient in Frameworks */ = {isa = PBXBuildFile; productRef = 2F31CE872B91D6E9002B0B29 /* OpenAPIClient */; }; + 2F38F3A02BE805090002E7D5 /* NICTrialsAPIDateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F38F39F2BE805090002E7D5 /* NICTrialsAPIDateFormatter.swift */; }; 2F42E9BB2B91B6EE00D88DB7 /* SpeziLLM in Frameworks */ = {isa = PBXBuildFile; productRef = 2F42E9BA2B91B6EE00D88DB7 /* SpeziLLM */; }; 2F42E9BD2B91B6EE00D88DB7 /* SpeziLLMOpenAI in Frameworks */ = {isa = PBXBuildFile; productRef = 2F42E9BC2B91B6EE00D88DB7 /* SpeziLLMOpenAI */; }; 2F42E9C02B91B70F00D88DB7 /* SpeziFHIR in Frameworks */ = {isa = PBXBuildFile; productRef = 2F42E9BF2B91B70F00D88DB7 /* SpeziFHIR */; }; @@ -110,8 +110,9 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 2F1AC9DE2B4E840E00C24973 /* OwnYourData.docc */ = {isa = PBXFileReference; lastKnownFileType = folder.documentationcatalog; path = OwnYourData.docc; sourceTree = ""; }; - 2F31CE852B91D6BE002B0B29 /* NCIClinicalTrialsSearchAPI */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = NCIClinicalTrialsSearchAPI; path = ../../Desktop/OwnYourData/NCIClinicalTrialsSearchAPI; sourceTree = ""; }; + 2F38F3982BE5A9E10002E7D5 /* NCIClinicalTrialsSearchAPI */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = NCIClinicalTrialsSearchAPI; sourceTree = ""; }; + 2F38F39C2BE5AB9F0002E7D5 /* NCIClinicalTrialsSearchAPI.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = NCIClinicalTrialsSearchAPI.json; sourceTree = ""; }; + 2F38F39F2BE805090002E7D5 /* NICTrialsAPIDateFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NICTrialsAPIDateFormatter.swift; sourceTree = ""; }; 2F42E9CD2B91BAB900D88DB7 /* OwnYourDataSection.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OwnYourDataSection.swift; sourceTree = ""; }; 2F42E9CE2B91BAB900D88DB7 /* LogoView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LogoView.swift; sourceTree = ""; }; 2F42E9CF2B91BAB900D88DB7 /* OwnYourDataButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OwnYourDataButton.swift; sourceTree = ""; }; @@ -256,6 +257,7 @@ children = ( 2F42E9E62B91BB8300D88DB7 /* ClinicalTrialsView.swift */, 2F42E9E52B91BB8300D88DB7 /* WebView.swift */, + 2F38F39F2BE805090002E7D5 /* NICTrialsAPIDateFormatter.swift */, ); path = ClinicalTrials; sourceTree = ""; @@ -291,7 +293,6 @@ 2FAEC07F297F583900C11C42 /* OwnYourData.entitlements */, 653A258928339462005D4D48 /* Info.plist */, 2F6025CA29BBE70F0045459E /* GoogleService-Info.plist */, - 2F1AC9DE2B4E840E00C24973 /* OwnYourData.docc */, ); path = "Supporting Files"; sourceTree = ""; @@ -354,7 +355,8 @@ isa = PBXGroup; children = ( 2FC94CD4298B0A1D009C8209 /* OwnYourData.xctestplan */, - 2F31CE852B91D6BE002B0B29 /* NCIClinicalTrialsSearchAPI */, + 2F38F39C2BE5AB9F0002E7D5 /* NCIClinicalTrialsSearchAPI.json */, + 2F38F3982BE5A9E10002E7D5 /* NCIClinicalTrialsSearchAPI */, 653A254F283387FE005D4D48 /* OwnYourData */, 653A256028338800005D4D48 /* OwnYourDataTests */, 653A256A28338800005D4D48 /* OwnYourDataUITests */, @@ -644,6 +646,7 @@ 2FE5DC3A29EDD7CA004B9AB4 /* Welcome.swift in Sources */, 2F42E9DE2B91BB2500D88DB7 /* PDFView.swift in Sources */, 2FE5DC3829EDD7CA004B9AB4 /* InterestingModules.swift in Sources */, + 2F38F3A02BE805090002E7D5 /* NICTrialsAPIDateFormatter.swift in Sources */, 2F42E9F42B91BBF300D88DB7 /* Instructions.swift in Sources */, 2F42EA112B91CF6F00D88DB7 /* ResourceSelection.swift in Sources */, 2F42EA052B91C24700D88DB7 /* ExportPackage.swift in Sources */, @@ -657,7 +660,6 @@ 2F42E9F32B91BBF300D88DB7 /* AddRecordInstructView.swift in Sources */, A9DFE8A92ABE551400428242 /* AccountButton.swift in Sources */, 2FE5DC3729EDD7CA004B9AB4 /* OnboardingFlow.swift in Sources */, - 2F1AC9DF2B4E840E00C24973 /* OwnYourData.docc in Sources */, 2F42E9D12B91BAB900D88DB7 /* LogoView.swift in Sources */, 2F42EA072B91C24700D88DB7 /* URL+Zip.swift in Sources */, 2FF53D8D2A8729D600042B76 /* OwnYourDataStandard.swift in Sources */, @@ -1217,7 +1219,7 @@ repositoryURL = "https://github.com/StanfordSpezi/SpeziLLM.git"; requirement = { kind = upToNextMinorVersion; - minimumVersion = 0.7.0; + minimumVersion = 0.8.1; }; }; 2F42E9BE2B91B70F00D88DB7 /* XCRemoteSwiftPackageReference "SpeziFHIR" */ = { diff --git a/OwnYourData.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/OwnYourData.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 3a5172a..1f859a2 100644 --- a/OwnYourData.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/OwnYourData.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -6,8 +6,17 @@ "repositoryURL": "https://github.com/google/abseil-cpp-binary.git", "state": { "branch": null, - "revision": "bfc0b6f81adc06ce5121eb23f628473638d67c5c", - "version": "1.2022062300.0" + "revision": "748c7837511d0e6a507737353af268484e1745e2", + "version": "1.2024011601.1" + } + }, + { + "package": "Antlr4", + "repositoryURL": "https://github.com/antlr/antlr4", + "state": { + "branch": null, + "revision": "7ed420ff2c78d62883875c442d75f32e73bc86c8", + "version": "4.13.1" } }, { @@ -24,8 +33,8 @@ "repositoryURL": "https://github.com/google/app-check.git", "state": { "branch": null, - "revision": "3e464dad87dad2d29bb29a97836789bf0f8f67d2", - "version": "10.18.1" + "revision": "7d2688de038d5484866d835acb47b379722d610e", + "version": "10.19.0" } }, { @@ -42,8 +51,8 @@ "repositoryURL": "https://github.com/firebase/firebase-ios-sdk.git", "state": { "branch": null, - "revision": "f91c8167141d0279726c6f6d9d4a47c026785cbc", - "version": "10.21.0" + "revision": "97940381e57703c07f31a8058d8f39ec53b7c272", + "version": "10.25.0" } }, { @@ -51,8 +60,8 @@ "repositoryURL": "https://github.com/google/GoogleAppMeasurement.git", "state": { "branch": null, - "revision": "cb8617fab75d181270a1d8f763f26b15c73e2e1e", - "version": "10.21.0" + "revision": "16244d177c4e989f87b25e9db1012b382cfedc55", + "version": "10.25.0" } }, { @@ -69,8 +78,8 @@ "repositoryURL": "https://github.com/google/GoogleUtilities.git", "state": { "branch": null, - "revision": "830ffa9276e10267881f2697283c2fcd867603fd", - "version": "7.13.0" + "revision": "8e5d57ed87057cd7b0e4e8f474d9e78f73eb85f7", + "version": "7.13.2" } }, { @@ -78,8 +87,8 @@ "repositoryURL": "https://github.com/google/grpc-binary.git", "state": { "branch": null, - "revision": "a673bc2937fbe886dd1f99c401b01b6d977a9c98", - "version": "1.49.1" + "revision": "e9fad491d0673bdda7063a0341fb6b47a30c5359", + "version": "1.62.2" } }, { @@ -87,8 +96,8 @@ "repositoryURL": "https://github.com/google/gtm-session-fetcher.git", "state": { "branch": null, - "revision": "76135c9f4e1ac85459d5fec61b6f76ac47ab3a4c", - "version": "3.3.1" + "revision": "0382ca27f22fb3494cf657d8dc356dc282cd1193", + "version": "3.4.1" } }, { @@ -96,8 +105,8 @@ "repositoryURL": "https://github.com/StanfordBDHG/HealthKitOnFHIR.git", "state": { "branch": null, - "revision": "825e96007d83ed83f81ee49eb3ebab29d7b7ba2f", - "version": "0.2.5" + "revision": "418929f315f37e6d9c8f30f40030bc65b9cc47c9", + "version": "0.2.8" } }, { @@ -114,8 +123,8 @@ "repositoryURL": "https://github.com/firebase/leveldb.git", "state": { "branch": null, - "revision": "43aaef65e0c665daadf848761d560e446d350d3d", - "version": "1.22.4" + "revision": "a0bc79961d7be727d258d33d5a6b2f1023270ba1", + "version": "1.22.5" } }, { @@ -123,8 +132,8 @@ "repositoryURL": "https://github.com/StanfordBDHG/llama.cpp", "state": { "branch": null, - "revision": "b0611c7d3cb049822f9911878514e4706b80e2ac", - "version": "0.1.8" + "revision": "7bfd6d4b5bbc9fd47bd023bdbb35f96c827977f3", + "version": "0.2.1" } }, { @@ -132,17 +141,17 @@ "repositoryURL": "https://github.com/firebase/nanopb.git", "state": { "branch": null, - "revision": "819d0a2173aff699fb8c364b6fb906f7cdb1a692", - "version": "2.30909.0" + "revision": "b7e1104502eca3a213b46303391ca4d3bc8ddec1", + "version": "2.30910.0" } }, { "package": "OpenAI", - "repositoryURL": "https://github.com/MacPaw/OpenAI", + "repositoryURL": "https://github.com/StanfordBDHG/OpenAI", "state": { "branch": null, - "revision": "35afc9a6ee127b8f22a85a31aec2036a987478af", - "version": "0.2.6" + "revision": "29316babb446c34bb07bf528d96de7eb41e7b03c", + "version": "0.2.8" } }, { @@ -159,8 +168,8 @@ "repositoryURL": "https://github.com/StanfordBDHG/ResearchKit", "state": { "branch": null, - "revision": "15f06cf7c1d2d22805b7b939823536bc78ad63a6", - "version": "2.2.25" + "revision": "3f70adf898b5985ba15e25d5074d86a9c657d305", + "version": "2.2.30" } }, { @@ -168,17 +177,8 @@ "repositoryURL": "https://github.com/StanfordBDHG/ResearchKitOnFHIR", "state": { "branch": null, - "revision": "300fbc0038df28f53a9b653298931f71aa6f0bb5", - "version": "1.1.1" - } - }, - { - "package": "Semaphore", - "repositoryURL": "https://github.com/groue/Semaphore.git", - "state": { - "branch": null, - "revision": "f1c4a0acabeb591068dea6cffdd39660b86dec28", - "version": "0.0.8" + "revision": "cdb24dd5607d5a63aaf3a3597c98122189cb548e", + "version": "1.3.0" } }, { @@ -186,8 +186,8 @@ "repositoryURL": "https://github.com/StanfordSpezi/Spezi", "state": { "branch": null, - "revision": "0ced3efbc2af9513c07ac913ad762c773a00a6c8", - "version": "1.2.1" + "revision": "c43e4fa3d3938a847de2b677091a34ddaea5bc76", + "version": "1.2.3" } }, { @@ -195,8 +195,8 @@ "repositoryURL": "https://github.com/StanfordSpezi/SpeziAccount.git", "state": { "branch": null, - "revision": "a7d289ef3be54de62b25dc92e8f7ff1a0f093906", - "version": "1.2.1" + "revision": "83f505c69865d5aaacf71fd5ae8d2ffb8c3187d8", + "version": "1.2.3" } }, { @@ -204,8 +204,8 @@ "repositoryURL": "https://github.com/StanfordSpezi/SpeziChat", "state": { "branch": null, - "revision": "2334583105224b0c04fc36989db82b000021d31d", - "version": "0.1.9" + "revision": "aaa10d71431b78ece8bf29f95c0050632714984d", + "version": "0.2.0" } }, { @@ -213,8 +213,8 @@ "repositoryURL": "https://github.com/StanfordSpezi/SpeziFHIR.git", "state": { "branch": null, - "revision": "9a171a21d7028042c30a24c661bfdfc6e363c9c3", - "version": "0.6.0" + "revision": "6eb16d2f80093d0c6db7d7966bc177e9454b5a49", + "version": "0.6.1" } }, { @@ -222,8 +222,8 @@ "repositoryURL": "https://github.com/StanfordSpezi/SpeziFirebase.git", "state": { "branch": null, - "revision": "ca1edf678ec59e76c9869ee3448e6e165d9c2789", - "version": "1.0.0" + "revision": "16c1c751c14b08ae593eacf9bc2752c2e070fe2f", + "version": "1.1.0" } }, { @@ -240,8 +240,8 @@ "repositoryURL": "https://github.com/StanfordSpezi/SpeziHealthKit.git", "state": { "branch": null, - "revision": "b40695ffa4d1c9d58c5a0ee277640c2343fb5516", - "version": "0.5.1" + "revision": "1e9cb5a6036ac7f4ff37ea1c3ed4898103339ad1", + "version": "0.5.3" } }, { @@ -249,8 +249,8 @@ "repositoryURL": "https://github.com/StanfordSpezi/SpeziLLM.git", "state": { "branch": null, - "revision": "6892c5dfe258371b6f3287f02b8fec57a611ba70", - "version": "0.7.0" + "revision": "cbaf20496e600c985dea2358f35a497fe4964116", + "version": "0.8.1" } }, { @@ -258,8 +258,8 @@ "repositoryURL": "https://github.com/StanfordSpezi/SpeziOnboarding", "state": { "branch": null, - "revision": "91463ae190611bd14ef52b0657e8db3bf53c9ae8", - "version": "1.1.0" + "revision": "8d6dda3501720a1952573439b21a503cbecd9e0f", + "version": "1.2.0" } }, { @@ -267,8 +267,8 @@ "repositoryURL": "https://github.com/StanfordSpezi/SpeziQuestionnaire.git", "state": { "branch": null, - "revision": "f25580e95bfdad02383980dcb94406cf97b08ea8", - "version": "1.0.2" + "revision": "f9d9b6d99bb1e00bda2974b440dca8367733d591", + "version": "1.1.0" } }, { @@ -285,8 +285,8 @@ "repositoryURL": "https://github.com/StanfordSpezi/SpeziStorage.git", "state": { "branch": null, - "revision": "eaed2220375c35400aa69d1f96a8d32b7e66b1c7", - "version": "1.0.0" + "revision": "b958df9b31f24800388a7bfc28f457ce7b82556c", + "version": "1.0.2" } }, { @@ -303,8 +303,8 @@ "repositoryURL": "https://github.com/apple/swift-argument-parser", "state": { "branch": null, - "revision": "c8ed701b513cf5177118a175d85fbbbcd707ab41", - "version": "1.3.0" + "revision": "46989693916f56d1186bd59ac15124caef896560", + "version": "1.3.1" } }, { @@ -330,8 +330,8 @@ "repositoryURL": "https://github.com/apple/swift-protobuf.git", "state": { "branch": null, - "revision": "65e8f29b2d63c4e38e736b25c27b83e012159be8", - "version": "1.25.2" + "revision": "9f0c76544701845ad98716f3f6a774a892152bcb", + "version": "1.26.0" } }, { diff --git a/OwnYourData.xcodeproj/xcshareddata/xcschemes/OwnYourData.xcscheme b/OwnYourData.xcodeproj/xcshareddata/xcschemes/OwnYourData.xcscheme index 65ee5e3..90f2c3f 100644 --- a/OwnYourData.xcodeproj/xcshareddata/xcschemes/OwnYourData.xcscheme +++ b/OwnYourData.xcodeproj/xcshareddata/xcschemes/OwnYourData.xcscheme @@ -79,7 +79,7 @@ + isEnabled = "YES"> + isEnabled = "YES"> TrialDetail { + OpenAPIClientAPI.customHeaders = ["X-API-KEY": ""] + CodableHelper.dateFormatter = NICTrialsAPIDateFormatter() + + return try await withCheckedThrowingContinuation { continuation in + TrialsAPI.getTrialById(id: trialId) { data, error in + guard let data else { + if let error { + continuation.resume(throwing: error) + } else { + continuation.resume(throwing: DownloadException.responseFailed) + } + return + } + + continuation.resume(returning: data) + } } } } diff --git a/OwnYourData/ClinicalTrials/NICTrialsAPIDateFormatter.swift b/OwnYourData/ClinicalTrials/NICTrialsAPIDateFormatter.swift new file mode 100644 index 0000000..bffd2be --- /dev/null +++ b/OwnYourData/ClinicalTrials/NICTrialsAPIDateFormatter.swift @@ -0,0 +1,84 @@ +// +// This source file is part of the OwnYourData based on the Stanford Spezi Template Application project +// +// SPDX-FileCopyrightText: 2023 Stanford University +// +// SPDX-License-Identifier: MIT +// +// Based on DateFormatter generated by the openapi-generator https://openapi-generator.tech +// + + +import Foundation + + +class NICTrialsAPIDateFormatter: DateFormatter { + static let withoutSeconds: DateFormatter = { + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ" + return formatter + }() + + static let withoutTime: DateFormatter = { + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = "yyyy-MM-dd" + return formatter + }() + + static let withMicroseconds: DateFormatter = { + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSSSS" + return formatter + }() + + static let withoutTimezone: DateFormatter = { + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss" + return formatter + }() + + + override init() { + super.init() + setup() + } + + required init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + setup() + } + + + override func date(from string: String) -> Date? { + if let result = super.date(from: string) { + return result + } else if let result = Self.withoutSeconds.date(from: string) { + return result + } else if let result = Self.withMicroseconds.date(from: string) { + return result + } else if let result = Self.withoutTimezone.date(from: string) { + return result + } + + return Self.withoutTime.date(from: string) + } + + private func setup() { + calendar = Calendar(identifier: .iso8601) + locale = Locale(identifier: "en_US_POSIX") + timeZone = TimeZone(secondsFromGMT: 0) + dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + } +} diff --git a/OwnYourData/Home.swift b/OwnYourData/Home.swift index 7392aa8..23fefea 100644 --- a/OwnYourData/Home.swift +++ b/OwnYourData/Home.swift @@ -17,7 +17,7 @@ struct HomeView: View { !FeatureFlags.disableFirebase && !FeatureFlags.skipOnboarding } - @Environment(Account.self) var account + @Environment(Account.self) var account: Account? @Environment(FHIRStore.self) var fjirStore @State private var presentingAccount = false @@ -74,7 +74,7 @@ struct HomeView: View { @MainActor @ViewBuilder private var welcome: some View { - if let givenName = account.details?.name?.givenName { + if let givenName = account?.details?.name?.givenName { Text("Welcome,\n\(givenName)") } else { Text("Welcome!") diff --git a/OwnYourData/Onboarding/AccountOnboarding.swift b/OwnYourData/Onboarding/AccountOnboarding.swift index 77f9e6a..47fac15 100644 --- a/OwnYourData/Onboarding/AccountOnboarding.swift +++ b/OwnYourData/Onboarding/AccountOnboarding.swift @@ -12,7 +12,6 @@ import SwiftUI struct AccountOnboarding: View { - @Environment(Account.self) private var account @Environment(OnboardingNavigationPath.self) private var onboardingNavigationPath