Skip to content

Commit

Permalink
remove calculated field
Browse files Browse the repository at this point in the history
ref #539
  • Loading branch information
wibeasley committed Oct 12, 2024
1 parent 6286f5a commit 32cef07
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion inst/test-data/projects/metadata-write/dictionary.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ address,demographics,,notes,"Street, City, State, ZIP",,,,,,y,,,,,,,
telephone,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'))",,,,,,,,,,,,
age,demographics,,text,"Age (years)",,,,,,,,,,,,,
sex,demographics,,radio,Gender,"0, Female | 1, Male",,,,,,,,,,,,
height,health,,text,"Height (cm)",,,number,130,215,,,,,,,,
weight,health,,text,"Weight (kilograms)",,,integer,35,200,,,,,,,,
Expand Down
8 changes: 4 additions & 4 deletions inst/test-data/projects/metadata-write/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 Target Simple -Write Metadata" AsOfDateTime="2024-10-12T08:11:04" CreationDateTime="2024-10-12T08:11:04" SourceSystem="REDCap" SourceSystemVersion="14.6.11">
<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 Target Simple -Write Metadata" AsOfDateTime="2024-10-12T08:17:03" CreationDateTime="2024-10-12T08:17:03" SourceSystem="REDCap" SourceSystemVersion="14.6.11">
<Study OID="Project.REDCapRTargetSimpleWriteMetada">
<GlobalVariables>
<StudyName>REDCapR Target Simple -Write Metadata</StudyName>
Expand Down Expand Up @@ -35,7 +35,7 @@
<redcap:UserRoles role_name="api" unique_role_name="U-69784TDHYW" lock_record="0" lock_record_multiform="0" lock_record_customize="0" data_export_tool="" data_export_instruments="[demographics,1][health,1][race_and_ethnicity,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="0" reports="0" design="1" alerts="0" calendar="0" data_entry="[demographics,1][health,1][race_and_ethnicity,1]" api_export="1" api_import="1" 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="1"/>
</redcap:UserRolesGroup>
</GlobalVariables>
<MetaDataVersion OID="Metadata.REDCapRTargetSimpleWriteMetada_2024-10-12_0811" Name="REDCapR Target Simple -Write Metadata" redcap:RecordIdField="record_id">
<MetaDataVersion OID="Metadata.REDCapRTargetSimpleWriteMetada_2024-10-12_0817" Name="REDCapR Target Simple -Write Metadata" redcap:RecordIdField="record_id">
<FormDef OID="Form.demographics" Name="demographics" Repeating="No" redcap:FormName="demographics">
<ItemGroupRef ItemGroupOID="demographics.record_id" Mandatory="No"/>
<ItemGroupRef ItemGroupOID="demographics.name_first" Mandatory="No"/>
Expand Down Expand Up @@ -121,7 +121,7 @@
<ItemDef OID="dob" Name="dob" DataType="date" Length="999" redcap:Variable="dob" redcap:FieldType="text" redcap:TextValidationType="date_ymd" redcap:Identifier="y">
<Question><TranslatedText>Date of birth</TranslatedText></Question>
</ItemDef>
<ItemDef OID="age" Name="age" DataType="float" Length="999" redcap:Variable="age" redcap:FieldType="calc" redcap:Calculation="rounddown(datediff([dob],&#039;today&#039;,&#039;y&#039;))">
<ItemDef OID="age" Name="age" DataType="text" Length="999" redcap:Variable="age" redcap:FieldType="text">
<Question><TranslatedText>Age (years)</TranslatedText></Question>
</ItemDef>
<ItemDef OID="sex" Name="sex" DataType="text" Length="1" redcap:Variable="sex" redcap:FieldType="radio">
Expand Down Expand Up @@ -249,7 +249,7 @@
</CodeList>
</MetaDataVersion>
</Study>
<ClinicalData StudyOID="Project.REDCapRTargetSimpleWriteMetada" MetaDataVersionOID="Metadata.REDCapRTargetSimpleWriteMetada_2024-10-12_0811">
<ClinicalData StudyOID="Project.REDCapRTargetSimpleWriteMetada" MetaDataVersionOID="Metadata.REDCapRTargetSimpleWriteMetada_2024-10-12_0817">
<SubjectData SubjectKey="1" redcap:RecordIdField="record_id">
<FormData FormOID="Form.demographics" FormRepeatKey="1">
<ItemGroupData ItemGroupOID="demographics.record_id" ItemGroupRepeatKey="1">
Expand Down

0 comments on commit 32cef07

Please sign in to comment.