|
I have 8 variables that contain string data, the string data are ICD-9 codes and what I am attempting to do is create a variable based on the first recorded diagnosis code indicating a head injury. some of the cases have multiple codes representing the head injury but I would like to use the first one recorded. so for example if in dx1 is 310.2 and then dx2 is 854.00 I would like to use 310.2 because that is the first reported head injury code. here is what the data looks like: I used the IF ANY command but it continued to read subsequent head injury codes. any help with this is greatly appreciated. AKR.
dx1 dx2 dx3 dx4 780.2 959.01 E91.78 959.01 850.9 803.00 784.0 959.01 873.42 959.01 780.2 920. 923.03 850.9 959.01 724.8 E88.59 E91.78 959.01 V70.5 723.1 V15.59_0 850.0 465.9 E92.74 309.9 959.01 E95.88 850.5 780.93 339.20 782.0 959.01 389.10 959.01 850.0 E91.79 919.8 920. 959.01 850.0 959.01 850.9 850.11 920. 922.31 719.46 959.01 924.8 782.3 959.09 959.01 V70.5 V15.59_2 805.4 959.01 850.11 912.0 E81.22 V70.5 V15.59_0 782.1 300.01 959.01 726.5 844.9 728.71 V15.59_0 959.01 473.9 V70.5 V15.59_0 V15.88 780.99 V49.89 V68.9 V15.59_1 V65.49 847.2 724.8 V15.59_0 E92.89 784.0 V70.5 V15.59_B 854.00 847.2 389.9 V70.5 V15.59_0 724.2 719.40 850.9 850.11 V15.59_2 V70.5 719.41 726.61 V15.59_0 V43.64 V70.5 V15.59_0 V62.81 V15.89 V70.5 V15.59_0 311. V62.81 V70.5 844.0 V45.89 V15.59_0 847.1 728.85 E92.70 V15.59_0 850.0 372.72 920. 922.9 873.40 850.5 910.0 881.01 805.05 959.01 V70.5 303.90 V15.59_1 840.9 850.9 E81.29 723.1 854.00 959.01 E91.70 959.01 V70.5 V15.59_0 311. 787.91 719.42 V15.59_0 339.22 V15.59_2 780.93 V70.5 850.0 847.0 723.1 724.5 V70.5 V15.59_0 V15.88 311. 719.46 V15.59_0 305.1 905.2 717.9 704.8 V15.59_0 959.01 718.31 V15.59_0 786.52 V15.59_0 850.0 V15.59_2 V70.5 E97.92 |
|
Administrator
|
I'm still a bit confused, but do you mean something like this? string firsthi (a10). do if any(dx1,"hicode1","hicode2",..."hicodex"). - compute firsthi = dx1. else if any(dx2,"hicode1","hicode2",..."hicodex"). - compute firsthi = dx2. else if any(dx3,"hicode1","hicode2",..."hicodex"). - compute firsthi = dx3. else if any(dx4,"hicode1","hicode2",..."hicodex"). - compute firsthi = dx4. else if any(dx5,"hicode1","hicode2",..."hicodex"). - compute firsthi = dx5. else if any(dx6,"hicode1","hicode2",..."hicodex"). - compute firsthi = dx6. else if any(dx7,"hicode1","hicode2",..."hicodex"). - compute firsthi = dx7. else if any(dx8,"hicode1","hicode2",..."hicodex"). - compute firsthi = dx8. end if. exe. Of course, you'll have to replace "hicode1","hicode2",..."hicodex" with the list of ICD-9 codes that refer to head injuries. Given the repetitive nature of that code, I think it would probably work in a DO-REPEAT, something like this: string firsthi (a10). do repeat d = dx1 to dx8. /* or list them all if not contiguous in the file . - do if (firsthi EQ "") . /* proceed only if FIRSTHI is still blank . - if any(d,"hicode1","hicode2",..."hicodex") firsthi = d. - end if. end repeat. exe.
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
|
In reply to this post by akrobbins
AKR,
I think there is a couple of ways of doing this, one using a loop and this one. I haven't tested it. Let dx1 to dx8 be the string vars for the ICD-9 codes. Then String firstdx(a5). Do repeat x=dx1 to dx8. + do if (any(x,'310.2','310.4','824.6','918.9')). + compute firstdx=x. + end if. End repeat. Gene Maguin >>I have 8 variables that contain string data, the string data are ICD-9 codes and what I am attempting to do is create a variable based on the first recorded diagnosis code indicating a head injury. some of the cases have multiple codes representing the head injury but I would like to use the first one recorded. so for example if in dx1 is 310.2 and then dx2 is 854.00 I would like to use 310.2 because that is the first reported head injury code. here is what the data looks like: I used the IF ANY command but it continued to read subsequent head injury codes. any help with this is greatly appreciated. AKR. dx1 dx2 dx3 dx4 780.2 959.01 E91.78 959.01 850.9 803.00 784.0 959.01 873.42 959.01 780.2 920. 923.03 850.9 959.01 724.8 E88.59 E91.78 959.01 V70.5 723.1 V15.59_0 850.0 465.9 E92.74 309.9 959.01 E95.88 850.5 780.93 339.20 782.0 959.01 389.10 959.01 850.0 E91.79 919.8 920. 959.01 850.0 959.01 850.9 850.11 920. 922.31 719.46 959.01 924.8 782.3 959.09 959.01 V70.5 V15.59_2 805.4 959.01 850.11 912.0 E81.22 V70.5 V15.59_0 782.1 300.01 959.01 726.5 844.9 728.71 V15.59_0 959.01 473.9 V70.5 V15.59_0 V15.88 780.99 V49.89 V68.9 V15.59_1 V65.49 847.2 724.8 V15.59_0 E92.89 784.0 V70.5 V15.59_B 854.00 847.2 389.9 V70.5 V15.59_0 724.2 719.40 850.9 850.11 V15.59_2 V70.5 719.41 726.61 V15.59_0 V43.64 V70.5 V15.59_0 V62.81 V15.89 V70.5 V15.59_0 311. V62.81 V70.5 844.0 V45.89 V15.59_0 847.1 728.85 E92.70 V15.59_0 850.0 372.72 920. 922.9 873.40 850.5 910.0 881.01 805.05 959.01 V70.5 303.90 V15.59_1 840.9 850.9 E81.29 723.1 854.00 959.01 E91.70 959.01 V70.5 V15.59_0 311. 787.91 719.42 V15.59_0 339.22 V15.59_2 780.93 V70.5 850.0 847.0 723.1 724.5 V70.5 V15.59_0 V15.88 311. 719.46 V15.59_0 305.1 905.2 717.9 704.8 V15.59_0 959.01 718.31 V15.59_0 786.52 V15.59_0 850.0 V15.59_2 V70.5 E97.92 -- View this message in context: http://old.nabble.com/creating-variable-from-multiple-variables-tp26217375p2 6217375.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
Administrator
|
Hi Gene. I see we both came up with the same approach. But I think your code will put the last head injury diagnosis into FIRSTDX, won't it?
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
|
In reply to this post by akrobbins
Mr. Weaver and Mr. Maguin,
This is what my original syntax looked like, I apologize in advance for how long and repetitive it is: I will be testing the syntax sent to me, but I wanted to give you an idea I what I had been using before. COMPUTE SEVERITY=0. IF ANY(full_diag1s, '804.5', '804.0', '803.0', '801.5', '801.0', '800.0', '800.5', '800.00', '800.01', '800.02', '800.06', '800.09', '310.20', '310.2', '800.50', '800.51', '800.52', '801.00', '801.01', '801.02', '801.06', '801.09', '801.50', '801.51', '801.52', '803.00', '803.01', '803.02', '803.06', '803.09', '803.50', '803.51', '803.52', '804.00', '804.01', '804.02', '804.06', '804.09', '804.50', '804.51', '804.52', '850.', '850.00', '850.0', '850.1', '850.10', '850.11', '850', '800', '801', '803', '803.0', '801.0', '804', '804.0', '850.5', '850.50', '850.9', '850.90', '959.01', 'V15.52', 'V15.57', 'V15.5C', 'V15.59_2', 'V15.59_C', 'V15.59_7') SEVERITY =1. IF ANY ( full_diag2s,'804.5','804.0', '803.0', '801.5', '801.0', '800.0', '800.5','800.00', '800.01', '800.02', '800.06', '800.09', '310.20', '310.2', '800.50', '800.51', '800.52', '801.00', '801.01', '801.02', '801.06', '801.09', '801.50', '801.51', '801.52', '803.00', '803.01', '803.02', '803.06', '803.09', '803.50', '803.51', '803.52', '804.00', '804.01', '804.02', '804.06', '804.09', '804.50', '804.51', '804.52', '850.', '850.00', '850.0', '850.1', '850.10', '850.11', '850','800', '801','803', '803.0','801.0','804', '804.0', '850.5', '850.50', '850.9', '850.90', '959.01', 'V15.52', 'V15.57', 'V15.5C', 'V15.59_2', 'V15.59_C', 'V15.59_7') SEVERITY =1. IF ANY ( full_diag3s,'804.5', '804.0', '803.0', '801.5', '801.0', '800.0', '800.5', '800.00', '800.01', '800.02', '800.06', '800.09', '310.20', '310.2', '800.50', '800.51', '800.52', '801.00', '801.01', '801.02', '801.06', '801.09', '801.50', '801.51', '801.52', '803.00', '803.01', '803.02', '803.06', '803.09', '803.50', '803.51', '803.52', '804.00', '804.01', '804.02', '804.06', '804.09', '804.50', '804.51', '804.52', '850.', '850.00', '850.0', '850.1', '850.10', '850.11', '850','800', '801','803', '803.0','801.0','804', '804.0', '850.5', '850.50', '850.9', '850.90', '959.01', 'V15.52', 'V15.57', 'V15.5C', 'V15.59_2', 'V15.59_C', 'V15.59_7') SEVERITY =1. IF ANY ( full_diag4s,'804.5','804.0', '803.0', '801.5', '801.0', '800.0', '800.5', '800.00', '800.01', '800.02', '800.06', '800.09', '310.20', '310.2', '800.50', '800.51', '800.52', '801.00', '801.01', '801.02', '801.06', '801.09', '801.50', '801.51', '801.52', '803.00', '803.01', '803.02', '803.06', '803.09', '803.50', '803.51', '803.52', '804.00', '804.01', '804.02', '804.06', '804.09', '804.50', '804.51', '804.52', '850.', '850.00', '850.0', '850.1', '850.10', '850.11', '850','800', '801','803', '803.0','801.0','804', '804.0', '850.5', '850.50', '850.9', '850.90', '959.01', 'V15.52', 'V15.57', 'V15.5C', 'V15.59_2', 'V15.59_C', 'V15.59_7') SEVERITY =1. IF ANY ( full_diag5s,'804.5','804.0', '803.0', '801.5', '801.0','800.0', '800.5', '800.00', '800.01', '800.02', '800.06', '800.09', '310.20', '310.2', '800.50', '800.51', '800.52', '801.00', '801.01', '801.02', '801.06', '801.09', '801.50', '801.51', '801.52', '803.00', '803.01', '803.02', '803.06', '803.09', '803.50', '803.51', '803.52', '804.00', '804.01', '804.02', '804.06', '804.09', '804.50', '804.51', '804.52', '850.', '850.00', '850.0', '850.1', '850.10', '850.11', '850','800', '801','803', '803.0','801.0','804', '804.0', '850.5', '850.50', '850.9', '850.90', '959.01', 'V15.52', 'V15.57', 'V15.5C', 'V15.59_2', 'V15.59_C', 'V15.59_7') SEVERITY =1. IF ANY ( full_diag6s,'804.5','804.0', '803.0', '801.5', '801.0','800.0', '800.5', '800.00', '800.01', '800.02', '800.06', '800.09', '310.20', '310.2', '800.50', '800.51', '800.52', '801.00', '801.01', '801.02', '801.06', '801.09', '801.50', '801.51', '801.52', '803.00', '803.01', '803.02', '803.06', '803.09', '803.50', '803.51', '803.52', '804.00', '804.01', '804.02', '804.06', '804.09', '804.50', '804.51', '804.52', '850.', '850.00', '850.0', '850.1', '850.10', '850.11', '850','800', '801','803', '803.0','801.0','804', '804.0', '850.5', '850.50', '850.9', '850.90', '959.01', 'V15.52', 'V15.57', 'V15.5C', 'V15.59_2', 'V15.59_C', 'V15.59_7') SEVERITY =1. IF ANY ( full_diag7s,'804.5','804.0', '803.0', '801.5', '801.0','800.0', '800.5', '800.00', '800.01', '800.02', '800.06', '800.09', '310.20', '310.2', '800.50', '800.51', '800.52', '801.00', '801.01', '801.02', '801.06', '801.09', '801.50', '801.51', '801.52', '803.00', '803.01', '803.02', '803.06', '803.09', '803.50', '803.51', '803.52', '804.00', '804.01', '804.02', '804.06', '804.09', '804.50', '804.51', '804.52', '850.', '850.00', '850.0', '850.1', '850.10', '850.11', '850','800', '801','803', '803.0','801.0','804', '804.0', '850.5', '850.50', '850.9', '850.90', '959.01', 'V15.52', 'V15.57', 'V15.5C', 'V15.59_2', 'V15.59_C', 'V15.59_7') SEVERITY =1. IF ANY ( full_diag8s,'804.5','804.0', '803.0', '801.5', '801.0','800.0', '800.5', '800.00', '800.01', '800.02', '800.06', '800.09', '310.20', '310.2', '800.50', '800.51', '800.52', '801.00', '801.01', '801.02', '801.06', '801.09', '801.50', '801.51', '801.52', '803.00', '803.01', '803.02', '803.06', '803.09', '803.50', '803.51', '803.52', '804.00', '804.01', '804.02', '804.06', '804.09', '804.50', '804.51', '804.52', '850.', '850.00', '850.0', '850.1', '850.10', '850.11', '850','800', '801','803', '803.0','801.0','804', '804.0', '850.5', '850.50', '850.9', '850.90', '959.01', 'V15.52', 'V15.57', 'V15.5C', 'V15.59_2', 'V15.59_C', 'V15.59_7') SEVERITY =1. IF ANY ( full_diag1s, '854.0', '853.0', '852.4', '852.0', '852.2', '851.6', '851.8', '851.4', '851.2', '851.0', '804.1', '804.2', '804.3', '804.4', '803.1', '803.2', '803.3', '803.4','801.1', '801.2', '801.3', '801.4', '800.1' ,'800.2', '800.3', '800.4','800.03', '800.10', '800.11', '800.12', '800.13', '800.16', '800.19', '800.20', '800.21', '800.22', '800.23', '800.26', '800.29', '800.30', '800.31', '800.32', '800.33', '800.36', '800.39', '800.40', '800.41', '800.42', '800.43', '800.46', '800.49', '800.53', '800.56', '800.59', '801.03', '801.10', '801.11', '801.12', '801.13', '801.16', '801.19', '801.20', '801.21', '801.22', '801.23', '801.26', '801.29', '801.30', '801.31', '801.32', '801.33', '801.36', '801.39', '801.40', '801.41', '801.42', '801.43', '801.46', '801.49', '801.54', '801.56', '801.59', '803.03', '803.10', '803.11', '803.12', '803.13', '803.16', '803.19', '803.20', '803.21', '803.22', '803.23', '803.26', '803.29', '803.30', '803.31', '803.32', '803.33', '803.36', '803.39', '803.40', '803.41', '803.42', '803.43', '803.46', '803.49', '803.53', '803.56', '803.59', '804.03', '804.10', '804.11', '804.12', '804.13', '804.16', '804.19', '804.20', '804.21', '804.22', '804.23', '804.26', '804.29', '804.30', '804.31', '804.32', '804.33', '804.36', '804.39', '804.40', '804.41', '804.42', '804.43', ' 804.46', '804.49', '804.53', '804.56', '804.59', '850.12', '850.2', '850.20', '851.00', '851.01', '851.02', '851.03', '851.06', '851.09', '851.20', '851.21', '851.22', '851.23', '851.26', '851.29', '851.40', '851.41', '851.42', '851.43', '851.46', '851.49', '851.60', '851.61', '851.62', '851.63', '851.66', '851.69', '851.80', '851.81', '851.82', '851.83', '851.86', '851.89', '852.00', '852.01', '852.02', '852.03', '852.06', '852.09', '852.20', '852.21', '852.22', '852.23', '852.26', '852.29', '852.40', '852.41', '852.42', '852.43', '852.46', '852.49', '853.00', '853.01', '853.02', '853.03', '853.06', '853.09', '854','851','852','853', '854.00', '854.01', '854.02', '854.03', '854.06', '854.09', 'V15.53', 'V15.58', 'V15.5D', 'V15.59_3', 'V15.59_8', 'V15.59_D') SEVERITY=2. IF ANY (full_diag2s,'854.0','853.0', '852.4','852.0', '852.2','851.6', '851.8', '851.4','851.2','851.0','804.1', '804.2', '804.3', '804.4','803.1', '803.2', '803.3', '803.4','801.1', '801.2', '801.3', '801.4','800.1', '800.2', '800.3', '800.4', '800.03', '800.10', '800.11', '800.12', '800.13', '800.16', '800.19', '800.20', '800.21', '800.22', '800.23', '800.26', '800.29', '800.30', '800.31', '800.32', '800.33', '800.36', '800.39', '800.40', '800.41', '800.42', '800.43', '800.46', '800.49', '800.53', '800.56', '800.59', '801.03', '801.10', '801.11', '801.12', '801.13', '801.16', '801.19', '801.20', '801.21', '801.22', '801.23', '801.26', '801.29', '801.30', '801.31', '801.32', '801.33', '801.36', '801.39', '801.40', '801.41', '801.42', '801.43', '801.46', '801.49', '801.54', '801.56', '801.59', '803.03', '803.10', '803.11', '803.12', '803.13', '803.16', '803.19', '803.20', '803.21', '803.22', '803.23', '803.26', '803.29', '803.30', '803.31', '803.32', '803.33', '803.36', '803.39', '803.40', '803.41', '803.42', '803.43', '803.46', '803.49', '803.53', '803.56', '803.59', '804.03', '804.10', '804.11', '804.12', '804.13', '804.16', '804.19', '804.20', '804.21', '804.22', '804.23', '804.26', '804.29', '804.30', '804.31', '804.32', '804.33', '804.36', '804.39', '804.40', '804.41', '804.42', '804.43', ' 804.46', '804.49', '804.53', '804.56', '804.59', '850.12', '850.2', '850.20', '851.00', '851.01', '851.02', '851.03', '851.06', '851.09', '851.20', '851.21', '851.22', '851.23', '851.26', '851.29', '851.40', '851.41', '851.42', '851.43', '851.46', '851.49', '851.60', '851.61', '851.62', '851.63', '851.66', '851.69', '851.80', '851.81', '851.82', '851.83', '851.86', '851.89', '852.00', '852.01', '852.02', '852.03', '852.06', '852.09', '852.20', '852.21', '852.22', '852.23', '852.26', '852.29', '852.40', '852.41', '852.42', '852.43', '852.46', '852.49', '853.00', '853.01', '853.02', '853.03', '853.06', '853.09', '854','851','852','853', '854.00', '854.01', '854.02', '854.03', '854.06', '854.09', 'V15.53', 'V15.58', 'V15.5D', 'V15.59_3', 'V15.59_8', 'V15.59_D') SEVERITY=2. IF ANY ( full_diag3s,'854.0','853.0', '852.4','852.0', '852.2','851.6', '851.8', '851.4','851.2','851.0','804.1', '804.2', '804.3', '804.4','803.1', '803.2', '803.3', '803.4','801.1', '801.2', '801.3', '801.4','800.1' ,'800.2', '800.3', '800.4', '800.03', '800.10', '800.11', '800.12', '800.13', '800.16', '800.19', '800.20', '800.21', '800.22', '800.23', '800.26', '800.29', '800.30', '800.31', '800.32', '800.33', '800.36', '800.39', '800.40', '800.41', '800.42', '800.43', '800.46', '800.49', '800.53', '800.56', '800.59', '801.03', '801.10', '801.11', '801.12', '801.13', '801.16', '801.19', '801.20', '801.21', '801.22', '801.23', '801.26', '801.29', '801.30', '801.31', '801.32', '801.33', '801.36', '801.39', '801.40', '801.41', '801.42', '801.43', '801.46', '801.49', '801.54', '801.56', '801.59', '803.03', '803.10', '803.11', '803.12', '803.13', '803.16', '803.19', '803.20', '803.21', '803.22', '803.23', '803.26', '803.29', '803.30', '803.31', '803.32', '803.33', '803.36', '803.39', '803.40', '803.41', '803.42', '803.43', '803.46', '803.49', '803.53', '803.56', '803.59', '804.03', '804.10', '804.11', '804.12', '804.13', '804.16', '804.19', '804.20', '804.21', '804.22', '804.23', '804.26', '804.29', '804.30', '804.31', '804.32', '804.33', '804.36', '804.39', '804.40', '804.41', '804.42', '804.43', ' 804.46', '804.49', '804.53', '804.56', '804.59', '850.12', '850.2', '850.20', '851.00', '851.01', '851.02', '851.03', '851.06', '851.09', '851.20', '851.21', '851.22', '851.23', '851.26', '851.29', '851.40', '851.41', '851.42', '851.43', '851.46', '851.49', '851.60', '851.61', '851.62', '851.63', '851.66', '851.69', '851.80', '851.81', '851.82', '851.83', '851.86', '851.89', '852.00', '852.01', '852.02', '852.03', '852.06', '852.09', '852.20', '852.21', '852.22', '852.23', '852.26', '852.29', '852.40', '852.41', '852.42', '852.43', '852.46', '852.49', '853.00', '853.01', '853.02', '853.03', '853.06', '853.09', '854','851','852','853', '854.00', '854.01', '854.02', '854.03', '854.06', '854.09', 'V15.53', 'V15.58', 'V15.5D', 'V15.59_3', 'V15.59_8', 'V15.59_D') SEVERITY=2. IF ANY ( full_diag4s,'854.0','853.0', '852.4','852.0', '852.2','851.6', '851.8', '851.4','851.2','851.0','804.1', '804.2', '804.3', '804.4','803.1', '803.2', '803.3', '803.4','801.1', '801.2', '801.3', '801.4', '800.1', '800.2', '800.3', '800.4', '800.03', '800.10', '800.11', '800.12', '800.13', '800.16', '800.19', '800.20', '800.21', '800.22', '800.23', '800.26', '800.29', '800.30', '800.31', '800.32', '800.33', '800.36', '800.39', '800.40', '800.41', '800.42', '800.43', '800.46', '800.49', '800.53', '800.56', '800.59', '801.03', '801.10', '801.11', '801.12', '801.13', '801.16', '801.19', '801.20', '801.21', '801.22', '801.23', '801.26', '801.29', '801.30', '801.31', '801.32', '801.33', '801.36', '801.39', '801.40', '801.41', '801.42', '801.43', '801.46', '801.49', '801.54', '801.56', '801.59', '803.03', '803.10', '803.11', '803.12', '803.13', '803.16', '803.19', '803.20', '803.21', '803.22', '803.23', '803.26', '803.29', '803.30', '803.31', '803.32', '803.33', '803.36', '803.39', '803.40', '803.41', '803.42', '803.43', '803.46', '803.49', '803.53', '803.56', '803.59', '804.03', '804.10', '804.11', '804.12', '804.13', '804.16', '804.19', '804.20', '804.21', '804.22', '804.23', '804.26', '804.29', '804.30', '804.31', '804.32', '804.33', '804.36', '804.39', '804.40', '804.41', '804.42', '804.43', ' 804.46', '804.49', '804.53', '804.56', '804.59', '850.12', '850.2', '850.20', '851.00', '851.01', '851.02', '851.03', '851.06', '851.09', '851.20', '851.21', '851.22', '851.23', '851.26', '851.29', '851.40', '851.41', '851.42', '851.43', '851.46', '851.49', '851.60', '851.61', '851.62', '851.63', '851.66', '851.69', '851.80', '851.81', '851.82', '851.83', '851.86', '851.89', '852.00', '852.01', '852.02', '852.03', '852.06', '852.09', '852.20', '852.21', '852.22', '852.23', '852.26', '852.29', '852.40', '852.41', '852.42', '852.43', '852.46', '852.49', '853.00', '853.01', '853.02', '853.03', '853.06', '853.09', '854','851','852','853', '854.00', '854.01', '854.02', '854.03', '854.06', '854.09', 'V15.53', 'V15.58', 'V15.5D', 'V15.59_3', 'V15.59_8', 'V15.59_D') SEVERITY=2. IF ANY ( full_diag5s,'854.0','853.0','852.4','852.0', '852.2','851.6', '851.8', '851.4','851.2','851.0','804.1', '804.2', '804.3', '804.4','803.1', '803.2', '803.3', '803.4','801.1', '801.2', '801.3', '801.4', '800.1' ,'800.2', '800.3', '800.4', '800.03', '800.10', '800.11', '800.12', '800.13', '800.16', '800.19', '800.20', '800.21', '800.22', '800.23', '800.26', '800.29', '800.30', '800.31', '800.32', '800.33', '800.36', '800.39', '800.40', '800.41', '800.42', '800.43', '800.46', '800.49', '800.53', '800.56', '800.59', '801.03', '801.10', '801.11', '801.12', '801.13', '801.16', '801.19', '801.20', '801.21', '801.22', '801.23', '801.26', '801.29', '801.30', '801.31', '801.32', '801.33', '801.36', '801.39', '801.40', '801.41', '801.42', '801.43', '801.46', '801.49', '801.54', '801.56', '801.59', '803.03', '803.10', '803.11', '803.12', '803.13', '803.16', '803.19', '803.20', '803.21', '803.22', '803.23', '803.26', '803.29', '803.30', '803.31', '803.32', '803.33', '803.36', '803.39', '803.40', '803.41', '803.42', '803.43', '803.46', '803.49', '803.53', '803.56', '803.59', '804.03', '804.10', '804.11', '804.12', '804.13', '804.16', '804.19', '804.20', '804.21', '804.22', '804.23', '804.26', '804.29', '804.30', '804.31', '804.32', '804.33', '804.36', '804.39', '804.40', '804.41', '804.42', '804.43', ' 804.46', '804.49', '804.53', '804.56', '804.59', '850.12', '850.2', '850.20', '851.00', '851.01', '851.02', '851.03', '851.06', '851.09', '851.20', '851.21', '851.22', '851.23', '851.26', '851.29', '851.40', '851.41', '851.42', '851.43', '851.46', '851.49', '851.60', '851.61', '851.62', '851.63', '851.66', '851.69', '851.80', '851.81', '851.82', '851.83', '851.86', '851.89', '852.00', '852.01', '852.02', '852.03', '852.06', '852.09', '852.20', '852.21', '852.22', '852.23', '852.26', '852.29', '852.40', '852.41', '852.42', '852.43', '852.46', '852.49', '853.00', '853.01', '853.02', '853.03', '853.06', '853.09', '854','851','852','853', '854.00', '854.01', '854.02', '854.03', '854.06', '854.09', 'V15.53', 'V15.58', 'V15.5D', 'V15.59_3', 'V15.59_8', 'V15.59_D') SEVERITY=2. IF ANY ( full_diag6s,'854.0','853.0', '852.4','852.0', '852.2','851.6', '851.8', '851.4','851.2','851.0','804.1', '804.2', '804.3', '804.4','803.1', '803.2', '803.3', '803.4','801.1', '801.2', '801.3', '801.4', '800.1', '800.2', '800.3', '800.4', '800.03', '800.10', '800.11', '800.12', '800.13', '800.16', '800.19', '800.20', '800.21', '800.22', '800.23', '800.26', '800.29', '800.30', '800.31', '800.32', '800.33', '800.36', '800.39', '800.40', '800.41', '800.42', '800.43', '800.46', '800.49', '800.53', '800.56', '800.59', '801.03', '801.10', '801.11', '801.12', '801.13', '801.16', '801.19', '801.20', '801.21', '801.22', '801.23', '801.26', '801.29', '801.30', '801.31', '801.32', '801.33', '801.36', '801.39', '801.40', '801.41', '801.42', '801.43', '801.46', '801.49', '801.54', '801.56', '801.59', '803.03', '803.10', '803.11', '803.12', '803.13', '803.16', '803.19', '803.20', '803.21', '803.22', '803.23', '803.26', '803.29', '803.30', '803.31', '803.32', '803.33', '803.36', '803.39', '803.40', '803.41', '803.42', '803.43', '803.46', '803.49', '803.53', '803.56', '803.59', '804.03', '804.10', '804.11', '804.12', '804.13', '804.16', '804.19', '804.20', '804.21', '804.22', '804.23', '804.26', '804.29', '804.30', '804.31', '804.32', '804.33', '804.36', '804.39', '804.40', '804.41', '804.42', '804.43', ' 804.46', '804.49', '804.53', '804.56', '804.59', '850.12', '850.2', '850.20', '851.00', '851.01', '851.02', '851.03', '851.06', '851.09', '851.20', '851.21', '851.22', '851.23', '851.26', '851.29', '851.40', '851.41', '851.42', '851.43', '851.46', '851.49', '851.60', '851.61', '851.62', '851.63', '851.66', '851.69', '851.80', '851.81', '851.82', '851.83', '851.86', '851.89', '852.00', '852.01', '852.02', '852.03', '852.06', '852.09', '852.20', '852.21', '852.22', '852.23', '852.26', '852.29', '852.40', '852.41', '852.42', '852.43', '852.46', '852.49', '853.00', '853.01', '853.02', '853.03', '853.06', '853.09', '854','851','852','853', '854.00', '854.01', '854.02', '854.03', '854.06', '854.09', 'V15.53', 'V15.58', 'V15.5D', 'V15.59_3', 'V15.59_8', 'V15.59_D') SEVERITY=2. IF ANY ( full_diag7s,'854.0','853.0', '852.4','852.0', '852.2','851.6', '851.8', '851.4','851.2','851.0','804.1', '804.2', '804.3', '804.4','803.1', '803.2', '803.3', '803.4','801.1', '801.2', '801.3', '801.4', '800.1' ,'800.2', '800.3', '800.4', '800.03', '800.10', '800.11', '800.12', '800.13', '800.16', '800.19', '800.20', '800.21', '800.22', '800.23', '800.26', '800.29', '800.30', '800.31', '800.32', '800.33', '800.36', '800.39', '800.40', '800.41', '800.42', '800.43', '800.46', '800.49', '800.53', '800.56', '800.59', '801.03', '801.10', '801.11', '801.12', '801.13', '801.16', '801.19', '801.20', '801.21', '801.22', '801.23', '801.26', '801.29', '801.30', '801.31', '801.32', '801.33', '801.36', '801.39', '801.40', '801.41', '801.42', '801.43', '801.46', '801.49', '801.54', '801.56', '801.59', '803.03', '803.10', '803.11', '803.12', '803.13', '803.16', '803.19', '803.20', '803.21', '803.22', '803.23', '803.26', '803.29', '803.30', '803.31', '803.32', '803.33', '803.36', '803.39', '803.40', '803.41', '803.42', '803.43', '803.46', '803.49', '803.53', '803.56', '803.59', '804.03', '804.10', '804.11', '804.12', '804.13', '804.16', '804.19', '804.20', '804.21', '804.22', '804.23', '804.26', '804.29', '804.30', '804.31', '804.32', '804.33', '804.36', '804.39', '804.40', '804.41', '804.42', '804.43', ' 804.46', '804.49', '804.53', '804.56', '804.59', '850.12', '850.2', '850.20', '851.00', '851.01', '851.02', '851.03', '851.06', '851.09', '851.20', '851.21', '851.22', '851.23', '851.26', '851.29', '851.40', '851.41', '851.42', '851.43', '851.46', '851.49', '851.60', '851.61', '851.62', '851.63', '851.66', '851.69', '851.80', '851.81', '851.82', '851.83', '851.86', '851.89', '852.00', '852.01', '852.02', '852.03', '852.06', '852.09', '852.20', '852.21', '852.22', '852.23', '852.26', '852.29', '852.40', '852.41', '852.42', '852.43', '852.46', '852.49', '853.00', '853.01', '853.02', '853.03', '853.06', '853.09', '854','851','852','853', '854.00', '854.01', '854.02', '854.03', '854.06', '854.09', 'V15.53', 'V15.58', 'V15.5D', 'V15.59_3', 'V15.59_8', 'V15.59_D') SEVERITY=2. IF ANY (full_diag8s,'854.0','853.0', '852.4','852.0', '852.2','851.6', '851.8', '851.4','851.2','851.0','804.1', '804.2', '804.3', '804.4','803.1', '803.2', '803.3', '803.4','801.1', '801.2', '801.3', '801.4', '800.1', '800.2', '800.3', '800.4', '800.03', '800.10', '800.11', '800.12', '800.13', '800.16', '800.19', '800.20', '800.21', '800.22', '800.23', '800.26', '800.29', '800.30', '800.31', '800.32', '800.33', '800.36', '800.39', '800.40', '800.41', '800.42', '800.43', '800.46', '800.49', '800.53', '800.56', '800.59', '801.03', '801.10', '801.11', '801.12', '801.13', '801.16', '801.19', '801.20', '801.21', '801.22', '801.23', '801.26', '801.29', '801.30', '801.31', '801.32', '801.33', '801.36', '801.39', '801.40', '801.41', '801.42', '801.43', '801.46', '801.49', '801.54', '801.56', '801.59', '803.03', '803.10', '803.11', '803.12', '803.13', '803.16', '803.19', '803.20', '803.21', '803.22', '803.23', '803.26', '803.29', '803.30', '803.31', '803.32', '803.33', '803.36', '803.39', '803.40', '803.41', '803.42', '803.43', '803.46', '803.49', '803.53', '803.56', '803.59', '804.03', '804.10', '804.11', '804.12', '804.13', '804.16', '804.19', '804.20', '804.21', '804.22', '804.23', '804.26', '804.29', '804.30', '804.31', '804.32', '804.33', '804.36', '804.39', '804.40', '804.41', '804.42', '804.43', ' 804.46', '804.49', '804.53', '804.56', '804.59', '850.12', '850.2', '850.20', '851.00', '851.01', '851.02', '851.03', '851.06', '851.09', '851.20', '851.21', '851.22', '851.23', '851.26', '851.29', '851.40', '851.41', '851.42', '851.43', '851.46', '851.49', '851.60', '851.61', '851.62', '851.63', '851.66', '851.69', '851.80', '851.81', '851.82', '851.83', '851.86', '851.89', '852.00', '852.01', '852.02', '852.03', '852.06', '852.09', '852.20', '852.21', '852.22', '852.23', '852.26', '852.29', '852.40', '852.41', '852.42', '852.43', '852.46', '852.49', '853.00', '853.01', '853.02', '853.03', '853.06', '853.09', '854','851','852','853', '854.00', '854.01', '854.02', '854.03', '854.06', '854.09', 'V15.53', 'V15.58', 'V15.5D', 'V15.59_3', 'V15.59_8', 'V15.59_D') SEVERITY=2. IF ANY (full_diag1s, '800.04', '800.05', '800.14', '800.15', '800.24', '800.25', '800.34', '800.35', '800.44', '800.45', '800.54', '800.55', '801.04', '801.05', '801.14', '801.15', '801.24', '801.25', '801.34', '801.35', '801.44', '801.45', '801.54', '801.55', '803.04', '803.05', '803.14', '803.15', '803.24', '803.25', '803.34', '803.35', '803.44', '803.45', '803.54', '803.55', '804.04', '804.05', '804.14', '804.15', '804.24', '804.25', '804.34', '804.35', '804.44', '804.45', '804.54', '804.55', '850.3', '850.30', '850.4', '850.40', '851.04', '851.05', '851.24', '851.25', '851.44', '851.45', '851.64', '851.65', '851.84', '851.85', '852.04', '852.05', '852.24', '852.25', '852.44', '852.45', '853.04', '853.05', '854.04', '854.05', 'V15.54', 'V15.59', 'V15.5E', 'V15.59_4', 'V15.59_9', 'V15.59_E') SEVERITY=3. IF ANY ( full_diag2s, '800.04', '800.05', '800.14', '800.15', '800.24', '800.25', '800.34', '800.35', '800.44', '800.45', '800.54', '800.55', '801.04', '801.05', '801.14', '801.15', '801.24', '801.25', '801.34', '801.35', '801.44', '801.45', '801.54', '801.55', '803.04', '803.05', '803.14', '803.15', '803.24', '803.25', '803.34', '803.35', '803.44', '803.45', '803.54', '803.55', '804.04', '804.05', '804.14', '804.15', '804.24', '804.25', '804.34', '804.35', '804.44', '804.45', '804.54', '804.55', '850.3', '850.30', '850.4', '850.40', '851.04', '851.05', '851.24', '851.25', '851.44', '851.45', '851.64', '851.65', '851.84', '851.85', '852.04', '852.05', '852.24', '852.25', '852.44', '852.45', '853.04', '853.05', '854.04', '854.05', 'V15.54', 'V15.59', 'V15.5E', 'V15.59_4', 'V15.59_9', 'V15.59_E') SEVERITY=3. IF ANY ( full_diag3s, '800.04', '800.05', '800.14', '800.15', '800.24', '800.25', '800.34', '800.35', '800.44', '800.45', '800.54', '800.55', '801.04', '801.05', '801.14', '801.15', '801.24', '801.25', '801.34', '801.35', '801.44', '801.45', '801.54', '801.55', '803.04', '803.05', '803.14', '803.15', '803.24', '803.25', '803.34', '803.35', '803.44', '803.45', '803.54', '803.55', '804.04', '804.05', '804.14', '804.15', '804.24', '804.25', '804.34', '804.35', '804.44', '804.45', '804.54', '804.55', '850.3', '850.30', '850.4', '850.40', '851.04', '851.05', '851.24', '851.25', '851.44', '851.45', '851.64', '851.65', '851.84', '851.85', '852.04', '852.05', '852.24', '852.25', '852.44', '852.45', '853.04', '853.05', '854.04', '854.05', 'V15.54', 'V15.59', 'V15.5E', 'V15.59_4', 'V15.59_9', 'V15.59_E') SEVERITY=3. IF ANY ( full_diag4s, '800.04', '800.05', '800.14', '800.15', '800.24', '800.25', '800.34', '800.35', '800.44', '800.45', '800.54', '800.55', '801.04', '801.05', '801.14', '801.15', '801.24', '801.25', '801.34', '801.35', '801.44', '801.45', '801.54', '801.55', '803.04', '803.05', '803.14', '803.15', '803.24', '803.25', '803.34', '803.35', '803.44', '803.45', '803.54', '803.55', '804.04', '804.05', '804.14', '804.15', '804.24', '804.25', '804.34', '804.35', '804.44', '804.45', '804.54', '804.55', '850.3', '850.30', '850.4', '850.40', '851.04', '851.05', '851.24', '851.25', '851.44', '851.45', '851.64', '851.65', '851.84', '851.85', '852.04', '852.05', '852.24', '852.25', '852.44', '852.45', '853.04', '853.05', '854.04', '854.05', 'V15.54', 'V15.59', 'V15.5E', 'V15.59_4', 'V15.59_9', 'V15.59_E') SEVERITY=3. IF ANY ( full_diag5s, '800.04', '800.05', '800.14', '800.15', '800.24', '800.25', '800.34', '800.35', '800.44', '800.45', '800.54', '800.55', '801.04', '801.05', '801.14', '801.15', '801.24', '801.25', '801.34', '801.35', '801.44', '801.45', '801.54', '801.55', '803.04', '803.05', '803.14', '803.15', '803.24', '803.25', '803.34', '803.35', '803.44', '803.45', '803.54', '803.55', '804.04', '804.05', '804.14', '804.15', '804.24', '804.25', '804.34', '804.35', '804.44', '804.45', '804.54', '804.55', '850.3', '850.30', '850.4', '850.40', '851.04', '851.05', '851.24', '851.25', '851.44', '851.45', '851.64', '851.65', '851.84', '851.85', '852.04', '852.05', '852.24', '852.25', '852.44', '852.45', '853.04', '853.05', '854.04', '854.05', 'V15.54', 'V15.59', 'V15.5E', 'V15.59_4', 'V15.59_9', 'V15.59_E') SEVERITY=3. IF ANY ( full_diag6s, '800.04', '800.05', '800.14', '800.15', '800.24', '800.25', '800.34', '800.35', '800.44', '800.45', '800.54', '800.55', '801.04', '801.05', '801.14', '801.15', '801.24', '801.25', '801.34', '801.35', '801.44', '801.45', '801.54', '801.55', '803.04', '803.05', '803.14', '803.15', '803.24', '803.25', '803.34', '803.35', '803.44', '803.45', '803.54', '803.55', '804.04', '804.05', '804.14', '804.15', '804.24', '804.25', '804.34', '804.35', '804.44', '804.45', '804.54', '804.55', '850.3', '850.30', '850.4', '850.40', '851.04', '851.05', '851.24', '851.25', '851.44', '851.45', '851.64', '851.65', '851.84', '851.85', '852.04', '852.05', '852.24', '852.25', '852.44', '852.45', '853.04', '853.05', '854.04', '854.05', 'V15.54', 'V15.59', 'V15.5E', 'V15.59_4', 'V15.59_9', 'V15.59_E') SEVERITY=3. IF ANY ( full_diag7s, '800.04', '800.05', '800.14', '800.15', '800.24', '800.25', '800.34', '800.35', '800.44', '800.45', '800.54', '800.55', '801.04', '801.05', '801.14', '801.15', '801.24', '801.25', '801.34', '801.35', '801.44', '801.45', '801.54', '801.55', '803.04', '803.05', '803.14', '803.15', '803.24', '803.25', '803.34', '803.35', '803.44', '803.45', '803.54', '803.55', '804.04', '804.05', '804.14', '804.15', '804.24', '804.25', '804.34', '804.35', '804.44', '804.45', '804.54', '804.55', '850.3', '850.30', '850.4', '850.40', '851.04', '851.05', '851.24', '851.25', '851.44', '851.45', '851.64', '851.65', '851.84', '851.85', '852.04', '852.05', '852.24', '852.25', '852.44', '852.45', '853.04', '853.05', '854.04', '854.05', 'V15.54', 'V15.59', 'V15.5E', 'V15.59_4', 'V15.59_9', 'V15.59_E') SEVERITY=3. IF ANY ( full_diag8s, '800.04', '800.05', '800.14', '800.15', '800.24', '800.25', '800.34', '800.35', '800.44', '800.45', '800.54', '800.55', '801.04', '801.05', '801.14', '801.15', '801.24', '801.25', '801.34', '801.35', '801.44', '801.45', '801.54', '801.55', '803.04', '803.05', '803.14', '803.15', '803.24', '803.25', '803.34', '803.35', '803.44', '803.45', '803.54', '803.55', '804.04', '804.05', '804.14', '804.15', '804.24', '804.25', '804.34', '804.35', '804.44', '804.45', '804.54', '804.55', '850.3', '850.30', '850.4', '850.40', '851.04', '851.05', '851.24', '851.25', '851.44', '851.45', '851.64', '851.65', '851.84', '851.85', '852.04', '852.05', '852.24', '852.25', '852.44', '852.45', '853.04', '853.05', '854.04', '854.05', 'V15.54', 'V15.59', 'V15.5E', 'V15.59_4', 'V15.59_9', 'V15.59_E') SEVERITY=3. IF ANY ( full_diag1s, '854.1', '853.1', '852.3', '852.5', '852.1', '851.5', '851.7', '851.9', '851.3', '851.1', '804.6', '804.7', '804.8', '804.9', '803.5', '803.6', '803.7', '803.8', '803.9', '801.6', '801.7', '801.8', '801.9', '800.6', '800.7', '800.8', '800.9', '800.60', '800.61', '800.62', '800.63', '800.64', '800.65', '800.66', '800.69', '800.70', '800.71', '800.72', '800.73', '800.74', '800.75', '800.76', '800.79', '800.80', '800.81', '800.82', '800.83', '800.84', '800.85', '800.86', '800.89', '800.91', '800.92', '800.93', '800.94', '800.95', '800.96', '800.99', '801.60', '801.61', '801.62', '801.63', '801.64', '801.65', '801.66', '801.69', '801.70', '801.71', '801.72', '801.73', '801.74', '801.75', '807.76', '801.79', '801.80', '801.81', '801.82', '801.83', '801.84', '801.85', '801.86', '801.89', '801.90', '801.91', '801.92', '801.93', '801.94', '801.95', '801.96', '801.99', '803.60', '803.61', '803.62', '803.63', '803.64', '803.65', '803.66', '803.69', '803.70', '803.71', '803.72', '803.73', '803.74', '803.75', '803.76', '803.79', '803.80', '803.81', '803.82', '803.83', '803.84', '803.85', '803.86', '803.89', '803.90', '803.91', '803.92', '803.93', '803.94', '803.95', '803.96', '803.99', '804.60', '804.61', '804.62', '804.63', '804.64', '804.65', '804.66', '804.69', '804.70', '804.71', '804.72', '804.73', '804.74', '804.75', '804.76', '804.79', '804.80', '804.81', '804.82', '804.83', '804.84', '804.85', '804.86', '804.89', '804.90', '804.91', '804.92', '804.93', '804.94', '804.95', '804.96', '804.99', '851.10', '851.11', '851.12', '851.13', '851.14', '851.15', '851.16', '851.19', '851.30', '851.31', '851.32', '851.33', '851.34', '851.35', '851.36', '851.39', '851.50', '851.51', '851.52', '851.53', '851.54', '851.55', '851.56', '851.59', '851.70', '851.71', '851.72', '851.73', '851.74', '851.75', '851.76', '851.79', '851.90', '851.91', '851.92', '851.93', '851.94', '851.95', '851.96', '851.99', '852.10', '852.11', '852.12', '852.13', '852.14', '852.15', '852.16', '852.19', '852.30', '852.31', '852.32', '852.33', '852.34', '852.35', '852.36', '852.39', '852.50', '852.51', '852.52', '852.53', '852.54', '852.55', '852.56', '852.59', '853.10', '853.11', '853.12', '853.13', '853.14', '853.15', '853.16', '853.19', '854.10', '854.11', '854.12', '854.13', '854.14', '854.15', '854.16', '854.19', 'V15.55', 'V15.5A', 'V15.5F', 'V15.59_5', 'V15.59_A', 'V15.59_F') SEVERITY=97. IF ANY ( full_diag2s,'854.1','853.1', '852.3', '852.5','852.1', '851.5', '851.7', '851.9','851.3', '851.1','804.6', '804.7', '804.8', '804.9', '803.5', '803.6', '803.7', '803.8', '803.9', '801.6', '801.7', '801.8', '801.9', '800.6', '800.7', '800.8', '800.9', '800.60', '800.61', '800.62', '800.63', '800.64', '800.65', '800.66', '800.69', '800.70', '800.71', '800.72', '800.73', '800.74', '800.75', '800.76', '800.79', '800.80', '800.81', '800.82', '800.83', '800.84', '800.85', '800.86', '800.89', '800.91', '800.92', '800.93', '800.94', '800.95', '800.96', '800.99', '801.60', '801.61', '801.62', '801.63', '801.64', '801.65', '801.66', '801.69', '801.70', '801.71', '801.72', '801.73', '801.74', '801.75', '807.76', '801.79', '801.80', '801.81', '801.82', '801.83', '801.84', '801.85', '801.86', '801.89', '801.90', '801.91', '801.92', '801.93', '801.94', '801.95', '801.96', '801.99', '803.60', '803.61', '803.62', '803.63', '803.64', '803.65', '803.66', '803.69', '803.70', '803.71', '803.72', '803.73', '803.74', '803.75', '803.76', '803.79', '803.80', '803.81', '803.82', '803.83', '803.84', '803.85', '803.86', '803.89', '803.90', '803.91', '803.92', '803.93', '803.94', '803.95', '803.96', '803.99', '804.60', '804.61', '804.62', '804.63', '804.64', '804.65', '804.66', '804.69', '804.70', '804.71', '804.72', '804.73', '804.74', '804.75', '804.76', '804.79', '804.80', '804.81', '804.82', '804.83', '804.84', '804.85', '804.86', '804.89', '804.90', '804.91', '804.92', '804.93', '804.94', '804.95', '804.96', '804.99', '851.10', '851.11', '851.12', '851.13', '851.14', '851.15', '851.16', '851.19', '851.30', '851.31', '851.32', '851.33', '851.34', '851.35', '851.36', '851.39', '851.50', '851.51', '851.52', '851.53', '851.54', '851.55', '851.56', '851.59', '851.70', '851.71', '851.72', '851.73', '851.74', '851.75', '851.76', '851.79', '851.90', '851.91', '851.92', '851.93', '851.94', '851.95', '851.96', '851.99', '852.10', '852.11', '852.12', '852.13', '852.14', '852.15', '852.16', '852.19', '852.30', '852.31', '852.32', '852.33', '852.34', '852.35', '852.36', '852.39', '852.50', '852.51', '852.52', '852.53', '852.54', '852.55', '852.56', '852.59', '853.10', '853.11', '853.12', '853.13', '853.14', '853.15', '853.16', '853.19', '854.10', '854.11', '854.12', '854.13', '854.14', '854.15', '854.16', '854.19', 'V15.55', 'V15.5A', 'V15.5F', 'V15.59_5', 'V15.59_A', 'V15.59_F') SEVERITY=97. IF ANY ( full_diag3s,'854.1','853.1', '852.3', '852.5','852.1', '851.5', '851.7', '851.9','851.3', '851.1','804.6', '804.7', '804.8', '804.9', '803.5', '803.6', '803.7', '803.8', '803.9', '801.6', '801.7', '801.8', '801.9', '800.6', '800.7', '800.8', '800.9', '800.60', '800.61', '800.62', '800.63', '800.64', '800.65', '800.66', '800.69', '800.70', '800.71', '800.72', '800.73', '800.74', '800.75', '800.76', '800.79', '800.80', '800.81', '800.82', '800.83', '800.84', '800.85', '800.86', '800.89', '800.91', '800.92', '800.93', '800.94', '800.95', '800.96', '800.99', '801.60', '801.61', '801.62', '801.63', '801.64', '801.65', '801.66', '801.69', '801.70', '801.71', '801.72', '801.73', '801.74', '801.75', '807.76', '801.79', '801.80', '801.81', '801.82', '801.83', '801.84', '801.85', '801.86', '801.89', '801.90', '801.91', '801.92', '801.93', '801.94', '801.95', '801.96', '801.99', '803.60', '803.61', '803.62', '803.63', '803.64', '803.65', '803.66', '803.69', '803.70', '803.71', '803.72', '803.73', '803.74', '803.75', '803.76', '803.79', '803.80', '803.81', '803.82', '803.83', '803.84', '803.85', '803.86', '803.89', '803.90', '803.91', '803.92', '803.93', '803.94', '803.95', '803.96', '803.99', '804.60', '804.61', '804.62', '804.63', '804.64', '804.65', '804.66', '804.69', '804.70', '804.71', '804.72', '804.73', '804.74', '804.75', '804.76', '804.79', '804.80', '804.81', '804.82', '804.83', '804.84', '804.85', '804.86', '804.89', '804.90', '804.91', '804.92', '804.93', '804.94', '804.95', '804.96', '804.99', '851.10', '851.11', '851.12', '851.13', '851.14', '851.15', '851.16', '851.19', '851.30', '851.31', '851.32', '851.33', '851.34', '851.35', '851.36', '851.39', '851.50', '851.51', '851.52', '851.53', '851.54', '851.55', '851.56', '851.59', '851.70', '851.71', '851.72', '851.73', '851.74', '851.75', '851.76', '851.79', '851.90', '851.91', '851.92', '851.93', '851.94', '851.95', '851.96', '851.99', '852.10', '852.11', '852.12', '852.13', '852.14', '852.15', '852.16', '852.19', '852.30', '852.31', '852.32', '852.33', '852.34', '852.35', '852.36', '852.39', '852.50', '852.51', '852.52', '852.53', '852.54', '852.55', '852.56', '852.59', '853.10', '853.11', '853.12', '853.13', '853.14', '853.15', '853.16', '853.19', '854.10', '854.11', '854.12', '854.13', '854.14', '854.15', '854.16', '854.19', 'V15.55', 'V15.5A', 'V15.5F', 'V15.59_5', 'V15.59_A', 'V15.59_F') SEVERITY=97. IF ANY ( full_diag4s,'854.1','853.1', '852.3', '852.5','852.1', '851.5', '851.7', '851.9','851.3', '851.1','804.6', '804.7', '804.8', '804.9', '803.5', '803.6', '803.7', '803.8', '803.9', '801.6', '801.7', '801.8', '801.9', '800.6', '800.7', '800.8', '800.9', '800.60', '800.61', '800.62', '800.63', '800.64', '800.65', '800.66', '800.69', '800.70', '800.71', '800.72', '800.73', '800.74', '800.75', '800.76', '800.79', '800.80', '800.81', '800.82', '800.83', '800.84', '800.85', '800.86', '800.89', '800.91', '800.92', '800.93', '800.94', '800.95', '800.96', '800.99', '801.60', '801.61', '801.62', '801.63', '801.64', '801.65', '801.66', '801.69', '801.70', '801.71', '801.72', '801.73', '801.74', '801.75', '807.76', '801.79', '801.80', '801.81', '801.82', '801.83', '801.84', '801.85', '801.86', '801.89', '801.90', '801.91', '801.92', '801.93', '801.94', '801.95', '801.96', '801.99', '803.60', '803.61', '803.62', '803.63', '803.64', '803.65', '803.66', '803.69', '803.70', '803.71', '803.72', '803.73', '803.74', '803.75', '803.76', '803.79', '803.80', '803.81', '803.82', '803.83', '803.84', '803.85', '803.86', '803.89', '803.90', '803.91', '803.92', '803.93', '803.94', '803.95', '803.96', '803.99', '804.60', '804.61', '804.62', '804.63', '804.64', '804.65', '804.66', '804.69', '804.70', '804.71', '804.72', '804.73', '804.74', '804.75', '804.76', '804.79', '804.80', '804.81', '804.82', '804.83', '804.84', '804.85', '804.86', '804.89', '804.90', '804.91', '804.92', '804.93', '804.94', '804.95', '804.96', '804.99', '851.10', '851.11', '851.12', '851.13', '851.14', '851.15', '851.16', '851.19', '851.30', '851.31', '851.32', '851.33', '851.34', '851.35', '851.36', '851.39', '851.50', '851.51', '851.52', '851.53', '851.54', '851.55', '851.56', '851.59', '851.70', '851.71', '851.72', '851.73', '851.74', '851.75', '851.76', '851.79', '851.90', '851.91', '851.92', '851.93', '851.94', '851.95', '851.96', '851.99', '852.10', '852.11', '852.12', '852.13', '852.14', '852.15', '852.16', '852.19', '852.30', '852.31', '852.32', '852.33', '852.34', '852.35', '852.36', '852.39', '852.50', '852.51', '852.52', '852.53', '852.54', '852.55', '852.56', '852.59', '853.10', '853.11', '853.12', '853.13', '853.14', '853.15', '853.16', '853.19', '854.10', '854.11', '854.12', '854.13', '854.14', '854.15', '854.16', '854.19', 'V15.55', 'V15.5A', 'V15.5F', 'V15.59_5', 'V15.59_A', 'V15.59_F') SEVERITY=97. IF ANY ( full_diag5s,'854.1','853.1', '852.3', '852.5','852.1', '851.5', '851.7', '851.9','851.3', '851.1','804.6', '804.7', '804.8', '804.9', '803.5', '803.6', '803.7', '803.8', '803.9', '801.6', '801.7', '801.8', '801.9', '800.6', '800.7', '800.8', '800.9', '800.60', '800.61', '800.62', '800.63', '800.64', '800.65', '800.66', '800.69', '800.70', '800.71', '800.72', '800.73', '800.74', '800.75', '800.76', '800.79', '800.80', '800.81', '800.82', '800.83', '800.84', '800.85', '800.86', '800.89', '800.91', '800.92', '800.93', '800.94', '800.95', '800.96', '800.99', '801.60', '801.61', '801.62', '801.63', '801.64', '801.65', '801.66', '801.69', '801.70', '801.71', '801.72', '801.73', '801.74', '801.75', '807.76', '801.79', '801.80', '801.81', '801.82', '801.83', '801.84', '801.85', '801.86', '801.89', '801.90', '801.91', '801.92', '801.93', '801.94', '801.95', '801.96', '801.99', '803.60', '803.61', '803.62', '803.63', '803.64', '803.65', '803.66', '803.69', '803.70', '803.71', '803.72', '803.73', '803.74', '803.75', '803.76', '803.79', '803.80', '803.81', '803.82', '803.83', '803.84', '803.85', '803.86', '803.89', '803.90', '803.91', '803.92', '803.93', '803.94', '803.95', '803.96', '803.99', '804.60', '804.61', '804.62', '804.63', '804.64', '804.65', '804.66', '804.69', '804.70', '804.71', '804.72', '804.73', '804.74', '804.75', '804.76', '804.79', '804.80', '804.81', '804.82', '804.83', '804.84', '804.85', '804.86', '804.89', '804.90', '804.91', '804.92', '804.93', '804.94', '804.95', '804.96', '804.99', '851.10', '851.11', '851.12', '851.13', '851.14', '851.15', '851.16', '851.19', '851.30', '851.31', '851.32', '851.33', '851.34', '851.35', '851.36', '851.39', '851.50', '851.51', '851.52', '851.53', '851.54', '851.55', '851.56', '851.59', '851.70', '851.71', '851.72', '851.73', '851.74', '851.75', '851.76', '851.79', '851.90', '851.91', '851.92', '851.93', '851.94', '851.95', '851.96', '851.99', '852.10', '852.11', '852.12', '852.13', '852.14', '852.15', '852.16', '852.19', '852.30', '852.31', '852.32', '852.33', '852.34', '852.35', '852.36', '852.39', '852.50', '852.51', '852.52', '852.53', '852.54', '852.55', '852.56', '852.59', '853.10', '853.11', '853.12', '853.13', '853.14', '853.15', '853.16', '853.19', '854.10', '854.11', '854.12', '854.13', '854.14', '854.15', '854.16', '854.19', 'V15.55', 'V15.5A', 'V15.5F', 'V15.59_5', 'V15.59_A', 'V15.59_F') SEVERITY=97. IF ANY ( full_diag6s,'854.1','853.1', '852.3', '852.5','852.1', '851.5', '851.7', '851.9','851.3', '851.1','804.6', '804.7', '804.8', '804.9', '803.5', '803.6', '803.7', '803.8', '803.9', '801.6', '801.7', '801.8', '801.9', '800.6', '800.7', '800.8', '800.9', '800.60', '800.61', '800.62', '800.63', '800.64', '800.65', '800.66', '800.69', '800.70', '800.71', '800.72', '800.73', '800.74', '800.75', '800.76', '800.79', '800.80', '800.81', '800.82', '800.83', '800.84', '800.85', '800.86', '800.89', '800.91', '800.92', '800.93', '800.94', '800.95', '800.96', '800.99', '801.60', '801.61', '801.62', '801.63', '801.64', '801.65', '801.66', '801.69', '801.70', '801.71', '801.72', '801.73', '801.74', '801.75', '807.76', '801.79', '801.80', '801.81', '801.82', '801.83', '801.84', '801.85', '801.86', '801.89', '801.90', '801.91', '801.92', '801.93', '801.94', '801.95', '801.96', '801.99', '803.60', '803.61', '803.62', '803.63', '803.64', '803.65', '803.66', '803.69', '803.70', '803.71', '803.72', '803.73', '803.74', '803.75', '803.76', '803.79', '803.80', '803.81', '803.82', '803.83', '803.84', '803.85', '803.86', '803.89', '803.90', '803.91', '803.92', '803.93', '803.94', '803.95', '803.96', '803.99', '804.60', '804.61', '804.62', '804.63', '804.64', '804.65', '804.66', '804.69', '804.70', '804.71', '804.72', '804.73', '804.74', '804.75', '804.76', '804.79', '804.80', '804.81', '804.82', '804.83', '804.84', '804.85', '804.86', '804.89', '804.90', '804.91', '804.92', '804.93', '804.94', '804.95', '804.96', '804.99', '851.10', '851.11', '851.12', '851.13', '851.14', '851.15', '851.16', '851.19', '851.30', '851.31', '851.32', '851.33', '851.34', '851.35', '851.36', '851.39', '851.50', '851.51', '851.52', '851.53', '851.54', '851.55', '851.56', '851.59', '851.70', '851.71', '851.72', '851.73', '851.74', '851.75', '851.76', '851.79', '851.90', '851.91', '851.92', '851.93', '851.94', '851.95', '851.96', '851.99', '852.10', '852.11', '852.12', '852.13', '852.14', '852.15', '852.16', '852.19', '852.30', '852.31', '852.32', '852.33', '852.34', '852.35', '852.36', '852.39', '852.50', '852.51', '852.52', '852.53', '852.54', '852.55', '852.56', '852.59', '853.10', '853.11', '853.12', '853.13', '853.14', '853.15', '853.16', '853.19', '854.10', '854.11', '854.12', '854.13', '854.14', '854.15', '854.16', '854.19', 'V15.55', 'V15.5A', 'V15.5F', 'V15.59_5', 'V15.59_A', 'V15.59_F') SEVERITY=97. IF ANY ( full_diag7s,'854.1','853.1', '852.3', '852.5','852.1', '851.5', '851.7', '851.9','851.3', '851.1', '804.6', '804.7', '804.8', '804.9','803.5', '803.6', '803.7', '803.8', '803.9', '801.6', '801.7', '801.8', '801.9', '800.6', '800.7', '800.8', '800.9', '800.60', '800.61', '800.62', '800.63', '800.64', '800.65', '800.66', '800.69', '800.70', '800.71', '800.72', '800.73', '800.74', '800.75', '800.76', '800.79', '800.80', '800.81', '800.82', '800.83', '800.84', '800.85', '800.86', '800.89', '800.91', '800.92', '800.93', '800.94', '800.95', '800.96', '800.99', '801.60', '801.61', '801.62', '801.63', '801.64', '801.65', '801.66', '801.69', '801.70', '801.71', '801.72', '801.73', '801.74', '801.75', '807.76', '801.79', '801.80', '801.81', '801.82', '801.83', '801.84', '801.85', '801.86', '801.89', '801.90', '801.91', '801.92', '801.93', '801.94', '801.95', '801.96', '801.99', '803.60', '803.61', '803.62', '803.63', '803.64', '803.65', '803.66', '803.69', '803.70', '803.71', '803.72', '803.73', '803.74', '803.75', '803.76', '803.79', '803.80', '803.81', '803.82', '803.83', '803.84', '803.85', '803.86', '803.89', '803.90', '803.91', '803.92', '803.93', '803.94', '803.95', '803.96', '803.99', '804.60', '804.61', '804.62', '804.63', '804.64', '804.65', '804.66', '804.69', '804.70', '804.71', '804.72', '804.73', '804.74', '804.75', '804.76', '804.79', '804.80', '804.81', '804.82', '804.83', '804.84', '804.85', '804.86', '804.89', '804.90', '804.91', '804.92', '804.93', '804.94', '804.95', '804.96', '804.99', '851.10', '851.11', '851.12', '851.13', '851.14', '851.15', '851.16', '851.19', '851.30', '851.31', '851.32', '851.33', '851.34', '851.35', '851.36', '851.39', '851.50', '851.51', '851.52', '851.53', '851.54', '851.55', '851.56', '851.59', '851.70', '851.71', '851.72', '851.73', '851.74', '851.75', '851.76', '851.79', '851.90', '851.91', '851.92', '851.93', '851.94', '851.95', '851.96', '851.99', '852.10', '852.11', '852.12', '852.13', '852.14', '852.15', '852.16', '852.19', '852.30', '852.31', '852.32', '852.33', '852.34', '852.35', '852.36', '852.39', '852.50', '852.51', '852.52', '852.53', '852.54', '852.55', '852.56', '852.59', '853.10', '853.11', '853.12', '853.13', '853.14', '853.15', '853.16', '853.19', '854.10', '854.11', '854.12', '854.13', '854.14', '854.15', '854.16', '854.19', 'V15.55', 'V15.5A', 'V15.5F', 'V15.59_5', 'V15.59_A', 'V15.59_F') SEVERITY=97. IF ANY ( full_diag8s,'854.1','853.1', '852.3', '852.5','852.1', '851.5', '851.7', '851.9','851.3', '851.1','804.6', '804.7', '804.8', '804.9', '803.5', '803.6', '803.7', '803.8', '803.9', '801.6', '801.7', '801.8', '801.9', '800.6', '800.7', '800.8', '800.9', '800.60', '800.61', '800.62', '800.63', '800.64', '800.65', '800.66', '800.69', '800.70', '800.71', '800.72', '800.73', '800.74', '800.75', '800.76', '800.79', '800.80', '800.81', '800.82', '800.83', '800.84', '800.85', '800.86', '800.89', '800.91', '800.92', '800.93', '800.94', '800.95', '800.96', '800.99', '801.60', '801.61', '801.62', '801.63', '801.64', '801.65', '801.66', '801.69', '801.70', '801.71', '801.72', '801.73', '801.74', '801.75', '807.76', '801.79', '801.80', '801.81', '801.82', '801.83', '801.84', '801.85', '801.86', '801.89', '801.90', '801.91', '801.92', '801.93', '801.94', '801.95', '801.96', '801.99', '803.60', '803.61', '803.62', '803.63', '803.64', '803.65', '803.66', '803.69', '803.70', '803.71', '803.72', '803.73', '803.74', '803.75', '803.76', '803.79', '803.80', '803.81', '803.82', '803.83', '803.84', '803.85', '803.86', '803.89', '803.90', '803.91', '803.92', '803.93', '803.94', '803.95', '803.96', '803.99', '804.60', '804.61', '804.62', '804.63', '804.64', '804.65', '804.66', '804.69', '804.70', '804.71', '804.72', '804.73', '804.74', '804.75', '804.76', '804.79', '804.80', '804.81', '804.82', '804.83', '804.84', '804.85', '804.86', '804.89', '804.90', '804.91', '804.92', '804.93', '804.94', '804.95', '804.96', '804.99', '851.10', '851.11', '851.12', '851.13', '851.14', '851.15', '851.16', '851.19', '851.30', '851.31', '851.32', '851.33', '851.34', '851.35', '851.36', '851.39', '851.50', '851.51', '851.52', '851.53', '851.54', '851.55', '851.56', '851.59', '851.70', '851.71', '851.72', '851.73', '851.74', '851.75', '851.76', '851.79', '851.90', '851.91', '851.92', '851.93', '851.94', '851.95', '851.96', '851.99', '852.10', '852.11', '852.12', '852.13', '852.14', '852.15', '852.16', '852.19', '852.30', '852.31', '852.32', '852.33', '852.34', '852.35', '852.36', '852.39', '852.50', '852.51', '852.52', '852.53', '852.54', '852.55', '852.56', '852.59', '853.10', '853.11', '853.12', '853.13', '853.14', '853.15', '853.16', '853.19', '854.10', '854.11', '854.12', '854.13', '854.14', '854.15', '854.16', '854.19', 'V15.55', 'V15.5A', 'V15.5F', 'V15.59_5', 'V15.59_A', 'V15.59_F') SEVERITY=97. IF ANY (full_diag1s,'950.1', '950.10', '950.2', '950.20', '950.3', '950.30', 'V15.51', 'V15.56', 'V15.5B', '907.0', '907.00', 'V15.59_1', 'V15.59_6', 'V15.59_B') SEVERITY=98. IF ANY ( full_diag2s,'950.1', '950.10', '950.2', '950.20', '950.3', '950.30', 'V15.51', 'V15.56', 'V15.5B', '907.0', '907.00', 'V15.59_1', 'V15.59_6', 'V15.59_B') SEVERITY=98. IF ANY ( full_diag3s,'950.1', '950.10', '950.2', '950.20', '950.3', '950.30', 'V15.51', 'V15.56', 'V15.5B', '907.0', '907.00', 'V15.59_1', 'V15.59_6', 'V15.59_B') SEVERITY=98. IF ANY ( full_diag4s,'950.1', '950.10', '950.2', '950.20', '950.3', '950.30', 'V15.51', 'V15.56', 'V15.5B', '907.0', '907.00', 'V15.59_1', 'V15.59_6', 'V15.59_B') SEVERITY=98. IF ANY ( full_diag5s,'950.1', '950.10', '950.2', '950.20', '950.3', '950.30', 'V15.51', 'V15.56', 'V15.5B', '907.0', '907.00', 'V15.59_1', 'V15.59_6', 'V15.59_B') SEVERITY=98. IF ANY ( full_diag6s,'950.1', '950.10', '950.2', '950.20', '950.3', '950.30', 'V15.51', 'V15.56', 'V15.5B', '907.0', '907.00', 'V15.59_1', 'V15.59_6', 'V15.59_B') SEVERITY=98. IF ANY ( full_diag7s,'950.1', '950.10', '950.2', '950.20', '950.3', '950.30', 'V15.51', 'V15.56', 'V15.5B', '907.0', '907.00', 'V15.59_1', 'V15.59_6', 'V15.59_B') SEVERITY=98. IF ANY ( full_diag8s,'950.1', '950.10', '950.2', '950.20', '950.3', '950.30', 'V15.51', 'V15.56', 'V15.5B', '907.0', '907.00', 'V15.59_1', 'V15.59_6', 'V15.59_B') SEVERITY=98. EXE. RECODE SEVERITY (0=98) (ELSE=COPY). EXE. VARIABLE LABEL SEVERITY 'Severity'. VALUE LABEL SEVERITY 1'Mild', 2 'Moderate', 3 'Severe', 97 'Penetrating', 98 'Missing/Unknown'. EXE.
|
|
Administrator
|
Yikes! You definitely want to use some DO-REPEAT loops such as the ones Gene & I posted. You might also look into using macros to define the lists of ICD-9 codes that are used in the various IF ANY commands. Finally, it looks to me like your SEVERITY variable could be overwritten depending on what the data for a particular patient look like--e.g., in the first part of the syntax, the presence of some ICD-9 code will cause SEVERITY to be set to 1. But further on down, there might be an ICD-9 code that causes that 1 to be overwritten with a 2 or a 3. I doubt that's what you intend to happen.
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
|
Mr. Weaver,
That is exactly what is happening with the syntax I created, it is be overwritten which is what I am trying to avoid. I never used a macro before is it possible to get a sample of what one may look like?
|
|
In reply to this post by Bruce Weaver
Hi Bruce,
Yes, it does. I did that because it seemed to me that AKR wanted to know the first qualifying ICD9 code and not just if there were any in the list. I could well have misinterpreted the posting. A new message from AKR was just distributed and after looking at that I can see that I didn't understand what was needed. To AKR, After looking at your most recent posting, I would say you want this. I haven't tested it, so there may be problems. In the code you sent, you check for severity=1 across the dx variables, then you check for severity=2 across the dx variables and so on. I think this code does that. Do repeat x=dx1 to dx8/y=dxlevel1 to dxlevel8. + if (any(x,'310.2','310.4','824.6','918.9')) y=1. + if (any(x,'810.2','420.9','421.5')) y=2. End repeat. If (any(1,dxlevel1 to dxlevel8)) severity=1. If (any(2,dxlevel1 to dxlevel8)) severity=2. However, after comparing your most recent posting and the original posting, I'm not sure what you want because your original message describes wanting to know the first occuring head injury code. The followup message describes something different. Please clarify what you need. > I have 8 variables that contain string data, the string data are ICD-9 > codes and what I am attempting to do is create a variable based on the > first recorded diagnosis code indicating a head injury. some of the cases > have multiple codes representing the head injury but I would like to use > the first one recorded. so for example if in dx1 is 310.2 and then dx2 is > 854.00 I would like to use 310.2 because that is the first reported head > injury code. here is what the data looks like: I used the IF ANY command > but it continued to read subsequent head injury codes. any help with this > is greatly appreciated. AKR. Gene Maguin ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
Administrator
|
In reply to this post by akrobbins
So you only want to look for ICD-9 codes that give SEVERITY=2 if you found none that give SEVERITY=1; and you want to look for ICD-9 codes that give SEVERITY = 3 if you found none that give 1 or 2; etc. Right? Here's what I had in mind as a way of coding this. It has not been tested, and I don't know if the macro lists will behave exactly as I'm hoping. (It may be necessary to do some fiddly stuff with !QUOTE and !UNQUOTE, for example.) But it gives you some ideas at least. * --- start of syntax --- . * Use macros to define lists of codes corresponding to * the different severity levels . define !list1 ()'804.5', '804.0', '803.0', '801.5', '801.0', '800.0', '800.5', '800.00', '800.01', '800.02', '800.06', '800.09', '310.20', '310.2', '800.50', '800.51', '800.52', '801.00', '801.01', '801.02', '801.06', '801.09', '801.50', '801.51', '801.52', '803.00', '803.01', '803.02', '803.06', '803.09', '803.50', '803.51', '803.52', '804.00', '804.01', '804.02', '804.06', '804.09', '804.50', '804.51', '804.52', '850.', '850.00', '850.0', '850.1', '850.10', '850.11', '850', '800', '801', '803', '803.0', '801.0', '804', '804.0', '850.5', '850.50', '850.9', '850.90', '959.01', 'V15.52', 'V15.57', 'V15.5C', 'V15.59_2', 'V15.59_C', 'V15.59_7' !enddefine. define !list2 ()'854.0', '853.0', '852.4', '852.0', '852.2', '851.6', '851.8', '851.4', '851.2', '851.0', '804.1', '804.2', '804.3', '804.4', '803.1', '803.2', '803.3', '803.4','801.1', '801.2', '801.3', '801.4', '800.1' ,'800.2', '800.3', '800.4','800.03', '800.10', '800.11', '800.12', '800.13', '800.16', '800.19', '800.20', '800.21', '800.22', '800.23', '800.26', '800.29', '800.30', '800.31', '800.32', '800.33', '800.36', '800.39', '800.40', '800.41', '800.42', '800.43', '800.46', '800.49', '800.53', '800.56', '800.59', '801.03', '801.10', '801.11', '801.12', '801.13', '801.16', '801.19', '801.20', '801.21', '801.22', '801.23', '801.26', '801.29', '801.30', '801.31', '801.32', '801.33', '801.36', '801.39', '801.40', '801.41', '801.42', '801.43', '801.46', '801.49', '801.54', '801.56', '801.59', '803.03', '803.10', '803.11', '803.12', '803.13', '803.16', '803.19', '803.20', '803.21', '803.22', '803.23', '803.26', '803.29', '803.30', '803.31', '803.32', '803.33', '803.36', '803.39', '803.40', '803.41', '803.42', '803.43', '803.46', '803.49', '803.53', '803.56', '803.59', '804.03', '804.10', '804.11', '804.12', '804.13', '804.16', '804.19', '804.20', '804.21', '804.22', '804.23', '804.26', '804.29', '804.30', '804.31', '804.32', '804.33', '804.36', '804.39', '804.40', '804.41', '804.42', '804.43', ' 804.46', '804.49', '804.53', '804.56', '804.59', '850.12', '850.2', '850.20', '851.00', '851.01', '851.02', '851.03', '851.06', '851.09', '851.20', '851.21', '851.22', '851.23', '851.26', '851.29', '851.40', '851.41', '851.42', '851.43', '851.46', '851.49', '851.60', '851.61', '851.62', '851.63', '851.66', '851.69', '851.80', '851.81', '851.82', '851.83', '851.86', '851.89', '852.00', '852.01', '852.02', '852.03', '852.06', '852.09', '852.20', '852.21', '852.22', '852.23', '852.26', '852.29', '852.40', '852.41', '852.42', '852.43', '852.46', '852.49', '853.00', '853.01', '853.02', '853.03', '853.06', '853.09', '854','851','852','853', '854.00', '854.01', '854.02', '854.03', '854.06', '854.09', 'V15.53', 'V15.58', 'V15.5D', 'V15.59_3', 'V15.59_8', 'V15.59_D' !enddefine. define !list3 ()'800.04', '800.05', '800.14', '800.15', '800.24', '800.25', '800.34', '800.35', '800.44', '800.45', '800.54', '800.55', '801.04', '801.05', '801.14', '801.15', '801.24', '801.25', '801.34', '801.35', '801.44', '801.45', '801.54', '801.55', '803.04', '803.05', '803.14', '803.15', '803.24', '803.25', '803.34', '803.35', '803.44', '803.45', '803.54', '803.55', '804.04', '804.05', '804.14', '804.15', '804.24', '804.25', '804.34', '804.35', '804.44', '804.45', '804.54', '804.55', '850.3', '850.30', '850.4', '850.40', '851.04', '851.05', '851.24', '851.25', '851.44', '851.45', '851.64', '851.65', '851.84', '851.85', '852.04', '852.05', '852.24', '852.25', '852.44', '852.45', '853.04', '853.05', '854.04', '854.05', 'V15.54', 'V15.59', 'V15.5E', 'V15.59_4', 'V15.59_9', 'V15.59_E' !enddefine. define !list97 ()'854.1', '853.1', '852.3', '852.5', '852.1', '851.5', '851.7', '851.9', '851.3', '851.1', '804.6', '804.7', '804.8', '804.9', '803.5', '803.6', '803.7', '803.8', '803.9', '801.6', '801.7', '801.8', '801.9', '800.6', '800.7', '800.8', '800.9', '800.60', '800.61', '800.62', '800.63', '800.64', '800.65', '800.66', '800.69', '800.70', '800.71', '800.72', '800.73', '800.74', '800.75', '800.76', '800.79', '800.80', '800.81', '800.82', '800.83', '800.84', '800.85', '800.86', '800.89', '800.91', '800.92', '800.93', '800.94', '800.95', '800.96', '800.99', '801.60', '801.61', '801.62', '801.63', '801.64', '801.65', '801.66', '801.69', '801.70', '801.71', '801.72', '801.73', '801.74', '801.75', '807.76', '801.79', '801.80', '801.81', '801.82', '801.83', '801.84', '801.85', '801.86', '801.89', '801.90', '801.91', '801.92', '801.93', '801.94', '801.95', '801.96', '801.99', '803.60', '803.61', '803.62', '803.63', '803.64', '803.65', '803.66', '803.69', '803.70', '803.71', '803.72', '803.73', '803.74', '803.75', '803.76', '803.79', '803.80', '803.81', '803.82', '803.83', '803.84', '803.85', '803.86', '803.89', '803.90', '803.91', '803.92', '803.93', '803.94', '803.95', '803.96', '803.99', '804.60', '804.61', '804.62', '804.63', '804.64', '804.65', '804.66', '804.69', '804.70', '804.71', '804.72', '804.73', '804.74', '804.75', '804.76', '804.79', '804.80', '804.81', '804.82', '804.83', '804.84', '804.85', '804.86', '804.89', '804.90', '804.91', '804.92', '804.93', '804.94', '804.95', '804.96', '804.99', '851.10', '851.11', '851.12', '851.13', '851.14', '851.15', '851.16', '851.19', '851.30', '851.31', '851.32', '851.33', '851.34', '851.35', '851.36', '851.39', '851.50', '851.51', '851.52', '851.53', '851.54', '851.55', '851.56', '851.59', '851.70', '851.71', '851.72', '851.73', '851.74', '851.75', '851.76', '851.79', '851.90', '851.91', '851.92', '851.93', '851.94', '851.95', '851.96', '851.99', '852.10', '852.11', '852.12', '852.13', '852.14', '852.15', '852.16', '852.19', '852.30', '852.31', '852.32', '852.33', '852.34', '852.35', '852.36', '852.39', '852.50', '852.51', '852.52', '852.53', '852.54', '852.55', '852.56', '852.59', '853.10', '853.11', '853.12', '853.13', '853.14', '853.15', '853.16', '853.19', '854.10', '854.11', '854.12', '854.13', '854.14', '854.15', '854.16', '854.19', 'V15.55', 'V15.5A', 'V15.5F', 'V15.59_5', 'V15.59_A', 'V15.59_F' !enddefine. COMPUTE SEVERITY=0. do repeat d = full_diag1s to full_diag8s . - do if (severity EQ 0). /* Only proceed if SEVERITY still = 0 . - if any(d,!list1) severity = 1. - end if. end repeat. do repeat d = full_diag1s to full_diag8s . - do if (severity EQ 0). /* Only proceed if SEVERITY still = 0 . - if any(d,!list2) severity = 2. - end if. end repeat. do repeat d = full_diag1s to full_diag8s . - do if (severity EQ 0). /* Only proceed if SEVERITY still = 0 . - if any(d,!list3) severity = 3. - end if. end repeat. do repeat d = full_diag1s to full_diag8s . - do if (severity EQ 0). /* Only proceed if SEVERITY still = 0 . - if any(d,!list97) severity = 97. - end if. end repeat. EXE. * You eventually recode 0 to 98, so I don't see * any need to include the IF ANY step for a value of 98. RECODE SEVERITY (0=98) (ELSE=COPY). EXE. VARIABLE LABEL SEVERITY 'Severity'. VALUE LABEL SEVERITY 1'Mild', 2 'Moderate', 3 'Severe', 97 'Penetrating', 98 'Missing/Unknown'. * --- end of syntax --- .
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
|
Administrator
|
In reply to this post by akrobbins
What I see being proposed is just slightly short of complete insanity!!!
Here's how you want to approach something like this!!! Take all those ICD-9 codes and put them into a small lookup table with an additional variable SEVERITY and type of injury (head injury). SORT cases by ICD-9 code. SAVE. Take original file and KEEP ID and desired ICD-9 codes. Use VARSTOCASES to create long file and retain sequence of ICD-9 code. SORT cases by ICD-9 code. MATCH using ICD-9 as a TABLE. SELECT only Head Injuries. SORT CASES by ID Sequence. AGGREGATE on ID and grab FIRST Head Injury ICD-9. MATCH result back to original data file by ID! I believe we are done unless I missed something. HTH, David Marso If you need further assist send me a PM and I'll quote you my rate! On Fri, 6 Nov 2009 10:54:07 -0800, Bruce Weaver <[hidden email]> wrote: >akrobbins wrote: >> >> Mr. Weaver, >> >> That is exactly what is happening with the syntax I created, it is be >> overwritten which is what I am trying to avoid. I never used a macro >> before is it possible to get a sample of what one may look like? >> >> > >So you only want to look for ICD-9 codes that give SEVERITY=2 if you found >none that give SEVERITY=1; and you want to look for ICD-9 codes that give >SEVERITY = 3 if you found none that give 1 or 2; etc. Right? > >Here's what I had in mind as a way of coding this. It has not been tested, >and I don't know if the macro lists will behave exactly as I'm hoping. (It >may be necessary to do some fiddly stuff with !QUOTE and !UNQUOTE, for >example.) But it gives you some ideas at least. > >* --- start of syntax --- . > >* Use macros to define lists of codes corresponding to >* the different severity levels . > >define !list1 ()'804.5', '804.0', '803.0', '801.5', '801.0', '800.0', >'800.5', '800.00', '800.01', '800.02', '800.06', '800.09', '310.20', >'310.2', '800.50', '800.51', '800.52', '801.00', '801.01', '801.02', >'801.06', '801.09', '801.50', '801.51', '801.52', '803.00', '803.01', >'803.02', '803.06', '803.09', '803.50', '803.51', '803.52', '804.00', >'804.01', '804.02', '804.06', '804.09', '804.50', '804.51', '804.52', >'850.', '850.00', '850.0', '850.1', '850.10', '850.11', '850', '800', '801', >'803', '803.0', '801.0', '804', '804.0', '850.5', '850.50', '850.9', >'850.90', '959.01', 'V15.52', 'V15.57', 'V15.5C', 'V15.59_2', 'V15.59_C', >'V15.59_7' >!enddefine. > >define !list2 ()'854.0', '853.0', '852.4', '852.0', '852.2', '851.6', >'851.8', '851.4', '851.2', '851.0', '804.1', '804.2', '804.3', '804.4', >'803.1', '803.2', '803.3', '803.4','801.1', '801.2', '801.3', '801.4', >'800.1' ,'800.2', '800.3', '800.4','800.03', '800.10', '800.11', '800.12', >'800.13', '800.16', '800.19', '800.20', '800.21', '800.22', '800.23', >'800.26', '800.29', '800.30', '800.31', '800.32', '800.33', '800.36', >'800.39', '800.40', '800.41', '800.42', '800.43', '800.46', '800.49', >'800.53', '800.56', '800.59', '801.03', '801.10', '801.11', '801.12', >'801.13', '801.16', '801.19', '801.20', '801.21', '801.22', '801.23', >'801.26', '801.29', '801.30', '801.31', '801.32', '801.33', '801.36', >'801.39', '801.40', '801.41', '801.42', '801.43', '801.46', '801.49', >'801.54', '801.56', '801.59', '803.03', '803.10', '803.11', '803.12', >'803.13', '803.16', '803.19', '803.20', '803.21', '803.22', '803.23', >'803.26', '803.29', '803.30', '803.31', '803.32', '803.33', '803.36', >'803.39', '803.40', '803.41', '803.42', '803.43', '803.46', '803.49', >'803.53', '803.56', '803.59', '804.03', '804.10', '804.11', '804.12', >'804.13', '804.16', '804.19', '804.20', '804.21', '804.22', '804.23', >'804.26', '804.29', '804.30', '804.31', '804.32', '804.33', '804.36', >'804.39', '804.40', '804.41', '804.42', '804.43', ' 804.46', '804.49', >'804.53', '804.56', '804.59', '850.12', '850.2', '850.20', '851.00', >'851.01', '851.02', '851.03', '851.06', '851.09', '851.20', '851.21', >'851.22', '851.23', '851.26', '851.29', '851.40', '851.41', '851.42', >'851.43', '851.46', '851.49', '851.60', '851.61', '851.62', '851.63', >'851.66', '851.69', '851.80', '851.81', '851.82', '851.83', '851.86', >'851.89', '852.00', '852.01', '852.02', '852.03', '852.06', '852.09', >'852.20', '852.21', '852.22', '852.23', '852.26', '852.29', '852.40', >'852.41', '852.42', '852.43', '852.46', '852.49', '853.00', '853.01', >'853.02', '853.03', '853.06', '853.09', '854','851','852','853', '854.00', >'854.01', '854.02', '854.03', '854.06', '854.09', 'V15.53', 'V15.58', >'V15.5D', 'V15.59_3', 'V15.59_8', 'V15.59_D' >!enddefine. > >define !list3 ()'800.04', '800.05', '800.14', '800.15', '800.24', '800.25', >'800.34', '800.35', '800.44', '800.45', '800.54', '800.55', '801.04', >'801.05', '801.14', '801.15', '801.24', '801.25', '801.34', '801.35', >'801.44', '801.45', '801.54', '801.55', '803.04', '803.05', '803.14', >'803.15', '803.24', '803.25', '803.34', '803.35', '803.44', '803.45', >'803.54', '803.55', '804.04', '804.05', '804.14', '804.15', '804.24', >'804.25', '804.34', '804.35', '804.44', '804.45', '804.54', '804.55', >'850.3', '850.30', '850.4', '850.40', '851.04', '851.05', '851.24', >'851.25', '851.44', '851.45', '851.64', '851.65', '851.84', '851.85', >'852.04', '852.05', '852.24', '852.25', '852.44', '852.45', '853.04', >'853.05', '854.04', '854.05', 'V15.54', 'V15.59', 'V15.5E', 'V15.59_4', >'V15.59_9', 'V15.59_E' >!enddefine. > >define !list97 ()'854.1', '853.1', '852.3', '852.5', '852.1', '851.5', >'851.7', '851.9', '851.3', '851.1', '804.6', '804.7', '804.8', '804.9', >'803.5', '803.6', '803.7', '803.8', '803.9', '801.6', '801.7', '801.8', >'801.9', '800.6', '800.7', '800.8', '800.9', '800.60', '800.61', '800.62', >'800.63', '800.64', '800.65', '800.66', '800.69', '800.70', '800.71', >'800.72', '800.73', '800.74', '800.75', '800.76', '800.79', '800.80', >'800.81', '800.82', '800.83', '800.84', '800.85', '800.86', '800.89', >'800.91', '800.92', '800.93', '800.94', '800.95', '800.96', '800.99', >'801.60', '801.61', '801.62', '801.63', '801.64', '801.65', '801.66', >'801.69', '801.70', '801.71', '801.72', '801.73', '801.74', '801.75', >'807.76', '801.79', '801.80', '801.81', '801.82', '801.83', '801.84', >'801.85', '801.86', '801.89', '801.90', '801.91', '801.92', '801.93', >'801.94', '801.95', '801.96', '801.99', '803.60', '803.61', '803.62', >'803.63', '803.64', '803.65', '803.66', '803.69', '803.70', '803.71', >'803.72', '803.73', '803.74', '803.75', '803.76', '803.79', '803.80', >'803.81', '803.82', '803.83', '803.84', '803.85', '803.86', '803.89', >'803.90', '803.91', '803.92', '803.93', '803.94', '803.95', '803.96', >'803.99', '804.60', '804.61', '804.62', '804.63', '804.64', '804.65', >'804.66', '804.69', '804.70', '804.71', '804.72', '804.73', '804.74', >'804.75', '804.76', '804.79', '804.80', '804.81', '804.82', '804.83', >'804.84', '804.85', '804.86', '804.89', '804.90', '804.91', '804.92', >'804.93', '804.94', '804.95', '804.96', '804.99', '851.10', '851.11', >'851.12', '851.13', '851.14', '851.15', '851.16', '851.19', '851.30', >'851.31', '851.32', '851.33', '851.34', '851.35', '851.36', '851.39', >'851.50', '851.51', '851.52', '851.53', '851.54', '851.55', '851.56', >'851.59', '851.70', '851.71', '851.72', '851.73', '851.74', '851.75', >'851.76', '851.79', '851.90', '851.91', '851.92', '851.93', '851.94', >'851.95', '851.96', '851.99', '852.10', '852.11', '852.12', '852.13', >'852.14', '852.15', '852.16', '852.19', '852.30', '852.31', '852.32', >'852.33', '852.34', '852.35', '852.36', '852.39', '852.50', '852.51', >'852.52', '852.53', '852.54', '852.55', '852.56', '852.59', '853.10', >'853.11', '853.12', '853.13', '853.14', '853.15', '853.16', '853.19', >'854.10', '854.11', '854.12', '854.13', '854.14', '854.15', '854.16', >'854.19', 'V15.55', 'V15.5A', 'V15.5F', 'V15.59_5', 'V15.59_A', 'V15.59_F' >!enddefine. > > >COMPUTE SEVERITY=0. > >do repeat d = full_diag1s to full_diag8s . >- do if (severity EQ 0). /* Only proceed if SEVERITY still = 0 . >- if any(d,!list1) severity = 1. >- end if. >end repeat. > >do repeat d = full_diag1s to full_diag8s . >- do if (severity EQ 0). /* Only proceed if SEVERITY still = 0 . >- if any(d,!list2) severity = 2. >- end if. >end repeat. > >do repeat d = full_diag1s to full_diag8s . >- do if (severity EQ 0). /* Only proceed if SEVERITY still = 0 . >- if any(d,!list3) severity = 3. >- end if. >end repeat. > >do repeat d = full_diag1s to full_diag8s . >- do if (severity EQ 0). /* Only proceed if SEVERITY still = 0 . >- if any(d,!list97) severity = 97. >- end if. >end repeat. > >EXE. > >* You eventually recode 0 to 98, so I don't see >* any need to include the IF ANY step for a value of 98. > >RECODE SEVERITY (0=98) (ELSE=COPY). >EXE. > >VARIABLE LABEL SEVERITY 'Severity'. >VALUE LABEL SEVERITY 1'Mild', 2 'Moderate', 3 'Severe', 97 'Penetrating', 98 >'Missing/Unknown'. > > >* --- end of syntax --- . > > >----- >-- >Bruce Weaver >[hidden email] >http://sites.google.com/a/lakeheadu.ca/bweaver/ >"When all else fails, RTFM." > >NOTE: My Hotmail account is not monitored regularly. >To send me an e-mail, please use the address shown above. >-- >View this message in context: >Sent from the SPSSX Discussion mailing list archive at Nabble.com. > >===================== >To manage your subscription to SPSSX-L, send a message to >[hidden email] (not to SPSSX-L), with no body text except the >command. To leave the list, send the command >SIGNOFF SPSSX-L >For a list of commands to manage subscriptions, send the command >INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
|
Administrator
|
David, I do wish you wouldn't sugar-coat everything. Why don't you just say how you really feel about it? ;-) How are you, by the way? I was just thinking that I haven't seen you post anything lately. Cheers, Bruce
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
|
In reply to this post by akrobbins
Hi Athena |
| Free forum by Nabble | Edit this page |
