---
title: "The Directory and the data flow"
kind: "explain"
audiences: ["strategist","rep","agent"]
track: "data-model"
date: "2026-10-15"
summary: "How data moves from outside sources to your screen, and how the Directory holds it as records, facts and links."
html_url: /library/learn/the-directory
markdown_url: /library/learn/the-directory.md
---

# The Directory and the data flow

How data moves from outside sources to your screen, and how the Directory holds it as records, facts and links.

**By the end:** You can follow a value from its source to a view, name the part of the Directory that holds it, and say which press made it true.

How your data fits together · 12 min · Foundational

## Five layers and one frame

Data moves down the stack. Only the Directory is the truth: everything above it proposes, everything below it reads. The market sits beside the stack. It picks which records count and how they show, and it owns no facts.

Figure: Five layers and one frame

- **Upstream** (Systems we read, never own): CMS warehouse (`cms-data`), NPPES, Google Places, Public websites, Research agents, Customer connectors
  - treaty: A research producer reads it to learn what to find and how to send it.
- **Discovery** (Machine research, per customer): Research runs and CMS editions, Snapshots, Proposals, Proposal versions
  - market_batch.v1: A research batch lands here as proposals. Nothing in it is true yet.
- **Directory** (Your accepted truth): Records, Facts, Links, Identifiers, Evidence, Receipts
- **Book** (Your team’s work): Book records, Accounts, Notes, Outreach and tasks
- **Views** (Cuts of one market): Summary, Dashboard, Full map, Table, Structure, Record pane, MCP tools
  - market_lens.v1: Its view block sets the dimensions, panels and map layers every view draws.

- Upstream → Discovery: **Pull, run or import**. A CMS edition is sealed, or a run or a batch is staged.
- Discovery → Directory: **Accept or Save**. A person’s press writes the record, with a receipt. The proposal stays as it was. Policy accept is off today: every item stays a proposal until a person accepts it.
- Directory → Book: **Add to My Book**. A Book record points at the Directory record. It never copies it.
- Book → Views: **Composed read**. The view reads the market’s members, their Directory facts and links, and your Book state.

**Market**: A frame on your records. A fact edit from a market writes the Directory record, never the market. (Boundary · ZIPs, Members · the records it counts, Lens · one per market, Grouping · a dimension, Edition · CMS markets)

## Records join into a graph

A record is one site, one person, or one organization, with one Directory id. Links join records, and the link’s name says how. This fictional Sacramento example shows each link type.

Figure: Records join into a graph

- **Capitol Example Health Partners** (Organization)
- **Foothill Example Imaging** (Organization)
- **Delta Ridge Imaging Group** (Organization): PAC ID 0000000000 · a value
- **Dr. Ana Example** (Person): NPI · a value
- **Delta Ridge · Midtown** (Site): Type · Imaging center; CMS class · Practice site
- **Delta Ridge · Natomas** (Site): Type · Imaging center; Modalities · MRI, CT
- **Dr. Lee Sample** (Person): NPI · a value

- Capitol Example Health Partners → Delta Ridge Imaging Group: parent_of
- Capitol Example Health Partners → Foothill Example Imaging: Possible parent (dashed)
- Delta Ridge Imaging Group → Delta Ridge · Midtown: operates
- Delta Ridge Imaging Group → Delta Ridge · Natomas: operates
- Dr. Ana Example → Delta Ridge Imaging Group: member_of · Primary
- Dr. Ana Example → Delta Ridge · Midtown: practices_at
- Dr. Lee Sample → Delta Ridge · Natomas: practices_at

Solid lines: an accepted link. Dashed lines: Possible parent · not confirmed, until a person presses Confirm parent.

On a person, practices_at reads Sites of service (each with its activity, and one Primary per activity) and member_of reads Organizations (Primary or Affiliated, with its basis). On an organization, operates reads Sites of service and parent_of reads Parent: one per organization.

## What a Directory record is made of

One identity row, one subtype row, and around it the values, facts, links, evidence and receipts. Arrows point from a row to the row it names.

Figure: What a Directory record is made of

- **Site details** (Subtype · site): directory_record_id; legal name; setting
- **Person details** (Subtype · person): directory_record_id; given and family name; credentials
- **Organization details** (Subtype · organization): directory_record_id; legal name; organization type
- **Record** (Identity): directory_record_id; type · site, person, organization; display name; lifecycle state
- **Identifiers** (Values): directory_record_id; kind · nppes.npi…; value
- **Facts**: directory_record_id; fact kind · site_type…; option or value; source · basis · origin; its evidence; starts · ends
- **Links**: from record; to record; link type · operates…; role · primary:visits…
- **Evidence**: page address; the quote; seen on · license class
- **Receipts**: replay key; change kind · who made it; result

