From GaProgMan's Wiki
Jump to: navigation, search

NOTE: This page contains an overview of the medico project, for an in-depth description see the medico design document pages

medico is an open source Windows Forms application, written in C#, designed to annoy the user until they have taken their medication.

Original author(s) Jamie
Developer(s) Jamie
Development status Planning
Written in C#, .NET
Operating system Windows
Available in English
License GPLv2

Project Description


medico is dedicated to the memory of Leigh Fisher, who passed away, at the age of 32, shortly before Christmas 2013. He was a close, personal friend of Jamie's.


Leigh and Jamie had discussed the ideas that would become 'medico in great detail during (what would become) his final summer. Leigh's medication regimen was quite strict during the final year of his life, and he would follow this procedure everyday:

  • Take his first medication shortly after waking
  • Manually create a series of alarms on his mobile devices, one alarm for each the doses of his medication
  • Nap, rest or take it easy until it was time to take his medication (the alarm would wake him)

All of his medication was time based, so he would have to set each of the alarms at the beginning of the day - MANUALLY. What he wanted was an app that would set all of the alarms for him when he took his first dose in the morning. Should his miss or delay a dose, the later alarms would be put on hold until he took his allotted dose, then all alarms based after that one would cascade AUTOMATICALLY.

Medication Class

The backbone of medico is the Medication class. This class contains very little medical information for each medication (save for the actual name and individual dose of each medication), all other meta data is used to help the user identify which medication to take and to set up alarms for that medication.

The application will create one or more instance of these objects with the user supplying the medical name, short name (a name that is easier for the user to recognise as some medications have long names), suggested dosage, time between doses (in minutes), maximum doses in a 24 hour period, the time of the initial dosage (optional), and a short description of the medication. This information will be used by the application to create a series of alarms for each dose of the medication.


John is prescribed:

  • Ibruprofen (2 pills per dosage, 4 hours apart, no more than 4 dosages in a day, red capsules with a single blue stripe)
  • MadeUpIButamol (1 patch per dosage, 4 hours apart, no more than 6 dosages in a day, buff coloured patches)

John enters these details into the Medico application, which creates two instances of the class as follows:

medicationClassOne.NameOfMedication         = "Ibruprofen";
medicationClassOne.ShortName                = "Pain meds";
medicationClassOne.TimePeriodBetweenDoses   = "240";
medicationClassOne.PrescribedDosage         = "2";
medicationClassOne.MaxNumberOfDosesPerDay   = "4";
medicationClassOne.InitialDoseTime          = "09:00";
medicationClassOne.Description              = "red capsules with a single blue stripe";

medicationClassTwo.NameOfMedication         = "MadeUpIButamol";
medicationClassTwo.ShortName                = "Patches";
medicationClassTwo.TimePeriodBetweenDoses   = "240";
medicationClassTwo.PrescribedDosage         = "1";
medicationClassTwo.MaxNumberOfDosesPerDay   = "6";
medicationClassTwo.InitialDoseTime          = "09:00";
medicationClassTwo.Description              = "buff coloured patches";

The application sets the following alarms on John's device:

  1. 09:00 "Pain Meds - Ibruprofen (red capsules with a single blue stripe) * 2"
  2. 09:00 "Patches - MadeUpIButamol (buff coloured patches) * 1"
  3. 11:00 "Pain Meds - Ibruprofen (red capsules with a single blue stripe) * 2"
  4. 11:00 "Patches - MadeUpIButamol (buff coloured patches) * 1"
  5. 13:00 "Pain Meds - Ibruprofen (red capsules with a single blue stripe) * 2"
  6. 13:00 "Patches - MadeUpIButamol (buff coloured patches) * 1"
  7. 15:00 "Last dosage: Pain Meds - Ibruprofen (red capsules with a single blue stripe) * 2"
  8. 15:00 "Patches - MadeUpIButamol (buff coloured patches) * 1"
  9. 17:00 "Patches - MadeUpIButamol (buff coloured patches) * 1"
  10. 19:00 "Last dosagePatches - MadeUpIButamol (buff coloured patches) * 1"

At each of the time periods outlined, the application receives a message from the operating system that an alarm has fired. This causes the application to display a message and play and audible alert. The contents of the alert will be the name (string literal) of the alarm, which contains the details of the medication to take, a "Taken dosage" button and a "snooze dosage" button.

Pressing the "Snooze dosage" button will, effectively, snooze the dosage for 1 minute. Pressing the "Taken dosage" button will cause the alert and the specific alarm to be removed, and all later alarms for that medication to be staggered based on the time that the button was pressed. That way all medication doses will be taken as close to time between doses as is possible.