Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

ERD diagram needs verification

Posted on 2011-03-25
2
Medium Priority
?
2,216 Views
Last Modified: 2012-05-11
Hi, I'm trying to draw an Entity Relationship Diagram for a smal General Practitioner's clinic.

A patient can see many doctors
A doctor can see many patients
A patient/doctor has 1 or more appointments
An appointment issues an invoice
A doctor prescribes a prescription
A patient has one record
A record consists of many appointments

Please can you take a look to see if I am displaying this correctly in my diagram. I am a bit unsure about how to involve the Prescription entity Erd diagram
0
Comment
Question by:graziazi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 37

Accepted Solution

by:
ValentinoV earned 1000 total points
ID: 35221030
That "Patient Record" table seems a bit weird to me.  A Patient can have multiple Appointments, right?  I think the Patient Record table should be renamed to "Patient Appointment" because it's a many-to-many relationship table, just like "Patient Doctor".

If you need to retrieve a patient's record, you would just join the Patient, Patient Appointment and Appointment tables in your queries.  Unless I'm mistaken, there's no particular need to keep a separate "Patient Record" entity.  If you do need it, for instance when a doctor wants to keep track of general notes per patient, not linked to any appointment in particular, you could add a "Patient Record" table with just a one-on-one relation to Patient.  Possibly a link to Doctor (to keep track of who made the note) is needed, all depends on the requirements.

As for Prescription, all that seems to be missing is the link between Prescription and Appointment.  You've got the Appointment_ID already, so it seems logical to put a relationship between the two tables.  After all, a Prescription is created during an Appointment.  Possibly multiple prescriptions?

Hope this helps?
0
 
LVL 35

Assisted Solution

by:ste5an
ste5an earned 1000 total points
ID: 35221722
hi,

Valentino is quite right.

Your [Patient Record] entity is redundant, because you already have it implicitly in you [Patient Doctor] entity. So you have an attribute [Notes] in [Patient Doctor] for general notes and you need an additional entity [Appointment Notes] - which is quite what you had in mind for [Patient Record] - for a one-to-many relationship between [Appointment] and notes per appointment, otherwise you would get anomalies per design.

The [Invoice] entity may be correct, but at least in Germany we have some billing by case, thus you should review your requirements here.

A prescription is always a result of an appointment - also speaking for Germany only, it's a legal requirement - thus the [Prescription]  entity needs only to be in a one-to-many relationship with [Appointment]. Otherwise it is in rrelation to [Patient Doctor], but not to [Doctor] unless you are giving out prescriptions without knowing your patient.
ERD.jpg
0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently I was talking with Tim Sharp, one of my colleagues from our Technical Account Manager team about MongoDB’s scalability. While doing some quick training with some of the Percona team, Tim brought something to my attention...
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

647 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question