• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

medplum / medplum / 26603157644
92%
main: 92%

Build:
Build:
LAST BUILD BRANCH: cody/pin-server-images
DEFAULT BRANCH: main
Ran 28 May 2026 09:46PM UTC
Jobs 1
Files 798
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 May 2026 09:24PM UTC coverage: 92.037% (+0.007%) from 92.03%
26603157644

push

github

web-flow
fix(server): derive bare-id reference prefix from SearchParameter.target (#9325)

* fix(server): derive bare-id reference prefix from SearchParameter.target (closes #9254) (#9256)

* fix(server): derive bare-id reference prefix from SearchParameter.target

Closes #9254

Reference search parameters with a single target resource type now accept
bare ids (the spec-compliant form per FHIR R4 §3.1.1.4.12). Previously, the
bare-id → typed-reference fixup in `buildReferenceSearchFilter` was
hard-coded to the `subject` and `patient` columns, so queries like
`DeviceRequest?encounter=<uuid>` silently returned an empty bundle.

The new behaviour:

  - For literal (non-canonical) reference search parameters whose underlying
    `SearchParameter.target` has exactly one entry, the column impl now
    carries a pre-computed `singleTargetType`. `buildReferenceSearchFilter`
    uses it to prefix bare UUID values with `Type/` before they hit the
    WHERE clause.
  - The existing `subject`/`patient` → `Patient/` fallback is preserved
    verbatim for back-compat on multi-target refs (e.g. `Observation.subject`
    targets [Patient, Group, Device, Location]).
  - Canonical reference params and non-UUID slashless values are left
    untouched to avoid corrupting URNs, canonical URLs, and other
    non-id values.

This mirrors the `searchParam.target?.length === 1` pattern already used
by chained search (`parseChainLink`) in the same file.

Tests cover `DeviceRequest.encounter`, `PractitionerRole.practitioner`,
the array reference column `Encounter.location`, the typed-prefix control,
back-compat for `Observation.subject`, and the non-uuid safety case.

Signed-off-by: Abhishek Gupta <98358742+AbhiMsft@users.noreply.github.com>

* Fix single-target reference derivation for shared search parameters

Shared search parameters like 'encounter' have multiple global targets
(Encounter, EpisodeOfCare), but individual resource types like
DeviceRequest.encounter only target En... (continued)

21654 of 24391 branches covered (88.78%)

Branch coverage included in aggregate %.

28 of 28 new or added lines in 3 files covered. (100.0%)

35555 of 37768 relevant lines covered (94.14%)

23388.7 hits per line

Jobs
ID Job ID Ran Files Coverage
1 26603157644.1 28 May 2026 09:46PM UTC 943
92.28
GitHub Action Run
Source Files on build 26603157644
  • Tree
  • List 798
  • Changed 90
  • Source Changed 3
  • Coverage Changed 90
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #26603157644
  • 816a1849 on github
  • Prev Build on gh-readonly-queue/main/pr-9322-1a0187381d686118e4d5e8c3fe4b79d6cb219d6f (#26592762929)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc