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.
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
| Who | Role in the application | Identity in LumoAuth |
|---|---|---|
| Clinician | Reads and writes records. | A user with attributes: department, shift, clearance. Signs in through the hospital's identity provider. |
| Privacy officer | Reviews access. | A user with access to the audit log and the GDPR tools. |
| Patient | Reads their own record. | A user in a separate application. |
Flows
| Flow | What happens | What LumoAuth does |
|---|---|---|
| Policy | The officer writes the rule in plain words, reviews the proposal and applies it. | Creates the attribute policy. |
| Read | A clinician opens a record. | The API sends the resource and the action. The server adds the network and the time. |
| Refused | A clinician off shift tries. | A deny, with the attribute that failed. |
| Break glass | The clinician states an emergency. | A step-up with a second factor, access for one hour, and a webhook to the officer. |
| Review | The officer reads who opened the record. | Audit events, also in the hospital's SIEM. |
| Patient request | A patient asks for their data. | A data subject request with an export. |
Parts
| Part | Built with | Job |
|---|---|---|
| Portal | Next.js, @lumoauth/nextjs | Records, the break-glass dialog, the review page. |
| Records API | FastAPI, 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
- Open a record as a clinician on shift.
- Change the shift, and read the refusal.
- Break the glass.
- Read the override as the privacy officer.
- 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.