surfbum3000
Technical User
I need to create a query that will select a DR. APPT. as the primary appointment when a patient has more than one appt. with a provider. The tblAppts contains the following fields:
CASE_NUM DATE SVC_ID SUBJECT STARTTIME
12345 08/17/2004 1000 C.W. APPT. 09:00 (Delete this appt.)
12345 08/17/2004 2000 NURSE APPT. 09:30 (Delete this appt.)
12345 08/17/2004 3000 DR. APPT. 10:00
If a patient has more than one appointment, and one of them is a Dr. appt., then the Dr. appt. is the only one selected.
CASE_NUM DATE SVC_ID SUBJECT STARTTIME
12345 08/17/2004 1000 C.W. APPT. 09:00 (Delete this appt.)
12345 08/17/2004 2000 NURSE APPT. 09:30 (Delete this appt.)
12345 08/17/2004 3000 DR. APPT. 10:00
If a patient has more than one appointment, and one of them is a Dr. appt., then the Dr. appt. is the only one selected.