Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[b]How to get conditions from 2 different entries=True[/b] 1

Status
Not open for further replies.

madsstiig

Technical User
Jun 11, 2008
50
DK
Hi...
I would like to make a report that lists up patients who has been to one specific exam AND on the same day to a totally different specific exam.
The patient-ID for different exams is in our country ALWAYS unique for each patient; the patient-ID will always be a specific constant for a patient - it won't change ever - so that would probably along with the bookdate be what links the exams together...
How do I even tell CR that it has to look at more than one entry? Dependancy of two different entries so to speak.
Do I make sense?
Best regards and thanks for a VERY helpful forum :)
Mads, Denmark.
 
I assume you have a patient table and an Exam table where its possible to link the two tables on patient ID.

By selecting a patient Id CR will automatically bring back any associated exam records.

Ian
 
Yes you assume right. But how do I get a result where ... example; patients who have been to an A exam AND on the same date also have been to a B exam .
It's true that if you enter the patients ID you will get a list of the exams this patient has been to but how will you make the conditions from above true?
Mads.
 
Group Report by Patient and then add a second group by Date and set as on chnage of day.

You will then see multiple exams per day.

In group suppression add clause

Count(patientID, PatientID) >1

This will suppress any patients who only have one Exam.

Ian
 
Hi again.
I've tried your solution and get a list that shows patients who have more than one exam on one day - so far so good.
What's now missing in the equation is that a patient who has had a B exam twice on one day is also on the list.
B exams covers different exams of one type (I don't think I got that out right in the first place, sorry).
So what should count is that a patient must have had at least one exam of type A and at least one exam of type B.
Furthermore I just got additional info: it doesn't necessarily have to be on the same date (sorry again for that) just some time in their hospitalization.
Mads
 
YOu need to replace date group with field that identifies individual hospitalisations.

Create two formula

@TypeA
If ExamType = A then 1 else 0

@Typeb
If ExamType = B then 1 else 0

In group supress

Sum(@typeA, hospitalise) >1 and Sum(@typeb, hospitalise) >1

Ian
 
I won't be able to take a look at it today but what you've come up with looks very useful - thank you Ian.
Best regards Mads, Denmark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top