[EpiData-list] Re: EpiData-list Digest, Vol 127, Issue 9

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Fri Jun 13 16:42:13 CDT 2014


Jamie,

Thank you so much for helpful advice - your recipe works! :-)

Defining custom command mycmd01 fas very helpful calculating hospital ward
utilization starting av certain day:

CMD mycmd01
count if (inndato <= aday) and (utdato >= aday)
pct=$count/9*100 //Percent utilization of a 9 bed ward
type "Beds occupied on @aday : @$count Percent filled : @pct"
*** Next statement adds a line to aggregate file
sday = sday + $count
aday = aday + 1
end

// repeating this command necessary number of times.

To take this even further, I try to produce a SPC graph of utilization rate
variation over time.

I thought that I will need an aggregate file with 2 variables: Counting
date (aday) and Count (of beds each day).

I have tried to use aggregate command combined with repeating the CMD
segment obove, but it fails.

i have also tried to define a new REC file containing the two variables
aday (or inndato) and beds=$count, and put this command into the mycmd01
block:

append aday beds /file="aggfile.rec"

I have trouble understanding the EpiDaat Process flow...

Any hints?

best regards,
Vegard



2014-05-29 19:03 GMT+02:00 <epidata-list-request at lists.umanitoba.ca>:

> Send EpiData-list mailing list submissions to
>         epidata-list at lists.umanitoba.ca
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.umanitoba.ca/mailman/listinfo/epidata-list
> or, via email, send a message with subject or body 'help' to
>         epidata-list-request at lists.umanitoba.ca
>
> You can reach the person managing the list at
>         epidata-list-owner at lists.umanitoba.ca
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of EpiData-list digest..."
>
>
> EpiData-list mailing list
> ___________________________________
>
> Today's Topics:
>
>    1. Community Hospital Ward utilization
>       (epidata-list at lists.umanitoba.ca)
>    2. Re: Community Hospital Ward utilization
>       (epidata-list at lists.umanitoba.ca)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 29 May 2014 00:08:58 +0200
> From: epidata-list at lists.umanitoba.ca
> Subject: [EpiData-list] Community Hospital Ward utilization
> To: epidata-list at lists.umanitoba.ca
> Message-ID:
>         <
> CAOcA-0iU6TNqJJrkPrNOtKBjwWHkhJKfUUWRZs1ib4JVUc8gBg at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> Dear list,
> I am thinking of designing a monitoring system for a short-term community
> hospital ward with 9 beds
>
> Among variables are
>
> Patient ID
> indate (admission date) <dd/mm/yyyy>  inhour  admission hour ##
> outdate (discharge date) <dd/mm/yyyy> outhour discharge hour ## (not always
> recorded)
>
> Age, sex diagnose1, diagnose2 diagnose3, treatment elements etc.
>
> Does anybody have a hint on how I can monitor utilization rate, i.e. how
> many beds are occupied each day, and average utilization rate per week?
>
> In Epi Info I would put up a sequence of commands that runs through the
> datafile for each consecutive day to count number of patients. in EpiInfo
> the PROCESS command would run thhrough the file and do the maths
>
> I thought a defined variable inhouse # and a counter date
> gen d testdate ="01/09/2013" // Opening date
>
> if testdate < today
>  then
>    if testdate >=indate and testdate <=outdate then
>    inhouse=1 else inhouse=0
>    endif
> testdate=testdate + 1
> else goto end
> endif
>
> Then route to an aggregate file date, count.
>
> PROCESS
>
> But there seems to be no equivalent command in EpiData. I have not figured
> out if aggregate or stab could be used for such a purpose. Anye ideas or
> hints?
>
> Best Regards
> Vegard Høgli
> Community Medical Officer
> Skien, Norway
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 28 May 2014 20:35:37 -0400
> From: epidata-list at lists.umanitoba.ca
> Subject: Re: [EpiData-list] Community Hospital Ward utilization
> To: EpiData List <epidata-list at lists.umanitoba.ca>
> Message-ID: <BLU0-SMTP92545148C20845F4C74AC1FD240 at phx.gbl>
> Content-Type: text/plain; charset="windows-1252"
>
> In Epidata Analysis, you could do something like this for daily
> utilization for a whole week:
>
> read thedatafile
> define aday <dd/mm/yyyy> global
> define sday #### global
> define avbed ###.#
>
> aday = dmy(?Start day?,?Start month?,?Start year?) // allows you to set a
> start date
> // add an imif here to check validity of the start date
>
> sday = 0
> ? “Utilization for the week starting @aday"
>
> count if (indate <= aday) and (outdate >= a day)
> ? “Beds used on @aday : @$count”
> sday = sday + $count
> aday = aday + 1
>
> count if (indate <= aday) and (outdate >= a day)
> ? “Beds used on @aday : @$count”
> sday = sday + $count
> aday = aday + 1
>
> // repeat last 4 steps 5 more times
>
> avbed = float(sday)/7.0
> ? “Average bed count for the week was #avbed”
>
> Note that the 4 commands starting with count if could be used to define a
> cmd to simplify the program.
> You could also set aday this way to get the 7 previous days:
>
> aday = today - 6
>
> Jamie
>
> On May 28, 2014, at 6:08 PM, epidata-list at lists.umanitoba.ca wrote:
>
> > Does anybody have a hint on how I can monitor utilization rate, i.e. how
> > many beds are occupied each day, and average utilization rate per week?
>
>
>
> ------------------------------
>
> ________________________________________
> EpiData-list at lists.umanitoba.ca
> http://lists.umanitoba.ca/mailman/listinfo/epidata-list
>
>
> End of EpiData-list Digest, Vol 127, Issue 9
> ********************************************
>


More information about the EpiData-list mailing list