Blue Dolphin Posted September 5, 2007 Posted September 5, 2007 (edited) Hi, Could you help find the number of UNIQUE patients that took the drug "Zidovudine"? I know the answer is 3 because i manually counted the patients, but how can this be programmed. I would like to know the unique number of patients based on a search for any drug. I attached my small file. The account name is admin and has no password. Thank you so so much. testing_unique.zip Edited September 5, 2007 by Guest
Oldfogey Posted September 6, 2007 Posted September 6, 2007 Even without the missing tables, the question is still valid. I presume that 'Patient ID' is unique to a patient and that you have a Patient table with one record per patient? Another guess, based on the title of the layout, is that there are multiple patient/drug records. Correct? If you set up a layout in your patient table with a Drug field from this Interval_History table and do a find for the particular drug, you will find just those patients who have that drug in the Interval_History table. The number will show up in the status area. If you want to script it all, use Get(FoundCount) to display the number of patients.
Blue Dolphin Posted September 6, 2007 Author Posted September 6, 2007 Hi, Yes, that is correct. I have a patient table and there are multiple patient/drug records with different dates. Is there any way to perform the search for unique patients taking a particular drug on the Interval_History table? The reason I ask is because I have 20 tables similar to the drug table in which the user would like to search on any field in any table and get the # of unique patients for that search.
Blue Dolphin Posted September 6, 2007 Author Posted September 6, 2007 yes i have the drugs table but did not add it to the prototype
comment Posted September 6, 2007 Posted September 6, 2007 I have a patient table ... i have the drugs table Well, then it should be very simple - see the attached. I have 20 tables similar to the drug table in which the user would like to search on any field in any table and get the # of unique patients for that search. That I did not understand, and it doesn't sound good. Prescriptions.fp7.zip
LaRetta Posted September 6, 2007 Posted September 6, 2007 Yes, good example file, Michael! Now I would have just required a Patient table. Then, from the Interval table, perform a find for the drug (in this case Zidovudine) and then GTRR (Go To Related Records) to the Patient table for a list of unique patients - this would be the key to producing a unique list of Patients using this method. Your portal setup and proper drug structure offers the best of all worlds. :wink2:
comment Posted September 6, 2007 Posted September 6, 2007 Sure, it's even possible to get it from the Prescriptions table alone - but why work hard?
Recommended Posts
This topic is 6287 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now