Dear all,
I am creating a database for a medical practice. There are three locations from which a medical test can be ordered: Hospital, Office and Phone conversation. Each of those locations represents an encounter with the patient and has a table:
Hospital: VEEG
VEEGID (Autonumber) primary key
MRN (Text) foreign key (linked to demographics)
Clinic: ClinicVisit
ClinicID (Autonumber) primary key
MRN (Text) foreign key (Linked to demographics)
Phone conversation: Phone
PhoneID (Autonumber) primary key
MRN (Text) foreign key (to demographic)
There is a table called Tests. Tests can be ordered from either three locations. I would like to be able to track where Tests were ordered and link them to the specific patient encounter. I was wondering if this works: I will create three foreign keys in Table Tests as such:
Table: Tests
TestID (Autonumber) primary key
VEEGID (longinteger) foreign key linked to VEEG
ClinicID (Longinteger) foreign key linked to Clinic
PhoneID (LongIntenteger) foreign key linked to Phone
I will create the forms such as you can only enter one of the three foreign keys for any given record.
My question: Will this work, or is it breaking some important relational rules that will get me in trouble down the road.
I appreciate any help. Thanks.
I am creating a database for a medical practice. There are three locations from which a medical test can be ordered: Hospital, Office and Phone conversation. Each of those locations represents an encounter with the patient and has a table:
Hospital: VEEG
VEEGID (Autonumber) primary key
MRN (Text) foreign key (linked to demographics)
Clinic: ClinicVisit
ClinicID (Autonumber) primary key
MRN (Text) foreign key (Linked to demographics)
Phone conversation: Phone
PhoneID (Autonumber) primary key
MRN (Text) foreign key (to demographic)
There is a table called Tests. Tests can be ordered from either three locations. I would like to be able to track where Tests were ordered and link them to the specific patient encounter. I was wondering if this works: I will create three foreign keys in Table Tests as such:
Table: Tests
TestID (Autonumber) primary key
VEEGID (longinteger) foreign key linked to VEEG
ClinicID (Longinteger) foreign key linked to Clinic
PhoneID (LongIntenteger) foreign key linked to Phone
I will create the forms such as you can only enter one of the three foreign keys for any given record.
My question: Will this work, or is it breaking some important relational rules that will get me in trouble down the road.
I appreciate any help. Thanks.