get_atc_code | R Documentation |
Collect
Drug Record Numbers or MedicinalProd_Ids associated to one or more ATC classes.
get_atc_code(atc_sel, mp, thg_data, vigilyze = TRUE)
atc_sel |
A named list of ATC codes. See Details. |
mp |
A modified MP data.table. See |
thg_data |
A data.table. Correspondence between ATC codes and MedicinalProd_Id (usually, it is |
vigilyze |
A logical. Should ATC classes be retrieved using the vigilyze style? See details |
get_atc_code()
is an ID collector function. Provide atc_sel
in the same way as d_sel
in add_drug()
,
but remember to specify its method arg as MedicinalProd_Id
if
vigilyze
is set to FALSE
.
Vigilyze style means all conditioning of drugs will be retrieved after
requesting an ATC class (i.e., drugs are identified with their DrecNos),
even if a specific conditioning is not present in the ATC class.
This is the default behavior in vigilyze.
A named list of integers. DrecNos if vigilyze
is set to TRUE
,
or MedicinalProd_Ids if vigilyze
is set to FALSE
.
mp_
, thg_
, add_drug()
, get_drecno()
# ## Find codes associated with one or more atc classes
# First, define which atc you want to use
atc_sel <-
rlang::list2(l03_j01 = c("L03AA", "J01CA"),
c09aa = c("C09AA")
)
# You can get DrecNos for you ATCs (if vigilyze is TRUE)
atc_drecno <-
get_atc_code(atc_sel = atc_sel,
mp = mp_,
thg_data = thg_,
vigilyze = TRUE)
# Or you can get MedicinalProd_Ids (if vigilyze is FALSE)
atc_mpi <-
get_atc_code(atc_sel = atc_sel,
mp = mp_,
thg_data = thg_,
vigilyze = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.