2020-01-31 03:56:37 UTC
So person one was diagnosed with '20' on their first visit and then nothing on their second visit.
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!