nrsmoll
Member
I have a database join which I would like to use to select a diagnosis code specific to a patient.
So once the dropdown is a selected, only the records associated with the patient should be shown.
The database join is in the "visits" table and both the foreign key fields refer to the "main" table primary key (ID) which is the patient ID.
I have set up a databasejoin element, and in the "Filter Where" option I have tried the following codes:
Overall, I want to filter on the two foreign keys (fk), in other words that they match each other.
Should I be using fabrik notation, or SQL notation?
Or have I got this all wrong?
So once the dropdown is a selected, only the records associated with the patient should be shown.
The database join is in the "visits" table and both the foreign key fields refer to the "main" table primary key (ID) which is the patient ID.
I have set up a databasejoin element, and in the "Filter Where" option I have tried the following codes:
Code:
chronic_pain_codes.`fk_chronic_pain_codes_main` = visit.`fk_visit_main`
{thistable}.`fk_chronic_pain_codes_main` = visit.`fk_visit_main`
visit.`fk_visit_main` = chronic_pain_codes.`fk_chronic_pain_codes_main`
Overall, I want to filter on the two foreign keys (fk), in other words that they match each other.
Should I be using fabrik notation, or SQL notation?
Or have I got this all wrong?