e***@gmail.com
2020-01-31 03:56:37 UTC
I have a two string variables (DiagnosisPrimary & DiagnosisOther) that have diagnosis coded into numerical values and delineated with '~' .
So person one was diagnosed with '20' on their first visit and then nothing on their second visit.
DiagnosisPrimary
20~
12~~~
20~20~
12~12~
12~~
~~~~~
12~12
If 20 represents having been diagnoised with depression, I want to see if there is a '20' among the string. Basically, find out who was diagnosed with dpression at any of their visits. In the past I have used the formula below, but now the data is a mix of numerical and text it is no longer working.
COMPUTE Dx_Depression =ANY(20, DiagnosisPrimary) OR ANY(20, DiagnosisOther).
I want to create a new variable with a true/false response.
Any help much appreicated!
So person one was diagnosed with '20' on their first visit and then nothing on their second visit.
DiagnosisPrimary
20~
12~~~
20~20~
12~12~
12~~
~~~~~
12~12
If 20 represents having been diagnoised with depression, I want to see if there is a '20' among the string. Basically, find out who was diagnosed with dpression at any of their visits. In the past I have used the formula below, but now the data is a mix of numerical and text it is no longer working.
COMPUTE Dx_Depression =ANY(20, DiagnosisPrimary) OR ANY(20, DiagnosisOther).
I want to create a new variable with a true/false response.
Any help much appreicated!