Building Clinical Tools with Swift: A Reality Check
I write Swift for my psychiatric practice. Not because Apple Care or any tech company gave me a reason to, but because the existing tools were terrible and I kept losing hours to manual data entry. What started as a quick GEDmatch-style intake form became a full suite of clinical utilities. Now I use them every single day. The core idea is simple: use Swift to create lightweight, local-first apps that handle the repetitive administrative pieces of psychiatric practice without uploading sensitive data to some third-party server. HIPAA compliance becomes a lot easier when your patient information never leaves the device. I built my first tool after spending three hours manually transcribing PHQ-9 and GAD-7 scores from paper forms into an Excel spreadsheet. The scores are straightforward to collect, but the scoring, charting, and trend analysis was eating my entire Friday afternoon. I wrote a Swift script that ran on my Mac, took a CSV export, calculated the totals, and spit out a formatted report. Cut that Friday task down to about four minutes. That was the turning point for me.
From there I expanded into a full app using SwiftUI. It handles intake scheduling, symptom tracking, medication side effect logs, and session note templates. Everything runs locally on my MacBook and iPad. I use CoreData for storage, and I encrypt the database with AES-256 before it ever touches iCloud if I choose to back it up. Here is what most people in clinical practice miss when they first look at Swift development: you do not need to be a developer. You need to be a person who can follow structured tutorials and has a specific problem to solve. The barrier to entry is lower than learning Python for data science because Apple's documentation is unusually good for beginners, and SwiftUI is designed for people who are not used to thinking in code architecture patterns. The counter-intuitive part is that building for Apple's ecosystem actually constrains you in useful ways. You cannot ship an app without going through their review process, which forces you to think about permissions, data handling, and privacy from the start. For a clinician, that is not a bug. That is the feature. Most open-source alternatives for clinical tools ignore HIPAA considerations entirely because nobody built them for regulated environments.
I ran into a real edge case last year that almost made me abandon the whole project. I was trying to integrate HL7 FHIR standards for exporting patient summaries to referring physicians. The FHIR specification is massive, and the Swift libraries available in 2024 had incomplete implementations. I spent two weeks debugging a serialization error where certain psychiatric assessment codes were being dropped during JSON encoding because the library did not handle the particular extension types that DSM-5-TR uses. The workaround was to stop using the generic FHIR exporter and instead write a custom encoder specifically for the resource types I actually needed. It added about six hours of development time but eliminated the data loss. If you are considering this path, do not assume the existing open-source FHIR Swift libraries will cover your use case out of the box. Budget extra time for custom encoding work. Another thing nobody tells you about building clinical tools in Swift: testing is harder than you expect. You cannot just throw some random test data at the app and call it done. If your symptom tracker has a bug that displays a PHQ-9 score as 12 instead of 21, a real patient could be misclassified. I ended up writing unit tests for every calculation function and then manually validating each one against known scoring rubrics. This took about 20 hours of work that I would have skipped if I were building a hobby app, but it is non-negotiable in a clinical context.
Get the Full Details

Here are the limitations you need to understand before you start. First, Swift development requires a Mac. If you do not own one, you are looking at a $999 minimum investment plus the Apple Developer program fee of $99 per year. Second, iOS apps are sandboxed, which means file sharing and data import features are more restrictive than you might want. I had to work around this by using the Files app integration and Apple's Sharing Extension framework, which added significant complexity to my initial design. Third, Swift updates happen annually and sometimes break compatibility with older code. I learned this the hard way when migrating from Swift 5.8 to 5.10 and found that three of my CoreData migrations failed silently. It took me a full day to diagnose and fix. Make sure your architecture uses stable, versioned migration paths from the beginning. For people who want to try this, the practical first step is not to build your full clinical suite. Build one tiny tool. A simple PHQ-9 calculator that runs locally, stores nothing, and exits. If you can do that in a weekend using Apple's SwiftUI tutorials, you will have enough momentum to expand. If you cannot get the calculator working, you are probably not going to build a full practice management system either, and that is fine.
The download question depends on what you are trying to achieve. If you are a clinician looking to build your own tools, I recommend starting with the official Apple Swift documentation and the SwiftUI tutorials on developer.apple.com. There is no single public repository I can link to that will solve your specific practice needs because every psychiatric workflow is different. What worked for me will not work for you, and that is the whole point of building it yourself. If you want something to study, the Apple Sample Library on GitHub has several healthcare-related projects, though none are tailored to psychiatric practice specifically. The closest is their Core ML health classification demo, which I adapted for my medication side-effect tracking feature. The original was built for general fitness tracking and had to be significantly modified to handle the categorical and ordinal data types that psychiatric assessments use. One more thing worth mentioning because it is easy to overlook: the maintenance burden. A Swift app that works today may break after the next iOS update. I spend roughly 3-4 hours per quarter doing compatibility updates. Factor that into your time budget. It is not trivial but it is manageable compared to the hours you save on daily tasks.
I also switched from publishing on the App Store to distributing through my own enterprise certificate. The App Store review process for medical-adjacent apps is slow and unpredictable. I had one submission rejected because the reviewer considered my anxiety screening tool a "medical device" and requested FDA documentation. It was a basic questionnaire app with no diagnostic claims, but the review guidelines are vague enough that you can get caught in that ambiguity. Enterprise distribution bypasses that problem but requires you to handle your own security auditing and compliance verification, which is a tradeoff worth considering. The bottom line is that Swift has genuinely changed how I run my practice, but it is not a shortcut. It is a long-term investment of time that pays off in reduced administrative overhead and better data control. If you are willing to put in the initial development work and maintain it going forward, it is one of the most practical things I have done professionally.
