0. Where we arewhat has been written, and what has not
Dev is written. Prod is not. One clinic per run, each with a journal to undo
it. Running all six at once is refused by the code.
1. What a run would doa dry run from run `salesmig plan` to refresh — nothing was written to prod
Click a clinic: one tab per kind, filters, and a row that opens to show
what it writes. Answer it there.
Of 3,184 sales rows, 3,103 write,
46 held. Held is not lost — the next run picks them up.
CL1 渋谷 is ready. The only thing it waits on is permission to start.
- Dump complete, zero broken relations. 287 of 295 rows get a facility.
- Creates 201 facilities and 180 people; 103 are name-only, per Akira's
"create them without an address".
- Zero rows need a choice — no CL1 row matches two prod facilities.
- The 8 held rows have no facility in Notion. Six trace to one person record,
病院連携室 — naming that hospital clears all six. The other two name a facility
no prod record holds: one manual entry each.
Measured by running salesmig migrate --target prod --clinic <CL> (one per run). The Notion
page id is the document id, so a second run creates nothing twice.
2. Decidedsettled by Akira on Aug 24 — not asked again
"Create them without an address" alone took holds 676 → 46,
with three matching fixes alongside it.
3. Why 46 rows are heldwhat each group needs to clear
CL4 is unblocked. Its title column is nameless in SQL but the API returns it
per page, so we re-read the 122 facilities its sales rows reach: held 153 → 12.
Every held row is on its clinic's page under You decide or
The clinic fixes, and the ones only a reviewer can answer are collected on the
decisions page, asked once each rather than once per row.
3.5 Patientsbuilt 3,775 write, 10 held across 6 of 6 clinics
Scope 2 is four things — facilities, people, patients, sales. The numbers above are
the first three; patients now have a run of their own,
salesmig patients --target prod --clinic <CL>. A patient points at a
facility and at a person, so it runs after them and reuses whatever they created
rather than making a second copy.
Bank details do not migrate. prod's patients has 26 fields
and none is an account number, bank code, branch or holder — nowhere to put them, so they
stay in Notion. 病名, 病歴, ADL and 生年月日 do have fields.
How much arrives is another matter: most clinics leave the clinical columns
near-empty, and CL1 has no 要支援・要介護 column at all. Each clinic's page shows what is
filled in.
4. Needs a decisionanswerable here, right now
Picks save as you make them. Anyone with this page open sees them.
Start writing to prod with CL1? All six are already in dev. Held is not lost — the next run picks it up.Akira / Kotaro
Which hospital is CL1's person record 病院連携室? Naming it clears 6 of CL1's 8 held rows.Kotaro / the CL1 sales rep
Patients: 3,697 rows, 2,131 with a bank account number, plus 病名, 病歴, ADL and date of birth. Nothing builds them yet.Akira / Kotaro
17 rows (8 names) match two or more prod facilities. Pick page ready, about a minute → /scope2_pick.htmlKotaro
カワウチ splits across two people. Does the 2025-09-10 sales row belong to アキコ or ショウコ?Kotaro
11 CL7 rows all point at one unnamed Notion page shared by 14 people from at least three different organizations (府中市地域包括支援センターあしたて, ホームステーション三鷹, リリィパワーズレジデンス武蔵野 and more). It is a placeholder, not a facility.Kotaro / the CL7 sales rep
49 rows identify neither facility nor person: 33 name-is-neither, 14 no facility link, 2 outside the dump.Kotaro