Tuesday, June 28, 2022

making pill tracking sheets in php

Our poor kitty Dean has a touch of small cell lymphoma (on top of his asthma) and his pill schedule has gotten pretty complicated! I decided to make a simple tool kirk.is/tools/pills/ that lets me (or anyone) make a printable pill schedule grid, ala:

(You can see Dean's full grid here)...

Like my recent quickpoll program, I decided to both keep it as pure PHP as well as relying a rather too geeky by half text-based format for the pill descriptors, each pill name can be followed by an @ sign to say how often (e.g. 2 for every other day, 3 for every third day, etc) and then a + sign and an offset for how many days forward):

everyday pill
every other day pill@2
every week pill@7
every 2 week pill, start in 5 days@14+5

I think I really need to build myself a generic form builder, while this text-block based stuff is cool in a minimalist way (and lets you copy and paste almost all the data in one fell swoop) it's not user friendly...

Anyway, other minor bits of cleverness is setting up the page to submit to itself via GET, so it's always bookmarkable, as well as using CSS media queries so when you print it's just the grid.

No comments:

Post a Comment