device issues dashboard - #254
Open
ewollesen wants to merge 12 commits into
Open
Conversation
ewollesen
force-pushed
the
eric-di-endpoint
branch
from
August 11, 2026 08:15
f69a2b8 to
b72f28d
Compare
ewollesen
force-pushed
the
eric-di-endpoint
branch
from
August 19, 2026 09:27
b72f28d to
3c7c887
Compare
Add a GINKGO_PACKAGES override to the Makefile to allow running a single package's tests, and use Docker cache mounts to speed up image builds.
A patient with a data source but no connection request for the same provider would cause a nil pointer dereference when formatting the data source state.
The primary (active) device is the provider of the most recently connected data source, or the provider of the most recent connection request. It is exposed (read-only) in the patient API so that the frontend and backend agree on which device various dashboards apply to. BACK-4319
POST /v1/device_issues triggers a scan of all patients, updating each patient's device issues. It is restricted to backend services, and is expected to be called periodically via the work system. The scan itself doesn't detect any issues yet; detection of each kind of device issue will follow separately. The integration test helpers added here back those upcoming detection tests. BACK-4382
A patient whose primary device is connected, but whose latest data is older than 48 hours, gets a staleData device issue. The issue's effective time is the moment the data became stale. Issues are removed again once fresh data arrives, both when the data source is updated and during the periodic device issues scan (for extra safety). BACK-4253
A patient with a provider connection request whose expiration time has passed gets an expiredConnectionInvitation device issue. The issue's effective time is the most recent expiration among the patient's expired invitations. BACK-4252
A patient whose most recent provider connection request is older than 48 hours and still unanswered gets a staleConnectionInvitation device issue. Only the newest request per provider matters, because requests are stored in reverse chronological order. BACK-4254
A patient with a disconnected data source gets a disconnected device issue, effective from the moment the data source was last modified. The periodic scan also removes the issue once no data source remains disconnected. BACK-4317
A patient with a data source in the error state gets an erroring device issue, effective from the moment the data source was last modified. The periodic scan also removes the issue once no data source remains in the error state. BACK-4318
When a patient's data sources are updated, compare the primary device's prior and new states: transitions into the disconnected or error state create the matching device issue immediately, transitions out of them remove it, and a reconnection updates the primary device and clears all issues. This keeps the dashboard current between runs of the periodic scan. BACK-4317 BACK-4318
The patients list endpoint accepts a deviceIssues query parameter (a comma-separated array of issue names) so that the device issues dashboard can list only patients experiencing any of the given issues. BACK-4319
Clinicians can dismiss a device issue by setting its hidden attribute (a timestamp): via the patient update endpoint; only the hidden attribute is writable by clients. The patients list endpoint gains an omitHiddenDeviceIssues parameter that redacts hidden issues from the response and drops patients left without any visible issues. Re-detection preserves a hidden dismissal: the periodic scan sets individual issue fields rather than replacing the subdocument, and the disconnected/erroring queries skip data sources whose issue is already hidden for the same provider. BACK-4316
ewollesen
force-pushed
the
eric-di-endpoint
branch
from
August 24, 2026 12:43
3c7c887 to
e76187c
Compare
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.
No description provided.