Building a compliance tool like MedReachAI means confronting one of the healthcare industry's most expensive problems: messy data. Medical registries, pharmaceutical payment logs, and clinical databases are notoriously riddled with human typos, duplicate provider entries, and missing Protected Health Information (PHI).
When a compliance officer has to manually scrub a spreadsheet containing thousands of rows, the risk of human error is immense. Accidentally exporting unvalidated data can trigger severe regulatory liabilities. This week, my teammate Collin and I focused on automating this audit process by connecting our Python anomaly detection backend to our React frontend, creating a "Human-in-the-Loop" resolution dashboard.
The Problem: Fragmented Data and UI Disconnects
Our primary architectural goal this week was to implement automated entity resolution. We needed the system to recognize that two separate rows with missing data (e.g., a missing email in one, a missing phone number in another) actually belong to the same provider, rather than treating them as isolated errors.
While the Python backend was successfully clustering these duplicates using the provider's National Provider Identifier (NPI), we hit a significant technical roadblock on the React frontend.
We built a bottom table to display flagged records, intending for the user to click a provider's name and have the top dashboard instantly snap to that provider's detailed profile. However, nothing happened when we clicked the rows. The custom table components we were using were acting as an "invisible shield," silently swallowing the native onClick events. Furthermore, the derived arrays populating the table were stripping out the original database IDs, leaving React with no way to trace the click back to the source object.
The Solution: Native Spans and The "Golden Record"
To resolve the state management disconnect, we had to bypass the custom UI wrapper entirely.
First, we refactored the derived PII rows to explicitly preserve and pass the originalRecord object. Second, instead of attaching the click handler to the parent , we wrapped the provider's name cell in a native HTML . By attaching the onClick event directly to this native element and utilizing e.stopPropagation(), we forced the event through the custom table wrapper.
The moment this state connection clicked into place, the true power of our anomaly engine became visible.
Now, when you click on a provider—let's say, "Riley Flores"—the dashboard doesn't just show a single row of data. Because the system anchors its logic to the NPI, it instantly pulls in all associated duplicate records and clusters them under Riley’s primary profile. We call this the "Golden Record." The compliance officer gets full context in a single view, complete with dynamically calculated null-percentages for missing emails and phone numbers, and one-click controls to safely Anonymize or Remove the bad data.
What’s Next: Stress-Testing with CMS National Data
Up to this point, we have been validating our logic against a curated 60-row synthetic dataset. While it perfectly demonstrates our statistical anomaly detection—like catching a mathematically impossible 75,000 prescription volume—we need to prove this architecture scales.
Following some excellent feedback from our professor, our next major milestone is stress-testing the pipeline. I will be ingesting the official Centers for Medicare & Medicaid Services (CMS) "Doctors and Clinicians" national dataset. My goal is to map this massive, real-world file to our pipeline and ensure our Python engine can process, flag, and group the data without memory timeouts before cleanly passing it to the React frontend.
We have the logic locked in; now it is time to see how it handles the weight of national data.


Top comments (0)