Escaping the Enclave: Format-Faithful Synthetic Data for Open, Reproducible Medicare Claims Pipelines
Abstract
Developing and testing software for regulated patient data such as Medicare claims is structurally expensive. Tooling work must occur inside credentialed, audited computing enclaves, where libraries and tools require approval before they can even be tried. This makes pipeline development and debugging far slower and more expensive than on an ordinary open stack. Because derived code and data cannot leave the enclave, pipelines cannot easily be shared, compared, or reproduced by others. We hypothesize that escaping this bind does not require statistically realistic synthetic data. For the purpose of building and testing data tooling, a pipeline exercises file formats, record structures, schema conformance, edge cases, and data-quality artifacts, rather than the true magnitudes of clinical or demographic distributions. Format and structural fidelity are therefore sufficient to support these engineering tasks; statistical fidelity is not a prerequisite. This claim does not eliminate final validation on real data, both for substantive analyses and for behavior on unanticipated production edge cases.We make this case concrete with synthmed, an open (Apache-2.0) Python package that generates a fully synthetic Medicare-like database conforming to Research Data Assistance Center (ResDAC) File Transfer Summary (FTS) layouts, together with a downloadable companion dataset (Creative Commons Attribution 4.0, CC-BY-4.0; calendar years 2011-2016). The generator emits fixed-width files in the same layouts as real Centers for Medicare & Medicaid Services (CMS) extracts, so the unmodified open dorieh ingestion pipeline can process them with no glue code and then run unchanged against the restricted extract inside the enclave. This demonstrates the approach for one workflow; transfer to other ResDAC consumers remains to be confirmed. Records are generated from AI-authored FTS specifications combined with public reference data and the CMS Data Entrepreneurs' Synthetic Public Use File (DE-SynPUF). An internal beneficiary table keeps synthetic identifiers and demographics consistent across files and years and injects data-quality artifacts to exercise error-handling and quality-control logic. No individual-level CMS ResDAC data or other real patient-level datasets are used, so the released files contain no protected health information or personally identifiable information.The generator is bit-reproducible under a fixed seed and has been run end to end with 5 million synthetic beneficiaries through the ingestion pipeline. An open quality-control run over that output identified a shape mismatch in the synthetic date-of-birth error distribution. Without the open synthetic run, detecting this deficiency would have required an authorized real-data run; the finding led to a corrected generation model.The artifacts support education, methods development, and extract-transform-load (ETL) or analysis-pipeline testing in population-health research. As more pipeline code is authored by AI, an open, format-faithful substrate of this kind also lowers the cost of independently inspecting, profiling, and regression-testing AI-generated ingestion logic outside the enclave. The released data are neither suitable nor intended for drawing substantive conclusions about real patients, providers, or health-care utilization.