diff --git a/mapping_functions.md b/mapping_functions.md index 7fd7d6c..e4178fa 100644 --- a/mapping_functions.md +++ b/mapping_functions.md @@ -209,7 +209,7 @@ Functions A parsed list of items in the list, e.g. ['a', 'b', 'c'] -`floating(data_values)` +`float(data_values)` : Convert a value to a float. Args: diff --git a/moh_template.csv b/moh_template.csv index d7f6916..446adde 100644 --- a/moh_template.csv +++ b/moh_template.csv @@ -148,20 +148,20 @@ DONOR.INDEX.comorbidities.INDEX.comorbidity_type_code, {single_val(COMORBIDITIES DONOR.INDEX.comorbidities.INDEX.laterality_of_prior_malignancy, {single_val(COMORBIDITIES_SHEET.laterality_of_prior_malignancy)} DONOR.INDEX.comorbidities.INDEX.prior_malignancy, {single_val(COMORBIDITIES_SHEET.prior_malignancy)} DONOR.INDEX.exposures.INDEX, {indexed_on(EXPOSURES_SHEET.submitter_donor_id)} -DONOR.INDEX.exposures.INDEX.pack_years_smoked, {floating(EXPOSURES_SHEET.pack_years_smoked)} +DONOR.INDEX.exposures.INDEX.pack_years_smoked, {float(EXPOSURES_SHEET.pack_years_smoked)} DONOR.INDEX.exposures.INDEX.tobacco_smoking_status, {single_val(EXPOSURES_SHEET.tobacco_smoking_status)} DONOR.INDEX.exposures.INDEX.tobacco_type, {pipe_delim(EXPOSURES_SHEET.tobacco_type)} DONOR.INDEX.biomarkers.INDEX, {indexed_on(BIOMARKERS_SHEET.submitter_donor_id)} DONOR.INDEX.biomarkers.INDEX.ca125, {integer(BIOMARKERS_SHEET.ca125)} DONOR.INDEX.biomarkers.INDEX.cea, {integer(BIOMARKERS_SHEET.cea)} -DONOR.INDEX.biomarkers.INDEX.er_percent_positive, {floating(BIOMARKERS_SHEET.er_percent_positive)} +DONOR.INDEX.biomarkers.INDEX.er_percent_positive, {float(BIOMARKERS_SHEET.er_percent_positive)} DONOR.INDEX.biomarkers.INDEX.er_status, {single_val(BIOMARKERS_SHEET.er_status)} DONOR.INDEX.biomarkers.INDEX.her2_ihc_status, {single_val(BIOMARKERS_SHEET.her2_ihc_status)} DONOR.INDEX.biomarkers.INDEX.her2_ish_status, {single_val(BIOMARKERS_SHEET.her2_ish_status)} DONOR.INDEX.biomarkers.INDEX.hpv_ihc_status, {single_val(BIOMARKERS_SHEET.hpv_ihc_status)} DONOR.INDEX.biomarkers.INDEX.hpv_pcr_status, {single_val(BIOMARKERS_SHEET.hpv_pcr_status)} DONOR.INDEX.biomarkers.INDEX.hpv_strain, {pipe_delim(BIOMARKERS_SHEET.hpv_strain)} -DONOR.INDEX.biomarkers.INDEX.pr_percent_positive, {floating(BIOMARKERS_SHEET.pr_percent_positive)} +DONOR.INDEX.biomarkers.INDEX.pr_percent_positive, {float(BIOMARKERS_SHEET.pr_percent_positive)} DONOR.INDEX.biomarkers.INDEX.pr_status, {single_val(BIOMARKERS_SHEET.pr_status)} DONOR.INDEX.biomarkers.INDEX.psa_level, {integer(BIOMARKERS_SHEET.psa_level)} DONOR.INDEX.biomarkers.INDEX.submitter_follow_up_id, {single_val(BIOMARKERS_SHEET.submitter_follow_up_id)} diff --git a/sample_inputs/moh_template.csv b/sample_inputs/moh_template.csv index 3618139..e6276fe 100644 --- a/sample_inputs/moh_template.csv +++ b/sample_inputs/moh_template.csv @@ -150,7 +150,7 @@ DONOR.INDEX.comorbidities.INDEX.age_at_comorbidity_diagnosis, {integer(COMORBIDI DONOR.INDEX.exposures.INDEX, {indexed_on(EXPOSURES_SHEET.submitter_donor_id)} DONOR.INDEX.exposures.INDEX.tobacco_smoking_status, {single_val(EXPOSURES_SHEET.tobacco_smoking_status)} DONOR.INDEX.exposures.INDEX.tobacco_type.INDEX, {indexed_on(EXPOSURES_SHEET.tobacco_type)} -DONOR.INDEX.exposures.INDEX.pack_years_smoked, {floating(EXPOSURES_SHEET.pack_years_smoked)} +DONOR.INDEX.exposures.INDEX.pack_years_smoked, {float(EXPOSURES_SHEET.pack_years_smoked)} DONOR.INDEX.biomarkers.INDEX, {indexed_on(BIOMARKERS_SHEET.submitter_donor_id)} DONOR.INDEX.biomarkers.INDEX.er_status, {single_val(BIOMARKERS_SHEET.er_status)} DONOR.INDEX.biomarkers.INDEX.pr_status, {single_val(BIOMARKERS_SHEET.pr_status)} @@ -167,8 +167,8 @@ DONOR.INDEX.biomarkers.INDEX.test_date, {date_interval(BIOMARKERS_SHEET.test_dat DONOR.INDEX.biomarkers.INDEX.psa_level, {integer(BIOMARKERS_SHEET.psa_level)} DONOR.INDEX.biomarkers.INDEX.ca125, {integer(BIOMARKERS_SHEET.ca125)} DONOR.INDEX.biomarkers.INDEX.cea, {integer(BIOMARKERS_SHEET.cea)} -DONOR.INDEX.biomarkers.INDEX.er_percent_positive, {floating(BIOMARKERS_SHEET.er_percent_positive)} -DONOR.INDEX.biomarkers.INDEX.pr_percent_positive, {floating(BIOMARKERS_SHEET.pr_percent_positive)} +DONOR.INDEX.biomarkers.INDEX.er_percent_positive, {float(BIOMARKERS_SHEET.er_percent_positive)} +DONOR.INDEX.biomarkers.INDEX.pr_percent_positive, {float(BIOMARKERS_SHEET.pr_percent_positive)} DONOR.INDEX.followups.INDEX, {moh_indexed_on_donor_if_others_absent(FOLLOWUPS_SHEET.submitter_donor_id, FOLLOWUPS_SHEET.submitter_primary_diagnosis_id, FOLLOWUPS_SHEET.submitter_treatment_id)} DONOR.INDEX.followups.INDEX.submitter_follow_up_id, {single_val(FOLLOWUPS_SHEET.submitter_follow_up_id)} DONOR.INDEX.followups.INDEX.date_of_followup, {date_interval(FOLLOWUPS_SHEET.date_of_followup)} diff --git a/src/clinical_etl/mappings.py b/src/clinical_etl/mappings.py index c0dfe52..b9b9658 100644 --- a/src/clinical_etl/mappings.py +++ b/src/clinical_etl/mappings.py @@ -342,7 +342,7 @@ def integer(data_values): return None -def floating(data_values): +def float(data_values): """Convert a value to a float. Args: