[BangPypers] SQLAlchemy and 'non-trivial' default values for a column

Sriram Karra karra.etc at gmail.com
Tue Feb 12 02:49:12 CET 2013

On Wed, Feb 6, 2013 at 1:37 PM, Thava Alagu <thavamuni at gmail.com> wrote:

> Hi Karra,
> Since you want more flexible system, I recommend that you add more
> columns--
> apt date, reservation date, actual visit date and *time* of consultation.

I have some of those fields, but did not show them in my mail in the
interest of clarity.

> To maintain our own sanity when records are accidentally updated,
> this will help to trace the problem.
> Not sure if you want the 'consultation-day-id' as a handy parameter for
> reference *after* the consultation or even before the consultation.

It is a quirk of how the clinic operates. I generate a printout with
patient detail, doctor details etc. during registration. During subsequent
visits the clerk will (a) enter details in teh system and (b) make a note
by pen on the paper the patient is expected to bring with him/her. A new
printout is issued only when the paper gets fully used or the patient loses

So we just need a unique ID per visit to be noted on the paper by hand for
reference. the actual format of the unique ID was a request from the

Dhruv had suggested a solution that works. I'll go with it


More information about the BangPypers mailing list