feat(documents): filter the archive by procedure or surgery

The vault's filter row gains a procedure facet beside the condition
facet. It lists the record's procedures and surgeries that hold at least
one live document, headed the way the visits page heads them (the
reason, else the practice, else the kind) with the body site and date
beneath, and narrows the list through the existing `encounterId` filter.
Same control, placement and clear behaviour as the condition facet; the
choice rides the URL as `?encounter=`, and an upload dropped into the
filtered view is filed against the procedure.

The usage read publishes the choices as `linkedProcedures` (additive),
decrypting only the label columns, and returns none when a sharing
grant does not cover the visits section.

On a phone an active facet now gives up label width before the search
field does, and the search keeps room for its icon and padding.
This commit is contained in:
Marc-André Bombeck committed 2026-10-04 21:59:22 +02:00
1 parent dc7061634e
commit 0219a85e92
24 files changed
+1308 -54

No files matched your search

+47 -3
View File
@@ -16410,7 +16410,8 @@ paths:
required: false
schema:
type: string
description: Only documents linked to this visit.
description: Only documents linked to this visit. The procedure filter sends a `linkedProcedures` id from the usage
read; an id that is not one of the caller's visits matches nothing.
- name: year
in: query
required: false
@@ -16744,8 +16745,11 @@ paths:
summary: Storage usage + effective limits
description: "The caller's vault usage and effective limits: `usedBytes` (every non-purged row — tombstones inside the
30-day undo grace still count), `quotaBytes` (per-user override ?? instance default), `maxFileBytes`
(admin-tunable per-file cap), `acceptedExtensions` for picker `accept` lists, and `linkedEpisodes` (episodes
carrying at least one live document link — the condition-filter chips). Read this before offering an upload."
(admin-tunable per-file cap), `acceptedExtensions` for picker `accept` lists, `linkedEpisodes` (episodes
carrying at least one live document link — the condition-filter chips), and `linkedProcedures` (visits of kind
PROCEDURE carrying at least one live document link, newest first — the procedure-filter choices; pass one's
`encounterId` to the list's `encounterId` filter). `linkedProcedures` is empty when a sharing grant does not
cover the visits section. Read this before offering an upload."
responses:
"200":
description: Usage + limits.
@@ -68514,6 +68518,45 @@ components:
- episodeId
- name
additionalProperties: false
linkedProcedures:
type: array
items:
type: object
properties:
encounterId:
type: string
occurredAt:
type: string
format: date-time
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
reason:
anyOf:
- type: string
- type: "null"
bodySite:
anyOf:
- type: string
- type: "null"
laterality:
anyOf:
- type: string
enum:
- LEFT
- RIGHT
- BOTH
- type: "null"
practitionerName:
anyOf:
- type: string
- type: "null"
required:
- encounterId
- occurredAt
- reason
- bodySite
- laterality
- practitionerName
additionalProperties: false
assistAvailable:
type: boolean
description: "Whether a document read can run for this record now: a provider can serve it and the `documentAi`
@@ -68539,6 +68582,7 @@ components:
- maxFileBytes
- acceptedExtensions
- linkedEpisodes
- linkedProcedures
- assistAvailable
- contentIndex
additionalProperties: false