on 03-12-2019 8:53 PM
I have a report where the patient may have a list of different diagnoses. I want to eliminate patients that have a certain diagnosis. I tried not like, not in from select expert and section expert using the suppress formula but all this does is eliminate the diagnosis from the list but still shows the patient. Thanks.
This type of thing can be a challenge if you're just linking tables together in Crystal. How are your SQL skills? I recommend creating a Command (SQL Select statement) that get's all of the data for the report and has something like the following in the where clause:
and not exists (
Select 'X' from patient_diagnosis where diagnosis_id = '123A' and patient_id = patient.patient_id
)
This will filter out from the data all of the patients that have that diagnosis as one of their codes.
For more information about using Commands see the blog post here. If you're not sure how to write the query, you can go to the Database menu in Crystal and select "Show SQL Query...". Copy the contents of the window and paste them here. Also provide the formula from the Select Expert and the type of database you're connecting to. I should be able to provide you with a query that is based on that information to get you started.
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Group the report on Patient.
Create a formula DiagX:
IF Diag = 'X' Then 1 Else 0
Add a formula to compute the MAX of that formula for each patient.
Add a Group Selection Formula that ensures that MAX = 0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.