Running examples in ‘admiral-Ex.R’ failed
The error most likely occurred in:

> ### Name: create_query_data
> ### Title: Creates a queries dataset as input dataset to the
> ###   'dataset_queries' argument in 'derive_vars_query()'
> ### Aliases: create_query_data
> ### Keywords: create_aux
> 
> ### ** Examples
> 
> library(tibble)
> library(dplyr, warn.conflicts = FALSE)
> library(pharmaversesdtm)
> library(admiral)
> 
> # creating a query dataset for a customized query
> cqterms <- tribble(
+   ~TERMNAME,                     ~TERMID,
+   "APPLICATION SITE ERYTHEMA", 10003041L,
+   "APPLICATION SITE PRURITUS", 10003053L
+ ) %>%
+   mutate(SRCVAR = "AEDECOD")
> 
> cq <- query(
+   prefix = "CQ01",
+   name = "Application Site Issues",
+   definition = cqterms
+ )
> 
> create_query_data(queries = list(cq))
# A tibble: 2 × 5
  TERMNAME                    TERMID SRCVAR  PREFIX GRPNAME                
  <chr>                        <int> <chr>   <chr>  <chr>                  
1 APPLICATION SITE ERYTHEMA 10003041 AEDECOD CQ01   Application Site Issues
2 APPLICATION SITE PRURITUS 10003053 AEDECOD CQ01   Application Site Issues
> 
> # create a query dataset for SMQs
> pregsmq <- query(
+   prefix = "SMQ02",
+   id = auto,
+   definition = basket_select(
+     name = "Pregnancy and neonatal topics (SMQ)",
+     scope = "NARROW",
+     type = "smq"
+   )
+ )
> 
> bilismq <- query(
+   prefix = "SMQ04",
+   definition = basket_select(
+     id = 20000121L,
+     scope = "BROAD",
+     type = "smq"
+   )
+ )
> 
> # The get_terms function from pharmaversesdtm is used for this example.
> # In a real application a company-specific function must be used.
> create_query_data(
+   queries = list(pregsmq, bilismq),
+   get_terms_fun = pharmaversesdtm:::get_terms,
+   version = "20.1"
+ )
Error in `assert_terms()`:
! Variable `TERMNAME` or `TERMID` is required.
None of them is in object returned by calling get_terms_fun(basket_select = basket_select(name = "Pregnancy and neonatal topics (SMQ)", id = NULL, scope = "NARROW", type = "smq"), version = "20.1", keep_id = TRUE).
Provided variables: `TERMCHAR`, `SRCVAR`, `GRPNAME` and `GRPID`
Backtrace:
    ▆
 1. └─admiral::create_query_data(...)
 2.   └─admiral:::get_terms_from_db(...)
 3.     └─admiral::assert_terms(...)
 4.       └─rlang::abort(...)
Execution halted