All selected work

prototype

OpenClinic

My EHR prototype iOS app, built to see what would happen if I blended my OpenIntelligence engine into an EHR. It runs on synthetic chart data, and everything happens on the iPad.

SMART on FHIR over OAuth, pulled into on-device SwiftData, answered with citations

SwiftUISwiftDataSMART on FHIRCore MLSQLite FTS5RRFOAuth

Screen recording

A clinic day and two panel questions. A prototype in the iPad Simulator, synthetic patients

Scroll to play. Scroll back to rewind.

How it works

The OpenIntelligence engine pointed at chart-shaped data. Records are pulled once over SMART on FHIR, then everything happens on the iPad.

FHIR serverOn device2 of 4 steps stay on the device
  1. FHIR server

    Authenticate

    SMART on FHIR discovery and OAuth through ASWebAuthenticationSession. Tokens live in the Keychain.

  2. FHIR server

    Import the chart

    Patient, Condition, and MedicationRequest resources arrive as HTTPS JSON from the sandbox endpoint and are mapped straight into SwiftData.

  3. On device

    Index locally

    Each record becomes chunks in a clinical vector store and rows in a SQLite FTS5 index. Nothing is sent to a cloud database.

  4. On device

    Ask the chart

    The same agentic reasoning loop as OpenIntelligence answers questions with citations back to the resource. A demo of the pattern, not production medical software.

The story

Why it exists and what building it taught me. Written for the homepage card, kept here in full.

Why: I wanted to see what would happen if I applied the same OpenIntelligence engine to clinical information. OpenClinic is the prototype where I tested it against chart-shaped data (not production medical software).

Clinical Data Sync: I integrated the SMART on FHIR standard using secure OAuth flows (ASWebAuthenticationSession). This lets the app connect directly to SMART sandbox endpoints and securely download structured Patient, Condition, and Medication resources.

Local Storage: Instead of sending patient histories to a cloud database, the app parses and maps the incoming FHIR clinical resources directly into local SwiftData schemas, keeping health records private and offline.

Current State: I reused the same agentic reasoning loop from OpenIntelligence, wired up SMART on FHIR discovery and OAuth (ASWebAuthenticationSession) to pull demo Patient, Condition, and MedicationRequest resources into a local model. It’s surprisingly good at finding relevant information in the chart and answering questions with citations, but the current data is too limited to be more than a demo of the retrieval and reasoning patterns. The next step would be to connect it to real FHIR endpoints and see how it handles the messiness of real clinical data, which comes with a multitude of complexities.

Shipping

Every commit, week by week, with the moments that mattered marked on it.

Commits
67
Active weeks
12
  1. First commit
  2. Latest commit