Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 6.0 Grids
Message
From
28/06/2001 23:09:13
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
 
To
28/06/2001 14:30:28
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00524840
Message ID:
00525020
Views:
14
>Hi all:
>
>I am a relatively new user and grids have frustrated me so far!
>
>Briefly, I am writing an appointment scheduling module for professionals. The tables I have created are:
>
>- Professionals
>- Appointments
>- Timeslots (15 min units)
>- Clients
>
>The form I have desigined so far (to browse appointments and identify empty timeslots), has a base class combobox, set to style 2 which will be populated with the full name of the professional. I also have on the form the olecontrol calendar. Addtionally, I have placed the base class grid on the form with 8 columns. The first col header is titled "Time" and the other 7 columns will have dates displayed as characters.
>
>I have also created a cursor that joins the timeslots table and the appointments table.
>
>The objective is to populate the grid with client appointments based on the professional chosen in the combobox.
>
>What I am struggling with is trying to find a way of displaying the client's name in the proper column which shows the date as a character field, while at the same time, displaying the name in the proper timeslot that the appointment had been made for. This should be repeated for any doctor chosen as well as when the next 7 days are chosen to be viewed. My plan is to have the user double click in any free timeslot in the grid which will then bring up an appointment booking form.
>
>Would appreciate your advise on how I should proceed with this problem.
>
>Thanks folks. Any help will be appreciated.

This may be a bit of a ramble, but here goes:

1) You need a "Week Table". This will have a record for each week and would be pre-generated. This is a master table/grid that drives a child table/grid of "weekly time slots". The primary key is "week #". Only a couple of records need be visible at a time.

2) The "weekly time-slot-table" is also pre-generated. The primary key is:

Week# + slot# + (military) start time + stop time.

There is a record ("per week") for every slot in the day.

The grid show all the slots for a given week (perhaps 8 hours x 4 slots/per hr = 32 rows ... 1 column per day).

3) There is an "appointent patient/pair" record: the primary key is:

Patient id + "doctor" id + Week # + day # + start time + stop time.

4) Clicking a cell in the "time-slot-table" pops a form initialized with the Week, Day, and start time. The User completes the Patient Id, Doctor Id, and stop time and "saves". Clicking another cell repeats the process ... perhaps defaulting to the last Patient Id/Doctor ID.

5) To display "appointment info" in a given cell, code a function that returns the "patient/doctor info" based on the primary key of the cell: eg. .ControlSource = "My_Func( alias.Week, alias.slot, , and anything else)"

6) My_func can access the "appointement pair table" using a "locate for BETWEEN " or some variation and return the appropriate string of patient/doctor identification info the display ... perhaps with related cells set to the same color.

7) The grid cell itself could be a container that has more than one control to show patient/doctor info ... but the more info you need to show, the bigger the screen. A 52" monitor should do nicely :)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform