I'm having trouble getting the results I want from a Crystal Report. I'm using v10 and connecting to a SQL Server mdb.
I have a table, "administrations", which contains patient info, medications they've taken, etc. I need to create a report which lists the patients who have had two particular medications during their stay at the hospital.
I started out with the following Selection Formula:
which returns the right data but it also returns patients who have only had one of the medications, like this
I need only Patient 1 and Patient 4's administrations to be returned.
I also tried using the table twice (with an alias) but either I didn't set it up correctly or it was the wrong method to use.
I'm hoping that I'm only missing one little bit of the puzzle to make this report work. Any suggestions?
I have a table, "administrations", which contains patient info, medications they've taken, etc. I need to create a report which lists the patients who have had two particular medications during their stay at the hospital.
I started out with the following Selection Formula:
Code:
{AHI_ADMINISTRATION.Order_Description} like ["*folic acid*", "*pyridoxine*"]
Code:
[b]Patient ID Date Medication[/b]
Patient 1 5/15/06 1:00pm Folic Acid 1MG
Patient 1 5/15/06 1:08pm Pyridoxine 100MG
Patient 2 5/15/06 2:30am Folic Acid 1MG
Patient 3 5/16/06 7:09am Pyridoxine 100MG
Patient 4 5/16/06 8:20am Folic Acid 1MG
Patient 4 5/16/06 2:30pm Pyridoxine 100MG
I need only Patient 1 and Patient 4's administrations to be returned.
I also tried using the table twice (with an alias) but either I didn't set it up correctly or it was the wrong method to use.
I'm hoping that I'm only missing one little bit of the puzzle to make this report work. Any suggestions?