# WHO reference z-score worksheet — dedicated source release

This source tree contains the six selected WHO-reference indicator arithmetic
contracts, a dedicated browser controller/form/style and a standalone offline
builder/source exporter. See NOTICE.md, COPYING and provenance.json for exact
version, authorship, modification, table and licence details.

Build offline with Python 3.11+ standard library into an absent or empty directory
outside this source tree:

    python3 build.py --out ../output

Run portable checks with Node 22+ and Python 3:

    node tests.mjs
    node controller-tests.mjs
    python3 verify-delivery.py

The last command uses only a temporary localhost HTTP server to verify the source
paths; it is not evidence of an actual public hosting service. No account or payment
is required to build or test. The browser application stores/submits no measurement
records and includes no analytics, cookies or persistent storage.

Every editable input required to modify and reproduce the application is supplied:
model-template.mjs.txt, six data/*.json files, exact selected editable upstream
TSVs, definition.json, controller, HTML template/style, builder/config, extraction
recipe, provenance, licence/notices and tests. Complete original WHO GPL-labelled
archives and notices are included. Existing whole-site app/server/build/publisher,
unrelated calculators, guides and private query/research data are not dependencies
of this dedicated component and are not included.

Original R4 scientific/controller tests and Decimal70 fixture generator are supplied unchanged as legacy suites; tests.mjs and controller-tests.mjs run both legacy and R5 suites. R5 adds generate-r5-oracle.py and r5-oracle-fixtures.json with90-digit independent Decimal expectations and a6001-pointCDF grid.
For optional fixture regeneration, create evidence/ in a separate disposable source
copy, then run python3 generate-oracle.py; the four source/*.txt inputs are supplied.
Normal build requires no optional third-party reader. tools/extract-coefficients.py
optionally verifies official RDA/TSV/JSON identity with the exact general-purpose
reader versions in provenance.json; it never runs WHO R code. General-purpose
reader packages are not vendored and need not be acquired to rebuild the browser
application from the editable supplied data/template.

The legacy four-mode scoreOnly calculation body and selected four tables are retained exactly, with their old API/default results. The original R4 source release remains separately immutable. This R5 adds two weight-for-age tables/modes and explicit optional central percentiles; original data inspection metadata is retained. The interface removes only a superseded historical release-status
sentence from displayed Scope. It preserves all numerical/model/source audit rows,
placing the z-score or availability/quality first and the rest in Technical details.
All scientific exclusions and declared software guards remain. Audit numbers display
to at most10 decimals; final rounded score uses the declared exact-binary ties-to-even
method. New weight-for-age requires kg only, confirmed recorded sex table, term-birth chronological context and explicit absence of oedema. Optional percentile is100*normalCDF(unroundedbasez), central[-3,3] only, with unknown/boundary uncertainty unavailable and approximate3dp output. No diagnosis, target, forecast, clinical assessment, prematurity correction or complete WHO software/official R parity is supplied.

The closed SOURCE-MANIFEST.json rejects additional files, missing/modified inputs
and symlinks. Deterministic archives fix order, uid/gid, permissions and timestamps.
Exact source and individual files use the immutable versioned public-build-config
path. A rebuild reproduces the module, controller, HTML/style, source pages/archive
and proposed route-specific headers byte-for-byte. Do not overwrite a whole site's
headers: review composition through the existing publisher for these two paths.

publicRightsApproved=false records that this source tree is proposed public release
bytes and is not a deployment or owner-rights authorization. The private enclosing
review/approval records are deliberately outside the corresponding-source allowlist.
Only an authorized release may place these exact files on the existing website.

The CDF uses41terms n=0..40 inclusive, first omitted n=41, with compensated summation. Numerical budgets and exact selected domain/availability rules are in model-evidence.json; synthetic precision fixtures are not clinical validation. To regenerate R5 fixtures in a disposable copy, run python3 generate-r5-oracle.py. The ordinary build remains offline and standard-library-only.

This builder emits only this version’s active proposed four route aliases and source-only outputs. Composition retaining the42immutableR4 source URLs is a separate reviewed delivery/integration task; this component does not delete, activate, or replace an existing deployment.

The two added WFA editable TSVs are deterministic transcriptions of their named archived R/sysdata.rda objects, not separately downloaded WHO worksheets. The optional reader verifies every JSON/TSV coefficient against the unmodified original archive, including exact binary64 identity.