- Site details → Record: 1 : 1
- Person details → Record: 1 : 1
- Organization details → Record: 1 : 1
- Identifiers → Record: values
- Facts → Record: about
- Links → Record: from · to
- Facts → Evidence: quote
- Facts → Receipts: receipt
- Links → Receipts: receipt

A fact never overwrites another source’s fact: each source keeps its own open value per slot, and the screen shows the face a written rule picks. A person’s own value always wins.

## How Discovery, the market and Book point at the Directory

Discovery keeps every run and proposal unchanged. An accept writes a Directory record and a commit row that ties the two. A market and a Book record only point at Directory records.

Figure: How Discovery, the market and Book point at the Directory

- **Research run** (Discovery): run id; kind · edition, batch…; what was asked; the edition seal
- **Snapshot** (Discovery): its run; kind · payload; license class
- **Proposal** (Discovery): kind · site, person…; match key; lifecycle state
- **Proposal version** (Discovery): its proposal; version number; what it proposes
- **Commit** (Accepted as): the accepted version; directory_record_id; the receipt
- **Saved market** (Market): kept_market_id; basis · custom or CMS edition; boundary ZIPs; lens and its version; the edition it reads
- **Market members** (Market): its market; directory_record_id; how it joined · state
- **Record** (Directory): directory_record_id; type
- **Book record** (Book): directory_record_id; workspace; owner · tags

- Snapshot → Research run: of a run
- Snapshot → Proposal: proposes (dashed)
- Proposal version → Proposal: versions
- Commit → Proposal version: accepted version
- Commit → Record: became
- Saved market → Research run: reads the edition
- Market members → Saved market: member of
- Market members → Record: counts
- Book record → Record: works on

Solid lines: one part names the other. Dashed lines: produced by, not a stored link.

A Directory receipt never names a workspace’s market or edition. Those ties live only in the workspace’s own parts: the market members and the commits.

## One site record, read together

The same fictional site as one document. The API returns these parts from separate reads; this shape is for reading.

Site record · illustrative:

```json
{
  "directory_record_id": "3f9c2a71-…-b04e",
  "record_type": "site",
  "display_name": "Delta Ridge Imaging · Midtown",
  "address": {"street": "1400 Example Ave", "city": "Sacramento",
              "state": "CA", "zip5": "95816"},
  "identifiers": [
    {"kind": "cms.org_pac_id", "value": "0000000000"},
    {"kind": "web.domain", "value": "deltaridge.example"}
  ],
  "facts": [
    {"kind": "site_type", "value": "imaging",
     "source": "market_batch_upload", "origin": "customer",
     "basis": "stated", "since": "2026-10-12",
     "evidence": {"permitted_excerpt": "An outpatient imaging center.",
                  "source_url": "https://deltaridge.example/midtown"}},
    {"kind": "cms_door_class", "value": "practice_site",
     "source": "manual", "origin": "customer",
     "basis": "stated", "since": "2026-10-14"}
  ],
  "links": [
    {"relationship_type": "operates", "from": "Delta Ridge Imaging Group"},
    {"relationship_type": "practices_at", "from": "Dr. Ana Example",
     "role_label": "primary:visits"}
  ]
}
```

- `directory_record_id`: The identity of the record. Nothing else is.
- `identifiers[]`: Values that help match and link. Two records can hold the same value.
- `facts[].source`: Where the value came from. manual means a person typed it.
- `facts[].origin`: customer when a person accepted or set it. A machine only proposes.
- `facts[].since`: When the value starts to hold. A replaced value ends; it is not deleted.
- `facts[].evidence`: The quote and its page, or a person’s statement.
- `cms_door_class`: The CMS class fact: practice_site or billing_hub. Only a person sets it.
- `links[].role_label`: Primary or not, then the role: an activity on practices_at (visits, procedures, inpatient), a basis on member_of (owner, employed, contracted, billing).

## How a person’s Accept writes a record

Machines propose; people accept.

1. **Propose** (owner: A machine): A run, an agent or an import stages a proposal in Discovery. It shows dimmed and does not count.
2. **Review** (owner: A person): You read the value, its quote and its basis on the record pane or the import card.
3. **Accept** (owner: A person): The Accept writes the record, its fact or its link with origin customer, and a commit row ties it to the proposal.
4. **Receipt** (owner: The system): The receipt keeps what changed, by whom, when, and from which source.

## Related modules

- [Data contracts](data-contracts.md): Where the lens and the research batch sit in the flow, what each block drives, and how a batch becomes Directory rows.
- [CMS data](cms-data.md): How CMS publishes clinicians, organizations and addresses, how an edition folds into your record graph, and how to read the figures.
- [Market graph channels](market-graph-channels.md): mydoclist · the seam between a market report, its sources, the Directory and Book
