PCProvider ComplianceMaster-pack mechanics
Two pack editions · 1,638 ZIP entries inspected

The master pack is a versioned document product.

Harrison supplied separate Category 1–4 and Category 1–5 editions. They overlap heavily but differ materially; safe generation requires explicit edition identity, inclusion rules, controlled replacements, structural validation and immutable output receipts.

Two editions, not one folder with extras

Category 1–4: 786 entriesCategory 1–5: 852 entries282 normalised overlaps173 changed same-path files

The editions cannot be merged by “latest filename wins.” The case must pin an edition ID and source checksum before transformation begins.

Build ruleA generation job references one confirmed edition, one approved case snapshot and one explicit inclusion manifest.

The workbook is a static register, not a rules engine.

The mapping workbook contains 331 records: 164 policies/procedures, 140 forms/registers and smaller HR, residential, welcome-pack and business-information groups. It has no formulas. Category Q3.2 dominates the mapping, while identifiers and controlled vocabularies are inconsistent.

Identity

Human IDs are reused.

Rows need stable machine IDs separate from displayed document numbers.

Vocabulary

Labels disagree.

Clinical/Non-clinical/Clinical-adjacent/N/No and Std/Standard values require normalisation.

Scope

Categories cross-contaminate.

Generic Category Q3.x labels are not sufficient for every current category question.

Authority

Mappings are indicative.

The workbook’s own legend requires confirmation against exact current forms.

A controlled generation job

  1. 1
    Pin inputs

    Edition checksum, approved case revision, categories, jurisdiction and output request.

  2. 2
    Resolve inclusion

    Use explicit register rules; never infer scope from filenames alone.

  3. 3
    Apply typed variables

    Every replacement has a source, required state and unresolved-token behaviour.

  4. 4
    Transform structures

    Handle runs, tables, headers, footers, workbooks and form fields without flattening content blindly.

  5. 5
    Emit review set

    Comments/highlights and a gap report show unresolved or low-confidence material.

  6. 6
    Finalise mechanically

    Remove review marks, scrub metadata and write an immutable output manifest and delta log.

Validation is part of generation.

edition checksumpre/post token censusrequired variable statescategory gatejurisdiction gateterminology consistencyDOCX structural openXLSX formulas/stylesPDF field mapmetadata scruboutput manifestfinalisation event
Refuse outputWrong edition, unresolved required token, unsupported case fact, inapplicable category content, stale authority or structural corruption blocks finalisation.

Repository fit

python-docx is the closest primary library because it exposes Word document structure directly. openpyxl covers the mapping workbook and spreadsheets. pypdf is the first form-field probe. Pydantic defines generation jobs, variables, manifests and validator outputs.

Docling, OCRmyPDF, Gotenberg and qpdf remain optional workers introduced only when real files fail the core fixtures.

Open reconciliation before automation

  • README counts and variable counts disagree.
  • Input lists describe 31 versus 33 fields.
  • Clinical labels and legacy codes are inconsistent.
  • Some control artifacts are referenced but absent.
  • macOS sidecar content appears inside supplied ZIPs.
  • Internal source-guide absolutes need current official confirmation before becoming validators.