diff --git a/scripts/us_cdc/non_infectious_diseases/golden_data/golden_summary_report.csv b/scripts/us_cdc/non_infectious_diseases/golden_data/golden_summary_report.csv new file mode 100644 index 0000000000..bb2d6a258c --- /dev/null +++ b/scripts/us_cdc/non_infectious_diseases/golden_data/golden_summary_report.csv @@ -0,0 +1,5 @@ +"NumPlaces","Units","ScalingFactors","MinDate","MeasurementMethods","observationPeriods","StatVar" +"55","[]","[]","1998-01","[dcAggregate/NORSNonInfectiousDisease]","[P1Y]","Count_MedicalConditionIncident_PatientDeceased_FoodborneTransmission" +"53","[]","[]","2009-01","[dcAggregate/NORSNonInfectiousDisease]","[P1Y]","Count_MedicalConditionIncident_PatientDeceased_PersonToPersonTransmission" +"45","[]","[]","2009-01","[dcAggregate/NORSNonInfectiousDisease]","[P1Y]","Count_MedicalConditionIncident_PatientDeceased_AnimalContactTransmission" +"56","[]","[]","1971-02","[dcAggregate/NORSNonInfectiousDisease]","[P1Y]","Count_MedicalConditionIncident_PatientDeceased_WaterborneTransmission" diff --git a/scripts/us_cdc/non_infectious_diseases/manifest.json b/scripts/us_cdc/non_infectious_diseases/manifest.json index a377ce8265..5e4843996f 100644 --- a/scripts/us_cdc/non_infectious_diseases/manifest.json +++ b/scripts/us_cdc/non_infectious_diseases/manifest.json @@ -19,7 +19,8 @@ "cleaned_csv": "data/output/NORS_NonInfectious_Disease.csv" } ], - "cron_schedule": "0 2 15 * *" + "cron_schedule": "0 2 15 * *", + "validation_config_file": "validation_config.json" } ] } \ No newline at end of file diff --git a/scripts/us_cdc/non_infectious_diseases/validation_config.json b/scripts/us_cdc/non_infectious_diseases/validation_config.json new file mode 100644 index 0000000000..6ed1d37945 --- /dev/null +++ b/scripts/us_cdc/non_infectious_diseases/validation_config.json @@ -0,0 +1,21 @@ +{ + "schema_version": "1.0", + "rules": [ + { + "rule_id": "check_deleted_records_percent", + "description": "Strictly enforce historical deletion average threshold of 0.1%", + "validator": "DELETED_RECORDS_PERCENT", + "params": { + "threshold": 0.1 + } + }, + { + "rule_id": "Check_goldens_summary_report", + "description": "Validates summary_report.csv against the golden summary data", + "validator": "GOLDENS_CHECK", + "params": { + "golden_files": "../../../../golden_data/golden_summary_report.csv" + } + } + ] +} \ No newline at end of file