Skip to content
View in Notion

Exportable Reports ​

Feature Overview ​

Exportable Reports are PPP's real-time, peer-reviewed CV for doctors plus the cohort report format for admins. Reports compose into a 3-tier structure (Summary → feature one-pagers → Detailed appendix), export to PDF or shareable link, and carry PPP branding in the footer so they retain provenance when shared outside the platform.

Related — passport-cv P3 shares this router (#10348). The generated Resume/CV export (reports.generateResumeCvPdf) lives on the same reports router and reuses this feature's PDF primitives (title page, fonts, footer, layout), but it is a distinct document governed by its own spec — see passport-cv.md (passport-cv.generated-sections). It renders only the confirmed CV section list (registration, roles/grades, CPD summary, qualifications/exams, publications, presentations); WBAs/appraisals/logbook belong to this exportable report, not the CV. No exportable-reports acceptance criteria change.

Open Questions ​

#QuestionProposed answer / statusRef
Q3Cohort anonymisation minimum: Rob's 2026-09-24 comment on #11772 says 3, but code (COHORT_THRESHOLD = 5), this spec and BDD all say 5. Which is right?Open — DECIDE (Rob/Matt). Not changed in code. Touches the org dashboard, the wellness privacy guard test and reports.feature.#11772
Q4Should the Multi-Feature Report offer timeframe presets and an activity-type filter?Open — DECIDE. Only free From/To dates today.#11055
Q5Retire the client-rendered "PDF" button in favour of the server Full report (it ignores Include evidence and has a flatter footer)?Open — DECIDE.#11219
Q6Are stat rows acceptable for the Tier 2 one-pagers, or must they draw the same widget as the dashboard tile?Open — DECIDE. Stat rows only today.#11219
Q7Should the PPP Passport be one exportable deliverable inside Reports?Open — DECIDE. Passport has its own export today.#12811
Closed Questions (5) — click to expand
#QuestionResolutionRef
Q1Doctor-facing CV — which features ship in v1?Original (2026-05-20): v1 = CPD + Logbook + Retrospective + Appraisals; WBA/Wellness → v2. Superseded 2026-07-11 (#10185) — Rob's direct decision, NOT Matt-confirmed: scope expanded to CPD + Logbook + Retrospective + Appraisals/WBA + Timesheets. This reverses the earlier "ask Matt" hold recorded on #10185 (2026-07-08 comment); Rob made the call himself rather than wait for Matt, so it is auditable as a Rob-decision pending any later Matt review. Wellness remains excluded (still gated on Q4 privacy work — cohort-only, never per-user).#6675 deep-dive 2026-05-20; #10185 (Rob 2026-07-11)
Q2"Smartly grouped items" within each feature section — what is the grouping rule?Chronological by date (engineering default). Matt: "I'm not really sure what I meant by that."#6675 deep-dive 2026-05-20
Q3Shareable link — expiry policy and access-control (signed URL? authenticated viewer?).Answered (Rob, 2026-05-21): Signed URL, 30-day default (configurable) TTL, viewer-not-required; revocable by the doctor at any time. code:api/backend-ppp/src/utils/token-helper.ts (default 30).Engineering-raised
Q4Wellness section in CV — include cohort signals only, or doctor-level (with consent)?Answered (Rob, 2026-05-21): Cohort signals only — no individual Pulse or WHO-5 scores in the CV export. E.g. "readiness above department average" but never raw scores.Engineering-raised
Q5Long detailed report ("could be thousands of pages") — paginate vs streaming PDF?Answered (transcript 2026-05-20 ~00:46:24): Appendix style — line-by-line detailed section at the end. Matt: "it could sometimes be a thousand-page document" — the structure is: title page → summary + contents → per-feature one-pagers → detailed appendix. No streaming required; standard PDF export.Notion brief
Matt's Requirements (from Notion brief) ​

Source: Notion page — last edit 2026-05-20

Purpose ​

  • A real-time, peer-reviewed CV based on platform data, supporting doctors in regulatory submissions (AHPRA, GMC, AMC, RACS).†
  • Same shape underpins admin cohort reports (see organisational-dashboard.md).

Display structure — title + 3 tiers ​

  1. Title page (cover) — photo, registration number, work history.†
  2. Summary Page / Contents — table of contents + overall insights "in numbers and words"; in electronic share, clickable to jump to each section.†
  3. Section by Section (Features) — "one-pagers" — per-feature headline widget for the selected timeframe.†
  4. Detailed Report — appendix sectioned feature-by-feature, listing all entries and details for review. May run to thousands of pages.†

Coverage (v1 starting point) ​

  • CPD
  • Surgical Logbook
  • Retrospective
  • Appraisals / WBA (promoted to current scope via #10185, Rob 2026-07-11)
  • Timesheets (added via #10185, Rob 2026-07-11)
  • Wellness remains excluded — cohort-only per Q4, never per-user data in this export.

Doctor-controlled disclosure (data privacy) ​

  • The doctor chooses per-section what is included in any single export — "It's my option rather than them having that."†
  • Each export records the selection set so the recipient sees a stable document, but the doctor's underlying privacy is preserved.
  • Use case: "We're having our annual review. I want you to bring along your PPP" — doctor brings only what they choose.

Within each feature ​

  • Smartly grouped items — TBD (Q2).
  • Clarity of current display.

Export targets ​

  • PDF — bookmarked contents page, interactive links from Summary → Section → Detail.
  • Shareable link — direct URL, no PDF download required (modern workflow).†

Branding ​

  • PPP branding in the footer with the platform URL on every page — treated like a standard software "produced by" marker.†

Acceptance Criteria ​

Doctor-facing CV — structure ​

  • ✅ exportable-reports.three-tier-structure — Export composes title page → Summary/Contents → Feature one-pagers → Detailed appendix.† (built: api/backend-ppp/src/services/reportPdfService/pages/ — titlePage.ts → summaryPage.ts → onePager.ts → appendix.ts; CSV at instances/ppp/src/modules/Reports/{CPD/UserActivities,MultiFeature}/utils/csvExport.ts; verified by @smoke BDD) (#7489)
  • ⏳ Title page renders the doctor's photo, registration number, and work history.†
  • ✅ exportable-reports.career-history — the title page renders a Career History section from the doctor's job-role history (grade + effective dates), with verified entries distinguished from unverified per the #8087 flag; rejected entries are omitted. † ‡
  • ✅ exportable-reports.title-page-month-only-start — the title page renders the working-calendar start as a month only, never a stale year. † ‡ (#8420)
  • ⏳ Summary page contains overall insights "in numbers and words" + Contents.
  • ⏳ Contents page lists every section and detail sub-section; renders before any content.
  • ⏳ Feature one-pagers carry a single headline widget per feature (the same widget used on the doctor's dashboard tile) for the selected timeframe.
  • ⏳ Detailed appendix paginates by feature → section → row; supports thousands of pages without blocking export.
  • ✅ exportable-reports.report-features — the report can include CPD, Surgical Logbook, Retrospective, Appraisals/WBA, and Timesheets (Q1 resolved; Appraisals/WBA + Timesheets added via #10185, Rob 2026-07-11). Wellness is excluded (cohort-only per Q4).†‡ (#10185)

Doctor-controlled disclosure ​

  • ✅ Pre-export selector: per-feature on/off via checkbox group above the date range — CPD, Logbook, Retrospective, Appraisals/WBA, Timesheets (#6734; Appraisals/WBA + Timesheets toggles added via #10185).†
  • ✅ Selection set is captured into the export's metadata (export_link.metadata.disclosureSelection) so the audit log shows exactly what was shared — backend wiring landed in #6749.
  • ✅ Default selection = "everything" so an unmodified export is complete; the doctor opts out, not in (#6734).

On-screen report display ​

  • ✅ exportable-reports.multifeature-curated-onscreen-columns — The on-screen multi-feature report renders a curated, per-feature column set (the handful of fields a clinician needs to review — e.g. CPD: Date, Activity, Category, Hours, Provider, Status) through the responsive PppDataTable primitive (desktop table → mobile stacked cards), not a raw dump of every DB field. Internal/plumbing fields (ids, approval-email message ids, collaboration-window / derived-from timestamps) never render as columns. The full data set remains available via the CSV/PDF export path.†‡ (#10023)
  • ✅ exportable-reports.multifeature-sections-collapsed-default — The on-screen multi-feature report renders each feature section collapsed by default, expandable on click, so a report carrying many feature sections never opens every one at once — matching the app's compartmentalised/collapsed pattern.†‡ (#10185)
  • ✅ exportable-reports.multifeature-counts-match-records — a Multi-Feature Report section's record count reflects the records actually fetched, including when patient-identifier encryption is on. A section whose fetch fails still surfaces as an error section, but the Surgical Logbook and Development / Audit Events fetchers must not fail on rows getActivitiesByFilter has already decrypted (decrypting twice threw malformed ciphertext and silently showed 0 records). The Appraisals section lists completed yearly appraisals PLUS the doctor's own WBA, MSF and MCR records, and the Development section lists audit events PLUS reflections (Rob's 2026-07-11 scope decision, Q1: every feature except Wellness; #12832). (#12600, #12832)

Multi-Consultant Report (MCR) — in-app CRUD ​

  • ✅ exportable-reports.mcr-crud-dialogs — The MCR page presents create, view, edit, and review dialogs for multi-consultant report records; an unsaved-changes guard prompts the user before discarding edits.†‡ (#9375)
  • ✅ exportable-reports.mcr-add-deeplink-non-consultant-only — The MCR page's ?add=1 deep link opens the request dialog only for non-consultants; for a consultant it opens nothing (MCR is non-consultant only, enforced server-side by mcr.create; see appraisals.mcr.non-consultant-requester-only in appraisals-wba).† (#12754)
  • ✅ exportable-reports.mcr-submit-notifies-assessors — Submitting an MCR (created as pending, or moved from draft to pending) notifies each assessor from the server, whatever client submitted it; the submitter is never notified about their own report (#12838, from #11210).

PDF export ​

  • ✅ exportable-reports.multifeature-pdf-paginated — Multi-feature PDF export renders a summary page then auto-paginated per-section tables.†‡ (#7803)
  • ✅ exportable-reports.multifeature-export-readable-and-branded — The full-data CSV/PDF export (distinct from the curated on-screen columns, exportable-reports.multifeature-curated-onscreen-columns) stays legible and clearly attributable: (1) the summary dashboard starts a genuine new "High-Level Summary (continued)" page — with its own heading — before any section's block would overflow the page bottom, never an orphaned/unheaded blank page; (2) internal workflow-plumbing columns (provider-approval token/email/claims fields, collaboration-window/decline bookkeeping, import/bulk-upload metadata) are excluded from both the CSV and PDF column set alongside the existing FK-id/PII exclusions; (3) a section whose remaining column count still exceeds 8 splits into sequential "Part N of M" table pages, each repeating a stable anchor column (Date, or the first column) so rows correlate across parts; (4) the downloaded filename is PPP_Report_&lt;Features&gt;_YYYYMMDD.&lt;ext&gt;, naming the included sections and export date, replacing the undifferentiated MULTI_FEATURE_REPORT_<timestamp> name — applied consistently to the CSV download, the PDF download, and the PDF preview dialog's Download link.†‡ (#10606)
  • ✅ exportable-reports.cpd.plr-coverage-column — The CPD section of the multi-feature export (on-screen curated columns, CSV, and PDF) surfaces Program-Level Requirement (PLR) coverage as a human-readable "Program Requirements" column — the confirmed, non-rejected PLR name(s) an activity claims — rather than silently stripping plrClaims/plrConfirmations as internal plumbing. A doctor's exported CPD report is the artefact presented as compliance evidence, so a policy-required field (Appendix 1, CPD Activity Policy; see cpd-home.md § cpd.home.compliance.plr-required-for-verdict) must not be omitted from it. The raw jsonb fields stay excluded — they are superseded by this derived column, not omitted as data. The standalone CPD User Activities Report's Program Requirements filter likewise matches by plrClaims (as well as the legacy classId) (#11192). (2026-08-23) (#11046) † ‡
  • ✅ exportable-reports.pdf-bookmarks — PDF generator emits a bookmark tree matching the Contents page so PDF viewers expose section navigation.†‡ (#10487)
  • ✅ exportable-reports.pdf-contents-hyperlinks — Contents-page entries are clickable hyperlinks within the PDF (jump to section and then to detail).†‡ (#10487)
  • ✅ exportable-reports.pdf-footer — Footer on every page: PPP logo + platform URL + page N of M + report-generated timestamp.†‡ (#10487)
  • ✅ exportable-reports.evidence-embedded-attachments — Evidence PDF pages merged inline into the report appendix (not attachment icons, not hyperlinks).†‡ (#7297, #7695)
  • ✅ exportable-reports.evidence-no-hyperlinks — The exported report contains no hyperlinks to evidence on any render path (PDF or CSV) — evidence is merged inline as PDF pages (never linked) and the logbook CSV column set carries no evidence URL / file-path column.†‡ (#7297) — delivered alongside evidence-embedded-attachments (SGD alignment sweep 2026-06-04)
  • ✅ exportable-reports.evidence-inclusion-is-a-choice — Whether the evidence appendix is merged into a generated PDF is an explicit practitioner choice (includeEvidence), honoured identically by both server-side PDF routes — the synchronous reports.generateCvPdf and the async exportableReports.startPdfGeneration. Both resolve the option through one shared mapping, so an opt-in yields session-scoped evidence access on both and an opt-out yields no evidence tier on either. Previously the two routes disagreed silently and neither was a choice: generateCvPdf hardcoded evidenceAccess: { mode: 'session' } (evidence always merged) while startPdfGeneration never set evidenceAccess at all (evidence never merged), so the same doctor received a materially different document depending on which route the caller happened to use. (2026-08-31) (#11979)†‡
  • ⏳ PDF generation runs async with progress polling — UI never blocks on a thousand-page export.

Excel export ​

  • ✅ exportable-reports.module-excel-export — The shared module export control offers Excel (.xlsx) alongside CSV and PDF, and the Excel option writes a real workbook — configured columns only, each column's own formatter applied, sheet named for the module. xlsx was already a declared dependency, but every non-test import was a parsing path: there was no XLSX.write in production code and the control's format union was pinned to 'csv' | 'pdf', so Excel was an export target in name only. The write path lives in the shared control so every module that already renders it gains a working Excel export without a per-module writer. (2026-08-31) (#11979)†‡

Scope note: this ships Excel for the module-level data export control (the tabular per-module download). The doctor-facing portfolio report export targets in §Export targets above remain PDF, shareable link, and structured JSON — Excel is deliberately not offered there, since that document is a paginated narrative artefact rather than a table. (#11979)

Structured data export (FHIR/JSON) ​

  • ✅ exportable-reports.structured-export — Alongside the PDF, the doctor can export the same selected report sections as a machine-portable structured JSON document (a new export target, not a replacement for PDF/shareable-link). Emitted as application/fhir+json via reports.generateStructuredExport.†‡ (#10185)
  • ✅ exportable-reports.structured-export-fhir-aligned — Profile/registration/role data maps to FHIR R4 resources (Practitioner with a registration identifier + qualification; PractitionerRole per grade-over-period, carrying the PPP verification flag so self-reported roles stay distinguishable from verified ones per #8087). Content with no natural FHIR resource — CPD activities, logbook entries, appraisals, timesheets — is emitted as plain structured JSON (curated rows + computed summary), deliberately not force-fitted into FHIR resources that don't semantically fit.†‡ (#10185)
  • ✅ exportable-reports.structured-export-disclosure — The structured export honours the same doctor-controlled disclosure as the PDF: only the features the doctor selected are included, and the document records the included-feature set + date range so the recipient sees a stable, auditable selection.†‡ (#10185)
  • ✅ Generates a signed URL (HMAC-SHA256, configurable TTL — default 30 days) — exportableReports.generateLink (#6731).†
  • ✅ Recipient does not need a PPP account to view (link auth) — public GET /r/:token route + /report/:token viewer page (#6731).
  • ✅ Author can revoke any active link — exportableReports.revokeLink enforces owner-only (#6731).
  • ✅ Link viewer respects same branding (PPP footer with URL) — per-section + page-level footer in ReportViewerPage (#6731).

Anonymisation (admin cohort exports) ​

  • ⏳ When the report subject is a cohort (not a single doctor), every section passes the organisational-dashboard.md anonymisation threshold.
  • ⏳ A would-be-leaky cohort export fails server-side with a user-facing explanation.

Audit ​

  • ✅ exportable-reports.export-audit-log — every report export a practitioner generates is audit-logged (actor, subject, format, source, timestamp). The four server-rendered paths (cv_pdf, resume_cv_pdf, structured_export, async CV PDF job acceptance) are authoritative — the audit write happens server-side and cannot be skipped by the client. The two browser-rendered paths (CPD Activities and MultiFeature CSV/PDF, which render entirely client-side with no other server call) are best-effort: the frontend fires a dedicated logClientExport mutation immediately before triggering the browser download, fire-and-forget so it never blocks the download, but a client that skips or fails that call still completes the export with no audit row — this is a structural limit of a client-triggered audit call for a client-rendered artefact, not a defect (PR #11879 review).†‡ (#11055)
  • ✅ Shareable-link creation is audit-logged (export_link_created: actor, subject, timestamp, link id) by exportLinkService.createLink. BDD reports.feature @issue-6735. (Status text corrected 2026-10-05; it was already built.)
  • ⏳ Audit log visible to PPP Staff; cohort-export audit also visible to the issuing admin within their scope.

Version control ​

  • ✅ Every server-rendered export writes an immutable report_exports snapshot — content hash (SHA-256 of the rendered artefact), the exact generation inputs (features, date range, format-specific options), and a timestamp — recorded on write and never updated afterward. Covers the same four server-rendered paths as the audit log above: cv_pdf, resume_cv_pdf, structured_export, and the async CV PDF job. Fire-and-forget like the audit write — a snapshot failure never fails the export itself.†‡ (#11978)
  • ⏳ Two snapshots can be diffed/compared. Deliberately out of scope for #11978 — the snapshot stores a content hash and the generation inputs, not the rendered artefact itself, so today's version control can only answer "did the export change" (hash mismatch) and "what was asked for", not "what specifically changed". A diff/compare UI needs the full artefact retained, which is a separate, larger storage decision (see PR #11978's description for the hash-only vs full-artifact tradeoff it weighs).
  • ⏳ Shareable-link generation and the two browser-rendered CSV/PDF paths (CPD Activities, MultiFeature — same structural limit as the Audit section above) do not yet write a version snapshot — not covered by #11978, tracked separately.

Performance ​

  • ⏳ Summary + Section one-pagers (≤50 pages) render in ≤5s.
  • ⏳ Full detailed appendix: streamed generation; first page available within 10s, full document within 5min for ≤5000 pages.
Current Status ​
Sub-featureStatusNotes
3-tier document structure🚧 In progressServer generator + Full report (PDF) button shipped; Appraisals and Timesheets one-pagers now drawn (#12961). Tier 2 widgets, audit-grade appendix columns, title photo still open.
PDF export with bookmarks✅ ShippedBookmark tree + clickable contents hyperlinks + footer (#10487).
Shareable link (signed URL)✅ ShippedGenerate / revoke / list + public viewer route (#6731); creator panel on the Multi-Feature Report page (#12962). Link base URL falls back to WEB_APP_BASE_URL.
PPP footer branding✅ ShippedLive in /report/:token viewer (#6731) + PDF generator (#10487).
Cohort export anonymisation❌ Not startedDepends on organisational-dashboard.md
Export audit log✅ ShippedClient-generated CSV/PDF exports logged (#11055); shareable-link creation audited (export_link_created).
Async PDF with progress✅ ShippedFull report (PDF) runs startPdfGeneration, polls getPdfStatus with a progress bar, then downloadCvPdf (#12963). Progress is coarse (0, 10, 100).
Export version control🚧 In progressHash + inputs + timestamp snapshot on the 4 server-rendered paths (#11978); no diff/compare UI, share-link and browser-rendered paths not yet covered.
Streaming PDF for ≥1000-page reports❌ Not startedQ5

Open issues on label:feature:exportable-reports — no open issues. Fetched at: 2026-10-13T07:29:49Z — live list on GitHub.

Downstream References ​
FeatureLinkage
Organisational DashboardCohort report flavour + anonymisation gate
Profile (Doctor)Source data for CV header (registration, qualifications, hospitals)
CPDOne-pager + appendix sections
LogbookOne-pager + appendix sections
RetrospectiveOne-pager + appendix sections
Appraisals / WBAOne-pager + appendix sections (current scope — promoted from v2 via #10185)
TimesheetsOne-pager + appendix sections (added via #10185)
WellnessOptional opt-in section (v2 — Q4; still excluded)
Dashboard (Doctor)Widget components reused in feature one-pagers
Change Log ​
DateChangePR/IssueReason
2026-10-05Full report now draws Appraisals and Timesheets one-pagers and contents one-liners; the Multi-Feature Report page has a share-link panel (create, copy, list, revoke); the Full report runs as an async job with a progress bar. Spec status text corrected and the open decisions Q3-Q7 recorded.#12961, #12962, #12963, #11219Task 17 reachability check found these built-but-unwired or computed-but-undrawn; the status table and Open Questions had drifted from the code.
2026-10-04The Multi-Feature Report no longer shows 0 records for Surgical Logbook and Development / Audit Events when patient-identifier encryption is on. The report (and the logbook CSV/PDF exports) decrypted identifiers a second time after getActivitiesByFilter had already decrypted them, the second pass threw, and the section silently became an empty error section.#12846, #12600, #12832Reported on UAT (#12600, #12832). Root cause was a double decrypt, not a date or scope filter. Appraisals (completed yearly appraisals only) and Reflections (not part of the Development section) were not changed here.
2026-10-04The CPD User Activities Report's Program Requirements filter now matches an activity by its plrClaims (canonical PLR names) as well as the legacy classId.#11192, #12659#12659 stopped setting classId on activities, so the filter, which matched classId only, returned nothing for any activity claiming a PLR (flagged as minor in the #12662 review, never filed).
2026-10-04The Multi-Feature Report page now has a "Full report (PDF)" button that generates the server-rendered 3-tier document (title page, summary and contents, per-feature one-pagers, detailed appendix) and opens it in the preview dialog, with an "Include evidence" checkbox for the evidence appendix. Previously nothing in the UI called the server generator, so only the client-side table PDF was reachable.#0, #11219Task 17 (#11219) part B asks to show the complete report in the 3-tier structure; the generator (reports.generateCvPdf) existed but had no caller. The one-liners, one-pager widgets and contents-to-appendix links inside that document are still tracked as unbuilt acceptance criteria.
2026-10-04The Multi-Feature Report PDF export no longer fails with "PDF export failed" when the report includes CPD evidence. The evidence appendix drew a "←" arrow (and any non-Latin activity name) with the standard Helvetica font, which pdf-lib cannot encode, so the whole PDF threw. The arrow is removed and characters Helvetica cannot encode are replaced with "?".#0, #12601Reported on UAT (#12601). The existing evidenceMerger unit test mocked pdf-lib, so it could never see the encode error; a real-pdf-lib test and BDD regression scenario now cover it.
2026-10-04The Multi-Feature Report Appraisals section now lists the doctor's WBA, MSF and MCR records alongside completed annual appraisals (each row carries a Type), and the Development section now includes reflections as well as audit events. Previously a doctor with an MSF request or a reflection saw "0 records" for these sections.#0, #12832Reported on UAT (#12832). The 2026-07-11 scope decision (Q1) made the report cover Appraisals/WBA and Retrospective, but the fetchers still returned completed annual appraisals and audit events only; the spec line saying widening was "a product decision" is now answered by Q1.
2026-10-04The "MCR submitted" notice to assessors is now created by the server when an MCR is created or submitted, no longer by the browser. Assessors are notified whatever client submitted it.#12838, #11144#12838 (from #11210, Task 12 brief): reviewers must be notified when asked. The browser-created notice meant an MCR submitted any other way told its assessors nothing.
2026-10-03The Multi-Consultant Report page no longer opens the request dialog from a ?add=1 deep link when the viewer is a consultant (MCR is non-consultant only).#12781, #12754Matt (#11210) — "MCR (non consultant only)". A consultant landing on /appraisals/mcr?add=1 got a request form whose submit the server now rejects with FORBIDDEN; the dialog is suppressed instead. No report content or export behaviour changed.
2026-09-20Built the minimal enabler for §7's "version control mechanisms" claim (#11055 AC3) — a report_exports table records a content hash (SHA-256 of the rendered artefact), the exact generation inputs, and a timestamp on every server-rendered export (generateCvPdf, generateResumeCvPdf, generateStructuredExport, async CV PDF job), never updated after insert. No diff/compare UI, and share-link/browser-rendered exports aren't covered — see the spec's Version control section for what today's snapshot can and can't answer.#12346, #11978, #11055Issue #11978 (#11055 AC3) — the published policy claims version control is implemented; the codebase had no reports table, no version column on export_links/pdf_export_jobs, and every export regenerated live with a fresh timestamp, so two exports a week apart were neither retained, linked, nor comparable. Path 1 of the issue's policy-vs-build fork (build, not drop the claim) — chosen over dropping the §7 claim because a bare hash+inputs snapshot is a bounded, buildable enabler even though a full diff UI remains future work.
2026-08-31Shipped Excel (.xlsx) as a real export format on the module-level export control — xlsx was a declared dependency whose every non-test import was a parsing path, with no XLSX.write in production code and the format union pinned to 'csv' | 'pdf'. Made evidence inclusion in generated PDFs an explicit includeEvidence option resolved through one shared helper by both server-side PDF routes. Added exportable-reports.module-excel-export and exportable-reports.evidence-inclusion-is-a-choice, plus a scope note recording that Excel is deliberately not offered for the doctor-facing portfolio report targets. The Excel writer applies the same leading-formula neutralisation the CSV path has always applied via escapeCSV, and honours the same includeInTab column scoping the sibling CSV writers apply, so an Excel export can neither carry an executable formula nor emit a column the active tab withholds.#12115, #11979, #11055Issue #11979 (#11055 AC4/AC5) — Excel was listed as an export target but never shipped, and the two PDF routes disagreed silently on evidence inclusion (reports.generateCvPdf hardcoded evidenceAccess { mode 'session' }, exportableReports.startPdfGeneration never set it), so the same doctor received a materially different document depending on which route the caller used, with no practitioner choice on either.
2026-08-27Added a logClientExport audit-log path for browser-rendered CSV/PDF exports (CPD Activities report and MultiFeature report), closing the gap where the only server call for those exports left no audit trail. Marked exportable-reports.export-audit-log shipped for the practitioner-export half; shareable-link-creation audit logging remains a separate, still-pending AC.#11879, #11055Issue #11055 — practitioner CSV/PDF downloads were browser-side and completely unlogged, unlike the share-link path which already had audit coverage.
2026-08-23CPD multi-feature report exports (CSV/PDF/on-screen) now surface Program-Level Requirement coverage via a derived "Program Requirements" column, instead of silently stripping plrClaims/plrConfirmations as excluded internal fields.#11744, #11046A doctor's exported CPD report is the artefact presented as compliance evidence; omitting a policy-required field (Appendix 1, CPD Activity Policy) from it meant no export could substantiate PLR compliance. Found by the policy-to-code conformance audit (#11022).
2026-07-14Fixed the full-data Multi-Feature CSV/PDF export — the summary dashboard now starts a genuine "continued" page (with its own heading) before overflowing, instead of leaving an orphaned unheaded blank page; expanded column exclusions drop internal provider-approval/collaboration/import-bookkeeping fields; sections with more than 8 remaining columns split into "Part N of M" table pages sharing a repeated anchor column; downloaded files are now named PPP_Report_&lt;Features&gt;_YYYYMMDD.&lt;ext&gt; instead of the undifferentiated MULTI_FEATURE_REPORT_&lt;timestamp&gt;.#10606A real export showed a blank orphaned page-2 (an overflowing Timesheets summary block rendered with no heading) and detail tables dumping up to 37 raw DB columns per section, wrapping headers into unreadable 2-3-character vertical stacks; filenames gave no indication of report contents without opening the file.
2026-07-12Mark PDF bookmark tree, clickable contents hyperlinks, and per-page footer ACs as shipped (✅); update Current Status table rows accordingly.#10516, #10487SGD C13 drift — spec understated shipped functionality. All three ACs were fully implemented in reportPdfService (buildOutlineTree, summaryPage.ts Dest links, shared/footer.ts drawFooter) but remained marked ⏳ pending.
2026-07-11Multi-feature report expanded to include Appraisals/WBA (promoted from v2) and Timesheets (net-new section — fetcher, summary, curated columns), and gained a FHIR-aligned structured JSON export target (reports.generateStructuredExport, application/fhir+json) alongside the PDF — Practitioner/PractitionerRole for profile/registration/roles, plain structured JSON for CPD/logbook/appraisals/timesheets.#10409, #10185Rob's direct 2026-07-11 scope decision (recorded in Q1 as a Rob-decision, NOT Matt-confirmed), superseding the pending "ask Matt" hold on #10185. Doctors need Appraisals/WBA + Timesheets in the report and machine-portable structured data, not only human-readable PDF. Wellness stays excluded per the closed Q4 privacy decision (cohort-only).
2026-07-08Multi-feature report sections render collapsed by default, expandable on click (multifeature-sections-collapsed-default).#10217, #10185Matt and Rob agreed on the 2026-07-08 Dev Session call (~00:29:40) that report sections should auto-collapse to match the app's compartmentalised pattern and avoid overwhelming the reader.
2026-07-04Multi-feature report tables now render a curated, per-feature column set (the fields a clinician needs) through the responsive PppDataTable primitive, instead of dumping every DB field as a column. Internal/plumbing fields never render on screen; the full data set stays available via the CSV/PDF export path.#10028, #10023, #9893The #9893 table audit found /reports/multi-feature derived columns from Object.keys(row), producing 21/38/39 columns per section — up to 4,607px silently clipped at 768px, 4,269px at 1280px, and no mobile treatment (page 23,441px tall at 375px).
2026-06-26Added exportable-reports.mcr-crud-dialogs AC — back-fills the existing MCR create/view/edit/review/unsaved-changes dialog CRUD behaviour that was always built but never AC'd. No behaviour change — this is a documentation catch-up triggered by the #8220 SRP refactor which extracted MCRDialogs.tsx from the 952-line God-component.#9383, #9375, #8220The #8220 SRP refactor (PR #9383) split MultiConsultantReport/index.tsx into SRP sub-files including MCRDialogs.tsx. The spec-drift gate correctly flagged the new file under the MultiConsultantReport/** code-path glob. The dialog behaviour (create / view / edit / review / unsaved-changes guard) pre-existed and was verbatim-preserved — this AC back-fills what was always built. The refactor itself introduced no new behaviour.
2026-06-22Added code-paths: front-matter (Reports modules + reports-and-export/** procedures and services) and recorded the existing reports.feature BDD mapping.#9068, #9055, #9056SGD C6 drift — the built Exportable Reports spec had no code-traceability metadata; SGD C4 — coverage already lives in reports.feature, now mapped via bdd-features:.
2026-06-10Title page renders the working-calendar start month-only ("Working calendar starts: February") instead of "Practising since: d MMM yyyy"; the profile mapper now coerces the PgDateString value (the old instanceof-Date guard silently dropped it, so the line never rendered at all); new AC exportable-reports.title-page-month-only-start.#8479, #8420The field is a month-only picker (#8408) — MUI stores day=1 + the save-time year and the working-year resolver ignores the stored year, so the printed year went stale and was meaningless on a formal PDF (Option A decision on #8420).
2026-06-04Flipped exportable-reports.evidence-no-hyperlinks ⏳→✅ — it was implemented (evidence merged inline as PDF pages, no evidence URL/path column in the logbook CSV) but the AC still read in-progress. Closed the duplicate tracking issue #8215.#8215, #7297SGD alignment sweep (2026-06-04) found the spec lagging the code — the no-hyperlinks behaviour shipped alongside evidence-embedded-attachments under #7297.
2026-06-03Correct Closed-Q3 shareable-link TTL text from 7-day to 30-day default (configurable) to match shipped code.#8166SGD governance sweep — transcript-grounded audit found these questions already answered; reconciled the spec to shipped reality and moved them out of Open Questions.
2026-06-02Evidence PDFs are now merged (spliced) inline into the report appendix — each document's pages render in place after its cover row — rather than listed as a reference only.#8096, #7695Matt (2026-06-02 call) — evidence must be "professionally merged in" so a reviewer reads it in place; an attachment icon ("you can't get to it") and a hyperlink (security risk) are both wrong. Reworded the AC from "embedded as PDF attachments" to "pages merged inline".
2026-05-27Fixed the multi-feature report PDF export (was crashing pdfme's placeRowsOnPages with "Cannot read properties of undefined"). Rewrote it to a summary page plus one auto-paginated table per section (basePdf padding + staticSchema chrome), matching the working CPD Activities export. Added a non-mocked real-generate regression test and a new exportable-reports.multifeature-pdf-paginated AC. Also brought the Date Range From/To pickers on-brand and adaptive (side-by-side on desktop, stacked on mobile, design tokens, year visible) (#7822).#7803, #7822The export built N explicit full-page-height table pages; pdfme's cross-page Y-offset went negative and sent currentPageIndex below zero, so pages[-1].push crashed. Every existing pdfExport test mocked @pdfme/generator, so none exercised the real pagination path — hence the silent failure. Verified live with a real click producing an in-app preview blob and a 60-row auto-paginated real-generate test.
2026-05-26Added two transcript-sourced PDF-export ACs to exportable-reports.md § PDF export — (1) evidence is embedded as PDF attachments in the appendix, never linked, and (2) the export contains no hyperlinks to evidence on any render path. Mirrored the no-hyperlink security trace into cpd.md § CPD Report and added a @regression BDD scenario (@issue-7297).#7543, #7297SGD transcript audit of Dev Session 2026-03-11 §ExportableReports (~00:15:06 / ~00:23:27). Matt described the tiered structure and Rob confirmed "not considering hyperlinks for evidence, which is viewed as a security risk". The structure ordering was already covered by exportable-reports.three-tier-structure, but the no-hyperlink/embedded-attachment security requirement was only stated inside the compound cpd.export.report-structure bullet and had no discrete, individually-traceable AC in exportable-reports.md. No inference: every clause traces to the transcript paragraph.
2026-05-26Implemented the exported report's third tier — associated evidence documents — as a per-feature Evidence appendix section. Each activity with attached evidence is referenced by an authenticated relative route path (/r/:token/evidence/:id token-scoped for shared links, /api/reports/evidence/:id session-scoped for the owner) resolving to a fresh 5-minute SAS URL with ownership/disclosure checks and per-click audit logging — never a direct/public blob hyperlink.#7512, #7490Sub-issue of #7321 (dashboard deferred ACs). The evidence tier was genuinely unimplemented — appendix.ts rendered activity text only. Closes the positive requirement ("evidence in an appendix/attachments") while satisfying the security constraint ("no hyperlinks for evidence") by reusing the exportLinkService / publicReportRoute token model.
2026-05-26Reconciled the three-tier export-structure AC from ⏳ to ✅ (exportable-reports.three-tier-structure) — the export composes title page → Summary/Contents → feature one-pagers → detailed appendix. Doc-only; mirrors the dashboard.report.three-tier flip.#7498, #7489, #7321The #7321 spec audit verified the three-tier composition is already built in api/backend-ppp/src/services/reportPdfService/pages (titlePage→summaryPage→onePager→appendix) with CSV exporters under Reports/{CPD/UserActivities,MultiFeature}/utils/csvExport.ts. The marker was stale ⏳.
2026-05-20Pre-export per-feature disclosure selector UI on the Multi-Feature Report page — checkbox group for CPD / Surgical logbook / Retrospective, default all on, URL-synced via features query param, with inline validation and disabled export buttons when zero sections are selected.#6777, #6734Sub-issue 5/6 of #6675 (exportable peer-reviewed CV) — implements the doctor-controlled disclosure UI. Wires the selected feature set into useMultiFeatureData (already passes features to the backend) and the CSV/PDF exports so the on-screen preview and exported document match what the doctor opted in to share. Appraisals as a 4th toggle is spun out as a follow-up.
2026-05-20Shareable signed-link generation/revocation/listing tRPC procedures + public /r/:token Express viewer route + anonymous /report/:token frontend page with PPP footer branding.#6749, #6731Sub-issue 2/6 of #6675 (exportable peer-reviewed CV). Builds on #6730's HMAC token + DB layer to deliver the first end-to-end share flow: doctor generates → anonymous visitor opens → revocation invalidates.
2026-05-20New spec — 3-tier exportable peer-reviewed CV (Summary / Contents → feature one-pagers → Detailed appendix), PDF + shareable signed-link, PPP footer branding.#0Notion brief existed since 2026-04-22 but no engineering spec was authored; transcript 2026-05-20 confirmed scope, 3-tier structure, and footer branding decision.

Internal documentation — org members only