Copy follows writing-for-a-technical-audience and ste-writing (STE-flavored).
Rationale source: /home/scarndp/.local/share/polytoken/sessions-v1/0e74w5-shaft/plan-001.md.
This presentation describes the refactor intent and source structure, not runtime verification.
The plan follows existing team practice: parameter defaults stay empty rather than referring to global macro variables.
It retains LABTABLE and NUMPARTITIONS because they are shared configuration across the codebase.
LAB01 already matches pt_loc as part of the mapped attributes. The other paths retain their separate care-setting filter.
A Y value applies that filter only when the care-setting criterion is nonblank.
The main macro still removes identical rows after the extraction paths finish.
The main macro first creates an empty OUTFILE with column attributes.
The old DATA-step assignment set newrun only when the step processed an observation.
The helper retains PROC DATASETS APPEND FORCE for a populated output.
The entry check detects blank lengths. It does not validate numeric ranges or all possible invalid values.
The header also documents the new parameters, helper macros, output handling, and isdata.sas dependency.
The refactor aims to preserve supported extraction behavior while making its dependencies and shared steps easier to maintain.