OHMOHM Studio

Example projects

Ten production-grade runnable examples covering every public surface of the OHM SDK — from a 30-line CLI to a 4-tab React Native demo.

View as Markdown

Example projects

Every example below lives at github.com/open-holistic-medicine/ohm-sdk/tree/main/examples. Each one is idiot-proof: graceful fallback on missing env, typed error handling for all 10 OHM*Error classes, a copy-paste 3-step quickstart in its README, and verified tsc --noEmit clean.

All examples are pinned to @ohm_studio/sdk@^0.12.0 / @ohm_studio/sdk-react-native@^0.12.0.


Start here — the full demo

This is the canonical end-to-end demo. 33 TS files, ~4500 lines, full typecheck clean. Clone it and you have a working production-shape app.


Hospital-integration kit (paired Studio + RN)

For inpatient ward EMRs replacing a webkitSpeechRecognition + regex parser. Two paired folders — Studio side first, then drop the RN screens into your existing app.


Visit feature (canonical EMR sample)

The Visit feature cookbook walks through the architecture in prose.


Production patterns


Minimal SDK demos


Pairs that go together

If you want to…Read these together
Build a hospital RN app end-to-endhospital-integration (Studio schemas) → clinical-station-rn (RN UI)
Long recordings with backend callbacksclinical-station-rn (Async tab in webhook mode) ⇄ webhook-receiver (your backend)
Submit async jobs from a scriptnode-cli (npm start async) ⇄ webhook-receiver
Server-side proxy for a web/mobile clientnextjs-server-action (sync) or streaming (SSE)

What every example guarantees

GuaranteeHow
No silent crash on missing configEach example detects an unset/placeholder OHM_API_KEY and prints a 3-step fix (Node) or shows a setup screen (RN).
Typed-error catchingAll 10 OHM*Error classes — OHMAuthError, OHMValidationError, OHMRateLimitError, OHMNotFoundError, OHMTimeoutError, OHMNetworkError, OHMServerError, OHMQuotaExceededError, OHMAbortError, OHMConfigError — each with a friendly user-facing message.
English transcriptsSpeak any of 23 supported languages — audio.transcribe / audio.extract always return clean English text.
Live keys never bundleRN examples show the test-key + acknowledgeBundledKey pattern. Server examples keep ohms_live_* server-side via env.
Real npm packagesAll examples install the published SDKs from npm — no workspace links — so you see exactly what a customer sees after npm install.

Run any example in 3 steps

cd examples/<sample>
npm install
cp .env*.example .env*        # copy + edit per the sample's README
npm start                     # or `npm run dev`, `npm run probe` — see README

The shortest path to a working SDK call:

cd examples/node-cli
npm install
echo "OHM_API_KEY=ohms_test_xxx" > .env
npm start summarize ./consult.txt

Where to mint the key: studio.ohm.doctor → Keys → New key → Test mode. Test keys (ohms_test_*) are safe to ship in dev bundles; live keys (ohms_live_*) belong in your backend's secrets manager — see RN key handling.