Hello all,
Need help going farther writing formulas.
I am using Crystal 8.5, pulling data from SQL tables that houses client medical data.
The {disability_score.population_category_1} field contains target populations such as “AMSPM,” “AMSMI,” “AMPAT” and the {cdw_diagnosis_update.primary_diagnosis}[/] field contains diagnosis information such as “295.0,” “295.10,” “295.11,” “295.68&310.012,” “310.22” etc. I want to the consumers who have a target population of say AMSPM and do not have the following diagnosis: 295.0-295.99, 296.0-296.99, & 298.9. In addition, I only want the report to look at the first 6 digits in the {cdw_diagnosis_update.primary_diagnosis} field, in such an instance that a client may have multiple diagnoses (as noted in bold type above).
This is the formula that I a have tried to use with no success. It tells me that a Boolean expression is expected after the first AND.
{disability_score.population_category_1} = "AMSPM"
and
left ({cdw_diagnosis_update.primary_diagnosis},6)
and
not
({cdw_diagnosis_update.primary_diagnosis} like "295*,""296*,""298.9"
I am wondering if I need to be using the trim function but that seems to be easier said than done. Also, where do i insert the formula? Any help and/or suggestions would greatly be appreciated as I am new to Crystal formulas beyond the basics.
Thanks
-T
Need help going farther writing formulas.
I am using Crystal 8.5, pulling data from SQL tables that houses client medical data.
The {disability_score.population_category_1} field contains target populations such as “AMSPM,” “AMSMI,” “AMPAT” and the {cdw_diagnosis_update.primary_diagnosis}[/] field contains diagnosis information such as “295.0,” “295.10,” “295.11,” “295.68&310.012,” “310.22” etc. I want to the consumers who have a target population of say AMSPM and do not have the following diagnosis: 295.0-295.99, 296.0-296.99, & 298.9. In addition, I only want the report to look at the first 6 digits in the {cdw_diagnosis_update.primary_diagnosis} field, in such an instance that a client may have multiple diagnoses (as noted in bold type above).
This is the formula that I a have tried to use with no success. It tells me that a Boolean expression is expected after the first AND.
{disability_score.population_category_1} = "AMSPM"
and
left ({cdw_diagnosis_update.primary_diagnosis},6)
and
not
({cdw_diagnosis_update.primary_diagnosis} like "295*,""296*,""298.9"
I am wondering if I need to be using the trim function but that seems to be easier said than done. Also, where do i insert the formula? Any help and/or suggestions would greatly be appreciated as I am new to Crystal formulas beyond the basics.
Thanks
-T