Skip to content

v1.0.0

Choose a tag to compare

@MichelleFindlay MichelleFindlay released this 10 Oct 01:04
· 37 commits to main since this release
85b4d9a

The first release of Pillbox: a self-hosted medication and health tracker built with PHP and MySQL, for phone and desktop browsers.

Highlights

Medications

  • Add medicines by searching the NHS medicines dictionary (dm+d), or type them in yourself. Picking a match fills in the name, strength, form and dose unit.
  • Several dose times per medicine, with different amounts on different weekdays and date ranges (for example, for reducing a dose).
  • As-needed medicines, with an optional daily maximum.
  • Stock tracking: "Prescription collected" adds to stock (with a collection history), and you can set an exact count. Low-stock warnings appear on Today.
  • Dose change history: changes to strength, amount or timing are recorded automatically (for example "Increased from 10mg to 20mg a day"), with the date and reason. You can add earlier changes by hand.
  • Stop a medicine and keep its history, or delete it permanently.

Today and history

  • Tick off doses with Take, Skip or Undo, see missed doses, and log as-needed doses.
  • History for each day, with the percentage of doses taken for each medicine.

Health readings

  • Blood pressure, heart rate, blood glucose, ketones, weight, temperature, SpO₂, breathing rate, peak flow, INR, cholesterol, pain, mood, sleep, fluid intake, steps, and symptoms or side effects.
  • Each person picks the readings their doctor wants, and can add their own measurements.
  • Trend charts and averages for every measurement.
  • Apple Health import: upload the Health app's export (re-importing never creates duplicates), or sync automatically every day using Shortcuts or the Health Auto Export app.

Appointments

  • GP, specialist, hospital, dentist, optician, blood tests, scans and more, with reminders.
  • A private calendar link for each person, which Apple Calendar, Google Calendar and Outlook can subscribe to.
  • An appointment page to prepare with: questions to ask, suggested topics from what you've recorded, and notes on what was decided. It can be printed.

Travel mode

  • Plan trips across time zones: switch to local time, stay on home time, or shift by 1 to 4 hours a day, with a day-by-day preview of dose times.

Reports and your data

  • A printable doctor's report (or save it as a PDF) that includes dm+d codes, plus CSV export.
  • Download my data, and delete your account.

Phone app

  • Install Pillbox as an app on iPhone and Android, from the browser's Add to Home Screen or Install app option, with no app store needed. It opens full screen with its own icon.
  • Sign-ins last across app restarts. When the phone is offline, a "You're offline" page is shown.

Accounts and sign-in

  • Multiple people, each with private data, plus an admin page.
  • Local username and password, Microsoft Entra ID single sign-on, and any OpenID Connect provider (Google, Okta, Auth0, Keycloak, Authentik and others).
  • Link or unlink a Microsoft account, and optionally turn off password sign-in when single sign-on is set up.
  • Self-service: edit your profile, username and email, change or add a password, and sign out other devices.
  • 8 colour themes, including high contrast, each with light, dark or automatic mode, chosen per person.

Security

  • Passwords are hashed, and password sign-ins are rate-limited.
  • Every form has CSRF protection.
  • Cookies are HttpOnly and SameSite, and also Secure over HTTPS.
  • A strict Content-Security-Policy is sent.
  • Single sign-on uses the authorisation-code flow with PKCE, and the returned ID token is fully checked.
  • Every database query is limited to the signed-in person's own data.

Installing

Requirements:

  • Apache 2.4 with mod_rewrite
  • PHP 8.1+ with pdo_mysql, curl, openssl and mbstring
  • MySQL 8.0+ or MariaDB 10.5+
  • HTTPS

Steps:

  1. Upload the files and create an empty database. The tables are created the first time Pillbox is opened.
  2. Copy config/config.example.php to config/config.php and fill in your database details.
  3. Make storage/ writable by the web server.

Optional extras, each set up in config/config.php:

  • dm+d search needs a free NHS England Terminology Server system-to-system account.
  • Single sign-on needs a client ID and secret from each provider.

See the README for the full instructions.

Good to know

  • Pillbox can't import your medicines from the NHS. NHS England isn't letting new apps read medication records. The dm+d codes Pillbox stores are the same ones GP records use, so they'd match if that changes.
  • Admins see Update available in the footer when a newer version is on GitHub.