Skip to content

device issues dashboard - #254

Open
ewollesen wants to merge 12 commits into
eric-migrate-pending-data-sourcesfrom
eric-di-endpoint
Open

device issues dashboard#254
ewollesen wants to merge 12 commits into
eric-migrate-pending-data-sourcesfrom
eric-di-endpoint

Conversation

@ewollesen

Copy link
Copy Markdown
Contributor

No description provided.

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
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