Subject |
Re: Form to Form |
From |
Mervyn Bick <invalid@invalid.invalid> |
Date |
Tue, 13 Jun 2023 15:58:21 +0200 |
Newsgroups |
dbase.getting-started |
On 2023/06/11 17:36, Mervyn Bick wrote:
> More, perhaps later otherwise tomorrow.
Looking at the structure of your patient table raises a few issues.
Using a logical datatype for the SEX field instead of the more usual
character field with a width of 1 reminds me of the story about the job
applicant filling in an application form. The entry for SEX was 'YES'.
ACTIVE is a reserved word in SQL. Using it as a field name is permitted
but it does require special handling if you ever need to use SQL to
interrogate your tables. You may feel now that this will never happen
but 'never' is a long time. Use, say, ACTIVE_PAT instead.
There is a school of thought that holds that one should never save the
same information in more than one place. The information in your
patient table should be information that seldom changes such as address
or phone number. The date of the initial appointment will never change
so that could well be saved but the dates of the previous and next
appointments should be fetched from the appointments file when your edit
form opens.
Instead of having a BALANCE field in the patient table to show if
payments are outstanding interrogate the billing table when the form
opens. That way there is no possibility of an error.
Instead of using a logical datatype for the BILL_TO field save the
PAT_NO of the responsible person. If the same number is saved in PAT_NO
and BILL_TO it means the patient gets the bill. If the numbers are not
the same you can show who gets the bill.
You have used character fields with a width of 20 for the INSnNOTES
fields. Is this enough? Memo fields may be a better choice. You are
not restricted to one memo field per table.
I added code to the edit form to display the patient's age and when
testing this I found that one character was enough to find a patient's
name EXCEPT in the case of Tom Riddle. RI and Enter worked. R and
Enter didn't. On the other hand G and Enter works perfectly for
Hermoine Granger. Needless to say, this has occasioned much head
scratching. It's got to the stage where I can't see the wood for the
trees. :-( Tomorrow is another day.
Mervyn.
|
|