dbFindIdsUniqueTrials {ctrdata}R Documentation

Get identifiers of deduplicated trial records

Description

Records for a clinical trial can be loaded from more than one register into a collection. The function returns identifiers of records in the collection that were loaded from the register(s) preferred by the user. All registers are recording identifiers also from other registers, which are used by this function to provide a vector of identifiers of deduplicated trials.

Usage

dbFindIdsUniqueTrials(
  preferregister = c("EUCTR", "CTGOV", "ISRCTN"),
  prefermemberstate = "DE",
  include3rdcountrytrials = TRUE,
  con,
  verbose = FALSE
)

Arguments

preferregister

A vector of the order of preference for registers from which to generate unique _id's, default c("EUCTR", "CTGOV", "ISRCTN")

prefermemberstate

Code of single EU Member State for which records should returned. If not available, a record for DE or lacking this, any random Member State's record for the trial will be returned. For a list of codes of EU Member States, please see vector countriesEUCTR. Specifying "3RD" will return the Third Country record of trials, where available.

include3rdcountrytrials

A logical value if trials should be retained that are conducted exclusively in third countries, that is, outside the European Union. Ignored if prefermemberstate is set to "3RD".

con

A connection object, see section 'Databases' in ctrdata-package

verbose

If set to TRUE, prints out which fields of the registers are used to find corresponding trial records

Details

Note that the content of records may differ between registers (and, for EUCTR, between records for different Member States). Such differences are not considered by this function.

Value

A vector with strings of keys ("_id") of records in the collection that represent unique trials.

Examples


dbc <- nodbi::src_sqlite(
   dbname = system.file("extdata", "demo.sqlite", package = "ctrdata"),
   collection = "my_trials")

dbFindIdsUniqueTrials(con = dbc)


[Package ctrdata version 1.11.1 Index]