Each
month, my department has to review a number of patient charts for several
billing codes. The number of charts to review is based on the number of
patients with a particular billing code, so each code will likely have a
different number of charts for review. The first step in my syntax is to
take a large database and reduce it to the information necessary including
aggregating by patient ID so the same chart is not reviewed for more than one
billing code in any given month. The second step appears below: compute
random=uniform(1000) . sort
cases by billing_code random . split
file by billing_code. compute
chart=1 . create
choose=csum(chart) . The
data now appear as:
The
largest value of Choose for each billing code is the number of patients upon
which the sampling will take place (the number of codes and numbers of charts are
small in order to save space). I can use the following syntax to select
the appropriate number of charts for each code (the numbers after each ‘choose’
indicating the number of charts to pick). select
if ((choose<6 and billing_code='H0023') or (choose<3 and billing_code='H0036'))
. execute
. Is
there any way of determining for each billing code the number of charts to
choose and then creating a scratch variable, for example, so the syntax runs without
having to stop and enter the numbers in the ‘select if’’
statement? Thanks. Brian Brian G. Dates Director of Evaluation and Research Southwest Counseling Solutions 1700 Waterman 313-841-7442 Leading the Way in Building
a Healthy Community |
Administrator
|
Your statement
"select if ((choose<6 and billing_code='H0023') or (choose<3 and billing_code='H0036')) ." Does not appear to have any obvious correlation to the data you have posted. Anyway:ESP suggests AGGREGATE /OUTFILE * / MODE=ADDVARIABLES / BREAK billing_code / SELECT=MAX(Choose). OTOH YMMV due to noise in the InterNeTelepathic nature of this transmission ;-) ------
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
|
If that guess is correct, why are RANDOM, CHART and CHOOSE needed? Won't this do the same thing? (No SPSS on this machine, so I can't test it right now.)
AGGREGATE /OUTFILE * / MODE=ADDVARIABLES / BREAK billing_code / SELECT=NU.
--
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
|
;-) Your guess is as good as mine.
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?" |
David/Bruce,
Thanks. FYI, I need to randomize the charts for review and then number each case (choose) in order to get the final reduced set for review; hence the random, chart, and choose numbers. Since the patient ID's are retrieved from the electronic medical record in numerical order, if I didn't use random and then order by that, I'd get the same charts for review every month. I've used your outcome, "SELECT", to determine the number of charts per month to achieve a 5% or less sampling error for the total number of charts for 12 months for each billing code [ncharts=384/(12*(1+384/select))+1], then substituted ncharts in each "choose<x" segment (choose<ncharts). Works perfectly! Thanks again. B -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of David Marso Sent: Tuesday, February 28, 2012 6:57 PM To: [hidden email] Subject: [NEWSENDER] - Re: Using CSUM to Compute Variable - Message is from an unknown sender ;-) Your guess is as good as mine. Bruce Weaver wrote > > If that guess is correct, why are RANDOM, CHART and CHOOSE needed? Won't > this do the same thing? (No SPSS on this machine, so I can't test it > right now.) > > AGGREGATE > /OUTFILE * > / MODE=ADDVARIABLES > / BREAK billing_code > / SELECT=NU. > > > > > David Marso wrote >> >> Your statement >> "select if ((choose<6 and billing_code='H0023') or (choose<3 and >> billing_code='H0036')) ." >> Does not appear to have any obvious correlation to the data you have >> posted. >> Anyway:ESP suggests >> AGGREGATE >> /OUTFILE * >> / MODE=ADDVARIABLES >> / BREAK billing_code >> / SELECT=MAX(Choose). >> >> OTOH YMMV due to noise in the InterNeTelepathic nature of this >> transmission ;-) >> ------ >> >> Dates, Brian wrote >>> >>> Each month, my department has to review a number of patient charts >>> several billing codes. The number of charts to review is based on the >>> number of patients with a particular billing code, so each code will >>> likely have a different number of charts for review. The first step in >>> my syntax is to take a large database and reduce it to the information >>> necessary including aggregating by patient ID so the same chart is not >>> reviewed for more than one billing code in any given month. The second >>> step appears below: >>> >>> >>> >>> compute random=uniform(1000) . >>> >>> sort cases by billing_code random . >>> >>> split file by billing_code. >>> >>> compute chart=1 . >>> >>> create choose=csum(chart) . >>> >>> >>> >>> The data now appear as: >>> >>> >>> >>> Patient ID >>> >>> Billing_Code >>> >>> Random >>> >>> Chart >>> >>> Choose >>> >>> 37339 >>> >>> H0023 >>> >>> 24.04 >>> >>> 1 >>> >>> 1 >>> >>> 1028989 >>> >>> H0023 >>> >>> 36.75 >>> >>> 1 >>> >>> 2 >>> >>> 454689 >>> >>> H0023 >>> >>> 41.21 >>> >>> 1 >>> >>> 3 >>> >>> 47920 >>> >>> H0023 >>> >>> 43.62 >>> >>> 1 >>> >>> 4 >>> >>> 49875 >>> >>> H0023 >>> >>> 48.12 >>> >>> 1 >>> >>> 5 >>> >>> 935277 >>> >>> H0023 >>> >>> 48.20 >>> >>> 1 >>> >>> 6 >>> >>> 1272528 >>> >>> H0036 >>> >>> 31.65 >>> >>> 1 >>> >>> 1 >>> >>> 1335619 >>> >>> H0036 >>> >>> 116.30 >>> >>> 1 >>> >>> 2 >>> >>> 1320606 >>> >>> H0036 >>> >>> 226.79 >>> >>> 1 >>> >>> 3 >>> >>> 1258900 >>> >>> H0036 >>> >>> 269.32 >>> >>> 1 >>> >>> 4 >>> >>> >>> >>> The largest value of Choose for each billing code is the number of >>> patients upon which the sampling will take place (the number of >>> and numbers of charts are small in order to save space). I can use the >>> following syntax to select the appropriate number of charts for each >>> code (the numbers after each 'choose' indicating the number of charts to >>> pick). >>> >>> >>> >>> select if ((choose<6 and billing_code='H0023') or (choose<3 and >>> billing_code='H0036')) . >>> >>> execute . >>> >>> >>> >>> Is there any way of determining for each billing code the number of >>> charts to choose and then creating a scratch variable, for example, >>> the syntax runs without having to stop and enter the numbers in the >>> 'select if'' statement? Thanks. >>> >>> >>> >>> Brian >>> >>> >>> >>> Brian G. Dates >>> >>> Director of Evaluation and Research >>> >>> Southwest Counseling Solutions >>> >>> 1700 Waterman >>> >>> Detroit, MI 48209 >>> >>> 313-841-7442 >>> >>> bdates@ >>> >>> >>> >>> Leading the Way in Building a Healthy Community >>> >> > -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Using-CSUM-to-Compute-Vari able-tp5523383p5523643.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
|
Brian, it's still not clear to me what you're asking. From your original post:
--- excerpt from original post --- select if ((choose<6 and billing_code='H0023') or (choose<3 and billing_code='H0036')) . execute . Is there any way of determining for each billing code the number of charts to choose and then creating a scratch variable, for example, so the syntax runs without having to stop and enter the numbers in the ‘select if’’ statement? Thanks. --- end of excerpt --- In the example you posted, it looked as if the < 6 and < 3 were based on the total number of cases for each billing code (although the 3 looked to be an error, as David pointed out). But maybe that's not what you had in mind. Please describe in explicit detail how you are setting the number of cases to select within each billing code category. (E.g., do you want a certain percentage of cases within each category, or what?) HTH.
--
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/). |
Free forum by Nabble | Edit this page |