Air-gapped AI for CMS Form 2567 plans of correction
A surveyor leaves the building and a facility has 10 calendar days to submit an acceptable plan of correction. Not to fix the problem, to document how it will be fixed, deficiency by deficiency, in the exact five-element structure CMS requires.
Industry: Healthcare & Clinics
The challenge
Miss the window, or submit a plan the state rejects, and the facility moves toward denial of payment for new admissions and civil money penalties. The clock runs on calendar days rather than working ones, so a survey that closes on a Thursday spends a weekend before anyone has read it properly.
The work itself is not intellectually hard, it is structurally miserable. Form 2567 arrives as a scanned or flattened PDF with no data layer, so someone senior, usually a director of nursing or a compliance lead billing at clinical rates, sits down and transcribes each cited tag by hand before a single word of remediation gets written.
This is the shape of problem a language model solves, and it is exactly the problem most healthcare organizations cannot hand to a cloud one. The surveyor's narrative is thick with resident identifiers, room numbers, dates of incident and clinical detail. Sending that to an external API turns a workflow improvement into a business associate agreement, a security review and a data egress risk most compliance officers will refuse outright.
What we built
- 01A .NET 8 application that owns the workflow, with the model as one component inside it rather than the product
- 02A quantized language model served by Ollama, bound to loopback, no API key and no outbound traffic
- 03Optical character recognition as the fallback path for flattened and scanned survey documents
- 04Rule-based segmentation that finds and separates each cited deficiency tag before any inference runs
- 05Scoped inference per tag, so the model reads one deficiency at a time rather than the whole document
- 06Validation of every generated plan against the five-element structure CMS requires
- 07Human review as the final gate, with the compliance lead editing rather than transcribing
That is the outline. The PDF walks the same build through in detail: the screens, the data moving between them, and how each piece was put together.

