Skip to content

Commit

Permalink
straggler from #530
Browse files Browse the repository at this point in the history
  • Loading branch information
wibeasley committed Sep 6, 2024
1 parent 8fd2cd5 commit 4f33e43
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 110 deletions.
99 changes: 4 additions & 95 deletions inst/test-data/project-longitudinal/dictionary.csv
Original file line number Diff line number Diff line change
@@ -1,96 +1,5 @@
"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"
study_id,demographics,,text,"Study ID",,,,,,,,,,,,,
date_enrolled,demographics,"Consent Information",text,"Date subject signed consent",,YYYY-MM-DD,date_ymd,,,,,,,,,,
patient_document,demographics,,file,"Upload the patient's consent form",,,,,,,,,,,,,
first_name,demographics,"Contact Information",text,"First Name",,,,,,y,,,,,,,
last_name,demographics,,text,"Last Name",,,,,,y,,,,,,,
telephone_1,demographics,,text,"Phone number",,"Include Area Code",phone,,,y,,,,,,,
email,demographics,,text,E-mail,,,email,,,y,,,,,,,
dob,demographics,,text,"Date of birth",,,date_ymd,,,y,,,,,,,
age,demographics,,calc,"Age (years)","rounddown(datediff([dob],'today','y'))",,,,,,,,,,,,
ethnicity,demographics,,radio,Ethnicity,"0, Hispanic or Latino | 1, NOT Hispanic or Latino | 2, Unknown / Not Reported",,,,,,,,LH,,,,
race,demographics,,dropdown,Race,"0, American Indian/Alaska Native | 1, Asian | 2, Native Hawaiian or Other Pacific Islander | 3, Black or African American | 4, White | 5, More Than One Race | 6, Unknown / Not Reported",,,,,,,,,,,,
sex,demographics,,radio,Gender,"0, Female | 1, Male",,,,,,,,,,,,
given_birth,demographics,,yesno,"Has the patient given birth before?",,,,,,,"[sex] = ""0""",,,,,,
num_children,demographics,,text,"How many times has the patient given birth?",,,integer,0,,,"[sex] = ""0"" and [given_birth] = ""1""",,,,,,
gym,demographics,"Please provide the patient's weekly schedule for the activities below.",checkbox,"Gym (Weight Training)","0, Monday | 1, Tuesday | 2, Wednesday | 3, Thursday | 4, Friday",,,,,,,,,,weekly_schedule,,
aerobics,demographics,,checkbox,Aerobics,"0, Monday | 1, Tuesday | 2, Wednesday | 3, Thursday | 4, Friday",,,,,,,,,,weekly_schedule,,
eat,demographics,,checkbox,"Eat Out (Dinner/Lunch)","0, Monday | 1, Tuesday | 2, Wednesday | 3, Thursday | 4, Friday",,,,,,,,,,weekly_schedule,,
drink,demographics,,checkbox,"Drink (Alcoholic Beverages)","0, Monday | 1, Tuesday | 2, Wednesday | 3, Thursday | 4, Friday",,,,,,,,,,weekly_schedule,,
specify_mood,demographics,"Other information",slider,"Specify the patient's mood","Very sad | Indifferent | Very happy",,,,,,,,RH,,,,
meds,demographics,,checkbox,"Is patient taking any of the following medications? (check all that apply)","1, Lexapro | 2, Celexa | 3, Prozac | 4, Paxil | 5, Zoloft",,,,,,,,,,,,
height,demographics,,text,"Height (cm)",,,number,130,215,,,,,,,,
weight,demographics,,text,"Weight (kilograms)",,,integer,35,200,,,,,,,,
bmi,demographics,,calc,BMI,"round(([weight]*10000)/(([height])^(2)),1)",,,,,,,,,,,,
comments,demographics,"General Comments",notes,Comments,,,,,,,,,,,,,
ec_phone,contact_info,,text,"Emergency Contact Phone Number",,"Include Area Code",phone,,,,,,,,,,
ec_confirmed,contact_info,,radio,Confirmed?,"0, No | 1, Yes",,,,,,,,,,,,
next_of_kin_contact_name,contact_info,,text,"Next of Kin Contact Name",,,,,,,,,,,,,
next_of_kin_contact_address,contact_info,,notes,"Next of Kin Contact Address",,,,,,,,,,,,,
next_of_kin_contact_phone,contact_info,,text,"Next of Kin Contact Phone Number",,"Include Area Code",phone,,,,,,,,,,
next_of_kin_confirmed,contact_info,,radio,Confirmed?,"0, No | 1, Yes",,,,,,,,,,,,
height2,baseline_data,,text,"Height (cm)",,,number,,,,,,,,,,
weight2,baseline_data,,text,"Weight (kilograms)",,,integer,,,,,,,,,,
bmi2,baseline_data,,calc,BMI,"round(([weight2]*10000)/(([height2])^(2)),1)",,,,,,,,,,,,
prealb_b,baseline_data,,text,"Serum Prealbumin (mg/dL)",,,number,,,,,,,,,,
creat_b,baseline_data,,text,"Creatinine (mg/dL)",,,number,,,,,,,,,,
npcr_b,baseline_data,,text,"Normalized Protein Catabolic Rate (g/kg/d)",,,number,,,,,,,,,,
chol_b,baseline_data,,text,"Cholesterol (mg/dL)",,,number,,,,,,,,,,
transferrin_b,baseline_data,,text,"Transferrin (mg/dL)",,,number,,,,,,,,,,
vld1,visit_lab_data,,text,"Serum Prealbumin (mg/dL)",,,number,,,,,,,,,,
vld2,visit_lab_data,,text,"Creatinine (mg/dL)",,,number,,,,,,,,,,
vld3,visit_lab_data,,text,"Normalized Protein Catabolic Rate (g/kg/d)",,,number,,,,,,,,,,
vld4,visit_lab_data,,text,"Cholesterol (mg/dL)",,,number,,,,,,,,,,
vld5,visit_lab_data,,text,"Transferrin (mg/dL)",,,number,,,,,,,,,,
pmq1,patient_morale_questionnaire,,dropdown,"On average, how many pills did you take each day last week?","0, less than 5 | 1, 5-10 | 2, 6-15 | 3, over 15",,,,,,,,,,,,
pmq2,patient_morale_questionnaire,,dropdown,"Using the handout, which level of dependence do you feel you are currently at?","0, 0 | 1, 1 | 2, 2 | 3, 3 | 4, 4 | 5, 5",,,,,,,,,,,,
pmq3,patient_morale_questionnaire,,radio,"Would you be willing to discuss your experiences with a psychiatrist?","0, No | 1, Yes",,,,,,,,,,,,
pmq4,patient_morale_questionnaire,,dropdown,"How open are you to further testing?","0, not open | 1, undecided | 2, very open",,,,,,,,,,,,
vbw1,visit_blood_workup,,text,"Serum Prealbumin (mg/dL)",,,number,,,,,,,,,,
vbw2,visit_blood_workup,,text,"Creatinine (mg/dL)",,,number,,,,,,,,,,
vbw3,visit_blood_workup,,text,"Normalized Protein Catabolic Rate (g/kg/d)",,,number,,,,,,,,,,
vbw4,visit_blood_workup,,text,"Cholesterol (mg/dL)",,,number,,,,,,,,,,
vbw5,visit_blood_workup,,text,"Transferrin (mg/dL)",,,number,,,,,,,,,,
vbw6,visit_blood_workup,,radio,"Blood draw shift?","0, AM | 1, PM",,,,,,,,,,,,
vbw7,visit_blood_workup,,radio,"Blood draw by","0, RN | 1, LPN | 2, nurse assistant | 3, doctor",,,,,,,,,,,,
vbw8,visit_blood_workup,,dropdown,"Level of patient anxiety","0, not anxious | 1, undecided | 2, very anxious",,,,,,,,,,,,
vbw9,visit_blood_workup,,dropdown,"Patient scheduled for future draws?","0, No | 1, Yes",,,,,,,,,,,,
vob1,visit_observed_behavior,"Was the patient...",radio,nervous?,"0, No | 1, Yes",,,,,,,,,,,,
vob2,visit_observed_behavior,,radio,worried?,"0, No | 1, Yes",,,,,,,,,,,,
vob3,visit_observed_behavior,,radio,scared?,"0, No | 1, Yes",,,,,,,,,,,,
vob4,visit_observed_behavior,,radio,fidgety?,"0, No | 1, Yes",,,,,,,,,,,,
vob5,visit_observed_behavior,,radio,crying?,"0, No | 1, Yes",,,,,,,,,,,,
vob6,visit_observed_behavior,,radio,screaming?,"0, No | 1, Yes",,,,,,,,,,,,
vob7,visit_observed_behavior,,notes,other,,,,,,,,,,,,,
vob8,visit_observed_behavior,"Were you...",radio,nervous?,"0, No | 1, Yes",,,,,,,,,,,,
vob9,visit_observed_behavior,,radio,worried?,"0, No | 1, Yes",,,,,,,,,,,,
vob10,visit_observed_behavior,,radio,scared?,"0, No | 1, Yes",,,,,,,,,,,,
vob11,visit_observed_behavior,,radio,fidgety?,"0, No | 1, Yes",,,,,,,,,,,,
vob12,visit_observed_behavior,,radio,crying?,"0, No | 1, Yes",,,,,,,,,,,,
vob13,visit_observed_behavior,,radio,screaming?,"0, No | 1, Yes",,,,,,,,,,,,
vob14,visit_observed_behavior,,notes,other,,,,,,,,,,,,,
study_comments,completion_data,,notes,Comments,,,,,,,,,,,,,
complete_study,completion_data,,dropdown,"Has patient completed study?","0, No | 1, Yes",,,,,,,,,,,,
withdraw_date,completion_data,,text,"Put a date if patient withdrew study",,,date_ymd,,,,,,,,,,
date_visit_4,completion_data,,text,"Date of last visit",,,date_ymd,,,,,,,,,,
alb_4,completion_data,,text,"Serum Albumin (g/dL)",,,number,,,,,,,,,,
prealb_4,completion_data,,text,"Serum Prealbumin (mg/dL)",,,number,,,,,,,,,,
creat_4,completion_data,,text,"Creatinine (mg/dL)",,,date_ymd,,,,,,,,,,
discharge_date_4,completion_data,,text,"Date of hospital discharge",,,date_ymd,,,,,,,,,,
discharge_summary_4,completion_data,,dropdown,"Discharge summary in patients binder?","0, No | 1, Yes",,,,,,,,,,,,
npcr_4,completion_data,,text,"Normalized Protein Catabolic Rate (g/kg/d)",,,integer,,,,,,,,,,
chol_4,completion_data,,text,"Cholesterol (mg/dL)",,,integer,,,,,,,,,,
withdraw_reason,completion_data,,dropdown,"Reason patient withdrew from study","0, Non-compliance | 1, Did not wish to continue in study | 2, Could not tolerate the supplement | 3, Hospitalization | 4, Other",,,,,,,,,,,,
cpq1,completion_project_questionnaire,,text,"Date of study completion",,,date_ymd,,,,,,,,,,
cpq2,completion_project_questionnaire,,text,"Transferrin (mg/dL)",,,integer,,,,,,,,,,
cpq3,completion_project_questionnaire,,text,Kt/V,,,integer,,,,,,,,,,
cpq4,completion_project_questionnaire,,text,"Dry weight (kilograms)",,,integer,,,,,,,,,,
cpq5,completion_project_questionnaire,,text,"Number of treatments missed",,,integer,,,,,,,,,,
cpq6,completion_project_questionnaire,,dropdown,"How compliant was the patient in drinking the supplement?","0, 100 percent | 1, 99-75 percent | 2, 74-50 percent | 3, 49-25 percent | 4, 0-24 percent",,,,,,,,,,,,
cpq7,completion_project_questionnaire,,dropdown,"Was patient hospitalized since last visit?","0, No | 1, Yes",,,,,,,,,,,,
cpq8,completion_project_questionnaire,,dropdown,"What was the cause of hospitalization?","1, Vascular access related events | 2, CVD events | 3, Other",,,,,,,,,,,,
cpq9,completion_project_questionnaire,,text,"Date of hospital admission",,,date_ymd,,,,,,,,,,
cpq10,completion_project_questionnaire,,dropdown,"On average, how many pills did you take each day last week?","0, less than 5 | 1, 5-10 | 2, 6-15 | 3, over 15",,,,,,,,,,,,
cpq11,completion_project_questionnaire,,dropdown,"Using the handout, which level of dependence do you feel you are currently at?","0, 0 | 1, 1 | 2, 2 | 3, 3 | 4, 4 | 5, 5",,,,,,,,,,,,
cpq12,completion_project_questionnaire,,radio,"Would you be willing to discuss your experiences with a psychiatrist?","0, No | 1, Yes",,,,,,,,,,,,
cpq13,completion_project_questionnaire,,dropdown,"How open are you to further testing?","0, not open | 1, undecided | 2, very open",,,,,,,,,,,,
record_id,collection,,text,"Record ID",,,,,,,,,,,,,
interview_date,collection,,text,interview_date,,,date_ymd,,,,,,,,,,
weight,collection,,text,weight,,,,,,,,,,,,,
image_profile,collection,,file,"Picture of fake patient",,,,,,,,,,,,,
31 changes: 16 additions & 15 deletions inst/test-data/project-longitudinal/project.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ODM xmlns="http://www.cdisc.org/ns/odm/v1.3" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:redcap="https://projectredcap.org" xsi:schemaLocation="http://www.cdisc.org/ns/odm/v1.3 schema/odm/ODM1-3-1.xsd" ODMVersion="1.3.1" FileOID="000-00-0000" FileType="Snapshot" Description="REDCapR Longitudinal Single Arm" AsOfDateTime="2022-12-13T16:23:06" CreationDateTime="2022-12-13T16:23:06" SourceSystem="REDCap" SourceSystemVersion="12.5.5">
<ODM xmlns="http://www.cdisc.org/ns/odm/v1.3" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:redcap="https://projectredcap.org" xsi:schemaLocation="http://www.cdisc.org/ns/odm/v1.3 schema/odm/ODM1-3-1.xsd" ODMVersion="1.3.1" FileOID="000-00-0000" FileType="Snapshot" Description="REDCapR Longitudinal Single Arm" AsOfDateTime="2024-09-06T16:00:44" CreationDateTime="2024-09-06T16:00:44" SourceSystem="REDCap" SourceSystemVersion="14.6.4">
<Study OID="Project.REDCapRLongitudinalSingleArm">
<GlobalVariables>
<StudyName>REDCapR Longitudinal Single Arm</StudyName>
Expand All @@ -8,33 +8,30 @@
<redcap:RecordAutonumberingEnabled>1</redcap:RecordAutonumberingEnabled>
<redcap:CustomRecordLabel></redcap:CustomRecordLabel>
<redcap:SecondaryUniqueField></redcap:SecondaryUniqueField>
<redcap:SecondaryUniqueFieldDisplayValue>1</redcap:SecondaryUniqueFieldDisplayValue>
<redcap:SecondaryUniqueFieldDisplayLabel>1</redcap:SecondaryUniqueFieldDisplayLabel>
<redcap:SchedulingEnabled>0</redcap:SchedulingEnabled>
<redcap:SurveysEnabled>0</redcap:SurveysEnabled>
<redcap:SurveyInvitationEmailField></redcap:SurveyInvitationEmailField>
<redcap:DisplayTodayNowButton>1</redcap:DisplayTodayNowButton>
<redcap:PreventBranchingEraseValues>0</redcap:PreventBranchingEraseValues>
<redcap:RequireChangeReason>0</redcap:RequireChangeReason>
<redcap:DataHistoryPopup>1</redcap:DataHistoryPopup>
<redcap:OrderRecordsByField></redcap:OrderRecordsByField>
<redcap:MyCapEnabled>0</redcap:MyCapEnabled>
<redcap:Purpose>4</redcap:Purpose>
<redcap:PurposeOther></redcap:PurposeOther>
<redcap:ProjectNotes>Longitudinal project with only one arm</redcap:ProjectNotes>
<redcap:SurveyQueueCustomText></redcap:SurveyQueueCustomText>
<redcap:SurveyQueueHide>0</redcap:SurveyQueueHide>
<redcap:DataMartProjectEnabled>0</redcap:DataMartProjectEnabled>
<redcap:DatamartAllowRepeatRevision>0</redcap:DatamartAllowRepeatRevision>
<redcap:DatamartAllowCreateRevision>0</redcap:DatamartAllowCreateRevision>
<redcap:DatamartCronEnabled>0</redcap:DatamartCronEnabled>
<redcap:HideFilledForms>1</redcap:HideFilledForms>
<redcap:FormActivationSurveyAutocontinue>0</redcap:FormActivationSurveyAutocontinue>
<redcap:MissingDataCodes></redcap:MissingDataCodes>
<redcap:ProtectedEmailMode>0</redcap:ProtectedEmailMode>
<redcap:ProtectedEmailModeCustomText></redcap:ProtectedEmailModeCustomText>
<redcap:ProtectedEmailModeTrigger>ALL</redcap:ProtectedEmailModeTrigger>
<redcap:ProtectedEmailModeLogo></redcap:ProtectedEmailModeLogo>
<redcap:UserRolesGroup>
<redcap:UserRoles role_name="api" unique_role_name="U-767DA9JEKR" lock_record="0" lock_record_multiform="0" lock_record_customize="0" data_export_tool="" data_export_instruments="[collection,1]" data_import_tool="0" data_comparison_tool="0" data_logging="0" file_repository="0" double_data="0" user_rights="0" data_access_groups="0" graphical="1" reports="1" design="0" calendar="0" data_entry="[collection,1]" api_export="1" api_import="0" mobile_app="0" mobile_app_download_data="0" record_create="0" record_rename="0" record_delete="0" dts="0" participants="1" data_quality_design="0" data_quality_execute="0" data_quality_resolution="1" random_setup="0" random_dashboard="0" random_perform="0" realtime_webservice_mapping="0" realtime_webservice_adjudicate="0" external_module_config=""/>
<redcap:UserRoles role_name="api" unique_role_name="U-767DA9JEKR" lock_record="0" lock_record_multiform="0" lock_record_customize="0" data_export_tool="" data_export_instruments="[collection,1]" data_import_tool="0" data_comparison_tool="0" data_logging="0" email_logging="0" file_repository="0" double_data="0" user_rights="0" data_access_groups="0" graphical="1" reports="1" design="0" alerts="0" calendar="0" data_entry="[collection,1]" api_export="1" api_import="0" api_modules="0" mobile_app="0" mobile_app_download_data="0" record_create="0" record_rename="0" record_delete="0" dts="0" participants="1" data_quality_design="0" data_quality_execute="0" data_quality_resolution="1" random_setup="0" random_dashboard="0" random_perform="0" realtime_webservice_mapping="0" realtime_webservice_adjudicate="0" external_module_config="" mycap_participants="0"/>
</redcap:UserRolesGroup>
<redcap:MultilanguageSettingsGroup>
<redcap:MultilanguageSettings settings="YToxNjp7czo3OiJ2ZXJzaW9uIjtzOjY6IjEyLjUuNSI7czo1OiJsYW5ncyI7YTowOnt9czo5OiJwcm9qZWN0SWQiO3M6NDoiMjYyOSI7czoxNToiZGVzaWduYXRlZEZpZWxkIjtzOjA6IiI7czo2OiJzdGF0dXMiO3M6MzoiZGV2IjtzOjU6ImRlYnVnIjtiOjA7czo3OiJyZWZMYW5nIjtzOjA6IiI7czoxMjoiZmFsbGJhY2tMYW5nIjtzOjA6IiI7czo4OiJkaXNhYmxlZCI7YjowO3M6MjU6ImhpZ2hsaWdodE1pc3NpbmdEYXRhZW50cnkiO2I6MDtzOjIyOiJoaWdobGlnaHRNaXNzaW5nU3VydmV5IjtiOjA7czoyMToiYXV0b0RldGVjdEJyb3dzZXJMYW5nIjtiOjA7czoxMjoiYWxlcnRTb3VyY2VzIjthOjA6e31zOjE0OiJleGNsdWRlZEFsZXJ0cyI7YTowOnt9czoxNDoiZXhjbHVkZWRGaWVsZHMiO2E6MDp7fXM6MTY6ImV4Y2x1ZGVkU2V0dGluZ3MiO2E6MDp7fX0="/>
</redcap:MultilanguageSettingsGroup>
</GlobalVariables>
<MetaDataVersion OID="Metadata.REDCapRLongitudinalSingleArm_2022-12-13_1623" Name="REDCapR Longitudinal Single Arm" redcap:RecordIdField="record_id">
<MetaDataVersion OID="Metadata.REDCapRLongitudinalSingleArm_2024-09-06_1600" Name="REDCapR Longitudinal Single Arm" redcap:RecordIdField="record_id">
<Protocol>
<StudyEventRef StudyEventOID="Event.intake_arm_1" OrderNumber="1" Mandatory="No"/>
<StudyEventRef StudyEventOID="Event.dischage_arm_1" OrderNumber="2" Mandatory="No"/>
Expand All @@ -57,6 +54,7 @@
<ItemRef ItemOID="record_id" Mandatory="No" redcap:Variable="record_id"/>
<ItemRef ItemOID="interview_date" Mandatory="No" redcap:Variable="interview_date"/>
<ItemRef ItemOID="weight" Mandatory="No" redcap:Variable="weight"/>
<ItemRef ItemOID="image_profile" Mandatory="No" redcap:Variable="image_profile"/>
</ItemGroupDef>
<ItemGroupDef OID="collection.collection_complete" Name="Form Status" Repeating="No">
<ItemRef ItemOID="collection_complete" Mandatory="No" redcap:Variable="collection_complete"/>
Expand All @@ -70,6 +68,9 @@
<ItemDef OID="weight" Name="weight" DataType="text" Length="999" redcap:Variable="weight" redcap:FieldType="text">
<Question><TranslatedText>weight</TranslatedText></Question>
</ItemDef>
<ItemDef OID="image_profile" Name="image_profile" DataType="text" Length="999" redcap:Variable="image_profile" redcap:FieldType="file">
<Question><TranslatedText>Picture of fake patient</TranslatedText></Question>
</ItemDef>
<ItemDef OID="collection_complete" Name="collection_complete" DataType="text" Length="1" redcap:Variable="collection_complete" redcap:FieldType="select" redcap:SectionHeader="Form Status">
<Question><TranslatedText>Complete?</TranslatedText></Question>
<CodeListRef CodeListOID="collection_complete.choices"/>
Expand All @@ -81,7 +82,7 @@
</CodeList>
</MetaDataVersion>
</Study>
<ClinicalData StudyOID="Project.REDCapRLongitudinalSingleArm" MetaDataVersionOID="Metadata.REDCapRLongitudinalSingleArm_2022-12-13_1623">
<ClinicalData StudyOID="Project.REDCapRLongitudinalSingleArm" MetaDataVersionOID="Metadata.REDCapRLongitudinalSingleArm_2024-09-06_1600">
<SubjectData SubjectKey="1" redcap:RecordIdField="record_id">
<StudyEventData StudyEventOID="Event.intake_arm_1" StudyEventRepeatKey="1" redcap:UniqueEventName="intake_arm_1">
<FormData FormOID="Form.collection" FormRepeatKey="1">
Expand Down

0 comments on commit 4f33e43

Please sign in to comment.