Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Search patients with no appointment history Post Reply Post New Topic
Author Message
saumyarpandey
Newbie
Newbie


Joined: 04 Dec 2012
Online Status: Offline
Posts: 11
Quote saumyarpandey Replybullet Topic: Search patients with no appointment history
     Posted: 04 Dec 2012 at 9:44am
Hi All,
 
I am a pharmacist and am just learning to use crystal reports. I am trying to create a report of patients that have never had any appointment history. The problem is when I pullup the whole list of patients with no appointment history I am also getting patients that have had appointments but also have one or two blank appointments. How can I eliminate these to get only those patients that have never had any appointments.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Dec 2012 at 3:22am
can you explain what the difference is between no appintment history at all and 'blank' appointment?
How are your tables set up?
do you have a client/patient table and a seperate appointment table?
if you outer join them you can use an isnull(clientid) on the appointment table.
IP IP Logged
saumyarpandey
Newbie
Newbie


Joined: 04 Dec 2012
Online Status: Offline
Posts: 11
Quote saumyarpandey Replybullet Posted: 05 Dec 2012 at 7:22am

A blank appoint occurs when a patient does not show up for a visit and "no show" is not chosen and entered in the system, but these patients have had appointments in the past. What I am looking for are only those patients that have never had any appointments at all. I am using a left outer join.

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Dec 2012 at 7:58am
so i assume you have a patient table and an appointment table that you can join on a patientid
do the outer join
in your select expert use
isnull(appointments.patientid)
IP IP Logged
saumyarpandey
Newbie
Newbie


Joined: 04 Dec 2012
Online Status: Offline
Posts: 11
Quote saumyarpandey Replybullet Posted: 05 Dec 2012 at 8:09am

No its not.

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Dec 2012 at 8:19am
please explain your data set up.
IP IP Logged
comatt1
Senior Member
Senior Member
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 337
Quote comatt1 Replybullet Posted: 05 Dec 2012 at 9:54am
you will either have to use some suppression or modify your query.

if I were doing it, I would probably be lazy and do in crystal

I would group by patient,

create a to find the max(inspection date)

reset on patient

----

I would then go to section expert, in group footer, suppress if that running total <> null

then have the info in details and move it to group footer.
---

If you need more explanation I am sure Blank will beat me to punch.


Edited by comatt1 - 05 Dec 2012 at 9:54am
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum