View source: R/create_query_data.R
query | R Documentation |
query
objectA query
object defines a query, e.g., a Standard MedDRA Query (SMQ), a
Standardized Drug Grouping (SDG), or a customized query (CQ). It is used
as input to create_query_data()
.
query(prefix, name = auto, id = NULL, add_scope_num = FALSE, definition = NULL)
prefix |
The value is used to populate |
name |
The value is used to populate Permitted Values: A character scalar or the |
id |
The value is used to populate Permitted Values: A integer scalar or the |
add_scope_num |
Determines if If the parameter is set to Default: Permitted Values: |
definition |
Definition of terms belonging to the query There are three different ways to define the terms:
Permitted Values: an |
An object of class query
.
create_query_data()
, basket_select()
, Queries Dataset Documentation
Source Objects:
basket_select()
,
censor_source()
,
death_event
,
event()
,
event_joined()
,
event_source()
,
flag_event()
,
records_source()
,
tte_source()
# create a query for an SMQ
library(tibble)
library(dplyr, warn.conflicts = FALSE)
# create a query for a SMQ
query(
prefix = "SMQ02",
id = auto,
definition = basket_select(
name = "Pregnancy and neonatal topics (SMQ)",
scope = "NARROW",
type = "smq"
)
)
# create a query for an SDG
query(
prefix = "SDG01",
id = auto,
definition = basket_select(
name = "5-aminosalicylates for ulcerative colitis",
scope = NA_character_,
type = "sdg"
)
)
# creating a query for a customized query
cqterms <- tribble(
~TERMCHAR, ~TERMNUM,
"APPLICATION SITE ERYTHEMA", 10003041L,
"APPLICATION SITE PRURITUS", 10003053L
) %>%
mutate(SRCVAR = "AEDECOD")
query(
prefix = "CQ01",
name = "Application Site Issues",
definition = cqterms
)
# creating a customized query based on SMQs and additional terms
query(
prefix = "CQ03",
name = "Special issues of interest",
definition = list(
cqterms,
basket_select(
name = "Pregnancy and neonatal topics (SMQ)",
scope = "NARROW",
type = "smq"
),
basket_select(
id = 8050L,
scope = "BROAD",
type = "smq"
)
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.