-
569 public CMS hospice registrations at 468 LA County addresses, ranked by explainable review priority and mapped.
-
12444 Victory Blvd: five registrations and real Vexcel imagery. No CoStar match, so building type and area are marked unknown.
-
3800 Barham Blvd: exact CoStar match. An 85,831 sq ft, six-story office with 44 tenant locations on record.
-
Every source is labelled: public CMS, masked ownership, licensed CoStar, Vexcel imagery. Live AI is off; the fallback says so.
-
Cross-source comparison: what’s clearer combined, what’s uncertain, what to request next. Here, CoStar context lowered concern.
-
Eight read-only evidence tools, each call logged with its source citation.
-
The same investigation workflow on mobile.
Inspiration
Hospice care is one of the best things healthcare does: it lets seriously ill people spend their remaining time at home, comfortable, with family, and Medicare pays for most of it. That only works if the providers behind it are real and accountable.
The registration data is public. CMS publishes every hospice enrollment, its address, and its owners. But it's published one row at a time. In Los Angeles County we counted 569 hospice registrations at just 468 physical addresses. Some of that is completely ordinary: a large office building can hold several healthcare companies. Some of it might deserve a closer look. Telling the two apart means crossing records nobody keeps in one place: who registered where, who owns them, and what the building at that address actually is.
We wanted to build the tool a reviewer would need to make that call responsibly. Not a fraud detector. A triage desk that shows the evidence, says what it doesn't know, and leaves the decision to a person.
What it does
- Explore LA hospice registrations on a map. 467 of 468 buildings are placed using LA County address points, with verified and approximate locations marked differently.
- Find unusual concentrations. Registrations are grouped by normalized building address and ranked against the county baseline. Shared ownership is mapped with every individual owner masked.
- See why a building was ranked. Each score breaks into four indicators (address clustering, building-type fit, space per registration, ownership network), each with its inputs, source records, and limitations. "High priority" requires three independent strong signals; today none of the 468 buildings meets that bar, and 119 are worth a look.
- Compare against the physical building. Where CoStar has an exact property match, PhantomCare shows the building type, class, area, floors, and occupancy-record context, and links the property's Matterport model from the sponsor dataset.
- Check aerial context. Where Vexcel imagery exists, it appears with its retrieval date, hash-verified provenance, and an explicit note that imagery shows the exterior, not what happens inside.
- Run an investigation. Eight read-only evidence tools pull CMS, ownership, CoStar, and Vexcel records, with a full tool trace. The result shows what each source establishes, what becomes clearer when they're combined, what remains uncertain, which records to request next, and a human-review checklist.
- Export a case file. Buildings that meet the evidence threshold get a downloadable JSON case report with citations and a non-fraud disclaimer.
CoStar data matters in both directions. 12444 Victory Blvd has five registrations and real Vexcel imagery but no exact CoStar match, so PhantomCare marks building type and area as unknown instead of guessing, and without them the building can't reach high priority. 3800 Barham Blvd has an exact CoStar match: an 85,831 sq ft, six-story class B office with 44 tenant locations on record. One hospice registration there works out to about 85,831 sq ft per registration, which is ordinary, and it scores near zero. Property data didn't just raise flags; it cleared one.
How we built it
- Data pipeline (Python, pandas): ingests the CMS hospice enrollment, owner, and additional-address files; filters to LA County; normalizes addresses and groups enrollments by building; computes a clustering baseline; and builds an ownership graph that hashes owner IDs and suppresses individual names.
- Geocoding: LA County CAMS address points, with U.S. Census street interpolation and reviewed parcel positions as labelled fallbacks.
- CoStar: an adapter reads the sponsor's JSONL property extract and matches buildings by exact normalized address only. Near misses are reported as no match, not guessed.
- Vexcel: a pipeline step requests an 80 m ortho extract from Vexcel's API for a geocoded address and records the image's SHA-256, retrieval time, and limitations.
- Scoring: a deterministic, versioned engine (
scoring_v1.json). Missing indicators are listed, available weights are rebalanced, and the claim level always explains itself. - Backend (FastAPI): serves the analysis, ownership networks, imagery, case files, and investigations.
- Agent layer: eight read-only evidence tools are registered with LangChain Deep Agents (
create_deep_agent) behind tool, token, time, retry, and rate limits. Any model output is rejected if it alleges fraud or cites evidence the tools never returned. Live AI is off in our deployment; investigations run a deterministic fallback over the same tools, and the UI labels it that way. - Frontend (Next.js, React, TypeScript, Leaflet): case queue, interactive map, evidence inspector, cross-source comparison, and case reports. Deployed on Vercel.
Challenges we ran into
- Addresses don't match cleanly. Suites, ZIP+4 codes, and abbreviations differ across sources. We match CoStar only on exact normalized addresses and show approximate map positions as approximate.
- The sponsor datasets barely overlap. Our one exact CoStar match and our one Vexcel image are different buildings. We wrote a read-only verifier that checks building ID, address, image hash, and coordinates before anything counts as a same-building match, and we label our fused three-source example as synthetic.
- Missing isn't negative. No CoStar record doesn't mean a building is fine or suspicious. Every view says which data is missing, and missing data can't push a building into high priority.
- Not accusing anyone. Our own tests caught our AI-output validator accepting paraphrased allegations like "fraud ring" and fabricated citations. We fixed both.
- Licensed data. We display sponsor data inside the app, keep raw extracts out of the repository, and mask all 1,559 individual owners.
Accomplishments that we're proud of
- An end-to-end investigation workflow running on real CMS, CoStar, and Vexcel data.
- A real example where property context reduced suspicion instead of adding to it.
- Ten synthetic evaluation scenarios with outcomes worked out by hand from our scoring rules: all ten pass (67 of 67 checks). These measure whether the system follows its own rules, not real-world accuracy.
- 129 backend tests and 36 browser tests across desktop and mobile.
What we learned
Connecting APIs was the easy part; deciding when two records describe the same building was the hard part. We learned to treat "unknown" as a first-class answer, and that the most useful thing an investigation tool can do is be honest about what it can't show.
What's next for PhantomCare
- Retrieve Vexcel imagery for buildings that already have exact CoStar matches, so real buildings can be compared across all three sources.
- Better spatial matching for suites and parcels.
- Room-level Matterport evidence where models are confirmed for the right property.
- A controlled, rate-limited live-agent pilot on synthetic targets.
- Feedback from people who actually do healthcare oversight.
- Resolving sponsor data licensing and retention before any wider use.
Built With
- cms-open-data
- costar
- deepagents
- fastapi
- github-actions
- httpx
- langchain
- leaflet.js
- next.js
- openstreetmap
- pandas
- playwright
- pydantic
- pytest
- python
- react
- ruff
- typescript
- uvicorn
- vercel
- vexcel
- vitest