Skip to content

Commit

Permalink
#107 change code list code
Browse files Browse the repository at this point in the history
  • Loading branch information
edgar-manukyan committed Dec 8, 2024
1 parent 8bd5f6e commit e8bedf2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion R/generate_code.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
# - Moved VSTESTCD before qualifired, e.g. VSSTAT, VSPOS so that topic is created first
# - Changed mapping_is_dataset to TRUE for VSTPT, VSDTC
# - Added a new column topic, showing to which topic the mapping belongs to

# - Some code list codes were populated in target_sdtm_variable_controlled_terms_or_format
# I move them under target_sdtm_variable_codelist_code, e.g. VSPOS, VSLOC

#' Generate the code for the mapping SDTM specification
#'
Expand Down
10 changes: 5 additions & 5 deletions R/generate_code_tempates.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ vs_combined <- dplyr::bind_rows(
vs <- vs_combined %>%
# Map VSDTC using assign_ct algorithm
assign_datetime(
raw_dat = vitals_raw,
raw_dat = vitals_raw_data,
raw_var = c("VTLD", "VTLTM"),
tgt_var = "VSDTC",
raw_fmt = c(list(c("d-m-y", "dd-mmm-yyyy")), "H:M")
) %>%
# Map VSTPT from TMPTC using assign_ct
assign_ct(
raw_dat = vitals_raw,
raw_dat = vitals_raw_data,
raw_var = "TMPTC",
tgt_var = "VSTPT",
ct_spec = study_ct,
Expand All @@ -127,7 +127,7 @@ vs <- vs_combined %>%
) %>%
# Map VSTPTNUM from TMPTC using assign_ct
assign_ct(
raw_dat = vitals_raw,
raw_dat = vitals_raw_data,
raw_var = "TMPTC",
tgt_var = "VSTPTNUM",
ct_spec = study_ct,
Expand All @@ -136,7 +136,7 @@ vs <- vs_combined %>%
) %>%
# Map VISIT from VISIT_NAME using assign_ct
assign_ct(
raw_dat = vitals_raw,
raw_dat = vitals_raw_data,
raw_var = "VISIT_NAME",
tgt_var = "VISIT",
ct_spec = study_ct,
Expand All @@ -145,7 +145,7 @@ vs <- vs_combined %>%
) %>%
# Map VISITNUM from VISIT_NAME using assign_ct
assign_ct(
raw_dat = vitals_raw,
raw_dat = vitals_raw_data,
raw_var = "VISIT_NAME",
tgt_var = "VISITNUM",
ct_spec = study_ct,
Expand Down

0 comments on commit e8bedf2

Please # to comment.