Hi
I am reporting from an Access 2003 database using Crystal 9.0.
I have a table of patient visits (data). I created another table, readmits, from a Crystal report where the current visit shows next visit information. The source is still the data table and the report sorted on chart number (unique identifer) and admit date and then each of the "next" fields would be:
etc.
Now I am creating a report showing the original visit but also the subsequent visit(s). Some of the data like diagnoses are from subreports so I have Group1 as the chart number and Group2 is account number (unique to each visit). All Group 2 subreports link on chart number and account number.
I created a field called visit type to denote original versus subsequent visit(s):
So now I want to select for certain records where the original CMG value is "100" but only show the chart numbers where there are also subsequent visits. Another wrinkle is that the subsequent visits can only be if their readmit codes = 2 or 3.
I can't use the visit type field to assist with this because I get an error indicating it needs to be evaluated later. How can I do this? Thanks.
I am reporting from an Access 2003 database using Crystal 9.0.
I have a table of patient visits (data). I created another table, readmits, from a Crystal report where the current visit shows next visit information. The source is still the data table and the report sorted on chart number (unique identifer) and admit date and then each of the "next" fields would be:
Code:
If next({Data.ChartNo}) = {Data.ChartNo} then next({Data.AcctNo}) else ""
Now I am creating a report showing the original visit but also the subsequent visit(s). Some of the data like diagnoses are from subreports so I have Group1 as the chart number and Group2 is account number (unique to each visit). All Group 2 subreports link on chart number and account number.
I created a field called visit type to denote original versus subsequent visit(s):
Code:
if {@admdate} =Minimum ({Data.AdmDate}, {Data.ChartNo}) then "ORIGINAL VISIT "
else "SUBSEQUENT VISIT "
So now I want to select for certain records where the original CMG value is "100" but only show the chart numbers where there are also subsequent visits. Another wrinkle is that the subsequent visits can only be if their readmit codes = 2 or 3.
I can't use the visit type field to assist with this because I get an error indicating it needs to be evaluated later. How can I do this? Thanks.