Prepare for v59 database

This commit adds changes related to the new v59 database layout;
changes in the new layout are:

* Make Drug use Schedule
* Separated "as needed" from repeatMode