It seems that the prescription table is for the patient’s current prescriptions and the drug table is for the drug database. there is a column in the prescription table, drug_id which matches a column in the prescription table but there is no foreign or primary key.
I would think that the workflow would be when adding a prescription to the patient One could
- search for a drug
- select that drug
- the drug would then be added to the prescription table
The problems I am having
- I have added drugs to the drug table but the search feature does not find them
- When the prescription is created there is no reference to the drug table
Which table is the drug search feature searching in the add prescription modal window?
If I select the searched drug then will the drug in the drug table be tied to that prescription table when I save the prescription?
The search button posts to this URL = /controller.php?prescription&lookup&drug=. I can find the controller but it is a bit tough to determine the select statement that is triggered so I cant find out which table it searching.
Any help would be greatly appreciated.
Thank you.