I have a table I am querying that has fields such as Pat_Acct_Nbr, Admit_Date, Discharge_Date and DX_Actual which are diagnosis codes. There are three categories of diagnosis codes I am interested in which are AMI, CHF and PN. There are several Diagnosis codes which fall into these categories. I wrote a case statement like the one below to show the groupings. What I want to do is to create an SSRS report and to create a parameter where a user gets a drop down of three choices: AMI, CHF or PN. Based on this selection, the query of the main report will filter on the DX_Actual field and select all records where one of these Diagnosis codes appears in this field. In the query of my main report I have Where DX_Actual in (@ReadmitCategory). But how do I create the parameter where a user make one of three selections but many codes get passed back to the query of the main report?
Case when DX_Actual in ('410.00','410.01','410.10','410.11','410.20','410.21','410.30','410.31','410.40','410.41', '410.50','410.51','410.60','410.61','410.70','410.71','410.80','410.81','410.90','410.91') then 'AMI'
when DX_Actual in ('402.01','402.11','402.91','404.01','404.03','404.11','404.13','404.91','404.93','428.0', '428.1','428.20','428.21','428.22','428.23','428.30','428.31','428.32','428.33','428.40',
'428.41','428.42','428.43','428.9') then 'CHF'
when DX_Actual in ('480.0','480.1','480.2','480.3','480.8','480.9','481','482.0','482.1','482.2','482.30','482.31', '482.32','482.39','482.40','482.41','482.49','482.81','482.82','482.83','482.84','482.89',
'482.9','483.0','483.1','483.8','485','486','487.0') then 'PN' end ReadmitCategory
Chuck W