fix: bound generated questionnaire and extraction resource IDs - #1102
Open
rob-reynolds wants to merge 1 commit into
Open
rob-reynolds wants to merge 1 commit into
rob-reynolds wants to merge 1 commit into
Conversation
Normalize complete generated composites to legal logical IDs of at most 64 characters, retaining legal IDs and deterministic full-input digests. Use the logical Questionnaire ID for generated responses. References read final resource identities; supplied IDs, subject references and linkIds remain unchanged. Transaction URLs and existing id-less outcome behavior remain separate limitations.
|
Formatting check succeeded! |
|
JPercival
approved these changes
Sep 9, 2026
barhodes
requested changes
Sep 9, 2026
barhodes
left a comment
Contributor
There was a problem hiding this comment.
Would like to look at adding this into the definition based population branch to avoid merge conflicts down the road.
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.



QuestionnaireResponse and extraction IDs are composed from several individually valid inputs, so the final ID can exceed FHIR's 64-character limit. On main, composing a response ID from a qualified/versioned Questionnaire ID can also append the subject suffix to the version component instead of creating a new logical response identity.
Normalize complete generated IDs at their final creation sites. Preserve already-valid IDs; otherwise use a sanitized, bounded stem plus 12 hexadecimal SHA-256 characters derived from the complete original input. Generate QuestionnaireResponse IDs from the Questionnaire's logical ID. Supplied IDs, subject references, canonicals and linkIds remain unchanged; generated references read the resulting resource identity.
Scope
QuestionnaireResponse, extracted resources, extraction Bundle and contained OperationOutcome IDs. The short digest is deterministic, not collision-proof. Existing id-less outcome suffix behavior is retained. This does not repair extraction transaction URLs or establish transaction persistence readiness.
Validation
This PR is stacked on codex/qr-coding-extraction so its diff contains only the ID correction. Merge the Coding PR first, then retarget this PR to main. A matching tested v4.7.0 backport is pushed on codex/qr-extraction-backport. No installed runtime or release was replaced.