ERD diagram - needs checking

Posted on 2011-04-23
Last Modified: 2012-08-14
Hi. I want to design a simple ERD diagram.

I want a patient to be able to have an appointment. A doctor to 'hold' an appointment. An appointment to prescribe one or more prescriptions. A prescription to consist ot one or more medications. An appointment updates a patients record.

Attached is my take on this. Please could you review this and let me know if it seems integral. Thanks

Also I would like to include a many to many relationship somewhere in here  diagram
Question by:graziazi
    LVL 24

    Accepted Solution

    ... Homework?

    Your model as it stands is simplistic. Every appointment results in at least one mandatory prescription? (Actually in the USA this might not be inaccurate... :) ) Any one prescription is likely only for one medication, BTW. If I get multiple medications prescribed as a result of an appointment each one is on its own prescription. And since a prescription will not be for anything that isn't a medication, I think you can probably collapse those into one table.

    You might want to think about how to model a family attending as a single appointment. Similarly prescriptions would be attached more to a patient than to an appointment, but you would want a record of which appointment triggered a prescription.

    Also how will you handle an invoice that is only part-paid? What if a patient pays for multiple appointments in a single payment?

    Author Comment

    Hi. Thanks for the reply. You raised some interesting questions. I came up with the narrative myself, I'm rehearsing for exams :)

    Things I'll need more practise
    LVL 24

    Expert Comment

    by:Joe Woodhouse
    As a general comment I find it more useful to think it through in words and think about what's actually being modelled. At every relationship in your diagram I asked myself "is there a time where this might not be mandatory even though it is currently marked as mandatory?" (Someone doesn't pay their their invoice in full and another invoice needs to be issued for the outstanding amount.) "This is currently marked one to one - is there ever a time when there'd be more than one? (A couple or family jointly attending an appointment with each of them being treated.)

    Once you go through it in words like that, the diagram itself is easy. Do the diagram after the analysis, not as *part* of the analysis. :)

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
    Read about achieving the basic levels of HRIS security in the workplace.
    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…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    754 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now