iOS 18+ SwiftUI app design for Epic-connected documentation

Physician Simple

The iPhone app blueprint for background voice capture, on-device transcription, editable AI note templates, and FHIR-native Epic filing.

Built around Swift 6, NavigationStack, MVVM, async/await, Apple Speech, AVFoundation background audio, Keychain secrets, JSON template persistence, and Epic sandbox SMART on FHIR.

Platform

iOS 18+ / SwiftUI / Swift 6

Architecture

NavigationStack + MVVM + async/await

Epic Client ID

0b6e4915-d99b-4921-8a80-4ca43220fb4d

FHIR Base URL

fhir.epic.com/interconnect-amcurprd-oauth/api/FHIR/R4/

Loading iOS app preview

Core Features

The complete app surface, mapped to the clinical workflow.

Every major screen and service is represented: Epic launch, schedule, recording, transcription, templates, note editing, AI providers, and push-back into Epic.

SMART on FHIR OAuth2 + PKCE

Standalone login and EHR launch both resolve Epic launch context, access tokens, patient ID, and encounter ID.

Daily Schedule View

Appointment.Search pulls the clinician’s appointments and presents today’s patients in a clean SwiftUI list.

Locked-Screen Recording

AVFoundation background audio keeps visit dictation reliable while the app is backgrounded or the screen is off.

On-Device Transcription

Apple Speech framework produces an editable transcript locally before any optional AI provider is called.

Advanced Template Library

Unlimited templates with editable sections, per-section prompts, duplication, reordering, and a default template.

Structured Note Builder

Every section is editable, AI-generateable, rebuildable, and switchable into another physician-owned template style.

Pluggable AI Providers

Apple Foundation Models, Ollama, OpenAI, Grok, Gemini, and NVIDIA Build API Catalog can be selected in Settings.

Epic Push Workflows

Push individual SmartPhrase sections or file the complete clinical note with DocumentReference.Create.

How It Works

From Epic launch to signed clinical note.

The app is designed around a physician’s real day: launch, schedule, patient context, recording, structured generation, review, and FHIR filing.

01

Launch or log in

SMART on FHIR OAuth2 + PKCE supports standalone sign-in and Epic EHR launch with patient and encounter context.

02

Choose today’s patient

Appointment.Search retrieves the daily schedule, then the physician taps a patient to enter the Note Builder.

03

Record anywhere

AVAudioSession is configured for background recording so dictation continues when locked or backgrounded.

04

Transcribe on-device

Apple Speech transforms the recording into an editable transcript with live waveform feedback.

05

Generate by template

Each section uses transcript, Epic context, and its own customizable AI prompt from the selected template.

06

Push back to Epic

SmartPhrase text can be pushed section-by-section, or the full note can be created as a Clinical Note.

Template Library

Unlimited physician-owned note templates with editable AI prompts.

Physician Simple starts with New Visit, Repeat Visit, and Referral Visit templates, then lets the clinician build any specialty-specific structure they want.

Templates

New VisitDefault
Repeat Visit
Referral Visit
Sports Med Follow-up
Create
Duplicate
Default
Reorder

Section Prompt Editor

History of Present Illness

AI Prompt

Generate a concise HPI using OLDCARTS, preserving patient wording and clinically relevant negatives.

Laboratory & Imaging Data

AI Prompt

Use transcript plus Epic context to write only this section in the selected template style.

Assessment

AI Prompt

Use transcript plus Epic context to write only this section in the selected template style.

Plan

AI Prompt

Use transcript plus Epic context to write only this section in the selected template style.

Preloaded templates: New Visit, Repeat Visit, Referral Visit
Create, duplicate, rename, reorder, and delete templates
Set any template as the Default Template
Add, remove, and reorder unlimited note sections
Customize the AI system prompt for every section
Switch templates inside the Note Builder and rebuild instantly

Structured Note Builder

The full standard note structure is the editable starting point.

Selecting a patient opens the Note Builder with the Default Template. The physician can AI-generate any section, edit any text, rebuild the full note, or change templates and instantly rebuild.

Part 1

Subjective: Medical History

Chief Complaint (CC)AI
History of Present Illness (HPI) using OLDCARTSAI
Past Medical History (PMH)AI
Past Surgical History (PSH)AI
Medications & AllergiesAI
Family History (FH)AI
Social History (SH)AI
Review of Systems (ROS)AI

Part 2

Objective: Physical Examination

Vital SignsAI
General AppearanceAI
HEENTAI
NeckAI
CardiovascularAI
PulmonaryAI
AbdomenAI
ExtremitiesAI
NeurologicalAI

