AI-Powered Personal Health Data Management for iOS
BisonHealth AI is a privacy-first iOS application that empowers users to take complete control of their personal health data. By leveraging AI and personal health information, BisonHealth AI provides a private assistant that helps users better understand and manage their health - all while keeping sensitive data securely stored locally on their device.
⚠️ IMPORTANT: Personal Use OnlyBisonHealth AI is designed exclusively for individual, personal health tracking and management. This application is NOT intended for use by HIPAA Covered Entities, Business Associates, or any professional, clinical, or enterprise environments. We do not provide Business Associate Agreements (BAAs) or HIPAA-compliant guarantees. Users assume full responsibility for their own data choices and usage decisions.
- 📱 Universal iOS App - Built with SwiftUI for iOS 17+, optimized for both iPhone and iPad
- 🔒 Privacy-First Design - All health data stored locally on-device, no cloud backup
- 🤖 Multiple AI Providers - Support for on-device MLX models, AWS Bedrock, and OpenAI-compatible servers
- 👨⚕️ AI Doctor Personas - Choose from specialized AI doctors (Root Cause Analysis, Primary Care, Chronic Health AI, and more)
- 📄 Smart Document Processing - Automatic OCR and extraction of health data from documents using Docling
- 🏥 Medical Document Management - Support for 11 document types including imaging reports, lab reports, prescriptions, discharge summaries, and more
- 🩺 Comprehensive Health Data - Personal info, blood tests, medical documents with structured extraction
- 💬 AI Chat with Context - Intelligent conversations with your health data as context, including current date/time awareness
- 📊 Data Export - Export your data in JSON or PDF formats
- 🌙 Accessibility - Full support for Dark Mode, VoiceOver, and Dynamic Type
- 🔄 Offline Support - Queue operations when offline, automatic retry when connection restored
- 📡 Streaming Responses - Real-time AI responses for better user experience
- 🎯 Context Selection - Choose which health data and documents to include in AI conversations
BisonHealth AI is designed exclusively for individual, personal health management and is NOT suitable for professional, clinical, or enterprise use.
- ✅ Personal Health Records: Perfect for individuals managing their own health data
- ✅ Consumer Privacy: Built with consumer-grade privacy protections
- ✅ Individual Control: You maintain complete control over your personal data
- ❌ No HIPAA Compliance: We do not provide Business Associate Agreements (BAAs)
- ❌ No Professional Use: Not intended for healthcare providers, clinics, or organizations
- ❌ No Regulated Hosting: We do not offer HIPAA-compliant hosting or guarantees
As a user, you are responsible for ensuring that your use of BisonHealth AI complies with all applicable laws and regulations. If you are a healthcare provider or work in a regulated environment, you must not use this application for managing patient data or any professional healthcare activities.
BisonHealth AI follows a modular, privacy-focused architecture:
┌─────────────────────────────────────────────────────────────┐
│ BisonHealth AI │
├─────────────────────────────────────────────────────────────┤
│ SwiftUI Views & ViewModels (MVVM Pattern) │
├─────────────────────────────────────────────────────────────┤
│ Business Logic Layer │
│ ├── Health Data Manager │
│ ├── Document Processor │
│ ├── AI Chat Manager │
│ └── Export Manager │
├─────────────────────────────────────────────────────────────┤
│ Data Access Layer │
│ ├── SQLite Database Manager (Encrypted) │
│ ├── File System Manager │
│ └── Backup Management Shell (placeholder) │
├─────────────────────────────────────────────────────────────┤
│ External Service Layer │
│ ├── AI Provider Interface (Protocol) │
│ │ ├── On-Device MLX Client │
│ │ ├── AWS Bedrock Client │
│ │ └── OpenAI-Compatible Client │
│ ├── Docling Client (Document Processing) │
│ └── Medical Document Extractor (AI-Enhanced) │
└─────────────────────────────────────────────────────────────┘
- Xcode 15.0 or later
- iOS 17.0+ deployment target
- Swift 5.9+
llama.xcframeworkfor on-device inference (see Install the llama framework — required to build, not included in the repo)- Optional AWS Bedrock or OpenAI-compatible endpoint for remote AI functionality
- Optional Docling server for document processing
-
Clone the repository:
git clone git@github.com:bisonbet/BisonHealth-AI.git cd BisonHealth-AI -
Open in Xcode:
open HealthApp/HealthApp.xcodeproj
-
Install Dependencies:
- Dependencies are managed via Swift Package Manager
- Xcode will automatically resolve packages on first build
-
Install the llama framework:
The app uses
llama.cppfor on-device inference via a prebuiltllama.xcframework. This binary is not checked into the repository (it is large and platform-specific) and is git-ignored, so you must install it manually before building.- Place the framework at
Frameworks/llama.xcframework, relative to the repository root:BisonHealth-AI/ └── Frameworks/ └── llama.xcframework/ - You can obtain it by building llama.cpp as an Apple multi-platform
xcframework(its build scripts produce one), or by copying a prebuiltllama.xcframeworkprovided by the team. - The Xcode project links against this path, so a missing or misplaced framework will cause build/link failures.
- Place the framework at
-
Configure External Services:
- Download an on-device model, or configure AWS Bedrock / an OpenAI-compatible endpoint for AI chat functionality
- Set up your Docling server for document processing if you want remote document conversion
- Configure providers and optional server endpoints in the app settings
- Select your target device or simulator
- Build and run the project (⌘+R)
- Configure server connections in Settings
- Start importing your health data!
- Personal Information - Demographics, date of birth, medical history, medications, allergies, family history
- Blood Test Results - Comprehensive lab results with reference ranges, abnormal value detection
- Medical Documents - Full support for 11 document categories:
- Doctor's Notes
- Imaging Reports (X-rays, MRIs, CT scans, ultrasounds)
- Lab Reports
- Prescriptions
- Discharge Summaries
- Operative Reports
- Pathology Reports
- Consultations
- Vaccine Records
- Referrals
- Other medical documents
- OCR & Text Extraction - Automatic text extraction from PDFs and images
- Structured Data Extraction - AI-powered extraction of dates, providers, document categories, and sections
- Section Detection - Automatic identification of Findings, Impressions, Recommendations, etc.
- AI Context Integration - Select documents to include in AI doctor conversations
- Priority Management - Set priority levels (1-5) for document inclusion in AI context
- Search & Filter - Full-text search across document content, filter by category, provider, date range
- Health Checkups - Regular health assessments and vital signs
- Wearable Data Integration - Apple Health, fitness trackers
BisonHealth AI supports multiple AI providers. Choose one based on your needs:
-
On-Device LLM (Default) - Local model execution for maximum privacy
- Download a supported model from Settings
- Runs directly on device after model download
- No remote AI server required
-
AWS Bedrock - Cloud AI service
- Configure AWS credentials (access key, secret key, region)
- Supports Claude Sonnet 4 and Llama 4 Maverick models
- Large context windows (200k tokens for Claude Sonnet 4)
- Requires AWS account and Bedrock access
-
OpenAI-Compatible Servers - For LiteLLM, LocalAI, vLLM, etc.
- Configure base URL and optional API key
- Supports any OpenAI-compatible API endpoint
- Flexible deployment options
Docling Server - Required for document processing
- Set up Docling server for document parsing and OCR
- Configure hostname and port in app settings
- Processes PDFs, images, and other document formats
- Extracts structured data and text from medical documents
- Local Storage - All health data encrypted and stored locally
- No Cloud Backup - Health data never leaves the device (iCloud/CloudKit backup removed for HIPAA compliance)
- Data Export - Export your data anytime in JSON or PDF format
- No Cloud Dependencies - Core functionality works completely offline
BisonHealth AI includes multiple specialized AI doctor personas, each with unique expertise and communication styles:
- Root Cause Analysis & Long Term Health - Systematic approach to identifying root causes with structured analysis
- Primary Care Physician - General healthcare with clinical precision and professional communication
- Chronic Health AI - Specialized in managing chronic conditions with comprehensive symptom tracking
- Orthopedic Specialist - Focus on musculoskeletal conditions and joint issues
- Clinical Nutritionist - Evidence-based nutrition advice and meal planning
- Exercise Specialist - Exercise programs, rehabilitation, and injury prevention
- Internal Medicine - Complex medical conditions and adult diseases
Each doctor persona has a customized system prompt that guides their responses and ensures they only use the health data explicitly provided in context. The AI is aware of the current date and time, allowing it to calculate patient age, assess document recency, and provide time-aware medical guidance.
HealthApp/
├── HealthApp/
│ ├── Models/ # Data models and protocols
│ │ ├── PersonalHealthInfo.swift
│ │ ├── BloodTestResult.swift
│ │ ├── MedicalDocument.swift
│ │ ├── ChatModels.swift
│ │ └── Doctor.swift
│ ├── Views/ # SwiftUI views and components
│ │ ├── ChatDetailView.swift
│ │ ├── MedicalDocumentDetailView.swift
│ │ ├── UnifiedContextSelectorView.swift
│ │ └── [40+ view files]
│ ├── Managers/ # MVVM view models/business logic
│ │ ├── HealthDataManager.swift
│ │ ├── DocumentManager.swift
│ │ ├── AIChatManager.swift
│ │ └── SettingsManager.swift
│ ├── Services/ # External service clients
│ │ ├── MLXOnDeviceClient.swift
│ │ ├── BedrockClient.swift
│ │ ├── OpenAICompatibleClient.swift
│ │ ├── DoclingClient.swift
│ │ └── MedicalDocumentExtractor.swift
│ ├── Database/ # SQLite database management
│ │ ├── DatabaseManager.swift
│ │ ├── DatabaseManager+HealthData.swift
│ │ ├── DatabaseManager+MedicalDocuments.swift
│ │ └── DatabaseManager+Chat.swift
│ ├── Networking/ # Network management
│ │ ├── NetworkManager.swift
│ │ └── PendingOperationsManager.swift
│ └── Utils/ # Utility functions and extensions
├── HealthAppTests/ # Unit tests
├── HealthAppUITests/ # UI tests
└── [Documentation files]
- SwiftUI - Modern iOS UI framework with universal app support
- SQLite.swift - Type-safe SQLite wrapper for local data storage
- CryptoKit - Encryption for sensitive health data
- VisionKit - Document scanning capabilities
- Combine - Reactive programming framework for state management
- MarkdownUI - Rich text rendering for AI responses
- AWS SDK - AWS Bedrock integration for cloud AI
- Network Framework - Network monitoring and offline support
# Run unit tests
xcodebuild test -scheme HealthApp -destination 'platform=iOS Simulator,name=iPhone 16 Pro'
# Run UI tests
xcodebuild test -scheme HealthApp -destination 'platform=iOS Simulator,name=iPhone 16 Pro'Note: Default simulator target is iPhone 16 Pro. If not available, use another device like iPhone 15.
Detailed documentation is available in the repository:
- Medical Documents Implementation - Comprehensive guide to medical document processing
- Docling Formats Explanation - Understanding Docling output formats
- Agent Guidelines - Development guidelines and coding standards
- Requirements - Detailed user stories and acceptance criteria
- Design - Architecture and technical design
- Tasks - Implementation roadmap and task breakdown
We welcome contributions! Please see our contributing guidelines for details on:
- Code style and conventions
- Testing requirements
- Pull request process
- Issue reporting
BisonHealth AI is built with privacy as the foundation for personal health data management:
- Local-First - All sensitive data stays on your device
- Encryption - Health data encrypted using CryptoKit
- No Tracking - No analytics, tracking, or data collection
- Open Source - Transparent, auditable codebase
- User Control - You decide what data to backup or export
- Personal Use Only - Designed for individual health management, not professional healthcare
- Consumer-Grade Protection - Privacy safeguards appropriate for personal use, not HIPAA compliance
This project is licensed under the MIT License - see the LICENSE file for details.
- Issues - Report bugs or request features via GitHub Issues
- Discussions - Join community discussions in GitHub Discussions
- Documentation - Check the
/Docs/directory for detailed guides
- Phase 1 - Core health data management and AI chat
- Phase 2 - Advanced document processing and medical document management
- Phase 2.5 - Multiple AI provider support (on-device, AWS Bedrock, OpenAI-compatible)
- Phase 2.6 - AI doctor personas and specialized prompts
- Phase 2.7 - Medical document OCR and structured extraction
- Phase 2.8 - Context selection and priority management
- Phase 2.9 - Offline functionality and network handling
- Phase 2.10 - Streaming AI responses
- Phase 2.11 - Current date/time injection for temporal awareness
- Phase 3 - Wearable device integration and Apple Health sync
- Phase 4 - Advanced AI features and health insights
- Phase 5 - Multi-language support and accessibility enhancements
Built with ❤️ for health data privacy and user empowerment