clintrials_gov_upload {eudract}R Documentation

applies a conversion using xslt from a simple xml file to a ClinicalTrials.gov compatible file, merges into a study record from the portal, and uploads the result.

Description

applies a conversion using xslt from a simple xml file to a ClinicalTrials.gov compatible file, merges into a study record from the portal, and uploads the result.

Usage

clintrials_gov_upload(
  input,
  orgname,
  username,
  password,
  studyid,
  url = "https://register.clinicaltrials.gov/",
  check = interactive(),
  output = "study_file.xml",
  backup = "bak_study_file.xml",
  xslt = system.file("extdata", "simpleToCtGov.xslt", package = "eudract"),
  schema_input = system.file("extdata", "simple.xsd", package = "eudract"),
  schema_results = system.file("extdata", "RRSUploadSchema.xsd", package = "eudract"),
  schema_output = system.file("extdata", "ProtocolRecordSchema.xsd", package = "eudract"),
  soc = system.file("extdata", "soc.xml", package = "eudract")
)

Arguments

input

a character string giving the file path to the simple xml file

orgname

a character string giving the organisation name used to log in

username

a character string giving the user-name used to log in

password

a character string giving the password used to log in

studyid

a character string given the unique study id within the portal

url

a character string giving the URL of the website to log in. Defaults to the live site, but the testing site is the alternative.

check

a logical that will check on the command line if you want to proceed as results will be overwritten. Defaults to TRUE.

output

a character string naming the output xml file

backup

a character string naming the copy of the original data that is created.

xslt

a character string giving the file path to the xslt script. Defaults to the script provided in this package

schema_input

a character string giving the file path to the schema for the simple xml file. Defaults to the schema provided in this package

schema_results

a character string giving the file path to the schema for the results section of the output. A copy was downloaded and is provided in this package as the default.

schema_output

a character string giving the file path to the schema for the overall output. A copy was downloaded and is provided in this package as the default.

soc

a character string giving an xml file that contains the System Organ Class look-up table going from EudraCT numbers to ClinicalTrials words.

Value

Invisibly returns the results from the two API with the portal response, POST . A new file is created as a side-effect, which is uploaded into ClinicalTrials.gov. This over-writes the original safety data online with the additional safety events. A backup copy of the original data is also saved.

See Also

safety_summary simple_safety_xml [ClinicalTrials.gov manual](https://prsinfo.clinicaltrials.gov/prs-users-guide.html#section10)

Examples

safety_statistics <- safety_summary(safety,
                                    exposed=c("Experimental"=60,"Control"=67))
simple <- tempfile(fileext = ".xml")
eudract <- tempfile(fileext = ".xml")
ct <- tempfile(fileext = ".xml")
simple_safety_xml(safety_statistics, simple)
eudract_convert(input=simple,
                output=eudract)
clintrials_gov_convert(input=simple,
                       original=system.file("extdata", "1234.xml", package ="eudract"),
                output=ct)
## Not run: 
  # This needs a real user account to work
  clintrials_gov_upload(
    input=simple,
    orgname="CTU",
    username="Student",
    password="Guinness",
    studyid="1234"
    )


## End(Not run)

[Package eudract version 1.0.0 Index]