Set/clear one perio site's reading(s) on the active chart's tooth.
pd is the CHARTING key. null/undefined/any value < 1 UN-CHARTS
the site — it is removed from pd, gm, bop, AND sup in one atomic
step (never leaves an orphaned gm/bop/sup behind). A non-integer pd
(e.g. 6.5) is instead REJECTED outright: the whole call is a no-op and
state stays unchanged (no partial write). A valid integer pd is
clamped to 1–15.
gm/bop/sup only ever apply to an ALREADY-charted site (this call's
own pd, or a previously-charted one) — supplying them for a site with
no charted pd is a silent no-op, preserving the "absence = not
charted" invariant. gm is clamped to −10…+20; a non-integer gm is
rejected (that one field is left unset/unchanged, the rest of the patch
still applies).
An unrecognized site (not one of PERIO_SITES) is a silent no-op.
Fires onStateChange listeners (via notifyStateChange()) whenever
it actually mutates state; never on a rejected/no-op call.
Set/clear one perio site's reading(s) on the active chart's tooth.
pdis the CHARTING key.null/undefined/any value< 1UN-CHARTS the site — it is removed frompd,gm,bop, ANDsupin one atomic step (never leaves an orphaned gm/bop/sup behind). A non-integerpd(e.g. 6.5) is instead REJECTED outright: the whole call is a no-op and state stays unchanged (no partial write). A valid integerpdis clamped to 1–15.gm/bop/suponly ever apply to an ALREADY-charted site (this call's ownpd, or a previously-charted one) — supplying them for a site with no chartedpdis a silent no-op, preserving the "absence = not charted" invariant.gmis clamped to −10…+20; a non-integergmis rejected (that one field is left unset/unchanged, the rest of the patch still applies).site(not one of PERIO_SITES) is a silent no-op.Fires onStateChange listeners (via
notifyStateChange()) whenever it actually mutates state; never on a rejected/no-op call.