help with relationships..

U

ucdcrush

Hi all. I am attempting to put together a database for a health
project..

There are 2 types of questionnaires, but they have in common that both
of them collect the same clinical measures. So there is tBaseline (one
of the questionnaires) and tEncounter (the other). They both should
store clinical data in tClinical, and they should be linked by the
patient ID and the date.

Problem is when I try to add a record to tBaseline, it tells me there
is no matching record in tEncounter.

I am using a simple form based on the client table, with a subform for
tBaseline [linked by site id and patient id] and a subform on that
subform which is linked to tClinical [linked by site id, patient id
and visit date].

Here is a picture of the relationship window:
http://farm1.static.flickr.com/210/474949547_7526018ed2_o.jpg

Can someone suggest a way to keep the clinical data stored in
tClinical yet have tBaseline and tEncounter linked to it by patient ID
and visit date and also have cascading updates and deletes?

Thanks for any insight..
 
M

Michael Gramelspacher

Hi all. I am attempting to put together a database for a health
project..

There are 2 types of questionnaires, but they have in common that both
of them collect the same clinical measures. So there is tBaseline (one
of the questionnaires) and tEncounter (the other). They both should
store clinical data in tClinical, and they should be linked by the
patient ID and the date.

Problem is when I try to add a record to tBaseline, it tells me there
is no matching record in tEncounter.

I am using a simple form based on the client table, with a subform for
tBaseline [linked by site id and patient id] and a subform on that
subform which is linked to tClinical [linked by site id, patient id
and visit date].

Here is a picture of the relationship window:
http://farm1.static.flickr.com/210/474949547_7526018ed2_o.jpg

Can someone suggest a way to keep the clinical data stored in
tClinical yet have tBaseline and tEncounter linked to it by patient ID
and visit date and also have cascading updates and deletes?

Thanks for any insight..
Here is something that might be similar:
http://www.psci.net/gramelsp/temp/Survey.png

Surveys = Questionaires (tBaseline and tEncounter
SurveyQuestions = Questions (checklist items)
QuestionResponses = tClinical (values measured)
Personnel = Patients
Companies = Sites

Just something to consider. I am no expert.
 
L

Larry Daugherty

As H.D. Thoreau said: "Simplify, Simplify"!

Without analyzing your relationships, I suggest that you take them out
and re-think your schema. It should come down to something as simple
as having two one-to-many relationships from tblClinical on the one
side and tblBaseline and tblEncounter each filling a many role.

For those two relationships, referential integrity should be enforced.
if you are using autonumber surrogate keys then cascading updates
doesn't buy you anything but cascading deletes will and should be
checked.

HTH
 
F

Fred Boer

.... and it only took him 9987 paragraphs and 116680 words to deliver that
message! <g>

Fred Boer

P.S. (Figures derived by using Word Document Properties on the Gutenberg.org
version of the text... )

Larry Daugherty said:
As H.D. Thoreau said: "Simplify, Simplify"!

Without analyzing your relationships, I suggest that you take them out
and re-think your schema. It should come down to something as simple
as having two one-to-many relationships from tblClinical on the one
side and tblBaseline and tblEncounter each filling a many role.

For those two relationships, referential integrity should be enforced.
if you are using autonumber surrogate keys then cascading updates
doesn't buy you anything but cascading deletes will and should be
checked.

HTH
--
-Larry-
--

Hi all. I am attempting to put together a database for a health
project..

There are 2 types of questionnaires, but they have in common that both
of them collect the same clinical measures. So there is tBaseline (one
of the questionnaires) and tEncounter (the other). They both should
store clinical data in tClinical, and they should be linked by the
patient ID and the date.

Problem is when I try to add a record to tBaseline, it tells me there
is no matching record in tEncounter.

I am using a simple form based on the client table, with a subform for
tBaseline [linked by site id and patient id] and a subform on that
subform which is linked to tClinical [linked by site id, patient id
and visit date].

Here is a picture of the relationship window:
http://farm1.static.flickr.com/210/474949547_7526018ed2_o.jpg

Can someone suggest a way to keep the clinical data stored in
tClinical yet have tBaseline and tEncounter linked to it by patient ID
and visit date and also have cascading updates and deletes?

Thanks for any insight..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top