Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Compliance based on a rolling week
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Compliance based on a rolling week
 Login/Join
 
Member
posted
I need to determine compliance based on how many times a week a patient is seen. Problem is...the week begins based on each patient's initial eval date, not a typical week, and ends upon discharge. I want to do this w/o having to perform a lot of manual calculations as each patient is different. One could have a stay of a week or be here for 6 months. How do I set this up based upon each patient's stay so that everything is calculated within the program? I'm trying to accomplish this vertically and do not think setting up weeks across in columns will work w/o manually specifying. Example of the data I'm looking at:

My initial eval time is 09/20/10 and I am supposed to be seen twice a week. I was discharged on 11/02/10. Here are my visit times which are entered by day.

2010/09/20
2010/09/21
2010/09/25
2010/09/26
2010/09/27
2010/09/29
2010/10/26
2010/10/29

Looking at this example, the patient was not seen twice per week, except during 9/20 to 9/27. How do I say "this patient was seen 5 times during 9/20 to 9/27, once from 9/28 to 10/4, none for 10/5 to 10/12, etc. I'm trying to do it in a define, but don't know how to set this up so that it is all based on the stay and not my having to set this up based on how many weeks I think a patient may be here. I've calculated the difference between the initial stay (9/20) and each visit to see what week it falls in, but need help figuring out the rest or would so appreciate other suggestions. Maybe I'm making this harder than it is??

This message has been edited. Last edited by: Kerry,


WF 8009
Windows 7 Enterprise
IE 9.0
Output: All
 
Posts: 20 | Registered: May 21, 2008Reply With QuoteReport This Post
Expert
posted Hide Post
Here is a suggestion that may work for you.

It uses the FOR commmand, you could replace this with Macgyver as well.

-SET &Cntr = 0 ;
-* Write out a master to read the BSB_ACC list
EX -LINES 4 EDAPUT MASTER,tmp_date,CV,FILE
FILENAME=TMP_DATE, SUFFIX=FIX,$
SEGNAME=TMP_DATE, $
  FIELD=Date ,ALIAS=  ,YYMD ,A10,$

FILEDEF TMP_DATE DISK tmp_date.ftm (LRECL 10

EX -LINES 9 EDAPUT FOCTEMP,tmp_date,CV,FILE
2010/09/20
2010/09/21
2010/09/25
2010/09/26
2010/09/27
2010/09/29
2010/10/26
2010/10/29

TABLE  FILE TMP_DATE
 SUM   
       COMPUTE MIN_DATE/YYMD = MIN.Date ;
 PRINT 
       COMPUTE NO_DAYS/I9 = Date - MIN_DATE ;
       COMPUTE WK_NO/I9   = (NO_DAYS/7) + 1 ;
 BY    Date
 ON    TABLE HOLD AS TMP_DAYS
 ON    TABLE SET HOLDLIST PRINTONLY
END

TABLE  FILE TMP_DAYS
 SUM   MAX.WK_NO
 ON    TABLE SAVE AS SAV_WK
END
-RUN
-READ SAV_WK &MAX_WK.A9.

TABLE  FILE TMP_DAYS
 PRINT Date
 FOR   WK_NO
-REPEAT WK_LOOP FOR &Cntr FROM 1 TO &MAX_WK ;
-SET &Over = IF &Cntr EQ 1 THEN ' ' ELSE 'OVER' ;
&Over &Cntr
-WK_LOOP
END


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6131 | Location: 33.8688° S, 151.2093° E | Registered: October 31, 2006Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Why can't you map the DATE field into a WEEK of Year field and sort by WEEK. e.g.
WDATE/YYW = DATE;

COUNT visits by WDATE where patient eq 'xxx'


Release 7.6.9
Windows
HTML
 
Posts: 226 | Registered: June 08, 2003Reply With QuoteReport This Post
Expert
posted Hide Post
That would work, if there was always dates in each week, but if there was no visits in a week, there will be missing data.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6131 | Location: 33.8688° S, 151.2093° E | Registered: October 31, 2006Reply With QuoteReport This Post
Member
posted Hide Post
quote:
-REPEAT

Thanks you guys....I so appreciate it.

I've never used Repeat before. From the -Repeat to the -Wk_Loop statement in the last table file...is that simply another way of doing a loop? I've not worked with loops that much....


WF 8009
Windows 7 Enterprise
IE 9.0
Output: All
 
Posts: 20 | Registered: May 21, 2008Reply With QuoteReport This Post
Expert
posted Hide Post
quote:
-REPEAT


Check out the documentation, there are several ways to use -REPEAT.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6131 | Location: 33.8688° S, 151.2093° E | Registered: October 31, 2006Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Compliance based on a rolling week

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.