Full Version: Would like some advice
UtterAccess Discussion Forums > Microsoft® Access > Access Tables + Relationships
medic7103
Let me start by saying I've been lurking these boards for months and I'm forever greatful for the constant flow of information. I learn something new ever time I log on! I'm hoping some of you might have suggestions on the project I just received.

I have been tagged to bring together three departments that bring patients into our hospital requiring beds. Prior to this undertaking each dept would fill out similar forms and fax them back and forth to request and then assign beds.

I've broken down all the forms into what I can figure is a normalized state. I'm still learning as this is only my third MSAccess DB ever. This DB is quite a bit larger than my previous DBs where proper normalization and relationships weren't as mission critical.

I've attached a .jpg of the relationships. Any comments or suggestions would be greatly appreciated!
ScottGem
QUOTE
This DB is quite a bit larger than my previous DBs where proper normalization and relationships weren't as mission critical.


First, I take exception to that statement. If you have been reading here you will see that most of us feel that normalization is ALWAYS mission critical.

I'm afraid you need to understand normalization better. Several of your tables have repeating groups. For example tblTimes. What you are doing is making the (not uncommon) mistake of defining values using field names. Instead you should be doing something like this:

tblTimes
TimesID (PK autonumber)
VisitID (FK)
TimesTypeID (FK)
Visittime

This would be accompanied by

tblVisits
VisitID (PK Autonumber)
PaitientID (FK)
VisitStart
VisitEnd
etc.

tluTimeTypes
TimeTypeID (PK Autonumber)
TimeType

using a strucutre like this, you only have to enter a time tpye applicable to that visit. You also don't have to redesing your forms or tables if a new time type is added. Your tblPtcondition and tblPtLabs have the same issue. You also need to treat each admission separately. A patient may be admitted different times for different conditions. So you need the Visits table (or call it tblAdmissions) to handle that. From there most everything else is linked to the Visit not the patient. You link to the patient thru the visit, not directly.
medic7103
My apologies Scott. I hadn't meant to play down the importance of normalization by an means. I was merely pointing out that I was able to accomplish my goals without a firm understanding of it previously. I have since come to understand it's importance and am now struggling to wrap my little brain around it.

So following what I believe you are saying and continuing it for the TblLabs I would create it like this:

tblLabs
LabsID(PK Autonumber)
VisitID(FK)
LabsTypeID(FK)
LabValue

Accompanied by:

tluLabTypes
LabTypeID
LabType

again linking to the visit. Am I understing it correctly?

Thanks for helping me here!
ScottGem
Exactly. In fact, many tables in a database can follow a similar structure. The idea is to use records to define the attributes of an entity rather than fields. In the above example, the entity is the lab test. The attributes of the test are Visit, Type, Result. There might be additional attributes like a Timestamp since some tests may be taken several times during a Visit. But the entity/attribute concept is a part of the normalization process.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.