Working in Cognos 11. Please see attached screenshot for data structure. I need to exclude each patient with an ICD Code equal to Z94.0. If I use a filter like [ICD Code] <> 'Z94.0', it only excludes that one row for the patient with that particular ICD code, but I want to get rid of (ie; exclude) all rows for that that patient so that the entire patient record is excluded. Any ideas?
This is almost certainly not the most efficient or elegant solution, however, I believe it works.
Add a data item expression to your query called 'Flag' with the following expression definition (adjusting for column names)
total((if([ICD Code] = 'Z94.0')
then(1)
else(0))
for [Patient Account Number])
The add a detail filter
[Flag] = 0
The Flag column computes the total number of records with an ICD Code value of 'Z94.0' for each [Patient Account Number] and the filter excludes anything over 0.
This should get you moving forward until someone more experienced chimes in.