# Downloadable Elderly Support data dictionary

Use **Download data dictionary (Excel)** below the heading on Registration, Manage Registration, Follow-up, or Manage Follow-up. The same workbook covers both forms. After the PWA caches its files online, the download also works offline. Save current work before refreshing online for this update.

Dictionary version 1.4 adds the automatic clinic-to-area ID rules and 10–12-digit General ID validation, retaining the browser Excel export guide. The workbook contains five sheets:

- Guide: definition versions, required fields, dates, blank values, codes and parent/visit relationships.
- Registration: all 58 current form fields, record_status, and three server compatibility aliases. Hidden historical family status is identified separately from neighbour status.
- Follow-up: all 36 current form fields and record_status, including the required hidden registration UUID and visit snapshots.
- Value codes: 99 entries with typed stored values, displayed labels, meanings and accepted older text aliases. Affirmative = integer 1; negative = integer 2. Other category values stay text.
- Record metadata: UUIDs, versions, deletion/sync state, API payload wrapper and the browser Excel columns.

Field sheets include English and Burmese/source labels, sections, stored types, requirements, full conditional chains, validation bounds/formats, source references, notes and visibility. Filters and frozen headers/key columns support searching large dictionaries. No patient examples, records, names or photographed handwriting are included.

## Source and regeneration

The workbook is generated from the current JSON form definitions (registration version 8, follow-up version 3), with descriptions checked against the server validator and browser export. Source hashes and workbook checksum are recorded in `outputs/elderly-support-data-dictionary/dictionary-manifest.json`.

```bash
node scripts/elderly-support/build-data-dictionary.mjs
python3 scripts/elderly-support/verify-data-dictionary.py
```

The builder uses the cached Codex Artifact Tool dependency by default. For another prepared environment, set `ELDERLY_ARTIFACT_NODE_MODULES` to its dependency directory. It writes the reviewed workbook and previews under `outputs/elderly-support-data-dictionary/` and copies the identical workbook to `public/elderly-support/elderly-support-data-dictionary.xlsx`. No database, patient workbook, photo or .env file is opened.

Regenerate and verify the workbook after any field, code, validation, source, visibility or required-rule change. Update the link/cache version and deploy the workbook together with the form shell and worker. The workbook is a versioned snapshot of the form definitions, not a live data export.

## PWA and deployment

This is static, non-personal metadata. It is served directly as a workbook and included explicitly in the PWA allowlist. The normal record APIs and patient exports remain outside Cache Storage. No route, database migration, access configuration or service restart is needed.

Worker: `elderly-support-shell-v12-automatic-ids-20261017`. Local source and production runtime are aligned through the module deployment manifest.


Manual IDs (20 October 2026): users select area/year and enter serial; HTY + 26 + 1 is stored as EHTY2600001. No clinic binding, automatic numbering or new reservations. Existing IDs are preserved. Dictionary 1.3 follows registration schema 7.

Caregiver questions are now in Requested support and caregiver details, card 07 after renumbering. Dictionary 1.4 follows registration schema 8; field values and source Excel columns are unchanged.

Dictionary 1.5 follows registration schema 8 / follow-up schema 4. Five historical Distribution fields are removed from follow-up entry, retained as hidden values, and remain available to reports and source-compatible exports. Collection details is now card 06.

Dictionary 1.6 follows registration schema 9 / follow-up schema 4. Has a current caregiver now belongs to Health and care, immediately after Disability category; remaining caregiver details stay in card 07.

Dictionary 1.7 retains registration schema 9 / follow-up schema 4 and updates date entry guidance: DD-MM-YYYY or DD-MM-YY with a calendar chooser; two-digit years mean 2000–2099. Payload dates remain YYYY-MM-DD. Original source-label text and source Excel formatting are preserved in the dictionary/export.
