Skip to content

transaction: bundle references are stored unresolved — urn:uuid fullUrls are not rewritten and conditional references are never resolved #459

Description

@angela-helios

Found by the #448 R4 parameter sweep (SQLite, main @ 2026-07-30), ingesting Synthea transaction bundles.

1. urn:uuid references survive into storage

Synthea bundles reference sibling entries by fullUrl (urn:uuid:<id>). After a successful transaction, the stored resources still carry the urn:

GET /Observation?_count=1 → .subject.reference == "urn:uuid:8712799b-3834-10cc-87b8-9474304f2d04"

Per the Bundle processing rules the server must rewrite references to bundle entries to the ids it assigned. Search mostly papers over it — the indexer evidently strips the prefix and the uuid happens to equal the assigned id, so Observation?patient=<id> works — but any client that reads the resource gets a dangling urn:uuid, and Observation?subject=urn:uuid:<id> (the literal in the body) matches nothing.

2. Conditional references are stored verbatim

GET /Immunization?_count=1 → .location.reference == "Location?identifier=https://github.com/synthetichealth/synthea|62163921-…"

Transaction processing is supposed to resolve conditional references against the server's data (or reject). Stored as-is they are unsearchable (Immunization?location=… can never match) and unresolvable by any client.

Both are the same subsystem (bundle reference resolution at commit); Synthea is a convenient repro because it uses both styles heavily. Practitioner/Organization-side references from the batch bundles show the same behavior.

Part of the #448 sanity pass.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions