Title: | Template for Clinical Trial Protocol |
Version: | 0.1.1 |
Description: | Contains an R Markdown template for a clinical trial protocol adhering to the SPIRIT statement. The SPIRIT (Standard Protocol Items for Interventional Trials) statement outlines recommendations for a minimum set of elements to be addressed in a clinical trial protocol. Also contains functions to create a xml document from the template and upload it to clinicaltrials.govhttps://www.clinicaltrials.gov/ for trial registration. |
URL: | https://github.com/awconway/spiritR |
BugReports: | https://github.com/awconway/spiritR/issues |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
LazyData: | true |
Imports: | xml2, httr, magrittr |
RoxygenNote: | 6.1.1 |
Suggests: | testthat, knitr, rmarkdown, pkgdown, covr |
VignetteBuilder: | knitr |
Language: | en-US |
NeedsCompilation: | no |
Packaged: | 2019-08-19 12:34:36 UTC; aaronconway |
Author: | Aaron Conway |
Maintainer: | Aaron Conway <aaron.conway@utoronto.ca> |
Repository: | CRAN |
Date/Publication: | 2019-08-19 13:10:02 UTC |
spiritR: Template for Clinical Trial Protocol
Description
Contains an R Markdown template for a clinical trial protocol adhering to the SPIRIT statement. The SPIRIT (Standard Protocol Items for Interventional Trials) statement outlines recommendations for a minimum set of elements to be addressed in a clinical trial protocol. Also contains functions to create a xml document from the template and upload it to clinicaltrials.gov<https://www.clinicaltrials.gov/> for trial registration.
Author(s)
Maintainer: Aaron Conway aaron.conway@utoronto.ca (0000-0002-9583-8636)
See Also
Useful links:
Pipe operator
Description
See magrittr::%>%
for details.
Usage
lhs %>% rhs
Add arms, interventions and outcomes to an existing xml document for upload to clinicaltrials.gov
Description
These functions add arms, interventions, primary and secondary outcomes as well as conditions and keywords to an xml document created using the create_ctxml() function. Calls to these functions should not be assigned to an object.
Usage
add_arm(ctxml, arm_label, arm_type, arm_desc)
add_intervention(ctxml, int_name, int_type, int_desc, arm_label)
add_pr_outcome(ctxml, name, time, description)
add_sec_outcome(ctxml, name, time, description)
add_condition(ctxml, condition)
add_keyword(ctxml, keyword)
Arguments
ctxml |
A xml document generated from the create_ctxml() function |
arm_label |
Label assigned to arm of clinical trial. Arm means a pre-specified group or subgroup of participant(s) in a clinical trial assigned to receive specific intervention(s) (or no intervention). |
arm_type |
Either Experimental, Active comparator, Placebo Comparator, Sham Comparator, No Intervention, or Other. |
arm_desc |
Description of the arm. |
int_name |
Name of the intervention. For a drug, it is the generic name. |
int_type |
Drug, Device, Biological/Vaccine, Procedure/Surgery, Radiation, Behavioural, Genetic, Dietary Supplement, Combination Product, Diagnostic Test, or Other. |
int_desc |
Other details about the intervention not included in name. |
name |
Name of outome measure. |
time |
Time point(s) at which the measurement is assessed. |
description |
Other details about the outcome measure not included in the name |
condition |
MeSH term for condition being studied in the trial, or Focus of the Study |
keyword |
Words or phrases that best describe the protocol. Keywords help users find studies in the database. |
Details
-
add_arm()
: Adds an xml nodespace containing information about the arm name, type and description to the xml document. -
add_intervention()
: Adds an xml nodespace containing information about the intervention name, type, description and arm it is associated with to the xml document. -
add_pr_outcome()
: Adds an xml nodespace containing information about the outcome name, time frame for measurement and additional descriptive details to the xml document. -
add_sec_outcome()
: Adds an xml nodespace containing information about the outcome name, time frame for measurement and additional descriptive details to the xml document. -
add_condition()
: Adds an xml nodespace containing a MeSH term for the condition being studied in the trial, or Focus of the Study to the xml document. -
add_keyword()
: Adds an xml nodespace containing a Words or phrases that best describe the protocol. Keywords help users find studies in the database to the xml document.
Value
A xml document
Examples
args_ctxml <- list(
org_name = "UHNToronto",
org_study_id = "Foo trial 20190806",
brief_title = "Foo trial to test auto upload 20190806",
study_acronym = "N/A",
official_title = "Foo trial to test auto upload: A randomized trial new 20190806",
agency = "Aaron Conway",
resp_party_type = "Sponsor-Investigator",
investigator_username = "aconway",
investigator_title ="Assistant Professor",
brief_summary = "Lay summary here",
start_date = "2019-10",
primary_compl = "2020-12",
study_compl = "2020-12",
int_subtype = "Health Services Research",
phase = "N/A",
assignment = "Parallel",
allocation = "Randomized",
no_masking = "False",
masked_subject = "True",
masked_caregiver = "True",
masked_investigator = "True",
masked_assessor = "True",
number_arms = 2,
sample_size = "40",
eligibility_criteria = "Inclusion Criteria
- Adults
Exclusion Criteria
- Children",
healthy_volunteers = "No",
genders_included = "Both",
gender_based = "No",
min_age = "1 years",
max_age = "N/A",
#Central contact
contact_first_name = "Aaron",
contact_last_name = "Conway",
contact_degrees = "PhD",
contact_phone = "649-728-8499",
contact_email = "aaron.conway@utoronto.ca",
#Overall official
official_first_name = "Aaron",
official_last_name ="Conway",
official_degrees = "PhD",
official_affiliation = "UHN",
official_role = "Study Principal Investigator",
#Sharing statements
ipd_sharing = "Yes",
ipd_description = "details",
ipd_protocol = "True",
ipd_sap = "True",
ipd_icf = "True",
ipd_csr = "True",
ipd_code = "True",
ipd_time = "details",
ipd_criteria = "details",
ipd_url = "http://www.aaronconway.info"
)
ctxml <- do.call(create_ctxml, args_ctxml)
add_arm(ctxml = ctxml,
arm_label = "Standard",
arm_type = "Active Comparator",
arm_desc = "Manual upload to registry")
add_intervention(ctxml = ctxml,
int_type = "Device",
int_name = "Registry entry",
int_desc = "The usual way to enter to the registry",
arm_label = "Standard")
add_pr_outcome(ctxml = ctxml,
name = "correct upload",
time = "As measured",
description = "Insert description about the measure.")
add_sec_outcome(ctxml = ctxml,
name = "time to upload",
time = "As measured",
description = "Insert description about the measure.")
add_condition(ctxml = ctxml,
condition = "Cardiac")
add_keyword(ctxml = ctxml,
keyword = "sedation")
Creates xml document for upload to clinicaltrials.gov
Description
This function will create an xml document conforming to clinicaltrials.gov requirements for automatic upload to the registry
Usage
create_ctxml(org_name, org_study_id, brief_title, study_acronym,
official_title, agency, resp_party_type, investigator_username,
investigator_title, brief_summary, start_date, study_compl,
primary_compl, int_subtype, phase, assignment, allocation, no_masking,
masked_subject, masked_caregiver, masked_investigator, masked_assessor,
number_arms, sample_size, eligibility_criteria, healthy_volunteers,
genders_included, gender_based, min_age, max_age, official_first_name,
official_last_name, official_degrees, official_role,
official_affiliation, contact_first_name, contact_last_name,
contact_degrees, contact_phone, contact_email, ipd_sharing,
ipd_description, ipd_protocol, ipd_sap, ipd_icf, ipd_csr, ipd_code,
ipd_time, ipd_criteria, ipd_url)
Arguments
org_name |
The code for the organisation name associated with your PRS clinicaltrials.gov log-in details. |
org_study_id |
Must be a unique study number from the organization. Sometimes it is the number associated with the funding received or submission for institutional approval. |
brief_title |
Brief title for the study with a limit of 300 characters |
study_acronym |
limit to 14 characters or enter n/a |
official_title |
Study title limited to 600 characters |
agency |
Name of the lead sponsor. This would be the name of the principal investigator if it is a Sponsor-Investigator trial. |
resp_party_type |
Either: Sponsor; Principal Investigator (responsible party designated by sponsor) or Sponsor-Investigator (individual who initiates and conducts study). |
investigator_username |
The username associated with your clinicaltrials.gov log-in |
investigator_title |
Offical title e.g. Assistant Professor |
brief_summary |
A short description of the clinical study, including a brief statement of the clinical study's hypothesis, written in language intended for the lay public. Limit is 5000 characters. |
start_date |
Anticipated start date written in yyyy-mm format |
study_compl |
The anticipated date (written in yyyy-mm) that the final participant was examined or received an intervention for purposes of final collection of data |
primary_compl |
Anticipated date written in yyyy-mm-dd format. The date that the final participant was examined or received an intervention for the purposes of final collection of data for the primary outcome. |
int_subtype |
Either: Treatment; Prevention; Diagnostic; Supportive Care; Screening; Health Services Research; Basic Science; Device Feasibility; or Other. |
phase |
Either: N/A (for trials that do not involve drug or biologic products); Early Phase 1; Phase1/Phase 2; Phase 2; Phase2/Phase 3; Phase 3; or Phase 4. |
assignment |
Either: Single group; Parallel; Crossover; Factorial; or Sequential. |
allocation |
Either: Randomized; or Non-randomized. |
no_masking |
True/False |
masked_subject |
True/False |
masked_caregiver |
True/False |
masked_investigator |
True/False |
masked_assessor |
True/False |
number_arms |
Number of arms. "Arm" means a pre-specified group or subgroup of participant(s) in a clinical trial assigned to receive specific intervention(s) (or no intervention) according to a protocol. |
sample_size |
Planned sample size |
eligibility_criteria |
Textbox contaiing both inclusion and exclusion criteria |
healthy_volunteers |
Trial is recruiting healthy volunteers for participation. Answer is either: Yes; or No. |
genders_included |
Either: Female; Male; or Both. |
gender_based |
If applicable, indicate if eligibility is based on self-representation of gender identitiy. Answer is either: Yes; or No. |
min_age |
Numeric with years - e.g. 16 years or 'N/A (No Limit)' |
max_age |
Numeric with years - e.g. 80 years or 'N/A (No Limit)' |
official_first_name |
Overall official first name |
official_last_name |
Overall official last name |
official_degrees |
Overall official degrees/qualifications |
official_role |
Either: Study Chair; Study Director or Study Principal Investigator. |
official_affiliation |
Full name of the official's organization. If none, specify Unaffiliated. |
contact_first_name |
Central contact first name |
contact_last_name |
Central contact last name |
contact_degrees |
Central contact's degrees/qualifications |
contact_phone |
Central contact phone number |
contact_email |
Central contact email |
ipd_sharing |
Indicate whether there is a plan to make individual participant data (IPD) collected in this study, including data dictionaries, available to other researchers (typically after the end of the study). Either: Yes; No; Undecided. |
ipd_description |
If yes, describe the IPD sharing plan, including what IPD are to be shared with other researchers. |
ipd_protocol |
Study protocol to be shared: True/False |
ipd_sap |
Statistical analysis plan to be shared: True/False |
ipd_icf |
Information consent form to be shared: True/False |
ipd_csr |
Clinical study report to be shared: True/False |
ipd_code |
Analytic code to be shared: True/False |
ipd_time |
A description of when the IPD and any additional supporting information will become available and for how long, including the start and end dates or period of availability. Limit 1000 characters. |
ipd_criteria |
Describe by what access criteria IPD and any additional supporting information will be shared, including with whom, for what types of analyses, and by what mechanism. Limit 1000 characters. |
ipd_url |
The web address, if any, used to find additional information about the plan to share IPD. |
Value
A xml document
Examples
args_ctxml <- list(
org_name = "UHNToronto",
org_study_id = "Foo trial 20190806",
brief_title = "Foo trial to test auto upload 20190806",
study_acronym = "N/A",
official_title = "Foo trial to test auto upload: A randomized trial new 20190806",
agency = "Aaron Conway",
resp_party_type = "Sponsor-Investigator",
investigator_username = "aconway",
investigator_title ="Assistant Professor",
brief_summary = "Lay summary here",
start_date = "2019-10",
primary_compl = "2020-12",
study_compl = "2020-12",
int_subtype = "Health Services Research",
phase = "N/A",
assignment = "Parallel",
allocation = "Randomized",
no_masking = "False",
masked_subject = "True",
masked_caregiver = "True",
masked_investigator = "True",
masked_assessor = "True",
number_arms = 2,
sample_size = "40",
eligibility_criteria = "Inclusion Criteria
- Adults
Exclusion Criteria
- Children",
healthy_volunteers = "No",
genders_included = "Both",
gender_based = "No",
min_age = "1 years",
max_age = "N/A",
#Central contact
contact_first_name = "Aaron",
contact_last_name = "Conway",
contact_degrees = "PhD",
contact_phone = "649-728-8499",
contact_email = "aaron.conway@utoronto.ca",
#Overall official
official_first_name = "Aaron",
official_last_name ="Conway",
official_degrees = "PhD",
official_affiliation = "UHN",
official_role = "Study Principal Investigator",
#Sharing statements
ipd_sharing = "Yes",
ipd_description = "details",
ipd_protocol = "True",
ipd_sap = "True",
ipd_icf = "True",
ipd_csr = "True",
ipd_code = "True",
ipd_time = "details",
ipd_criteria = "details",
ipd_url = "http://www.aaronconway.info"
)
ctxml <- do.call(create_ctxml, args_ctxml)
Print xml document created using spiritR
Description
This function allows you to easily view the structure of the xml document generated using the create_ctxml() function
Usage
print_ctxml(ctxml)
Arguments
ctxml |
The xml document generated by a call to create_ctxml() |
Examples
args_ctxml <- list(
org_name = "UHNToronto",
org_study_id = "Foo trial 20190806",
brief_title = "Foo trial to test auto upload 20190806",
study_acronym = "N/A",
official_title = "Foo trial to test auto upload: A randomized trial new 20190806",
agency = "Aaron Conway",
resp_party_type = "Sponsor-Investigator",
investigator_username = "aconway",
investigator_title ="Assistant Professor",
brief_summary = "Lay summary here",
start_date = "2019-10",
primary_compl = "2020-12",
study_compl = "2020-12",
int_subtype = "Health Services Research",
phase = "N/A",
assignment = "Parallel",
allocation = "Randomized",
no_masking = "False",
masked_subject = "True",
masked_caregiver = "True",
masked_investigator = "True",
masked_assessor = "True",
number_arms = 2,
sample_size = "40",
eligibility_criteria = "Inclusion Criteria
- Adults
Exclusion Criteria
- Children",
healthy_volunteers = "No",
genders_included = "Both",
gender_based = "No",
min_age = "1 years",
max_age = "N/A",
#Central contact
contact_first_name = "Aaron",
contact_last_name = "Conway",
contact_degrees = "PhD",
contact_phone = "649-728-8499",
contact_email = "aaron.conway@utoronto.ca",
#Overall official
official_first_name = "Aaron",
official_last_name ="Conway",
official_degrees = "PhD",
official_affiliation = "UHN",
official_role = "Study Principal Investigator",
#Sharing statements
ipd_sharing = "Yes",
ipd_description = "details",
ipd_protocol = "True",
ipd_sap = "True",
ipd_icf = "True",
ipd_csr = "True",
ipd_code = "True",
ipd_time = "details",
ipd_criteria = "details",
ipd_url = "http://www.aaronconway.info"
)
ctxml <- do.call(create_ctxml, args_ctxml)
print_ctxml(ctxml)
Upload an xml object to the clinicaltrials.gov registry
Description
This function will make a http POST request to upload a XML document to the clinicaltrials.gov registry.
Usage
upload_ctxml(ctxml, org_name, user_name, password)
Arguments
ctxml |
A xml document created using create_ctxml() and updated with any add_arms(), add_interventions(), add_pr_outcomes() and add_sec_outcomes() that may be required. |
org_name |
The organisation name associated with a clinicaltrials.gov account |
user_name |
Username for a clinicaltrials.gov account |
password |
Password for a clinicaltrials.gov account |
Value
A message from a http post request to show that the upload was successful or unsuccesful
Examples
## Not run:
upload_ctxml(ctxml = ctxml, org_name ="UHNToronto", user_name = "aconway",
password = "password")
## End(Not run)