I have to design a database for a doctors surgery for my college project. Here is the brief of the project:
A local doctors’ surgery, Cedarwood Medical, would like to convert their paper-based medical/prescription records onto a database system, so that it is quicker and easier to find all patients who have been prescribed a particular drug at any one time.
Cedarwood Medical would like to hold their patient details, all drugs prescribed to a particular patient, visit details which should include which doctor they have seen and what drug(s) were prescribed on that visit. The surgery would like to record all medical conditions a patient has been diagnosed with, current and past.
The database is not to be used for booking appointments, as Cedarwood Medical already has a booking system in place, which they are happy with.
Each drug given to a particular patient will have specific instructions, which are based on the patients’ condition(s), what other drugs they are taking etc.
Cedarwood Medical would like to be able to extract information from the new system, including (but NOT limited to):
• All patients in a specific age group
• All patients prescribed a specific drug, in a specific date range
• All patients who have visited a specific doctor
• All drugs allocated on a specific date, and in a specific month
• All patients with a specific medical condition.
I have attempted to normalise so that I can produce tables in access and the relationships between them. UNF PATIENT ID
PATIENT TITLE
PATIENT FORENAME
PATIENT SURNAME
PATIENT SEX
PATIENT DOB
PATIENT ADDRESS
PATIENT TEL NO
PATIENT NOTES
DOCTOR ID
DOCTOR FORENAME
DOCTOR SURNAME
DOCTOR SEX
DOCTOR NOTES
PRESCRIPTION ID
PRESCRIPTION DATE
DRUG ID
DRUG NAME
DRUG SIDE EFFECTS
DRUG DANGERS
MEDICAL HISTORY ID
MEDICAL CONDITION ID
ILLNESS
SYMPTOMS
TREATMENT
VISIT ID
VISIT DATE
VISIT TIME
1NF PATIENT ID
PATIENT TITLE
PATIENT FORENAME
PATIENT SURNAME
PATIENT SEX
PATIENT DOB
PATIENT ADDRESS
PATIENT TEL NO
PATIENT NOTES DOCTOR ID
DOCTOR FORENAME
DOCTOR SURNAME
DOCTOR SEX
DOCTOR NOTES
PRESCRIPTION ID
PRESCRIPTION DATE
DRUG ID
DRUG NAME
DRUG SIDE EFFECTS
DRUG DANGERS
MEDICAL HISTORY ID
MEDICAL CONDITION ID
ILLNESS
SYMPTOMS
TREATMENT
VISIT ID
VISIT DATE
VISIT TIME
2NF PATIENT ID
PATIENT TITLE
PATIENT FORENAME
PATIENT SURNAME
PATIENT SEX
PATIENT DOB
PATIENT ADDRESS
PATIENT TEL NO
PATIENT NOTES DOCTOR ID
DOCTOR FORENAME
DOCTOR SURNAME
DOCTOR SEX
DOCTOR NOTES PRESCRIPTION ID
PRESCRIPTION DATE
DRUG ID
DRUG NAME
DRUG SIDE EFFECTS
DRUG DANGERS MEDICAL HISTORY ID
MEDICAL CONDITION ID
ILLNESS
SYMPTOMS
TREATMENT
VISIT ID
VISIT DATE
VISIT TIME
3NF PATIENT ID
PATIENT TITLE
PATIENT FORENAME
PATIENT SURNAME
PATIENT SEX
PATIENT DOB
PATIENT ADDRESS
PATIENT TEL NO
PATIENT NOTES DOCTOR ID
DOCTOR FORENAME
DOCTOR SURNAME
DOCTOR SEX
DOCTOR NOTES PRESCRIPTION ID
PRESCRIPTION DATE DRUG ID
DRUG NAME
DRUG SIDE EFFECTS
DRUG DANGERS MEDICAL HISTORY ID VISIT ID
VISIT DATE
VISIT TIME PRESCRIPTION ID DRUG ID MEDICAL HISTORY ID MEDICAL CONDITION ID DOCTOR ID VISIT ID MEDICAL CONDITION ID
ILLNESS
SYMPTOMS
TREATMENT
Could someone tell me if I have done this right because when I tried to put this into access the relationships sometimes come up as interderminate (which I dont know what that means). Any help would be greatly appreciated.
3 11191
I'm not sure what 'interderminate' means either, actually :-)
Perhaps you mean 'indeterminate'?
Something doesn't look quite right with what you have listed below the 3rd Normal Form section of your table structure. You have several tables listed as only have one field: the foreign key of another table... That's likely why you are getting an indeterminate relationship warning from Access.
Remember when designing your table structure you need to be able to separate between subjects and characteristics. An example of subjects in your project would be Doctors, Patients, Prescriptions. An example of characteristics would be Title, FrontName, BackName, Street Address, City, ZIP, DOB, Instructions etc.
Remember also that Subjects become tables, characteristics become fields in the tables.
Break each Subject down according to its relationship with the other Subjects... One Doctor can have multiple Patients, but can One Patient have multiple Doctors? If only the former is true you have a one to many relationship between Doctors and Patients, however I think you will have to admit that really the latter is true! This means you have a Many to Many relationship between Doctors and Patients, which will require a simple linking table which breaks this down into two One to Many relationships.
Next clarify in your mind to whom the Prescription is related, and the nature of its relationship: to Doctors or to Patients? One to Many, One to One, Many to Many?
If you think carefully about this, you'll see that while Doctors can write Prescriptions, the real relationship is to the Patient who is receiving it! After all the requirement is not to find which prescriptions the Doctor writes, but which Prescriptions the Patient has... Thus you'll be changing the prescription to be related to the Patient, not the Doctor. What is its relationship? One Patient will have multiple prescriptions? One Prescription will have multiple patients?
An extremely good book that I would highly recommend you buy off Amazon.com is Database Design for Mere Mortals 2nd Edition by Mike Hernandez. You'll get far more from working through his book than the few dollar investment you make to buy it.
Any other questions, don't hesitate to ask.
Regards,
Scott
Hi. Scott has given a very good, detailed reply and you have plenty to do, I'm sure! I notice that you have tended not to carry forward the primary key from an entity when you are going to 2NF.
As Scott identified, Prescription, for instance, has just an ID and does not refer to the patient receiving the prescription. Similarly your visit link table has a doctor ID but no patient ID. Doctor visits Patient, not just Doctor makes a visit.
To assist you avoid this vanishing key issue, when you are looking at relationships between entities such as patient, doctor, prescription and so on ask yourself what that relationship represents. For example, Patient is treated by Doctor, Patient is prescribed Prescription, and so on.
Explicitly defining the kind of relationship will help you recognise whether a relationship is one to one, one to many, or many to many. A Patient can have many Doctor visits, and a Doctor can visit many Patients - so this is a many to many relationship which has to be resolved by use of a linking entity - Doctor Patient Visit would be one name for it. Thinking of these as bi-directional relationships makes it less likely you will overlook carrying forward the primary keys of the many-to-many tables as foreign keys into the linking tables.
Good luck with your project
Regards
Stewart
Sign in to post your reply or Sign up for a free account.
Similar topics
by: John D. |
last post by:
I have a small (fewer than a few thousand records) database with the
following properties:
Each record has four fields: A, B, C, D.
Fields A and B are unique:
there is one B for every A and one...
|
by: deko |
last post by:
Do I get more scalability if I split my database? The way I calculate
things now, I'll be lucky to get 100,000 records in my Access 2003 mdb.
Here some math:
Max mdb/mde size = 2000 x 1024 =...
|
by: Anne Lynn |
last post by:
I have a query where I defined three fields must match - Physician, Date
of Service and Claim#. No problem. Now I need to add parameters that
allow a user to define a 4th field= Procedure Codes. ...
|
by: Stewart Graefner |
last post by:
Here is a chunk of code that works for an individual record. It
evaluates dates and checks or unchecks boxes as it goes along. It may
not be pretty but it works. What my problem is that I need it...
|
by: Monty |
last post by:
Hi there, I have a simple medical database with patient records. I use:
TotalRecords.Text = DetailsViewMain.DataItemCount & " records" to reflect
the number of patients in the db.
I then filter...
|
by: bgreen |
last post by:
I am hoping for some assistance with formatting a large text file which
consists of a series of individual records. Each record includes
specific labels/field names (a sample of 1 record (one of...
|
by: Nameless One |
last post by:
Okay, it's been a while. I'm sure I used to know how to do this.
I have two identical databases in structure and format. I want to
copy records from a table in one database and add them to the...
|
by: ssledgeo |
last post by:
i have a database in ms access. i keep medical information of applicants.
in some cases some applicants take the medical exams twice. how do i keep this two records and mentain a unique id for the...
|
by: Matheus Mumbala |
last post by:
Can anyone please try and help me with this project
Background
ABC Mining Ltd is a company operating in the mining industry. The company was hard hit by the current economic recession. In order...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |