Provider Workspace, Not a Patient App
SMART on FHIR import, local charting, dermatology workflows, and on-device clinical retrieval for clinicians.
OpenClinic is a SwiftUI and SwiftData clinical workstation built for provider-side workflows. It imports records through SMART on FHIR OAuth, preserves provenance on imported records, stores local chart state on device, and uses Apple Foundation Models plus a clinic-specific retrieval stack derived from OpenIntelligence internals for chart Q&A and note drafting.
What Makes OpenClinic Different
Provider-first workflow
Daily schedules, patient routing, visit states, and chart review live in a native multi-pane workspace designed for clinicians, not consumer health tracking.
SMART on FHIR import
Uses SMART on FHIR discovery plus `ASWebAuthenticationSession` to import Patient, Condition, MedicationRequest, and Appointment resources from supported R4 sandboxes.
Local charting and provenance
SwiftData persists notes, appointments, medications, and photos locally while preserving source-system metadata and sync lineage for imported records.
Dermatology-friendly imaging
Region-tagged clinical photos, body-map placement, and lesion timelines support dermatology-style follow-up workflows.
On-device note drafting
Structured encounter dictation and local summarization use Apple Foundation Models to assist with chart creation without sending PHI to third-party model providers.
Clinical retrieval with verification
Core ML embeddings, SQLite FTS5, reciprocal-rank fusion, and a 9-gate verification layer are used to keep chart answers scoped, grounded, and patient-isolated.
Technical Profile
Core APIs
- UI: SwiftUI, SwiftData
- Models: Apple Foundation Models, Core ML
- Interoperability: SMART on FHIR, ASWebAuthenticationSession
- Retrieval: SQLite FTS5, local vector store
Data boundary
- Local: Charts, notes, photos, vector indexes, provenance metadata
- Remote: OAuth and FHIR resource fetches from configured servers
- Not present: HealthKit sync as an active product feature
- Status: Prototype only, no writeback and no deployment certification
How OpenClinic Runs
Authenticate and import
The app discovers SMART endpoints, performs OAuth through `ASWebAuthenticationSession`, and imports patient-context data into local models.
Persist local chart state
SwiftData stores appointments, medications, local clinical records, and image metadata while Keychain protects connection tokens.
Index and retrieve context
Clinical records are chunked, embedded locally with Core ML, indexed into SQLite FTS5 plus a local vector store, and fused at query time for patient-scoped retrieval.
Synthesize and verify
Apple Foundation Models generate chart assistance on device, and a 9-gate clinical verification pass checks grounding, numeric sanity, contradictions, and patient isolation before display.