Issue 26: Data in dbDay table is incorrect
Project Member Reported by bkmackellar, Apr 30, 2014


The test data entered into the dbDay table in revision116 represents the relationship with dbshifts incorrectly. The shift column contains the key of one shift. But a given day will have lots of shifts. The relationship is one to many, not one to one. Normally, we would put a foreign key in the shifts table pointing back to dbday. But the Homebase code did it differently, and it is safest to follow their lead. They put a *list* of shift ids into their dbdate table, and then use that list whenever retrieving shifts. A screenshot of the RMHHomebase dbDates table is attached. Please modify the data in the shift column of dbday to refer to shift records in the same way. Note - since the key of a shift will contain the clinician, we may need to retrieve by date instead.



RMHdbdatesTable.png
35.1 KB   View   Download
Apr 30, 2014
Project Member #1 ntrif...@gmail.com
I believe you meant to assign this to me. I'll fix it. I assume 9-5 would be a reasonable shift length?
Apr 30, 2014
Project Member #2 bkmackellar
pulling the discussion to Piazza because this affects a lot of code