Provenance for the final grade — the three sub-grades deriveGrade
computes internally, surfaced (not re-derived) so callers (the FHIR
evidence) can cite exactly which factor(s) drove the result.
direct is the raw %RBL÷age band, or null when age/RBL is missing
(mirrors grade === "indeterminate" when no modifiers are known either).
smoking/diabetes are always a concrete bucket ("A" when the
status is unknown/none/never/former — never null, since those
statuses are a known "does not escalate" fact, not a missing one).
Provenance for the final
grade— the three sub-gradesderiveGradecomputes internally, surfaced (not re-derived) so callers (the FHIR evidence) can cite exactly which factor(s) drove the result.directis the raw %RBL÷age band, ornullwhen age/RBL is missing (mirrorsgrade === "indeterminate"when no modifiers are known either).smoking/diabetesare always a concrete bucket ("A"when the status is unknown/none/never/former — nevernull, since those statuses are a known "does not escalate" fact, not a missing one).