pfs: keep the CPT manual as a second anchor when it confirms an FR-extracted element ("cpt confirms fr") #703
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
From the P49 slice-2 reviews (Task 5 and whole-branch, 2026-09-09).
Today.
extract_codereads elements from the FR descriptor runs first, then from the newest CPT edition'spfs.cpt_coderow (stem/tail + required-elements list). Duplicates on(type, value, detail)keep the FR row and drop the CPT row, so on the live replicapfs.code_elementhas zerosource='cpt'rows for the fixture families — the manual's independent transcription of the same element is discarded, and its value only shows for codes with thin FR coverage.Ask. Preserve the cross-check without doubling row counts: either a
confirmed_bycolumn/list onpfs.code_element(e.g.cpt:GQGTPGYV) set when a second source yields the same element, or a smallpfs.code_element_confirm(code, type, value, detail, source, item_key, p_id)table. The chat and notebook can then say "this element is stated by both the CPT manual (2024) and the CY2015 final rule". Also giveReviewRowasourcecolumn so CPT-sourced review lines are distinguishable from FR ones (today onlyitem_keytells them apart).Done when 99490's
comprehensive-care-planelement shows both anchors, and the review queue rows carry their source.Done in
9073b3a(merge of9803a9a): pfs.code_element gains confirmed_by (comma-separated source:item_key tokens set when a second source yields the same (type, value, detail) — row counts unchanged, FR > CPT > HCPCS > RVU precedence unchanged), pfs.code_element_review gains source; ensure_tables migrates existing tables; readers tolerate the old schema; stack pfs elements prints the confirmed count and stack pfs review shows the source. Live after re-extracting the five hand families: 118 elements across 18 codes carry a second-source confirmation; 99490's comprehensive-care-plan row is source=fr (DE2VH9PD ¶1247) confirmed_by cpt:GQGTPGYV — the done criterion. Notebook section 2 shows both anchors.