From b842910d938d56615ccc357d0caff10f4c416a89 Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Fri, 11 Oct 2024 18:22:40 -0500 Subject: [PATCH] potentially problematic dictionary --- inst/misc/dev-2.credentials | 2 +- inst/misc/project-redirection.yml | 2 +- .../data.csv | 1 + .../dictionary.csv | 8 +- .../project.xml | 108 ++++++++++++++++++ 5 files changed, 115 insertions(+), 6 deletions(-) create mode 100644 inst/test-data/projects/potentially-problematic-dictionary/data.csv create mode 100644 inst/test-data/projects/potentially-problematic-dictionary/project.xml diff --git a/inst/misc/dev-2.credentials b/inst/misc/dev-2.credentials index 0f3178df..0018af4c 100644 --- a/inst/misc/dev-2.credentials +++ b/inst/misc/dev-2.credentials @@ -18,7 +18,7 @@ redcap_uri,username,project_id,token,comment "https://redcap-dev-2.ouhsc.edu/redcap/api/","myusername","44","0BF920AAF9566A8E603F528A498A5729","DAG Read" "https://redcap-dev-2.ouhsc.edu/redcap/api/","myusername","45","2759D713EB9FF8B2CB704F1A72790BF0","potentially problematic values" "https://redcap-dev-2.ouhsc.edu/redcap/api/","myusername","46","FEF7A22B52E6B9942AFF7A28C426C871","Repeating Instruments" -"https://redcap-dev-2.ouhsc.edu/redcap/api/","myusername","","","Potentially problematic dictionary" +"https://redcap-dev-2.ouhsc.edu/redcap/api/","myusername","47","096CBEF8742EBC493CD859FE53C9381B","Potentially problematic dictionary" "https://redcap-dev-2.ouhsc.edu/redcap/api/","myusername","","","simple write metadata" "https://redcap-dev-2.ouhsc.edu/redcap/api/","admin" ,"","","DAG Write -admin" "https://redcap-dev-2.ouhsc.edu/redcap/api/","user-dag1" ,"","","DAG Write -group A" diff --git a/inst/misc/project-redirection.yml b/inst/misc/project-redirection.yml index 9080bceb..75f0b4b5 100644 --- a/inst/misc/project-redirection.yml +++ b/inst/misc/project-redirection.yml @@ -49,7 +49,7 @@ - dag: 44 - potentially-problematic-values: 45 - repeating-instruments: 46 - - potentially-problematic-dictionary: 0 + - potentially-problematic-dictionary: 47 - metadata-write: 0 - dag-write: 0 - super-wide-2: 0 diff --git a/inst/test-data/projects/potentially-problematic-dictionary/data.csv b/inst/test-data/projects/potentially-problematic-dictionary/data.csv new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/inst/test-data/projects/potentially-problematic-dictionary/data.csv @@ -0,0 +1 @@ + diff --git a/inst/test-data/projects/potentially-problematic-dictionary/dictionary.csv b/inst/test-data/projects/potentially-problematic-dictionary/dictionary.csv index 0d05e936..e5a4a4d4 100644 --- a/inst/test-data/projects/potentially-problematic-dictionary/dictionary.csv +++ b/inst/test-data/projects/potentially-problematic-dictionary/dictionary.csv @@ -1,7 +1,7 @@ "Variable / Field Name","Form Name","Section Header","Field Type","Field Label","Choices, Calculations, OR Slider Labels","Field Note","Text Validation Type OR Show Slider Number","Text Validation Min","Text Validation Max",Identifier?,"Branching Logic (Show field only if...)","Required Field?","Custom Alignment","Question Number (surveys only)","Matrix Group Name","Matrix Ranking?","Field Annotation" record_id,form_1,,text,"Record ID",,,,,,,,,,,,, v1,form_1,,dropdown,"Is the laser mounted on the shark?�?�","0, No | 1, Yes | 3, I should find out",,,,,,,,,,,, -curly_quote_single,form_1,,radio,My child doesn’t like candy,"0, (0) Never or Almost Never | 1, (1) Sometimes | 2, (2) Often",,,,,,,,,,,, -curly_quote_double_left,form_1,,radio,Maybe I don't “look the part","0, Bennett | 1, Brauer",,,,,,,,,,,,https://github.com/OuhscBbmc/REDCapR/issues/290 -curly_quote_double_right,form_1,,radio,Maybe I don't "look comfortable on camera”,"0, Bennett | 1, Brauer",,,,,,,,,,,,https://github.com/OuhscBbmc/REDCapR/issues/290 -long_dash,form_1,,radio,Maybe I don't "wear the latest clothes" −or even ones that don't "reek","0, Bennett | 1, Brauer",,,,,,,,,,,,https://github.com/OuhscBbmc/REDCapR/issues/290 +curly_quote_single,form_1,,radio,"My child doesn't like candy","0, (0) Never or Almost Never | 1, (1) Sometimes | 2, (2) Often",,,,,,,,,,,, +curly_quote_double_left,form_1,,radio,"Maybe I don't ""look the part""","0, Bennett | 1, Brauer",,,,,,,,,,,,https://github.com/OuhscBbmc/REDCapR/issues/290 +curly_quote_double_right,form_1,,radio,"Maybe I don't ""look comfortable on camera""","0, Bennett | 1, Brauer",,,,,,,,,,,,https://github.com/OuhscBbmc/REDCapR/issues/290 +long_dash,form_1,,radio,"Maybe I don't ""wear the latest clothes"" −or even ones that don't ""reek""","0, Bennett | 1, Brauer",,,,,,,,,,,,https://github.com/OuhscBbmc/REDCapR/issues/290 diff --git a/inst/test-data/projects/potentially-problematic-dictionary/project.xml b/inst/test-data/projects/potentially-problematic-dictionary/project.xml new file mode 100644 index 00000000..11e781b5 --- /dev/null +++ b/inst/test-data/projects/potentially-problematic-dictionary/project.xml @@ -0,0 +1,108 @@ + + + + + REDCapR Problematic dictionary + This file contains the metadata, events, and data for REDCap project "REDCapR Problematic dictionary". + REDCapR Problematic dictionary + 1 + + + 1 + 1 + 0 + 0 + + 1 + 0 + 0 + 1 + + 0 + 4 + + Has variables or descriptions that might cause problems with the API + + 0 + + ALL + + + + + + + + + + + + + + + + + + + + + + + Record ID + + + Is the laser mounted on the shark?�?� + + + + My child doesn't like candy + + + + Maybe I don't "look the part" + + + + Maybe I don't "look comfortable on camera" + + + + Maybe I don't "wear the latest clothes" −or even ones that don't "reek" + + + + Complete? + + + + No + Yes + I should find out + + + (0) Never or Almost Never + (1) Sometimes + (2) Often + + + Bennett + Brauer + + + Bennett + Brauer + + + Bennett + Brauer + + + Incomplete + Unverified + Complete + + + + + + \ No newline at end of file