Provider Clinical Workspace
A local clinical workspace with offline verification and SMART on FHIR interoperability.
OpenClinic is an Apple-native clinical charting workspace built with SwiftUI and SwiftData. It functions as a provider assistant, running on-device clinical retrieval, reranking, and verification, with ASWebAuthenticationSession OAuth connection to SMART on FHIR sandbox platforms.
Core Capabilities
Agenda & Workflow Management
Track daily schedules, workflow status progressions (arrived, charting, signed), and patient routing using fluid SwiftUI lists and swipe gestures.
Patient Chart Workspace
Browse comprehensive demographic and clinical data (conditions, medication logs, appointments, visit history, and clinical photos) in a fast, native split-view dashboard.
Structured Encounter Dictation
Capture clinician speech dictation alongside anatomical context, automatically generating structured SOAP encounter notes with signed and signed lifecycle stages.
Anatomical Photography
Dermatology-forward tools including interactive 2D anatomical body maps, region-tagged clinical photos, and lesion timelines to track progression over time.
SMART on FHIR Interoperability
Perform live sandbox EHR discovery, in-app OAuth signing via ASWebAuthenticationSession, and import FHIR resources (Patient, Condition, MedicationRequest, Appointment) with robust data provenance badges.
On-Device Clinical Intelligence
Local document RAG executing semantic Core ML embedding generation, SQLite FTS5 keyword indexing, hybrid Reciprocal Rank Fusion search, MMR reranking, and 7 verification safety gates.
Key Architectural Workflow
Local SwiftData Ingestion
The workspace seeds a local demo dataset on first launch. Clinicians can capture photos, dictate encounters, or import SMART on FHIR patient records into a secure local SQLite database via SwiftData.
On-Device RAG Chunking & Indexing
Clinical notes and charts are parsed, chunked, and tokenized using local vocabulary models. The app indexes text locally using a sqlite FTS5 service and produces local vector embeddings via Core ML.
Grounded Retrieval & Synthesis
When asking questions, OpenClinic performs hybrid vector-keyword retrieval, applies Reciprocal Rank Fusion, MMR diversification, and re-orders context chunks before calling local foundation models to synthesize answers.
7 Safety Verification Gates
Before displaying replies to clinicians, the synthesized text runs through seven safety gates: retrieval confidence, evidence coverage, numeric sanity, contradiction check, semantic grounding, quote faithfulness, and generation quality.