Zelaron Gaming Forum  
Stats Arcade Portal Forum FAQ Community Calendar Today's Posts Search
Go Back   Zelaron Gaming Forum > The Zelaron Nexus > Science and Art > Tech Help

 
 
Thread Tools Display Modes

 
MS Access Help
Reply
Posted 2007-07-24, 02:50 AM
I've never really used access before, so I'm a bit of a noob with it, but I told my uncle I'd make a database for him. He's a doctor so he needs a database for his patients. One thing he wants to be able to keep track of is medicines they've been prescribed, dates they were prescribed on, and so forth. I don't really see any "list" object under access so I was a little unsure about how to go about doing that. My thought was to create another table for medicines and then set up a relationship between the medicine table and the patient table. Would that be the best way to go about doing that?
Old
Profile PM WWW Search
Demosthenes seldom sees opportunities until they cease to beDemosthenes seldom sees opportunities until they cease to beDemosthenes seldom sees opportunities until they cease to beDemosthenes seldom sees opportunities until they cease to be
 
Demosthenes
 



 
Reply
Posted 2007-07-24, 03:12 PM in reply to Demosthenes's post "MS Access Help"
table patient
unsigned integer autoincrement patientid
varchar(40) namelast
varchar(40) namefirst
varchar(128) addressline1
varchar(128) addressline2
varchar(128) addressline3
unsigned integer guardianid

table medicine
unsigned integer autoincrement medicineid
varchar(128) medicinename

table prescription
unsigned integer autoincrement prescriptionid
unsigned integer patientid
unsigned integer medicineid
mediumtext doseage
date prescriptionstart
date prescriptionend

Just my suggestion.
Old
Profile PM WWW Search
WetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusion
 
 
WetWired
 



 
Reply
Posted 2007-07-24, 04:16 PM in reply to WetWired's post starting "table patient unsigned integer..."
Thanks. Yea, he sent me the requirements in a word document. Ahh, that's a genius idea -- splitting the medicine into a table for medicine and a table for prescription. Had not thought of that. Thanks.
Old
Profile PM WWW Search
Demosthenes seldom sees opportunities until they cease to beDemosthenes seldom sees opportunities until they cease to beDemosthenes seldom sees opportunities until they cease to beDemosthenes seldom sees opportunities until they cease to be
 
Demosthenes
 



 
Reply
Posted 2007-07-24, 09:28 PM in reply to Demosthenes's post starting "Thanks. Yea, he sent me the..."
Well, that way if a medicine gets recalled or something, you can write a query something like
Code:
SELECT patient.* FROM patient LEFT JOIN prescription ON patient.patientid=prescription.patientid WHERE medicineid=15
to find all the patients that have used it. You could write a query based on text, too, but misspelling would be an issue, then. This way, you have them pick from a drop-down, so you don't have that issue. Also, searching for a number in a database is faster than searching for text. If a field will have a lot of repeated data and you may need to search on it, it's a good idea to make a table to associate it with a numerical index.

In case you hadn't figured it out, with the structure I proposed, each prescription entry has the ID of the person it was perscribed for, then you can use a query such as
Code:
SELECT prescription.* FROM prescription LEFT JOIN patient ON prescription.patientid=patient.patientid WHERE (patient.namelast="last")AND(patient.namefirst="first")

Last edited by WetWired; 2007-07-24 at 09:31 PM.
Old
Profile PM WWW Search
WetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusion
 
 
WetWired
 
 

Bookmarks

« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules [Forum Rules]
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 02:41 PM.
'Synthesis 2' vBulletin 3.x styles and 'x79' derivative
by WetWired the Unbound and Chruser
Copyright ©2002-2008 zelaron.com
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.