Hi,
I'm struggling with getting a query to function looking across multiple tables to create a report.
The context is that I am trying to build a database for patient records, so that we can both produce a daily, usable list and audit various aspects.
The tables in use are: Patients, Admissions, Operations and Complications. They are related as follows:
Every admission relates to a single patient. Each operation relates to a single admission for a single patient. Each Complication relates to a single operation, on a single admission for a single patient.
Each is linked by a primary key (Medical Record Number in Patients, AdmissionID in Admissions etc) which is one-to-many related to a FK field in the subsequent tables. (Complications has FK fields for MRN, Admission and Operation etc).
(Ideally, I eventually also want a problems table which was valid for each admission per patient; but for the time being am using a short text field in Admissions)
I've built a query which ran successfully just around patients and admissions. However, as I wanted to build a report which showed a list of currently admitted patients and included their operations and complications, I needed to build a query which pulled all of this info.
When I run the query, however, it returns no records.
Can anyone suggest a solution, please?