fix(paperwork-pdf): use friendly patient ID on Paperwork PDF#8003
Open
alexwillingham wants to merge 1 commit into
Open
fix(paperwork-pdf): use friendly patient ID on Paperwork PDF#8003alexwillingham wants to merge 1 commit into
alexwillingham wants to merge 1 commit into
Conversation
The Paperwork PDF was still rendering the raw FHIR Patient UUID in its "PID:" field instead of the friendly patient identifier. PR #7795 moved the other PDFs (discharge summary, visit note, progress note) onto the friendly ID via getPatientFriendlyId(), but the Paperwork PDF was missed. Swap patient.id for getPatientFriendlyId(patient) so it matches the rest of the PDFs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR #7795 moved most of our PDFs onto the friendly patient identifier (
getPatientFriendlyId()) instead of the raw FHIRPatient.idUUID. The Paperwork PDF was missed in that change — it was still rendering the raw UUID in itsPID:field.This PR fixes that gap so the Paperwork PDF is consistent with the discharge summary, visit note, and progress note PDFs.
Change
In
packages/zambdas/src/ehr/paperwork-to-pdf/document.ts, the patient infoidis now sourced fromgetPatientFriendlyId(patient)rather thanpatient.id ?? ''. Thedraw.tsrenderer already prints this value asPID: <id>, so no rendering changes were needed.This mirrors the exact pattern used in PR #7795 for
sections/patientInfo.tsandsections/discharge-summary/patientInfo.ts(an unconditional swap of the existing, always-shown ID field).Testing
PIDfield, so none required updating.getPatientFriendlyIdis already exported fromutilsand imported the same way by the sibling PDF section files.🤖 Generated with Claude Code
https://claude.ai/code/session_01SsAo3ZztQLx47iBKXFA8t5
Generated by Claude Code