Capturing doctor visits & Sickdays in org-mode
At work, we need to fill out a timesheet every month. For those of you who are not familiar with the concept, this is usually a spreadsheet with one column for each month and cells for each day. You fill in the code (V for vacation, S for a sick day, etc.) for the spots you took off from work. There might be a few more variations of these, but this is the general idea.
To me, timesheets are a pain in the rear. I need to check your calendar (or agenda in my case) to see when I took the off days, then I need to mark them down on the spreadsheet, and then I need to export them to a PDF to sign the thing and send it to my supervisor. I’m horrible at keeping track of these things because they don’t fit my workflow: a vacation or a doctor visit gets marked down on the agenda as an event with a location, unique to its settings. This makes it difficult to go back and catch those when it’s time to do the above routine.
I had been considering using tags for a while, but I usually only use them for people on the agenda when a task or event involves them. I could have used a category, but it seems silly to have a whole category for one thing just because it’s hard to find on the agenda. Then an idea hit me when I was watching the Emacs Conference, when I noticed a few of the presenters using tables: a table!
Of course! Not only can I mark down the exact day for a sick day I took, but I can also fill in if it was half a day or a full day, which is another thing I need to mark on the sheet. It took some time to figure out how to use org-capture for a line in a table, but the results were well worth it. Here, take a look:
Looks great, doesn’t it? Not only do I have a nice, organized place to mark down these days, but I can also link to the event itself on the agenda (right now it says journal, I should change that). I can even go into the table and add separators for months and make it clearer. If only Emacs could also fill the Excel sheet I need to fill and sign for me…
Here’s the code that makes this work:
("js" "Sickdays" table-line (file+olp "~/Archive/routines.org" "Personal" "Sickdays") "| %u | %^{(H)alf/(F)ull} | %? |")
table-line is the magic word that tells org-mode to populate the next available line in the table, so it doesn’t matter what’s before it. I can add and remove things as I please. And then the lines just work as is, using org-mode’s powerful table format.