# Elderly program IDs — manual entry

New IDs use `E` + selected area + selected two-digit year + the user-entered serial padded to five digits, without separators. For example, HTY + 26 + 1 is stored as `EHTY2600001`; TL + 27 + 42 becomes `ETL2700042`. E identifies the Elderly program. Areas are HTY, SPT, SDG and TL. Year codes are text 00–99, with 26 initially selected. Users enter serials 1–99999; zero, letters and invalid lengths are rejected. No user clinic value chooses or restricts these inputs.

The combined ID is previewed while editing. It is saved only through Save draft or Complete & save. Opening, reloading, typing, selecting New draft, reconnecting and pressing Enter do not save a record. Both save actions are guarded against duplicate clicks. New registration drafts require the user to supply an ID. An older unnumbered draft must be reopened, given an ID and explicitly saved before syncing.

There is no automatic allocation or reservation request in the entry flow. The previous reservation URL returns a reload message (409) for stale pages and performs no database writes. The historical reservation ledger and migration remain for compatibility with older offline drafts. Previously reserved numbered drafts can still sync with their original UUID, ID and account. Do not truncate the ledger or rewrite browser queues.

Unsynced manual IDs may be corrected before the server accepts them, including after a duplicate-ID validation error. IDs are fixed while a transmitted operation awaits acknowledgement, and remain fixed after server acceptance. Historical IDs retain their original format. Existing registration/follow-up UUID links remain unchanged. New visits inherit their registration's current canonical ID during parent-first sync.

The browser blocks duplicate IDs among readable, non-deleted records in the current account. Server sync enforces global uniqueness, including deleted registrations, in the existing registration counter transaction and unique index. Concurrent requests for the same ID cannot create two rows. An ID rejected as a duplicate must be corrected; no replacement number is allocated. Lost acknowledgements preserve the exact operation and replay its receipt.

General / clinic ID remains a separate optional text value containing exactly 10, 11 or 12 ASCII digits. Leading zeros are preserved. Exports retain the source workbook column order and include the full program ID as text. Dictionary version 1.3 describes registration schema 7 and follow-up schema 3.

No migration, database cleanup, user-account change, environment update or service restart is required. Verification uses guarded disposable MySQL and browser fixtures; production smoke checks never submit patient records.
