Skip to content

🧪 Auto-PR: Merge develop → test - #1025

Merged
proxy-smart-releaser[bot] merged 3 commits into
testfrom
develop
Aug 16, 2026
Merged

🧪 Auto-PR: Merge develop → test#1025
proxy-smart-releaser[bot] merged 3 commits into
testfrom
develop

Conversation

@proxy-smart-releaser

Copy link
Copy Markdown
Contributor

Automated Pull Request 🤖

Commits ahead of test: 2
Commits behind test: 0
TODOs remaining in codebase: 3

quotentiroler and others added 3 commits August 16, 2026 14:02
…field

`application/smart-api-access` has an optional `query` — "array of strings
acting as hints to the client, indicating queries it might want to make"
(SHL protocol spec; HL7 smart-health-cards-and-links IG). We never emitted
it, and that gap is the whole reason `complete` exists: a scoped link had no
way to say what it WAS, so a boolean was added saying what it was not.

A study-scoped share now carries

  "query": ["ImagingStudy?identifier=urn:oid:<uid>"]

which is the identifier filter scopeFhirRequest already forces, so the query
the recipient is handed is exactly the one the proxy allows. A test asserts
that agreement rather than trusting the two strings to stay in step.

This is what fixes the behaviour behind the original report. The proxy is
default-deny, so a viewer holding a study link fired its usual record sweep
and had almost all of it rejected — which the portal drew as a dashboard of
empty cards, and then as "complete summary" over the top. Hiding empty cards
treated the symptom; a recipient that knows what to ask for does not generate
them.

Whole-patient shares deliberately get no hints. Listing the reachable types
would name the withheld ones by omission, which is more than the patient
agreed to disclose.

`maxhealth_records_withheld` replaces what is left of `complete`: whether the
patient held records back. Nothing in either spec describes that, so it is
prefixed rather than dressed up as standard. Note it is FALSE for a
study-scoped share — scoping is what the link is for, not withholding, and
conflating the two is what made `complete` useless to both viewers.

`complete` is still emitted and marked deprecated; the deployed portal reads
it, and absent would read as "complete" there. It goes once both viewers ship.

Also fixed: isCompleteShare took `selectiveScope?: unknown` and tested
truthiness, so a present-but-empty scope counted as narrowing. The mint site
normalises that to undefined so it never fired, but the invariant lived at the
call site rather than in the function, and `unknown` is what stopped it using
isSelectiveScopeActive two functions below. Now typed and delegating, with a
test for the empty case.
@proxy-smart-releaser
proxy-smart-releaser Bot merged commit e39f602 into test Aug 16, 2026
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.

1 participant