Hi David,
Off the top of my head, you could do 3 tables:
1. patients (PatID, Name, other details)
2. medication (MedID, Medicine, dosage, etc) you could have 2 aspirins with
diff. dosages
3. patient_med (PMID, PatID, MedID)
To get medicines for a patient:
Select MedID, Medicine, ... from patients a,medication b,patient_med c where
a.PatID = c.PatID and b. MedID = c.MedID and a.QueryField = FilterValue
To get all patients on a medicine:
Select PatID, Name, ... from patients a,medication b,patient_med c where
a.PatID = c.PatID and b. MedID = c.MedID and b.QueryField = FilterValue
I think this accomodates a lot of variables already. The other more senior
members can help scrutinize my idea.
Hope this helps.
-Weng
________________________________
From: David Halliday
I wonder if you could advise on this point.
There are already 70 tables, (one for each medicine). Each table has a
column listing all the patients on that medicine. For example:
ASPIRIN lists 1989 patients's names (in one column)
VALIUM lists 734 patients' names
so on
There is also one table called PATIENTS. It lists all the 2000 individuals'
names. Perhaps there is a faster and more efficient way!
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/CefplB/TM
--------------------------------------------------------------------~->
The php_mysql group is dedicated to learn more about the PHP/MySQL web database
possibilities through group learning.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php_mysql/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/