Skip to main content

Carepoint

A clinical records portal in which attributes decide access: care team, shift and network. It includes an emergency override and the records that GDPR asks for.

ApplicationPlanned
This example is planned. Not built yet. This page is the specification for the example.
Works with
JavaScript / TypeScriptPythonNext.jsFastAPI
Stack
Next.js portal, FastAPI records API

Scenario​

A clinician may read a patient record when three things are true: they are on the care team of the patient, they are on shift, and they are on the hospital network. In an emergency a clinician can break the glass: access is given, a reason is required, and the privacy officer is told at once. The same portal answers a patient who asks for a copy of their data.

People and agents​

WhoRole in the applicationIdentity in LumoAuth
ClinicianReads and writes records.A user with attributes: department, shift, clearance. Signs in through the hospital's identity provider.
Privacy officerReviews access.A user with access to the audit log and the GDPR tools.
PatientReads their own record.A user in a separate application.

Flows​

FlowWhat happensWhat LumoAuth does
PolicyThe officer writes the rule in plain words, reviews the proposal and applies it.Creates the attribute policy.
ReadA clinician opens a record.The API sends the resource and the action. The server adds the network and the time.
RefusedA clinician off shift tries.A deny, with the attribute that failed.
Break glassThe clinician states an emergency.A step-up with a second factor, access for one hour, and a webhook to the officer.
ReviewThe officer reads who opened the record.Audit events, also in the hospital's SIEM.
Patient requestA patient asks for their data.A data subject request with an export.

Parts​

PartBuilt withJob
PortalNext.js, @lumoauth/nextjsRecords, the break-glass dialog, the review page.
Records APIFastAPI, lumoauth[fastapi]An attribute check on every read and write.

What the seed script creates​

  • Attribute definitions and values for three clinicians.
  • Two policies: the care-team rule and the break-glass rule.
  • A required second factor.
  • A log destination.
  • A webhook for the override.

Walkthrough​

  1. Open a record as a clinician on shift.
  2. Change the shift, and read the refusal.
  3. Break the glass.
  4. Read the override as the privacy officer.
  5. Export the data of a patient.

Before you run it​

  • Create the organization in the EU region to keep the data there.
  • Check that your plan includes fine-grained authorization in the plans matrix.