Skip to content

docs(rfc): Spike for reconstructing the narrative#1328

Merged
robertmitchellv merged 5 commits into
mainfrom
robert/1241-narrative-reconstruction-spike
Jun 11, 2026
Merged

docs(rfc): Spike for reconstructing the narrative#1328
robertmitchellv merged 5 commits into
mainfrom
robert/1241-narrative-reconstruction-spike

Conversation

@robertmitchellv

@robertmitchellv robertmitchellv commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator

🔀 PULL REQUEST

💡 Summary

Adds RFC proposing how the refiner will rebuild a section's human-readable
<text> from the entries that survive pruning, starting with Results, Problems,
Medications, and Immunizations.

This is documentation only--no application code changes. The RFC records the
architecture decision and the reasoning behind it; implementation follows in a
later PR once the approach is reviewed.

In short, the chosen approach ("Option C") splits the work into three layers:
shared mechanical primitives written once (a typed-value renderer, a field
extractor, a table builder); per-section field maps as data (keyed by
template_id); and short per-section join functions as code that handle the
structural reach into ancestors/siblings. The RFC explains why this beats both a
fully-hardcoded approach and a fully-data-driven one, and how the field maps
become a down payment on the future template-aware matching engine without
building it now.

A runnable companion script (reconstruction_toy.py) demonstrates the design
end-to-end on a small eICR fragment.

Please review the RFC itself for the full context, options comparison, and
deferred questions:

  • docs/rfc/0010-narrative-reconstruction.md

🔗 Related Issue

Fixes #1241

✅ Acceptance Criteria

🧪 How to test

You can run the toy example folded into the RFC if you'd like to test things out.

ℹ️ Additional Information

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

🔒 Security Scan Results

⚠️ Found 15 vulnerabilities

Severity Total
🟠 High 12
🟡 Medium 3

📦 refiner-app

No vulnerabilities found

📦 refiner-lambda

Severity Count
🟠 High 4

📦 refiner-ops

Severity Count
🟠 High 8
🟡 Medium 3

View detailed results: Security tab
Last updated: 2026-06-11 16:17:34 UTC

@robertmitchellv robertmitchellv marked this pull request as ready for review June 8, 2026 19:06

@jakewheeler jakewheeler left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work Robert 🎉

@robertmitchellv robertmitchellv added this pull request to the merge queue Jun 11, 2026
Merged via the queue into main with commit a8fb29e Jun 11, 2026
19 checks passed
@robertmitchellv robertmitchellv deleted the robert/1241-narrative-reconstruction-spike branch June 11, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SPIKE] Narrative reconstruction for Results

2 participants