Module 19, Analytics & Reporting

Decision
Analytics Core

The Analytics module transforms raw hospital data into actionable insights. It provides dashboards (including rearrangeable GridStack overview widgets), reports, a drag-and-drop Report Builder, and AI-powered analysis to help management make informed decisions.

What is Analytics?

Analytics provides dashboards (real-time visual summaries of key metrics like patient count, revenue, occupancy), pre-built reports (patient, financial, pharmacy, inventory, operational), a Report Builder (drag-and-drop custom report creation without SQL knowledge), and AI-powered insights (predictive analytics and natural language querying).

It connects to every module in the system, extracting data from clinical, financial, and operational sources and presenting it in easy-to-understand charts, tables, and exports.

Why Does It Exist?

  • → No visibility — Hospital management can't improve what they can't measure
  • → Slow decisions — Without real-time data, decisions are based on gut feelings or old information
  • → Manual reporting — Exporting data to Excel and making reports manually is time-consuming and error-prone
  • → Missed trends — Without trend analysis, you might miss declining revenue or increasing no-show rates
Deep Dive

Every Feature Explained

Dashboards (GridStack)

What it is

Role-scoped overview dashboards with rearrangeable GridStack widgets.

Why it exists

Gives management immediate visibility into operations without digging through reports.

How it works

Widgets show patient counts, revenue, occupancy, wait times, and alerts. Layouts persist per user; widgets refresh with live data and respect module permissions.

Pre-Built Reports

What it is

Ready-to-use reports for common needs.

Why it exists

90% of reporting needs are standard. Pre-built reports save time.

How it works

Reports are organized by category: Patient (registrations, visits), Financial (revenue, collections, outstanding), Pharmacy (stock, expiry, consumption), Operational (occupancy, wait times).

Report Builder

What it is

FK-aware drag-and-drop custom report creation with scheduled delivery.

Why it exists

Not everyone knows SQL. Non-technical users should be able to create custom reports.

How it works

Users select fields and linked datasets from Prisma-mapped tables, set filters, and export. Dynamic joins enforce per-table module permissions; schedules use reports:schedule.

Scheduled Reports

What it is

Automatically generate and deliver reports on a schedule.

Why it exists

Regular reports (daily revenue, monthly stats) should not require manual effort.

How it works

Reports can be scheduled to run daily, weekly, or monthly. Results are saved and can be emailed to recipients. Historical reports are archived.

AI-Powered Insights

What it is

Ask questions in plain English and get answers from your data.

Why it exists

Not everyone can navigate complex reports. Natural language makes data accessible to everyone.

How it works

The AI analyzes your question, finds the relevant data, and generates a response or chart. Uses the AI gateway with SQL-safe guardrails.

Data Export

What it is

Export reports to Excel, CSV, or PDF.

Why it exists

Data needs to be shared with external stakeholders (government, auditors, insurance).

How it works

Exports respect permission boundaries. PII (patient names, phone numbers) can be auto-anonymized for research exports.

Technical Architecture

FieldTypeInstitutional Role
event_keyUUIDUnique analytical record identifier.
dimension_dataJSONBFlattened mapping of clinical and fiscal attributes.
sync_latencyIntTime-delta from clinical action to report availability.
is_anonymizedBooleanPII protection state for research exports.

Note: Sensitive fields use AES-256 field-level encryption where applicable.

Governance & Power

reports:view
reports:export
reports:builder
reports:builder
  • Report Builder Logic

    Users drag-and-drop any clinical or fiscal field into a custom export grid. The system auto-resolves joins to maintain performance.

  • Predictive Vitals

    Historical triage and surgical outcome data is piped through the AI engine to identify high-risk institutional trends.

  • Research Export

    Exports for scholarly research automatically strip all PII, replacing MRNs with ephemeral research IDs.