Posted By: sanchezgmc06 — 6 Apr 2017 at 1:56pm
Hello I need to write a formula to group diagnosis codes
The diagnosis codes can be 3-5 characters
Example: F21.1 OR F41.25
I want to do this formula in my command statement but not sure how to start it
For instance I need to categorize the diagnosis in the following order:
If they start with F70 - F90 THEN label this range as Mental Retardation
Hope I am explaining myself well
Posted By: Sastry — 7 Apr 2017 at 4:03am
Hi,
You need to use Case statement to group the diagnosis codes like ..
Select (case when left(diagnosis,3) ='F70' OR left(diagnosis,3) ='F90' then 'Mental Retardation' else when left(diagnosis,3) ='F21' THEN 'XXX' SO ON..
Please check case statement syntax in google for your database and write it.
Thanks,
Sastry
Posted By: sanchezgmc06 — 7 Apr 2017 at 6:20am
Perfect! thank you