MetaclinicMetaclinic Start a conversation

The structure

Multi-tenant, and the tenants have relationships

Multi-tenant usually means isolation: each customer in a sealed box. Diagnostic data does not work that way. A laboratory reports to a practice, the practice consults a specialist at another organization, a delegated biller codes the case, a firm holds a lien on the receivable, and the patient stands outside all of them holding a legal right to the whole thing. The interesting part of the model is not the walls. It is the doors.

Three nested machined enclosures, only the innermost lit, its light stopping at the boundary containing it.
A boundary that holds is one in the database, not one in the interface.

Four layers, not one

org · suborg · role · grant
Organization
The contracting entity. A laboratory, a practice group, a firm, a management company. Owns the agreement and the data classes in scope.
Sub-organization
Location, division, or department. Real, addressable, and permissioned independently, because a practice with eleven sites does not want one worklist and a pathology group with two divisions does not want shared sign-out.
Role
What a member can do inside their own organization. Coarse enough to administer, specific enough that a coder is not a clinician and a front-desk user cannot open a molecular panel.
Grant
An edge that crosses a tenant boundary, attached to a case or a matter, with an expiry. Grants are the entire cross-organization access story. There is no standing permission to look at another tenant's data.

Why grants are edges and not roles

A consulting specialist given a role in the referring practice's tenant would keep that access after the consult ends, and would see every other patient in the tenant. A grant on a case expires and cannot widen. The distinction sounds academic until the first audit.

Enforcement has a floor

row-level security

Application code decides what to show. The database decides what can be read at all. Both are necessary and only the second one holds when the application has a bug, which it eventually will.

  • Row-level policy in the database keyed to tenant and grant, evaluated on every query rather than assembled in application logic.
  • A policy decision point for attribute and relationship checks that are too expressive for a table of roles, with decisions logged.
  • Deny by default. A new data class is invisible until a rule releases it, which means the failure mode of forgetting to write a rule is a support ticket rather than a breach.
  • No shared administrative account has read access to clinical data. Support access is a break-glass event.

Break-glass

logged, notified, time-boxed

There are real emergencies: a critical result routed to a tenant that cannot be reached, an integration failure during a sign-out backlog, a patient in an emergency department whose prior pathology is behind a grant that expired. Pretending otherwise produces shared passwords.

  1. The user states a reason from a fixed list plus free text. Access is not granted against an empty reason field.
  2. Access is granted for a bounded window, scoped as narrowly as the situation allows.
  3. The affected tenant's administrator is notified when it happens, not in a monthly report.
  4. Every break-glass event is reviewed. A user with a pattern of them has a workflow problem, a training problem, or a permissions problem, and all three are worth finding.

The audit record is a product surface

who saw what, when

Access logging is usually built for a hypothetical future investigator. Ours is built to be read: a patient can see who accessed their record, an administrator can see what left their tenant, and a firm can see exactly what was produced on a matter and when. The same record answers an accounting of disclosures request without a special project.

one specimen, nine release events
14:02
Specimen received
Accession created, requisition parsed, order matched to the referring practice tenant.
Laboratory tenant
14:03
Patient identity linked
Probabilistic candidate held for review rather than auto-merged. A false link is a disclosure to the wrong person.
Cross-tenant identity
09:41
Result verified and released to the ordering clinician
Discrete values mapped to LOINC, reference interval carried from the performing laboratory.
Laboratory tenant → practice tenant
09:41
Released to the patient
Same moment, no administrative hold. Plain-language summary generated above the report, never in place of it.
Patient identity
09:41
Ordering clinician notified of the abnormal flag
So the conversation happens quickly. Notification and open state are both recorded.
Practice tenant
09:44
Coder opens the report
Final diagnosis and specimen list visible. Slide images are not, because coding does not require them.
Billing tenant
11:20
Consulting specialist granted the case
One case, twenty-one days, expiring on a date rather than on a promise.
Grant across tenants
16:08
Firm requests records on the matter
Authorization parsed. Chemistry and pathology released; the Part 2 toxicology result is withheld and the omission is reported by name.
Firm tenant
16:08
Disclosure recorded
Requester, purpose, basis, classes released, classes withheld, and the result version current at release.
Audit record

Which stakeholder is currently asking you for data you cannot easily give them?

That is the useful first conversation, and it is a short one. Bring the laboratories, the practices, and the thing that breaks today.

service@meta.clinic Read the release model first