Files
stack/notebooks/snippets/query-pmpm.py
kert 227169d838
Some checks failed
ci/woodpecker/push/infra-ci Pipeline was successful
ci/woodpecker/push/deploy Pipeline failed
coverage 99% coverage
ci/woodpecker/push/ci Pipeline was successful
fix snippets: rewrite as marimo notebooks, disable defaults
Snippets were plain Python dicts — marimo expects actual notebook
files (marimo.App with @app.cell). Rewrote all 10 as proper marimo
notebooks that load_app() can parse.

Disabled include_default_snippets — only our project snippets show.

10 snippets: duckdb, trino, bib, nessie, s3-obstore, chart-bar,
chart-line, query-demographics, query-schema, query-pmpm.

refs #75
2026-03-21 20:58:19 -04:00

41 lines
796 B
Python

import marimo
__generated_with = "0.20.4"
app = marimo.App()
@app.cell
def _(mo):
mo.md(r"""
# Query: PMPM financial summary
Per-member-per-month cost breakdown by service category.
""")
return
@app.cell
def _(mo, q):
pmpm = q('''
SELECT year_month, member_months,
round(total_paid / member_months, 2) AS total_pmpm,
round(inpatient_paid / member_months, 2) AS inpatient_pmpm,
round(pharmacy_paid / member_months, 2) AS pharmacy_pmpm
FROM financial_pmpm.pmpm_payer
WHERE member_months > 50
ORDER BY year_month
''')
mo.ui.table(pmpm, label="PMPM by Month")
return (pmpm,)
@app.cell
def _():
import marimo as mo
return (mo,)
if __name__ == "__main__":
app.run()