React Advanced Odontogram - v2.2.1
    Preparing search index...

    Function buildDerivationInputFromState

    • SP-perio P4b Task 1: state adapter for the pure 2017 periodontal classification derivation core (derivePerioClassification in perioClassification.ts). Reduces the active chart's per-tooth CAL/PD + the P4a case metadata into the pure PerioDerivationInput struct — this is the ONLY place engine state is read for classification purposes; derivePerioClassification itself never touches toothState/caseMeta directly, so it stays callable from an arbitrary serialized snapshot (the later FHIR Condition builder feeds it that way, not live module state).

      Per tooth: interdentalCal = worst (max) CAL over the 4 approximal sites (MB/DB/ML/DL); buccalOralCal = worst (max) CAL over the 2 mid sites (B/L); maxPd = worst (max) raw PD over any of the 6 sites (from s.perio.pd directly, NOT derived CAL); present mirrors isToothPresent(). A tooth never touched at all (no chart entry) reads as present with all-zero perio fields — the same "never touched -> default state" convention every other per-tooth read in this file uses.

      Returns PerioDerivationInput