Skip to content

Commit

Permalink
Added new column to the model csv file (load) to indicate whether eac…
Browse files Browse the repository at this point in the history
…h variable should be loaded to the final destination or not.
  • Loading branch information
maxramirez84 committed Jul 8, 2021
1 parent b3bfea2 commit 458008b
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 53 deletions.
8 changes: 4 additions & 4 deletions azi.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"variable", "source", "type"
"int_azi", "db", "logical"
"int_random_letter", "db", "character"
"int_date", "db", "Date"
"variable", "source", "type", "load"
"int_azi", "db", "logical", 1
"int_random_letter", "db", "character", 1
"int_date", "db", "Date", 1
4 changes: 2 additions & 2 deletions death.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"variable", "source", "type"
"death_reported_date", "db", "Date"
"variable", "source", "type", "load"
"death_reported_date", "db", "Date", 1
4 changes: 4 additions & 0 deletions main.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ saes$study_number <- substr(saes$sae_number, 1, 9)
saes$record_id <- as.integer(saes$record_id)
saes <- saes[order(saes$hf, saes$record_id),
c("hf", "record_id", "study_number", sae$variable)]

# Get Screening Log information to create the Screening Log table
logs <- data.log[which(!is.na(data.log$screening_date)),
screening.log$variable[which(screening.log$load == 1)]]


# Load data
40 changes: 20 additions & 20 deletions participant.csv
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
"variable", "source", "type"
#"district", "meta", "factor"
"hf", "meta", "factor"
"record_id", "db", "integer"
"screening_number", "db", "character"
"screening_consent", "db", "logical"
"child_dob", "db", "Date"
"screening_age_weeks_new_2", "db", "integer"
"ic_age_10w", "db", "logical"
"ic_age", "db", "logical"
"screening_weight", "db", "numeric"
"ic_weight", "db", "logical"
"ic_residency_now", "db", "logical",
"ec_other_study", "db", "logical",
"ec_allergies", "db", "logical",
"ec_serious_disease", "db", "logical",
"ec_acute_illness", "db", "logical"
"eligible", "db", "logical"
"study_number", "db", "character"
"screening_date", "db", "Date"
"variable", "source", "type", "load"
#"district", "meta", "factor", 1
"hf", "meta", "factor", 1
"record_id", "db", "integer", 1
"screening_number", "db", "character", 1
"screening_consent", "db", "logical", 1
"child_dob", "db", "Date", 1
"screening_age_weeks_new_2", "db", "integer", 1
"ic_age_10w", "db", "logical", 1
"ic_age", "db", "logical", 1
"screening_weight", "db", "numeric", 1
"ic_weight", "db", "logical", 1
"ic_residency_now", "db", "logical", 1
"ec_other_study", "db", "logical", 1
"ec_allergies", "db", "logical", 1
"ec_serious_disease", "db", "logical", 1
"ec_acute_illness", "db", "logical", 1
"eligible", "db", "logical", 1
"study_number", "db", "character", 1
"screening_date", "db", "Date", 1
20 changes: 10 additions & 10 deletions sae.csv
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"variable", "source", "type"
"sae_number", "db", "character"
"sae_report_type", "db", "factor"
"sae_icd_10", "db", "factor"
"sae_onset", "db", "Date"
"sae_death", "db", "logical"
"sae_death_date", "db", "Date"
"sae_relationship", "db", "factor"
"sae_severity", "db", "factor"
"sae_action", "db", "factor"
"variable", "source", "type", "load"
"sae_number", "db", "character", 1
"sae_report_type", "db", "factor", 1
"sae_icd_10", "db", "factor", 1
"sae_onset", "db", "Date", 1
"sae_death", "db", "logical", 1
"sae_death_date", "db", "Date", 1
"sae_relationship", "db", "factor", 1
"sae_severity", "db", "factor", 1
"sae_action", "db", "factor", 1
28 changes: 14 additions & 14 deletions screening_log.csv
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
"variable", "source", "type"
"record_id", "db", "integer"
"hf", "meta", "character"
"hf_bombali", "db", "integer"
"hf_port_loko", "db", "integer"
"hf_tonkolili", "db", "integer"
"screening_date", "db", "Date"
"n_penta1", "db", "integer"
"n_approached", "db", "integer"
"n_underweight", "db", "integer"
"n_over_age", "db", "integer"
"n_consent", "db", "integer"
"n_screening_failures", "db", "integer"
"n_previously_invited", "db", "integer"
"variable", "source", "type", "load"
"record_id", "db", "integer", 1
"hf", "meta", "character", 1
"hf_bombali", "db", "integer", 0
"hf_port_loko", "db", "integer", 0
"hf_tonkolili", "db", "integer", 0
"screening_date", "db", "Date", 1
"n_penta1", "db", "integer", 1
"n_approached", "db", "integer", 1
"n_underweight", "db", "integer", 1
"n_over_age", "db", "integer", 1
"n_consent", "db", "integer", 1
"n_screening_failures", "db", "integer", 1
"n_previously_invited", "db", "integer", 1
6 changes: 3 additions & 3 deletions withdrawal.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"variable", "source", "type"
"wdrawal_reason", "db", "factor"
"wdrawal_reported_date", "db", "Date"
"variable", "source", "type", "load"
"wdrawal_reason", "db", "factor", 1
"wdrawal_reported_date", "db", "Date", 1

0 comments on commit 458008b

Please sign in to comment.