Introspective is an iOS app that is focused on both mental and physical health. It is a new way to explore your health data. It allows you to write custom (easy-to-understand) queries against your data and create custom graphs that can show the relationship between different pieces of your health data.
MIT License
Introspective is an iOS app that is focused on both mental and physical health. It is a new way to explore your health data. It allows you to write custom (easy-to-understand) queries against your data and create custom graphs that can show the relationship between different pieces of your health data. Self-tracking, as it is sometimes called, has a lot of potential value to offer. This tool helps you harness that value. It is available to download for free on the App Store at https://apps.apple.com/us/app/introspective/id1521706312
What if a doctor had actual data available to customize the care of each individual to their specific needs, even if the patient doesn’t know what their needs are? Self-tracking is a recent trend that has seen a lot of purported benefit anecdotally. This data has a tremendous amount of potential value in the form of helping behavior modification therapy, reducing reliance on population statistics, reducing reliance on medications and even for preventative care. Current patient doctor interactions, especially in the field of psychiatry, are driven by the patient’s memory. There has long been research available to show how fallible human memory is but until self-tracking, there was not a better way. Imagine going to the doctor and just showing them a dashboard on your phone instead of spending 5-10 minutes answering a standard questionnaire. Imagine an app that could help autistic children gain emotional independence. Imagine screening for bipolar, seasonal affective disorder and other mood disorders. Imagine monitoring mood journals for suicidal ideation. For psychiatry in particular, this data could also allow the doctor to spend more time with each patient by providing them with a sort of dashboard for checkup appointments based on a patient’s diagnoses instead of them having to spend 5-10 mins asking each ongoing patient every time how they’ve been feeling over the past x months, etc (Importantly, this data would never have to leave the user’s mobile device as they can just bring it with them to show the doctor instead of transmitting the data, eliminating almost all privacy concerns from a technical level as far as compliance with HIPAA). This data can also be used for “augmented” introspection for an individual with lower than average emotional intelligence by automatically looking for trends in their mood across activities / days of the week, etc. and prompting them with questions of why they think the found correlations might be, as well as other appropriate questions. This would prep the patient to be thinking about things in between appointments. Not only would this be a better patient outcome, allowing them to have more independence and be better able to communicate their needs, but it would also reduce the amount of financial burden on insurance companies and the time burden on medical staff by increasing the efficiency of time spent by a therapist / counselor, allowing for both a reduction in the amount of time they need to spend with the patient and faster outcomes. The value of these and other preventative measures based on the tracked data is compounded even more when you consider the current shortage of doctors in the US and other countries.These are all possible.
See https://commons.wikimedia.org/wiki/File:The_Cognitive_Bias_Codex_-_180%2B_biases,_designed_by_John_Manoogian_III_(jm3).png for other types of cognitive bias
There are many things to consider when choosing a recording method. For most people, your phone is going to be your new best friend. For those of you wanting to use a more analog approach, this section won’t be useful. If you’re still reading, you’ll want to find an app for recording (even if it’s just a spreadsheet in Numbers / Excel). The priorities I’ve fleshed out for choosing an app, their order and justifications for them are listed below.
Explore your data in a unique way by querying for exactly the records in which you're interested. Specify complex conditions on any attribute for any supported data type by combining them using "and", "or", and condition groups (full boolean algebra support with grouping). Even better, you can limit your query further by looking at other data types within the query. For example, you can find all moods that were recorded within a half hour of socializing.
Use custom queries to specify exactly which data points you want to graph. The following graphs are available:
Use queries to find trends between two different types of data (i.e. how your heart rate affects your mood). Show multiple values (i.e. avg mood, min mood) over time in the same graph. Specify how to group data into a single value for each point (i.e. avg mood per hour).
Introspection integrates with a number of data types from the Apple Health app, allowing you to query against them. For a full list of supported data types, see the list below.
The following data types are supported (with more to come, guaranteed):
? = optional field
Code formatting is done via SwiftFormat. You must install it for the build to work because all non-test code is automatically formatted during the build process.
cd .git/hooks
ln -s ../../scripts/pre-commit .
For dependency management, CocoaPods is used. See Podfile for configuration.
There are 5 main build targets in this project:
There are 3 different types of tests in this project:
Any time you need to run a FunctionalTest class that requires Health App integration on a new simulator, you will first need to:
All FunctionalTest classes should now run properly on the target simulator.
This project uses SwiftyMocky for mocking. This is why you will sometimes find //sourcery: AutoMockable
on some protocols. As part of the build process, rake mock
is ran in a Run Script Build Phase. Running rake mock
in the root project directory will search for and regenerate any mockable protocols (marked with the previously mentioned comment) and any custom mocks that are in the CustomMocks directory as defined by the Rakefile and the SwiftyMocky config generation script.
Currently, this project uses a public Trello board, though this may be migrated to something else in the future. Feel free to take a look.
From the very beginning of this project, I decided that privacy and security were the number one priorities. As such, any and all of your data NEVER leaves your phone (unless you export it). Don't believe me? Look at the source code yourself.