Skip to content

Commit

Permalink
read-eav-oneshot update
Browse files Browse the repository at this point in the history
the attribute order changed for some reason

ref #542
  • Loading branch information
wibeasley committed Oct 14, 2024
1 parent 4db037a commit 420f703
Show file tree
Hide file tree
Showing 10 changed files with 266 additions and 307 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,41 @@ structure(list(record = c("1", "1", "1", "1", "1", "1", "1",
"4", "4", "4", "4", "4", "4", "4", "4", "4", "4", "4", "4", "4",
"4", "4", "4", "4", "4", "4", "5", "5", "5", "5", "5", "5", "5",
"5", "5", "5", "5", "5", "5", "5", "5", "5", "5", "5", "5", "5",
"6", "6", "6", "6"), field_name = c("address", "age", "bmi",
"comments", "demographics_complete", "dob", "email", "ethnicity",
"health_complete", "height", "interpreter_needed", "name_first",
"name_last", "race", "race_and_ethnicity_complete", "record_id",
"sex", "telephone", "weight", "address", "age", "bmi", "comments",
"demographics_complete", "dob", "email", "ethnicity", "health_complete",
"height", "interpreter_needed", "name_first", "name_last", "race",
"race", "race_and_ethnicity_complete", "record_id", "sex", "telephone",
"weight", "address", "age", "bmi", "comments", "demographics_complete",
"dob", "email", "ethnicity", "health_complete", "height", "interpreter_needed",
"name_first", "name_last", "race", "race", "race_and_ethnicity_complete",
"record_id", "sex", "telephone", "weight", "address", "age",
"bmi", "comments", "demographics_complete", "dob", "email", "ethnicity",
"health_complete", "height", "name_first", "name_last", "race",
"race", "race_and_ethnicity_complete", "record_id", "sex", "telephone",
"weight", "address", "age", "bmi", "comments", "demographics_complete",
"dob", "email", "ethnicity", "health_complete", "height", "interpreter_needed",
"name_first", "name_last", "race", "race", "race_and_ethnicity_complete",
"record_id", "sex", "telephone", "weight", "name_first", "name_last",
"demographics_complete", "record_id"), value = c("14 Rose Cottage St.\nKenning UK, 323232",
"11", "204.1", "Character in a book, with some guessing", "2",
"2003-08-30", "[email protected]", "1", "1", "7", "0", "Nutmeg",
"Nutmouse", "5", "2", "1", "0", "(405) 321-1111", "1", "14 Rose Cottage Blvd.\nKenning UK 34243",
"11", "277.8", "A mouse character from a good book", "2", "2003-03-10",
"[email protected]", "1", "0", "6", "0", "Tumtum", "Nutmouse",
"3", "5", "0", "2", "1", "(405) 321-2222", "1", "243 Hill St.\nGuthrie OK 73402",
"80", "24.7", "completely made up", "2", "1934-04-09", "[email protected]",
"0", "2", "180", "1", "Marcus", "Wood", "4", "5", "2", "3", "1",
"(405) 321-3333", "80", "342 Elm\nDuncanville TX, 75116", "61",
"19.8", "This record doesn't have a DAG assigned\n\nSo call up Trudy on the telephone\nSend her a letter in the mail",
"2", "1952-11-02", "[email protected]", "1", "2", "165", "Trudy",
"DAG", "2", "5", "2", "4", "0", "(405) 321-4444", "54", "Hotel Suite\nNew Orleans LA, 70115",
"59", "27.9", "Had a hand for trouble and a eye for cash\n\nHe had a gold watch chain and a black mustache",
"2", "1955-04-15", "[email protected]", "2", "0", "193.04",
"0", "John Lee", "Walker", "1", "6", "2", "5", "1", "(405) 321-5555",
"104", "blank-for-gray", "blank-for-gray", "0", "6")), row.names = c(NA,
-102L), class = c("tbl_df", "tbl", "data.frame"))
"6", "6", "6", "6", "6", "6"), field_name = c("record_id", "name_first",
"name_last", "address", "telephone", "email", "dob", "age", "sex",
"demographics_complete", "height", "weight", "comments", "health_complete",
"race", "ethnicity", "interpreter_needed", "race_and_ethnicity_complete",
"bmi", "record_id", "name_first", "name_last", "address", "telephone",
"email", "dob", "age", "sex", "demographics_complete", "height",
"weight", "comments", "health_complete", "race", "race", "ethnicity",
"interpreter_needed", "race_and_ethnicity_complete", "bmi", "record_id",
"name_first", "name_last", "address", "telephone", "email", "dob",
"age", "sex", "demographics_complete", "height", "weight", "comments",
"health_complete", "race", "race", "ethnicity", "interpreter_needed",
"race_and_ethnicity_complete", "bmi", "record_id", "name_first",
"name_last", "address", "telephone", "email", "dob", "age", "sex",
"demographics_complete", "height", "weight", "comments", "health_complete",
"race", "race", "ethnicity", "race_and_ethnicity_complete", "bmi",
"record_id", "name_first", "name_last", "address", "telephone",
"email", "dob", "age", "sex", "demographics_complete", "height",
"weight", "comments", "health_complete", "race", "race", "ethnicity",
"interpreter_needed", "race_and_ethnicity_complete", "bmi", "record_id",
"name_first", "name_last", "demographics_complete", "health_complete",
"race_and_ethnicity_complete"), value = c("1", "Nutmeg", "Nutmouse",
"14 Rose Cottage St.\nKenning UK, 323232", "(405) 321-1111",
"[email protected]", "2003-08-30", "11", "0", "2", "7", "1", "Character in a book, with some guessing",
"1", "5", "1", "0", "2", "204.1", "2", "Tumtum", "Nutmouse",
"14 Rose Cottage Blvd.\nKenning UK 34243", "(405) 321-2222",
"[email protected]", "2003-03-10", "11", "1", "2", "6", "1", "A mouse character from a good book",
"0", "3", "5", "1", "0", "0", "277.8", "3", "Marcus", "Wood",
"243 Hill St.\nGuthrie OK 73402", "(405) 321-3333", "[email protected]",
"1934-04-09", "80", "1", "2", "180", "80", "completely made up",
"2", "4", "5", "0", "1", "2", "24.7", "4", "Trudy", "DAG", "342 Elm\nDuncanville TX, 75116",
"(405) 321-4444", "[email protected]", "1952-11-02", "61",
"0", "2", "165", "54", "This record doesn't have a DAG assigned\n\nSo call up Trudy on the telephone\nSend her a letter in the mail",
"2", "2", "5", "1", "2", "19.8", "5", "John Lee", "Walker", "Hotel Suite\nNew Orleans LA, 70115",
"(405) 321-5555", "[email protected]", "1955-04-15", "59", "1",
"2", "193.04", "104", "Had a hand for trouble and a eye for cash\n\nHe had a gold watch chain and a black mustache",
"0", "1", "6", "2", "0", "2", "27.9", "6", "blank-for-gray",
"blank-for-gray", "0", "0", "0")), row.names = c(NA, -104L), class = c("tbl_df",
"tbl", "data.frame"))
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,41 @@ structure(list(record = c("1", "1", "1", "1", "1", "1", "1",
"4", "4", "4", "4", "4", "4", "4", "4", "4", "4", "4", "4", "4",
"4", "4", "4", "4", "4", "4", "5", "5", "5", "5", "5", "5", "5",
"5", "5", "5", "5", "5", "5", "5", "5", "5", "5", "5", "5", "5",
"6", "6", "6", "6"), field_name = c("address", "age", "bmi",
"comments", "demographics_complete", "dob", "email", "ethnicity",
"health_complete", "height", "interpreter_needed", "name_first",
"name_last", "race", "race_and_ethnicity_complete", "record_id",
"sex", "telephone", "weight", "address", "age", "bmi", "comments",
"demographics_complete", "dob", "email", "ethnicity", "health_complete",
"height", "interpreter_needed", "name_first", "name_last", "race",
"race", "race_and_ethnicity_complete", "record_id", "sex", "telephone",
"weight", "address", "age", "bmi", "comments", "demographics_complete",
"dob", "email", "ethnicity", "health_complete", "height", "interpreter_needed",
"name_first", "name_last", "race", "race", "race_and_ethnicity_complete",
"record_id", "sex", "telephone", "weight", "address", "age",
"bmi", "comments", "demographics_complete", "dob", "email", "ethnicity",
"health_complete", "height", "name_first", "name_last", "race",
"race", "race_and_ethnicity_complete", "record_id", "sex", "telephone",
"weight", "address", "age", "bmi", "comments", "demographics_complete",
"dob", "email", "ethnicity", "health_complete", "height", "interpreter_needed",
"name_first", "name_last", "race", "race", "race_and_ethnicity_complete",
"record_id", "sex", "telephone", "weight", "name_first", "name_last",
"demographics_complete", "record_id"), value = c("14 Rose Cottage St.\nKenning UK, 323232",
"11", "204.1", "Character in a book, with some guessing", "2",
"2003-08-30", "[email protected]", "1", "1", "7", "0", "Nutmeg",
"Nutmouse", "5", "2", "1", "0", "(405) 321-1111", "1", "14 Rose Cottage Blvd.\nKenning UK 34243",
"11", "277.8", "A mouse character from a good book", "2", "2003-03-10",
"[email protected]", "1", "0", "6", "0", "Tumtum", "Nutmouse",
"3", "5", "0", "2", "1", "(405) 321-2222", "1", "243 Hill St.\nGuthrie OK 73402",
"80", "24.7", "completely made up", "2", "1934-04-09", "[email protected]",
"0", "2", "180", "1", "Marcus", "Wood", "4", "5", "2", "3", "1",
"(405) 321-3333", "80", "342 Elm\nDuncanville TX, 75116", "61",
"19.8", "This record doesn't have a DAG assigned\n\nSo call up Trudy on the telephone\nSend her a letter in the mail",
"2", "1952-11-02", "[email protected]", "1", "2", "165", "Trudy",
"DAG", "2", "5", "2", "4", "0", "(405) 321-4444", "54", "Hotel Suite\nNew Orleans LA, 70115",
"59", "27.9", "Had a hand for trouble and a eye for cash\n\nHe had a gold watch chain and a black mustache",
"2", "1955-04-15", "[email protected]", "2", "0", "193.04",
"0", "John Lee", "Walker", "1", "6", "2", "5", "1", "(405) 321-5555",
"104", "blank-for-gray", "blank-for-gray", "0", "6")), row.names = c(NA,
-102L), class = c("tbl_df", "tbl", "data.frame"))
"6", "6", "6", "6", "6", "6"), field_name = c("record_id", "name_first",
"name_last", "address", "telephone", "email", "dob", "age", "sex",
"demographics_complete", "height", "weight", "comments", "health_complete",
"race", "ethnicity", "interpreter_needed", "race_and_ethnicity_complete",
"bmi", "record_id", "name_first", "name_last", "address", "telephone",
"email", "dob", "age", "sex", "demographics_complete", "height",
"weight", "comments", "health_complete", "race", "race", "ethnicity",
"interpreter_needed", "race_and_ethnicity_complete", "bmi", "record_id",
"name_first", "name_last", "address", "telephone", "email", "dob",
"age", "sex", "demographics_complete", "height", "weight", "comments",
"health_complete", "race", "race", "ethnicity", "interpreter_needed",
"race_and_ethnicity_complete", "bmi", "record_id", "name_first",
"name_last", "address", "telephone", "email", "dob", "age", "sex",
"demographics_complete", "height", "weight", "comments", "health_complete",
"race", "race", "ethnicity", "race_and_ethnicity_complete", "bmi",
"record_id", "name_first", "name_last", "address", "telephone",
"email", "dob", "age", "sex", "demographics_complete", "height",
"weight", "comments", "health_complete", "race", "race", "ethnicity",
"interpreter_needed", "race_and_ethnicity_complete", "bmi", "record_id",
"name_first", "name_last", "demographics_complete", "health_complete",
"race_and_ethnicity_complete"), value = c("1", "Nutmeg", "Nutmouse",
"14 Rose Cottage St.\nKenning UK, 323232", "(405) 321-1111",
"[email protected]", "2003-08-30", "11", "0", "2", "7", "1", "Character in a book, with some guessing",
"1", "5", "1", "0", "2", "204.1", "2", "Tumtum", "Nutmouse",
"14 Rose Cottage Blvd.\nKenning UK 34243", "(405) 321-2222",
"[email protected]", "2003-03-10", "11", "1", "2", "6", "1", "A mouse character from a good book",
"0", "3", "5", "1", "0", "0", "277.8", "3", "Marcus", "Wood",
"243 Hill St.\nGuthrie OK 73402", "(405) 321-3333", "[email protected]",
"1934-04-09", "80", "1", "2", "180", "80", "completely made up",
"2", "4", "5", "0", "1", "2", "24.7", "4", "Trudy", "DAG", "342 Elm\nDuncanville TX, 75116",
"(405) 321-4444", "[email protected]", "1952-11-02", "61",
"0", "2", "165", "54", "This record doesn't have a DAG assigned\n\nSo call up Trudy on the telephone\nSend her a letter in the mail",
"2", "2", "5", "1", "2", "19.8", "5", "John Lee", "Walker", "Hotel Suite\nNew Orleans LA, 70115",
"(405) 321-5555", "[email protected]", "1955-04-15", "59", "1",
"2", "193.04", "104", "Had a hand for trouble and a eye for cash\n\nHe had a gold watch chain and a black mustache",
"0", "1", "6", "2", "0", "2", "27.9", "6", "blank-for-gray",
"blank-for-gray", "0", "0", "0")), row.names = c(NA, -104L), class = c("tbl_df",
"tbl", "data.frame"))
78 changes: 36 additions & 42 deletions inst/test-data/specific-redcapr/read-eav-oneshot/default.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,40 @@ structure(list(record = c("1", "1", "1", "1", "1", "1", "1",
"3", "3", "3", "4", "4", "4", "4", "4", "4", "4", "4", "4", "4",
"4", "4", "4", "4", "4", "4", "4", "4", "4", "4", "5", "5", "5",
"5", "5", "5", "5", "5", "5", "5", "5", "5", "5", "5", "5", "5",
"5", "5", "5", "5", "5"), field_name = c("address", "telephone",
"email", "dob", "age", "ethnicity", "sex", "height", "weight",
"bmi", "comments", "demographics_complete", "record_id", "name_first",
"name_last", "health_complete", "race_and_ethnicity_complete",
"race", "mugshot", "interpreter_needed", "address", "telephone",
"email", "dob", "age", "ethnicity", "sex", "height", "weight",
"bmi", "comments", "demographics_complete", "record_id", "name_first",
"name_last", "health_complete", "race_and_ethnicity_complete",
"race", "race", "mugshot", "interpreter_needed", "address", "telephone",
"email", "dob", "age", "ethnicity", "race", "sex", "height",
"weight", "bmi", "comments", "demographics_complete", "record_id",
"name_first", "name_last", "health_complete", "race_and_ethnicity_complete",
"race", "mugshot", "interpreter_needed", "address", "telephone",
"email", "dob", "ethnicity", "sex", "height", "weight", "bmi",
"demographics_complete", "record_id", "comments", "age", "name_first",
"name_last", "health_complete", "race_and_ethnicity_complete",
"race", "race", "mugshot", "address", "demographics_complete",
"record_id", "telephone", "email", "dob", "age", "ethnicity",
"sex", "height", "weight", "bmi", "comments", "name_first", "name_last",
"health_complete", "race_and_ethnicity_complete", "race", "race",
"mugshot", "interpreter_needed"), value = c("14 Rose Cottage St.\nKenning UK, 323232",
"(405) 321-1111", "[email protected]", "2003-08-30", "11", "1",
"0", "7", "1", "204.1", "Character in a book, with some guessing",
"2", "1", "Nutmeg", "Nutmouse", "1", "2", "5", "197977", "0",
"5", "5", "5", "5", "5"), field_name = c("record_id", "name_first",
"name_last", "address", "telephone", "email", "dob", "age", "sex",
"demographics_complete", "height", "weight", "comments", "mugshot",
"health_complete", "race", "ethnicity", "interpreter_needed",
"race_and_ethnicity_complete", "bmi", "record_id", "name_first",
"name_last", "address", "telephone", "email", "dob", "age", "sex",
"demographics_complete", "height", "weight", "comments", "mugshot",
"health_complete", "race", "race", "ethnicity", "interpreter_needed",
"race_and_ethnicity_complete", "bmi", "record_id", "name_first",
"name_last", "address", "telephone", "email", "dob", "age", "sex",
"demographics_complete", "height", "weight", "comments", "mugshot",
"health_complete", "race", "race", "ethnicity", "interpreter_needed",
"race_and_ethnicity_complete", "bmi", "record_id", "name_first",
"name_last", "address", "telephone", "email", "dob", "age", "sex",
"demographics_complete", "height", "weight", "comments", "mugshot",
"health_complete", "race", "race", "ethnicity", "race_and_ethnicity_complete",
"bmi", "record_id", "name_first", "name_last", "address", "telephone",
"email", "dob", "age", "sex", "demographics_complete", "height",
"weight", "comments", "mugshot", "health_complete", "race", "race",
"ethnicity", "interpreter_needed", "race_and_ethnicity_complete",
"bmi"), value = c("1", "Nutmeg", "Nutmouse", "14 Rose Cottage St.\nKenning UK, 323232",
"(405) 321-1111", "[email protected]", "2003-08-30", "11", "0",
"2", "7", "1", "Character in a book, with some guessing", "22",
"1", "5", "1", "0", "2", "204.1", "2", "Tumtum", "Nutmouse",
"14 Rose Cottage Blvd.\nKenning UK 34243", "(405) 321-2222",
"[email protected]", "2003-03-10", "11", "1", "1", "6", "1", "277.8",
"A mouse character from a good book", "2", "2", "Tumtum", "Nutmouse",
"0", "0", "3", "5", "197978", "0", "243 Hill St.\nGuthrie OK 73402",
"(405) 321-3333", "[email protected]", "1934-04-09", "80", "0", "4",
"1", "180", "80", "24.7", "completely made up", "2", "3", "Marcus",
"Wood", "2", "2", "5", "197979", "1", "342 Elm\nDuncanville TX, 75116",
"(405) 321-4444", "[email protected]", "1952-11-02", "1", "0",
"165", "54", "19.8", "2", "4", "This record doesn't have a DAG assigned\n\nSo call up Trudy on the telephone\nSend her a letter in the mail",
"61", "Trudy", "DAG", "2", "2", "2", "5", "198002", "Hotel Suite\nNew Orleans LA, 70115",
"2", "5", "(405) 321-5555", "[email protected]", "1955-04-15",
"59", "2", "1", "193.04", "104", "27.9", "Had a hand for trouble and a eye for cash\n\nHe had a gold watch chain and a black mustache",
"John Lee", "Walker", "0", "2", "1", "6", "198021", "0")), row.names = c(NA,
-103L), spec = structure(list(cols = list(record = structure(list(), class = c("collector_character",
"collector")), field_name = structure(list(), class = c("collector_character",
"collector")), value = structure(list(), class = c("collector_character",
"collector"))), default = structure(list(), class = c("collector_character",
"collector")), delim = ","), class = "col_spec"), class = c("spec_tbl_df",
"tbl_df", "tbl", "data.frame"))
"[email protected]", "2003-03-10", "11", "1", "2", "6", "1", "A mouse character from a good book",
"23", "0", "3", "5", "1", "0", "0", "277.8", "3", "Marcus", "Wood",
"243 Hill St.\nGuthrie OK 73402", "(405) 321-3333", "[email protected]",
"1934-04-09", "80", "1", "2", "180", "80", "completely made up",
"24", "2", "4", "5", "0", "1", "2", "24.7", "4", "Trudy", "DAG",
"342 Elm\nDuncanville TX, 75116", "(405) 321-4444", "[email protected]",
"1952-11-02", "61", "0", "2", "165", "54", "This record doesn't have a DAG assigned\n\nSo call up Trudy on the telephone\nSend her a letter in the mail",
"25", "2", "2", "5", "1", "2", "19.8", "5", "John Lee", "Walker",
"Hotel Suite\nNew Orleans LA, 70115", "(405) 321-5555", "[email protected]",
"1955-04-15", "59", "1", "2", "193.04", "104", "Had a hand for trouble and a eye for cash\n\nHe had a gold watch chain and a black mustache",
"26", "0", "1", "6", "2", "0", "2", "27.9")), row.names = c(NA,
-103L), class = c("tbl_df", "tbl", "data.frame"))
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
structure(list(record = c("5", "5", "5", "5", "5", "5", "5",
"5", "5", "5", "5", "5", "5", "5", "5", "5", "5", "5", "5", "5",
"5"), field_name = c("address", "demographics_complete", "record_id",
"telephone", "email", "dob", "age", "ethnicity", "sex", "height",
"weight", "bmi", "comments", "name_first", "name_last", "health_complete",
"race_and_ethnicity_complete", "race", "race", "mugshot", "interpreter_needed"
), value = c("Hotel Suite\nNew Orleans LA, 70115", "2", "5",
"(405) 321-5555", "[email protected]", "1955-04-15", "59", "2",
"1", "193.04", "104", "27.9", "Had a hand for trouble and a eye for cash\n\nHe had a gold watch chain and a black mustache",
"John Lee", "Walker", "0", "2", "1", "6", "198021", "0")), row.names = c(NA,
-21L), spec = structure(list(cols = list(record = structure(list(), class = c("collector_character",
"collector")), field_name = structure(list(), class = c("collector_character",
"collector")), value = structure(list(), class = c("collector_character",
"collector"))), default = structure(list(), class = c("collector_character",
"collector")), delim = ","), class = "col_spec"), class = c("spec_tbl_df",
"tbl_df", "tbl", "data.frame"))
"5"), field_name = c("record_id", "name_first", "name_last",
"address", "telephone", "email", "dob", "age", "sex", "demographics_complete",
"height", "weight", "comments", "mugshot", "health_complete",
"race", "race", "ethnicity", "interpreter_needed", "race_and_ethnicity_complete",
"bmi"), value = c("5", "John Lee", "Walker", "Hotel Suite\nNew Orleans LA, 70115",
"(405) 321-5555", "[email protected]", "1955-04-15", "59", "1",
"2", "193.04", "104", "Had a hand for trouble and a eye for cash\n\nHe had a gold watch chain and a black mustache",
"26", "0", "1", "6", "2", "0", "2", "27.9")), row.names = c(NA,
-21L), class = c("tbl_df", "tbl", "data.frame"))
Loading

0 comments on commit 420f703

Please sign in to comment.