Small experiments in building with OHS.
Building with OHS and testing AI for digital health, measured and shared in the open.
Small, open experiments on the OHS stack. Open a card for the setup, measurements, and repos.
We had AI coding agents build the same offline-first antenatal care app four ways. With the OHS libraries and Agent Skills, five models built a fully working FHIR app for about 50 cents more than a custom one.
Can a small model on a phone read a patient's FHIR record? Turning FHIR JSON into SQL-on-FHIR views and Markdown (Tokempic) makes the record about 12 times smaller.
Skills, rules, planned MCP tools and verification hooks that help AI coding agents build offline-first health apps with Open Health Stack libraries—packaging the domain layer across Antigravity, Claude Code and Gemini CLI.
A single static Rust binary with no JVM or external runtime dependencies for building Hive-partitioned SQL-on-FHIR Parquet warehouses, GeoParquet location registries, and IG-publishable FML imports.
Skills that pull context from the FHIR Implementation Guide, build the query and enforce guardrails (no DELETE), with MCP for the database layer.
Concept for running SQL-on-FHIR queries and indicator dashboards directly in a browser tab over static Parquet tables and catalog.sql exported by fhir-pipes-rs—with no BI backend, Spark cluster, or Hive server.
Experiments move through four stages. Ones that prove useful can graduate into an OHS project or pillar.
An idea we want to run. Looking for owners, data or a deployment to try it in.
Work in progress. A harness exists and early results are coming in.
Results, code and write-up are public, so anyone can rerun them.
It worked, and it now lives in an OHS project or pillar.
Every experiment is open source and built to be rerun. Try one against your own FHIR server or model, extend it, or bring the next question.
Digital health projects have long skipped FHIR because it took more time and effort. Health Samurai showed, from impressions, that agents build more coherent apps on a FHIR stack. We tested that claim on the OHS stack with measurements.
An agent got the same spec for an offline-first Android antenatal care (ANC) register and built it under one of four conditions. A working app lists patients, shows visit history, records new visits, keeps data after a restart and syncs both ways with a FHIR server.
Each condition ran twice on Claude Haiku, Sonnet, Opus and Fable (Claude Code) and Gemini 3.8 Flash and Gemini 4 Argon (Antigravity CLI), at medium effort. Every run got a fresh session, folder, server and device. A person installed every app and scored it on 10 checks.
Health workers often have no reliable connection. A small language model running on the phone could summarise a patient's history offline, but raw FHIR JSON is huge. This experiment tests whether converting FHIR to SQL-on-FHIR views and Markdown with Tokempic makes the record small enough to fit. It comes from the OHS issue "Exploration: FHIR via LLMs on device".
Experiment 1 covers size and speed. Results so far are from an emulator. Help us run it on real devices with at least 8 GB of RAM, and test answer quality on clinical questions.
Agent harnesses already handle the model loop, context, tools and sandbox. What they lack is up-to-date knowledge of Open Health Stack libraries—without it, agents hand-roll FHIR JSON, invent codes and call outdated APIs.
In labs-ohs-agent, five of
six models built a fully working offline FHIR app (10 out of 10 checks) with
OHS libraries plus Agent Skills, compared with 6 to 8 without them and at lower
token cost. ohs-agent-kit packages that domain layer (model + harness +
ohs-agent-kit) and adds deterministic verification checks before an agent says
it is done.
skills/ (kotlin-fhir pinned to 1.0.0-beta05, kotlin-fhir-engine
2.0.0-alpha02, kotlin-fhir-data-capture 2.0.0-alpha02), always-on
invariants in rules/AGENTS.md (offline-first, KMP, jvmTarget = 21, synthetic
data only), and versions.toml tracking current pins alongside Phase 1
upgrade targets.kotlin-fhir 1.0.0,
engine/SDC 2.0.0-alpha03+, under 200 lines each) and add kotlin-fhirpath,
smart-guidelines-ig, ohs-player, fhir-info-gateway, and fhir-data-pipes.wso2/fhir-mcp-server paired with ohs-build-mcp for offline IG
validation, terminology and FHIRPath; a thin ohs-agent-sdk Python facade on
google-antigravity; and required CI eval gates from labs-ohs-agent.Proposed roadmap runs from Phase 0 (Dec 2026) through v1.0 at WHA 2027 (Apr–May
2027); expect breaking changes while pre-alpha.
Traditional FHIR analytics pipelines often rely on JVM services, Spark Thrift
Server and Hive Metastore. fhir-pipes-rs explores whether a single static Rust
binary (fhir-pipes, configured via fhir-pipes.toml) can cover extraction,
SQL-on-FHIR transformation, location sync and non-FHIR imports in environments
that only want lightweight CLI jobs or standard Parquet files.
refresh, serve, views): fetches changed
resources incrementally (_lastUpdated, system Bulk Data $export, or HAPI
PostgreSQL), evaluates ViewDefinition JSON files, atomically swaps
Hive-partitioned Parquet tables with manifest.json and catalog.sql
(queryable directly with DuckDB, PostgreSQL, or catalog.spark.sql), and
can serve scheduled/HTTP refreshes or $sql-run on Unix.export, sync): downloads FHIR R4 resources as
NDJSON and syncs to another server, including Google Cloud Healthcare API
(--google-auth), HAPI FHIR, Medplum and Aidbox (untested against a live
Aidbox server).extract, load, import, dhis2): converts
Location and Organization resources into GeoParquet and optional PMTiles
map tiles, loads edits back with version checks, and runs FHIR Mapping
Language import packages (including DHIS2 via the companion fhir-pipes-dhis2
binary). Also includes an Agent Skill under skills/fhir-pipes.Marked as an experimental OHS-Labs library and not currently supported—use
fhir-data-pipes for
supported production deployments. Per its ROADMAP.md, nested SQL-on-FHIR v1
Parquet tables, a built-in SQL studio/dashboard UI, and mobile FFI packaging are
currently out of scope for the core binary.
This idea is listed in the OHS Labs backlog and hasn't started. If you'd like to own it, or have data or a deployment where it would help, get in touch.
fhir-pipes-rs already writes flat SQL-on-FHIR ViewDefinition tables as
Hive-partitioned Apache Parquet alongside a DuckDB-ready catalog.sql, and
its ROADMAP.md keeps local SQL studios and dashboards out of the core Rust
binary (No). Instead of deploying Apache Superset, Spark Thrift Server and Hive
Metastore just to inspect population indicators, this proposal explores computing
cohort queries and cross-filtered charts directly in the browser over those
static Parquet exports.
fhir-pipes refresh produces plain Parquet
files and catalog.sql (read_parquet(...)), plus optional rclone push to
object storage—eliminating always-on query middleware when data refreshes in
batches.fhir-data-pipes (exp/rust-fhir-pipes) prototyped a local Python DuckDB SQL
studio (duckdb_studio.py) and interactive Synthea HIV/TB care-cascade views
(synthea_hiv_dashboard.html) as a lightweight stand-in for Superset + Hive.catalog.duckdb) using
synthetic FHIR warehouses, and measure bundle load times, browser memory
ceilings, and access-control patterns before touching real facility data.Nothing is built or benchmarked in-browser yet. Looking for collaborators to
prototype a static viewer over synthetic fhir-pipes-rs Parquet exports and
ViewDefinition schemas.