LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2005)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 24 Feb 2005 14:07:48 +0200
Reply-To:     Hillel Vardi <hilel@bgumail.bgu.ac.il>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Hillel Vardi <hilel@bgumail.bgu.ac.il>
Subject:      Re: select cases with Multiple variables in a range
In-Reply-To:  <D4735768B50FE54199B15326E108D2C114F96B@agency8.state.ky.us>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Shalom I also work on hospital data . In past year a case use to have 3-10 diagnosis (icd codes) per admission . to day some cases may have 20-60 codes per admission and the number of cases may by huge , therefor most hospitals store there data base in a relational database . one of the tables in this database is usely diagnosis and it is stricture as many lines per case . Keeping the data as long ( many line per case) id icd1 id icd2 id icd3 id icd4 have many advantage over keeping them as one line with many icd line id icd1 icd2 icd3 icd4 Here is a way to do it with your data

*Sri.Pasupulati@ky.gov . NEW file. INPUT PROGRAM. LOOP id=1 TO 10. LEAVE id. numeric icd1 to icd11 (f3) . do repeat icd= icd1 to icd11 . COMPUTE icd=200 + UNIFORM(1) * 100 . end repeat . END CASE. END LOOP. END FILE. END INPUT PROGRAM. EXECUTE. VARSTOCASES /MAKE dig FROM icd1 icd2 icd3 icd4 icd5 icd6 icd7 icd8 icd9 icd10 icd11 /INDEX = Index(11) /KEEP = id /NULL = KEEP. recode dig(250 thru 260=1) into keep . select if keep eq 1. EXECUTE. SORT CASES BY id . CASESTOVARS /ID = id /drop=index keep /GROUPBY = VARIABLE .

Hillel Vardi Ben Gurion U Isreal

Sri Pasupulati wrote:

>Hi friends, > >I have a Data (hospital) in which there are cases which have more than one >variable (primary, secondary diagnosis ...) of the same type (have ICD 9 >codes). I need to select the cases which have the code '250 - 260' in >atleast one of those variables. What syntax do I need to use in the 'Select >cases' function? Please help me. > >Thanks in advance, Sri > > >


Back to: Top of message | Previous page | Main SPSSX-L page