If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Using access to make patient records

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-24-12, 15:41
Hirosakamoto Hirosakamoto is offline
Registered User
 
Join Date: Jan 2012
Posts: 2
Using access to make patient records

Hi there everyone! Im new here but I have a quick question. I am not familiar with much SQL, and I am trying to start learning access and then get into using mysql. Anyways my problem is that I am making a 2 tabled database, one that holds patient information, while another one holds records of patient appointments. My one issue I am running into, is that I want to count how many total appointments a patient has ever had by counting how many date values there are.

Appointment rows all have date, physician, patient, and work tele. Each row consists of a new appointment ( not having a drop down list associated with all dates of the patient. A little "find how many times X's name comes up on the appointment side would work in the same way, so either or is fine by me. Can anyone help? I apologize I realize it is a dumb question ><
Reply With Quote
  #2 (permalink)  
Old 01-24-12, 16:00
Sam Landy Sam Landy is offline
Registered User
 
Join Date: May 2004
Location: New York State
Posts: 931
Welcome to the Access forum.

I suggest you don't try summing the appointments by counting the date values. You'll get '1' for an answer every time, because the patient only has one appointment on any date. What you want to do is count how many times the patient name appears in the appointment file. That will give you what you're looking for.

Good luck,

Sam
Reply With Quote
  #3 (permalink)  
Old 01-24-12, 16:00
Sinndho Sinndho is offline
Registered User
 
Join Date: Mar 2009
Posts: 3,446
You can retrieve this kind of information from a query (change the names to match those in your database):
Code:
SELECT PatientID, Count(*) AS AppointmentCount
FROM Tbl_Appointments
GROUP BY PatiendID
__________________
Have a nice day!
Reply With Quote
  #4 (permalink)  
Old 01-25-12, 06:44
Hirosakamoto Hirosakamoto is offline
Registered User
 
Join Date: Jan 2012
Posts: 2
thanks alot guys! I usually just need a little push before I can get started in learning something like this.
Reply With Quote
  #5 (permalink)  
Old 01-25-12, 10:00
Sinndho Sinndho is offline
Registered User
 
Join Date: Mar 2009
Posts: 3,446
You're welcome!
__________________
Have a nice day!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting 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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On