deltron / veosan

2 stars 1 forks source link

Only write booking info to database after patient confirms #29

Closed deltron closed 12 years ago

deltron commented 12 years ago

Now there is a two-step process:

  1. Choose date, time, etc. -> store booking in database
  2. Enter patient details -> store patient in database, link to booking from step 1
  3. confirm reservation, show page, email, etc.

The problem is if the patient doesn't confirm in step 3, we have an orphaned booking stored in the database. It's probably better to

  1. Choose date, time, etc. -> carry booking info to next page
  2. Enter patient details -> store patient in database, store booking in database, link booking to patient, commit transaction
  3. confirm reservation, show page, email, etc.
phiiil commented 12 years ago

We will probably need something like this to keep session information: https://github.com/dound/gae-sessions/

I'm in javascript hell.

On Mon, Apr 9, 2012 at 9:56 AM, David L reply@reply.github.com wrote:

Now there is a two-step process:

  1. Choose date, time, etc. -> store booking in database
  2. Enter patient details -> store patient in database, link to booking from step 1
  3. confirm reservation, show page, email, etc.

The problem is if the patient doesn't confirm in step 3, we have an orphaned booking stored in the database. It's probably better to

  1. Choose date, time, etc. -> carry booking info to next page
  2. Enter patient details -> store patient in database, store booking in database, link booking to patient, commit transaction
  3. confirm reservation, show page, email, etc.

Reply to this email directly or view it on GitHub: https://github.com/im-patient/cliksante/issues/29

deltron commented 12 years ago

or we just pass it through as hidden fields in the 2nd form.

I bet that avoiding sessions as much as possible on GAE will make our lives a lot easier later on (QA, scaling, replication, etc.). Let's try to keep everything stateless.

how did you fall into the Javascript hole?

On Mon, Apr 9, 2012 at 12:37 PM, phiiil < reply@reply.github.com

wrote:

We will probably need something like this to keep session information: https://github.com/dound/gae-sessions/

I'm in javascript hell.

On Mon, Apr 9, 2012 at 9:56 AM, David L reply@reply.github.com wrote:

Now there is a two-step process:

  1. Choose date, time, etc. -> store booking in database
  2. Enter patient details -> store patient in database, link to booking from step 1
  3. confirm reservation, show page, email, etc.

The problem is if the patient doesn't confirm in step 3, we have an orphaned booking stored in the database. It's probably better to

  1. Choose date, time, etc. -> carry booking info to next page
  2. Enter patient details -> store patient in database, store booking in database, link booking to patient, commit transaction
  3. confirm reservation, show page, email, etc.

Reply to this email directly or view it on GitHub: https://github.com/im-patient/cliksante/issues/29


Reply to this email directly or view it on GitHub: https://github.com/im-patient/cliksante/issues/29#issuecomment-5028369

deltron commented 12 years ago

Fixed - pass the reservation information as hidden fields. Store booking & patient at the same time and links them together.