Part 3

Conclusion & Next Steps

Laboratory & Imaging DataAI
AssessmentAI
PlanAI

AI Generate

Regenerate one editable section with transcript, prompt, and Epic context.

Rebuild Entire Note

Regenerate all sections using the currently selected template.

Change Template

Switch to another library template and rebuild the note in that style.

AI Providers

Fully pluggable AI generation with secure provider settings.

Settings lets the physician choose a default provider and enter API keys. Each section prompt can run against the selected backend while preserving the same Note Builder interface.

Settings

Default AI Provider + Keychain API Keys

Apple Foundation Models on-device
Ollama on the local network
ChatGPT / OpenAI API
Grok API by xAI
Gemini API by Google
NVIDIA Build API Catalog free hosted models

Epic Integration

Concrete SMART on FHIR sandbox wiring.

The site now reflects the actual Epic implementation plan, including client ID, sandbox base URL, custom callback scheme, launch context handling, and R4 resource calls.

Epic Sandbox | SMART on FHIR R4
SMART launch from Epic with launch, patient, and encounter context
OAuth2 authorization code flow with PKCE verifier/challenge
Appointment.Search (Appointments) R4 for clinician schedule
DiagnosticReport pull for recent labs and imaging
DocumentReference pull for prior clinical notes
SmartPhrase section pushes such as .physimpleHPI
DocumentReference.Create for full Clinical Notes (R4)
client_id=0b6e4915-d99b-4921-8a80-4ca43220fb4d
redirect_uri=physiciansimple://oauthcallback
base=https://fhir.epic.com/interconnect-amcurprd-oauth/api/FHIR/R4/

GET  Appointment?date=today&practitioner={clinician}
GET  DiagnosticReport?patient={patient}
GET  DocumentReference?patient={patient}
POST DocumentReference  // Clinical Notes (R4)

Technical Architecture

Production-oriented SwiftUI foundations.

The app design calls for clean separation between UI, view models, persistence, Keychain, audio recording, transcription, AI provider adapters, and Epic FHIR clients.

SwiftUI Navigation

Login, schedule, patient detail, note builder, template library, and settings are composed with NavigationStack routes.

Clean MVVM

FHIR clients, auth services, audio services, transcription services, template stores, and AI providers sit behind view models.

Local JSON Persistence

Templates and non-secret settings persist through FileManager JSON stores and @AppStorage for lightweight defaults.

Keychain Secrets

FHIR tokens and API keys stay in Keychain, never in JSON files or @AppStorage.

Background Audio

AVAudioSession category and background modes are configured for reliable recording while locked.

Async FHIR Layer

Swift 6 async/await drives OAuth, Appointment, DiagnosticReport, DocumentReference, and note creation calls.

Privacy & Security

Sensitive clinical data and credentials stay under explicit control.

Physician Simple is designed around local transcription, Keychain secrets, clinician review, and transparent provider selection.

Secure storage

Tokens and API keys live in Keychain.

On-device first

Recording and Apple Speech transcription happen locally, with optional AI calls controlled by provider settings.

Token-safe by design

OAuth tokens, refresh tokens, and provider API keys are stored in Keychain with narrow access surfaces.

Physician-editable output

Every generated section remains editable before SmartPhrase push or DocumentReference.Create filing.

Implementation Snapshot

What the app must remember at runtime.

A compact view of the state that powers generation, template switching, and Epic filing.

Default note sourceSelected Default Template
AI inputTranscript + section prompt + Epic context
Epic contextPatient, Encounter, DiagnosticReport, DocumentReference
Local secretsKeychain
Template storageJSON via FileManager

Physician Response

Built for doctors, credible to IT.

The app design balances premium physician ergonomics with explicit technical details for Epic and security review.

This is the first note app spec that respects how physicians actually work: launch from Epic, record in the room, edit the note, and file it back.

DMC

Dr. Maya Chen

Internal Medicine

The per-section prompt library is the killer feature. Every specialist can keep their own structure without waiting for a vendor update.

DAP

Dr. Aaron Patel

Cardiology

From an informatics standpoint, the OAuth, FHIR resources, Keychain storage, and explicit Epic sandbox details make this feel implementation-ready.

ER

Elena Rodriguez

Clinical Informatics Director

Physician Simple is now framed as the full iOS app design.

The page reflects the target SwiftUI implementation: Epic launch, daily schedule, locked-screen recording, on-device transcription, editable templates, pluggable AI, and FHIR note filing.