Self-service analytics lets department heads, quality teams and analysts build their own reports instead of queuing requests with a central data team. Over clinical data, that freedom only works if each person sees the rows their job requires and nothing more, enforced in the BI layer rather than left to report authors.
Startup founders and product or engineering leaders building analytics for hospitals, clinics or health plans will find how to model department and role rules, what a BI tool enforces and what it does not, and how to test the rules before release.
What is self-service analytics over clinical data?
Self-service analytics over clinical data gives trained staff a governed semantic model they can query, filter and chart on their own, while row-level security limits each user to the departments, sites or patient groups their role covers. The data team owns the model and the rules; users own their reports.
Building analytics on clinical data?
We design the semantic model, the entitlement tables and the row-level rules, then test them user by user.
Row-level security filters the data itself, so a cardiology manager who builds a new chart still sees only cardiology rows. The rule travels with the model, not with any single report.
Why put row-level security in the BI layer?
Row-level security belongs in the BI layer because self-service means users create reports nobody reviewed. Hiding a filter pane or publishing separate reports per department fails the moment someone builds a fresh visual on the shared model.
Under 45 CFR 164.514(d)(2), a covered entity must identify the people or classes of people in its workforce who need access to protected health information to do their jobs, the categories of information each one needs and any conditions on that access, and must make reasonable efforts to limit their access to match.
Department and role rules in the semantic model are a practical way to carry out that duty for analytics users. They turn a written access policy into a filter the tool applies on every query.
How do you map departments and roles to rows?
Map departments and roles to rows with an entitlement table that links each user's sign-in identity to the departments, sites or care programs they may see, then filter the clinical tables through it.
- Entitlement table: one row per user and allowed department or site, loaded from the identity provider or HR system.
- Dimension link: the department or site dimension joins both the entitlement table and the fact tables.
- Dynamic rule: one role filters the entitlement table by the signed-in user's identity, so a single rule serves everyone.
- Wide-access roles: a separate role for quality or executive users who need every department, granted on purpose.
Dynamic rules scale better than one static role per department. Adding a new clinic becomes a data change in the entitlement table, not a model change and a redeploy.
Which access rules does a clinical model usually need?
A clinical model usually needs a small set of rule patterns that combine department, site and purpose, agreed with the privacy officer before anyone writes a filter.
| User group | Rows they see | Points to settle |
|---|---|---|
| Department manager | Encounters, orders and outcomes for their own department | Shared patients who move between departments |
| Site lead | All departments at their site | Staff who cover more than one site |
| Quality and safety team | All departments, for measures they report | Whether identifiers are needed or aggregates are enough |
| Finance analyst | Billing and cost rows across departments | Whether clinical detail columns are visible at all |
| Researcher | A de-identified or limited data set only | Approval records and a separate model |
What does the BI tool enforce, and what does it not?
The BI tool enforces the row filters for the users the rules apply to, but each tool has documented gaps that the design has to cover. Power BI is a common example.
Microsoft's Power BI documentation says row-level security filters data at the row level through rules defined in roles, and that it only restricts users with Viewer permissions. It does not apply to people in the workspace Admin, Member or Contributor roles.
That means report authors with edit rights on the workspace see every row. Keep the clinical semantic model in a workspace where most users hold only the Viewer role, and give edit rights to a small, named group.
The same Microsoft documentation says a user in more than one role sees the rows of all those roles, because roles are additive, and that row-level security cannot hide columns: a user who can see a row sees every column in it. Microsoft points to object-level security for column restrictions.
Additive roles change how you design. A user placed in both a department role and a wide-access role gets the wide view, so membership must be reviewed as a set, not role by role. Sensitive columns such as names, record numbers or free-text notes need object-level security or a separate model.
Where should the rules live: warehouse or semantic model?
The rules can live in the warehouse, the semantic model or both, and the choice depends on how the BI tool connects and who else queries the data.
- Semantic model rules: simpler to manage for BI users, but they protect only queries that go through that model.
- Warehouse rules: protect every tool and notebook that queries the tables, at the cost of more database administration.
- Both: the warehouse limits each service account, and the model applies per-user department rules on top.
Check how your BI tool treats source-system security for each connection mode before deciding, because imported data and live queries can behave differently.
How do you keep small counts from identifying patients?
Small counts can identify patients even when rows are filtered correctly, so self-service models over clinical data need rules for small cells as well as rows.
- Agree a suppression rule with the privacy officer for counts shown to broad audiences.
- Apply it in measures inside the model, so every new report inherits it.
- Keep patient-level drill-through for roles that are allowed to see patient-level detail.
Which data should the self-service model expose?
The self-service model should expose curated tables built for questions departments actually ask, not a copy of every EHR table. A smaller model is easier to secure, faster to query and easier for non-specialists to use correctly.
- Facts: encounters, orders, results, procedures and length of stay, each tied to a department and site.
- Dimensions: dates, departments, sites, payers and diagnosis groups with plain-language names.
- Measures: agreed definitions such as readmissions or wait times, written once in the model.
- Excluded by default: free-text notes, full addresses and identifiers no report needs.
Every table added later should arrive with its department key, so the existing row rules cover it from day one.
How do teams roll out row-level security step by step?
- Step 1, write the access policy: which roles see which departments, sites and columns, signed off by privacy and clinical leads.
- Step 2, build the entitlement feed from the identity provider or HR system, with a daily refresh.
- Step 3, model the rules: dynamic row filters, wide-access roles and column restrictions.
- Step 4, set workspace permissions so most users are viewers.
- Step 5, test with a user matrix and real accounts.
- Step 6, release to one department, review questions and access requests, then widen.
How do you test row-level security?
Test row-level security with a written matrix of test users, their roles and the row counts each should see, then check every cell with the tool's role testing and with real sign-ins.
- Single-role users: confirm each sees only their department's rows on every page and visual.
- Multi-role users: confirm the combined view is what the policy intends.
- No-role users: confirm they see nothing rather than everything.
- Movers: change a test user's department in the entitlement feed and confirm the view changes after refresh.
- Exports: check that downloads and analyze-in-spreadsheet features return the same filtered rows.
Role-testing features in BI tools usually run under the tester's own identity. Dynamic rules based on the signed-in user still need checks with genuine test accounts.
Keeping entitlements current
Entitlements go stale when people change jobs, so the feed that drives them matters as much as the filter expression.
Load entitlements from the system that already knows about joiners, movers and leavers, refresh them at least daily, and log every change. Send a periodic access report to department heads so they can confirm who sees their data.
What are the common mistakes with self-service analytics security?
The common mistakes with self-service analytics security come from treating access as a report setting instead of a property of the data model.
- Security by report: separate reports per department on one unsecured model.
- Authors as editors: everyone gets contributor rights, so row rules never apply to them.
- Hand-kept user lists: role membership typed in by hand and never updated when staff move.
- Forgotten columns: rows are filtered, but names and record numbers stay visible to everyone with access.
- Testing as admin: the developer checks the rules from an account the rules do not apply to.
What does row-level security mean for your build plan?
Row-level security adds an access policy, an entitlement feed, model rules and a test matrix to the analytics plan. Each is modest, but the policy needs sign-off from people outside engineering, so start it early.
- Schedule policy workshops with privacy, clinical and finance leads before modeling starts.
- Treat the entitlement feed as a data pipeline with monitoring and alerts.
- Budget time for test accounts and a test matrix for every role pattern.
- Plan a periodic access review with department heads.
How does Agnotic build secure self-service analytics?
Agnotic Technologies builds the semantic model, the entitlement feed and the row and column rules for your BI tool, sets workspace permissions and tests the rules user by user. Your analysts get freedom to build reports, and your privacy team gets rules they can review.
Give analysts freedom without widening access
Rules in the model hold for every report users create.
Related reading on Agnotic
Analytics, data engineering and access control.


