k
REDCap Surveillance Instrument for Rat Indexing
The instrument is built upon the "Rat Indexing" model, a proactive municipal strategy that identifies biological signals of infestation before they manifest as public complaints. This methodology shifts the agency from a reactive 311-response posture to a preventative Integrated Pest Management (IPM) framework.
These variables ensure the auditability and spatial accuracy required for longitudinal M&E.
Inspector ID (rs_inspector_id): Standardizes staff accountability.
Temporal Stamp (rs_timestamp): Captures seasonal variance in rodent activity.
Property Classification (rs_property_type): Categorizes sites (e.g., Food Commercial vs. Residential) to identify high-risk vectors.
Geospatial Coordinates (rs_gps): Critical for heat-mapping and correlation with the 10-year 311 dataset.
The "Active Rat Sign" (ARS) methodology is the gold standard for urban rodent surveillance (Corrigan, 2001). Each variable below is a "Leading Indicator" of infestation.
Active Burrows (rs_ars_burrows):
Description: Entry points in soil or pavement with "slick" edges or fresh soil.
Branching: If YES, trigger rs_burrow_count and rs_burrow_location.
Justification: Burrows indicate "residency." Unlike sightings, which may be transient, burrows confirm that the environment is supporting a nesting colony (Corrigan, 2001).
Fresh Droppings (rs_ars_droppings):
Description: Moist, dark, non-crumbly fecal matter.
Branching: If YES, trigger rs_dropping_density (Sparse, Moderate, Heavy).
Justification: Dropping morphology is the most reliable indicator of current activity. Freshness indicates a feeding site used within the last 24–48 hours (Colvin & Jackson, 1999).
Rub Marks (rs_ars_rubmarks):
Description: Dark, greasy sebum stains along walls or structural edges.
Justification: Rats are thigmotactic, meaning they maintain contact with walls for navigation. Established rub marks indicate high-traffic "runways" that persist even when rats are not visible (Walsh, 2014).
Gnaw Marks (rs_ars_gnawing):
Description: New teeth marks on plastic bins, wooden doors, or utility lines.
Justification: Rodents must gnaw to wear down incisors. Fresh gnawing indicates active entry attempts or foraging (Parsons et al., 2017).
Tracks and Tail Drags (rs_ars_tracks):
Description: Footprints or tail "drag" lines in soft soil, dust, or snow.
Justification: Tracks provide an estimate of movement patterns and the size of the individual, assisting in population density mapping (Colvin & Jackson, 1999).
III. Environmental Drivers: IPM Risk Factors
These variables document the "carrying capacity" of the environment—the factors that allow a rat population to thrive (McComas et al., 2017).
Refuse Containment Quality (rs_ipm_refuse):
Description: A 4-point scale from "Excellent" (Metal/Sealed) to "Critical" (Loose Bags).
Justification: Garbage management is the single most significant predictor of urban rat density. Transitioning from loose bags to "rat-proof" containers is the most cost-effective municipal intervention (Traweger et al., 2006).
Food Sources (rs_ipm_food):
Description: Checklist of bird feeders, pet waste, spilled trash, and grease.
Justification: Rodents are opportunistic foragers. Identifying the specific calorie source is essential for targeted enforcement (Walsh, 2014).
Structural Harborage (rs_ipm_harborage):
Description: Dense vegetation (English Ivy), debris, or foundation cracks.
Justification: Removing harborage (shelter) is a core pillar of "Sustained Suppression." Without removing shelter, baiting is only a temporary fix (Parsons et al., 2017).
To ensure data integrity, the REDCap instrument uses a centralized Failure Logic to automate reporting.
Cumulative Failure Trigger:
Logic: If [any_ARS_variable] = "Yes", then [rs_final_status] = FAIL.
Purpose: This creates a binary metric (Pass/Fail) that can be visualized on a public dashboard, as required by the DC RAT Act of 2026.
Mandatory Evidence Branching:
Logic: If [rs_final_status] = FAIL, then show rs_photo_evidence (Mandatory Upload).
Purpose: Provides "Ground Truth" for administrative hearings and quality assurance.
Enforcement Branching:
Logic: If [rs_final_status] = FAIL AND [rs_property_type] = "Private", show rs_notice_of_violation.
Purpose: Directs legal enforcement resources toward the private sector while flagging public spaces for DPW cleaning.
import csv
# Define the REDCap Data Dictionary Headers
headers = [
"Variable / Field Name", "Form Name", "Section Header", "Field Type",
"Field Label", "Choices, Calculations, OR Observations", "Field Note",
"Text Validation Type OR Show Slider Number", "Text Validation Min",
"Text Validation Max", "Identifier?", "Branching Logic",
"Required Field?", "Custom Alignment", "Question Number",
"Matrix Group Name", "Matrix Ranking?", "Field Annotation"
]
# Define the Surveillance Instrument Data
data = [
# ADMINISTRATIVE MODULE
["rs_inspector_id", "administrative", "", "dropdown", "Inspector ID", "1, Inspector A | 2, Inspector B | 3, Inspector C", "", "", "", "", "y", "", "y", "", "", "", "", "@USERNAME"],
["rs_timestamp", "administrative", "", "text", "Inspection Date/Time", "", "", "datetime_seconds_ymd", "", "", "", "", "y", "", "", "", "", "@NOW @READONLY"],
["rs_ward", "administrative", "", "dropdown", "DC Ward", "1, Ward 1 | 2, Ward 2 | 3, Ward 3 | 4, Ward 4 | 5, Ward 5 | 6, Ward 6 | 7, Ward 7 | 8, Ward 8", "", "", "", "", "", "", "y", "", "", "", "", ""],
["rs_property_type", "administrative", "", "dropdown", "Property Classification", "1, Residential | 2, Commercial (Food) | 3, Commercial (Other) | 4, Public Space | 5, Alleyway", "", "", "", "", "", "", "y", "", "", "", "", ""],
["rs_gps", "administrative", "", "text", "GPS Coordinates", "", "Captured automatically", "", "", "", "", "", "", "", "", "", "", "@LATITUDE @LONGITUDE"],
# BIOLOGICAL INDICATORS (ARS)
["rs_ars_burrows", "active_rat_signs", "Active Rat Signs (ARS)", "yesno", "Active Burrows Present?", "", "Look for slick entries/fresh dirt", "", "", "", "", "", "y", "", "", "", "", ""],
["rs_burrow_count", "active_rat_signs", "", "text", "Number of Active Burrows", "", "", "integer", "1", "100", "", "[rs_ars_burrows] = '1'", "y", "", "", "", "", ""],
["rs_ars_droppings", "active_rat_signs", "", "yesno", "Fresh Droppings Present?", "", "Moist/Dark = Fresh", "", "", "", "", "", "y", "", "", "", "", ""],
["rs_dropping_density", "active_rat_signs", "", "dropdown", "Dropping Density", "1, Sparse (<10) | 2, Moderate (10-50) | 3, Heavy (>50)", "", "", "", "", "", "[rs_ars_droppings] = '1'", "y", "", "", "", "", ""],
["rs_ars_rubmarks", "active_rat_signs", "", "yesno", "Rub Marks Present?", "", "Greasy sebum stains along walls", "", "", "", "", "", "y", "", "", "", "", ""],
["rs_ars_gnawing", "active_rat_signs", "", "yesno", "Fresh Gnawing?", "", "Check bins/utility lines", "", "", "", "", "", "y", "", "", "", "", ""],
["rs_ars_tracks", "active_rat_signs", "", "yesno", "Tracks or Tail Drags?", "", "", "", "", "", "", "", "y", "", "", "", "", ""],
["rs_ars_sighting", "active_rat_signs", "", "yesno", "Live Rat Sighting?", "", "", "", "", "", "", "", "y", "", "", "", "", ""],
# ENVIRONMENTAL DRIVERS (IPM)
["rs_ipm_refuse", "environmental_ipm", "Integrated Pest Management (IPM) Risk Factors", "dropdown", "Refuse Containment Quality", "1, Excellent (Hard metal/Sealed) | 2, Standard (Plastic/Lidded) | 3, Poor (Broken/Open) | 4, Critical (Loose Bags)", "", "", "", "", "", "", "y", "", "", "", "", ""],
["rs_ipm_food", "environmental_ipm", "", "checkbox", "Primary Food Sources", "1, Bird Feeders | 2, Pet Waste | 3, Spilled Trash | 4, Grease | 5, Fruit Trees", "", "", "", "", "", "", "", "", "", "", "", ""],
["rs_ipm_harborage", "environmental_ipm", "", "checkbox", "Primary Harborage Sites", "1, Dense Vegetation (Ivy) | 2, Clutter | 3, Construction Debris | 4, Foundation Cracks", "", "", "", "", "", "", "", "", "", "", "", ""],
# FINAL ASSESSMENT & LOGIC
["rs_final_status", "results", "Final Assessment", "calc", "Inspection Result", "if([rs_ars_burrows]='1' or [rs_ars_droppings]='1' or [rs_ars_rubmarks]='1' or [rs_ars_gnawing]='1' or [rs_ars_tracks]='1' or [rs_ars_sighting]='1', 'FAIL', 'PASS')", "Calculated automatically based on ARS", "", "", "", "", "", "", "", "", "", "", ""],
["rs_photo_evidence", "results", "", "file", "Evidence Photo (Required for Failures)", "", "", "", "", "", "", "[rs_final_status] = 'FAIL'", "", "", "", "", "", "@REQUIRED"],
["rs_enforcement", "results", "", "dropdown", "Enforcement Action", "1, Educational Warning | 2, Notice of Violation (NOV) | 3, Abatement Order | 4, None (Public/Cleared)", "", "", "", "", "", "[rs_final_status] = 'FAIL'", "y", "", "", "", "", ""]
]
# Write to CSV
with open('DC_Health_Rodent_Surveillance.csv', mode='w', newline='') as file:
writer = csv.writer(file)
writer.writerow(headers)
writer.writerows(data)
print("Success: 'DC_Health_Rodent_Surveillance.csv' has been generated.")