Alert on drug interaction

dammy

Registered User.
Local time
Today, 12:27
Joined
Sep 13, 2010
Messages
29
Hi everyone
Please I need help
Please how do I set up my order details page to give an alert if there would be an interaction in the group of drugs entered.

Thanks and hope to help from you soon
 
While a lot depends on the situation, you might start by checking for interactions in the Form_BeforeUpdate event. Something like:

if DrugInteractionCheckFails() then
MsgBox "You got a problem."
end if
 
Hi Royce
Thanks for your prompt reply
Maybe I should make myself clearer
In the drug details form, there will be a column for drug interaction and all possible interaction with the drug will be there.

For example:
Drug_Name- Diclofenac
Drug_Interactions- Ibuprofen, Moduretic

So at the point of ordering,
Drug_Name- Diclofenac
Ibuprofen
Promethazine

It should raise an alert that ' there is an interaction with Ibuprofen'

Thanks and hope to hear from you soon
 
It seems like from your sample you have a field "Drug_interactions" which is a text field that can contain multiple different Drug_name(s).

This design is flawed and will make things complicated.
Instead I strongly suggestion you make a druginteraction table that administrates the possible interactions of drugs based on the Drug primary key
 
Hi Namlian

Thanks for your prompt reply.

The probable drug interactions are all the drugs.
What you mean is after creating a drug interaction table
Drug_Interaction
Drug_ID -2
Drug_interaction_ID- 1
Drug_Interaction--Ibuprofen, Aspirin

Drug Details
Drug_ID 2
Drug_Name- diclofenac
Drug Interaction - 1

Order Details
Dilcofenac
Ibuprofen
Promethazine

There is a drug interaction between diclofenac and promethazine
Is this what you mean

Just want to clarify
Thanks hope to hear from you soon.
 
No that is not what I mean....

You have one table Drugs
Code:
ID Name
1  Diclofenac
2  Ibuprofen
3  Promethazine
4  Moduretic
In this table you do NOT register the Interactions.

Then you have a SEPERATE table tblInterActions
Code:
ID InteractWith
1  2
2  1
This adminsters that drug ID 1 interacts with Drug ID 2
Preferably you wouldnt need the second record, but it is slightly easier in maintenance if you do administer it seperately. However it does mean that you need to do double administration as you need to keep the interaction two times.
In theory however, if 1 interacts with 2, you would also have the reverse.... dont know if this is always the case. If it is always the case you can make due with only the first record.

Then its a 'simple' select to find if the corrent order has Interactions with the current drug.
 
Hi
Thanks for your prompt reply
So please how do I link this to my sales page?
I have drug details table
Drug Id
Drug name
Cost price
Batch no etc

So you said I should introduce 2 more tables
Drugs
ID Name
1. Diclofenac

Drug Interaction
ID interact with
1. 2

The interaction we can have more than one drug interacting.

So please how can I include this in my order details form.
Thanks
 
"my" drugs table sounds like your Drug details table.
However perhaps your details table will have multiple batches/prices for the same drug (Diclofenac)?? In which case there are yet more design issues.

In your form you should make a subform where your user can input the interaction drugs. Where they (I think) should be able to pick the interacting drug from a drop down box. Using the interaction table, you can offcourse enter as many interacting drugs as you care for, be it 1 or none or 1 million (sure hope not!) but yeah possible.
 

Users who are viewing this thread

Back
Top Bottom