Repository navigation
feat(viewer): open a record on a justification with a reason (#6649) - #6714
Open
rubentalstra wants to merge 31 commits into
Open
rubentalstra wants to merge 31 commits into
rubentalstra wants to merge 31 commits into
Conversation
#6641) Parties lists the parties the CDR holds by kind, newest commit first, read through the CDR's AQL rooted at a demographic class, so the policy-party rule is the server's. A find narrows the list to the parties whose identities hold a text; it posts, so the text stays out of the address. A CDR that serves no demographic root keeps the open by uid and the tag index. The parties pages get their own catalog part.
…le (#6647) The Access log tab lists the EHR's access-log entries newest first, read from the CDR's access-log extension, filtered by action, outcome, kind of accessor, ground and day, and paged in the session. An entry shows the access, what it rested on with the reason stated for a justified or an emergency access, what it reached and the entry as served. The CDR decides which view the reader gets; a refused read says who may read the log.
….30 (#6689) ferrohealth-smart 0.35 signs and verifies every JWS in its own jws module over aws-lc-rs. The viewer names its launch key's algorithm in that type, so jsonwebtoken is a test fixture alone. ihe-iti 0.24 and ferrobridge-term 0.21 are the releases on ferrohealth-smart 0.35 that keep fhir-types 0.2, so the lock holds one copy of each family crate. A configured HS256 or none now fails to parse.
GET {ext}/access/purposes answers the [audit] reason_header beside the
purpose header, so a client states the reason of a justified access in
the header this deployment reads.
…to feat/viewer-justified-access
A refusal a justification answers (no care relationship, or a justification with no reason) is followed by a form: a purpose of use the CDR lists and the clinician's reason. The viewer keeps it in its server-side session for that EHR for 15 minutes, never in a cookie, and each CDR call drawing that EHR's pages declares the purpose and states the reason, percent-encoded, in the header the purposes route names. A notice shows it with End now. A sealed session store keeps no reason, so it says justified access needs the memory store; the hosted sandbox moves to the memory store.
…t/viewer-ehr-access-log # Conflicts: # app/ferroehr-viewer/src/paging.rs # app/ferroehr-viewer/tests/fixtures/cdr/manifest.json # app/ferroehr-viewer/tests/fixtures/cdr/recording.json # app/ferroehr-viewer/tests/it/ssr_app.rs # scripts/checks/stray-literals.allow
0.30.1 keeps the justification an operator states for one object with a memory-store session, which the viewer's justified access builds on.
…to feat/viewer-justified-access
# Conflicts: # website/book/src/viewer/img/parties/parties-dark.png # website/book/src/viewer/img/parties/parties.png
# Conflicts: # website/book/src/viewer/img/ehrs/ehr-dark.png # website/book/src/viewer/img/ehrs/ehr.png
# Conflicts: # .claude/rules/console-ui.md # app/ferroehr-viewer/src/locale.rs # app/ferroehr-viewer/tests/fixtures/cdr/manifest.json # app/ferroehr-viewer/tests/fixtures/cdr/recording.json
# Conflicts: # app/ferroehr-viewer/src/bff/mod.rs # app/ferroehr-viewer/tests/fixtures/cdr/manifest.json # app/ferroehr-viewer/tests/fixtures/cdr/recording.json # app/ferroehr-viewer/tests/it/main.rs
… feat/viewer-justified-access
# Conflicts: # scripts/checks/stray-literals.allow
# Conflicts: # scripts/checks/stray-literals.allow
…-access # Conflicts: # scripts/checks/stray-literals.allow
… feat/viewer-justified-access
…eded clinician (#6649) The docs-shots pass writes the seed's first policy version over its final one, captures the clinician's refused EHR with the justification form and the notice after stating one, and writes the final version back whatever the captures did. It runs after every other capture.
rubentalstra
marked this pull request as ready for review
November 26, 2026 20:16
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Nov 26, 2026
This branch has not been deployed
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.
A clinician can now open a record on a justification when FerroEHR refuses it for lack of a care relationship. The reason they give stays on the server.
refused-no-care-relationshiporrefused-reason-missingon an EHR's page, the refusal is followed by a form. It asks for a purpose of use, from the list{ext}/access/purposesreturns, and a required reason of 1 to 1000 characters with no control characters (booksecurity.md§Justified access outside the care relationships). The access policy decides, by purpose, whether this is a justification or an emergency; the viewer only states it.ferrohealth-session0.30.1Sessions::justify(ferrohealth-session keeps a stated justification with a memory-store session FerroSMART#902). It is never kept in a cookie, since the reason may hold health data (GDPR Art. 5(1)(c) and (f)). It lasts for that one EHR for 15 minutes, until End now, or until sign-out.[session] store = "sealed"keeps no reason. It says that justified access needs the server-side session store, names the key, and shows no form. The hosted sandbox moves to the memory store, so every shipped posture supports justified access. Several replicas sharing a store is ferrohealth-session: a server-side session store shared between console instances FerroSMART#904.GET {ext}/access/purposesnow also returnsreason_header([audit] reason_header), so the viewer uses the header the deployment reads. The served OpenAPI snapshot and the REST test follow.No openEHR specification governs the justification header, its bound or the viewer: FerroEHR's own design.
Tests:
justifiedunit tests: reason bounds, encoding, which refusals offer a justification.ssr_app::a_refused_record_offers_a_justification_that_holds_until_ended: the memory store draws the form and the notice and never puts the reason in a cookie; a sealed store explains why it offers none; End now ends it.an_empty_reason_keeps_no_justification, the sandbox posture test, andaccess_purposes_http.justificationauthorisation with the reason, then End now, then refused again.Closes #6649
This PR is stacked on #6679 (the
accesscatalog part) and carries it until that merges. #6698 is on main.