OptionalextendOptionaloriginalThe chart a superadmin resubmission (reprocess / run retry) originated from. If the re-extraction lands on a different dedup key (reclassified type or changed assessment date), the upsert creates a new row — the original is then superseded and deleted, along with its vectors, so stale copies don't feed chart-review retrieval.
OptionaltreatmentProvenance stamp: the episode the originating RPA run was scoped to. Documents from a run bounded to one episode's stay window belong to that episode BY CONSTRUCTION, so this wins over inference from the OCR'd assessment_date. Null/absent (an unbounded pull spanning multiple episodes) falls back to date-of-service resolution, then the latest episode.
Extend workflowRun id; when set, the stored chart is linked back to its
extend_runsrow.