source: FOIAVistA/trunk/r/SCHEDULING-SD-SC/SDAMQ2.m@ 1267

Last change on this file since 1267 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.2 KB
Line 
1SDAMQ2 ;ALB/MJK - AM Background Utilities (cont.) ; 12/1/91
2 ;;5.3;Scheduling;**132**;Aug 13, 1993
3 ;
4CHK(SDBEG,SDEND,SDPCE) ; -- check if all dates are processed
5 N SDDT,X1,X2,X K ^TMP("SDAM NOT UPDATED",$J)
6 S SDDT=$S(SDBEG<$$SWITCH^SDAMU:$$SWITCH^SDAMU,1:SDBEG)
7 F Q:SDDT>SDEND D
8 .S:'$P($G(^SDD(409.65,+$O(^SDD(409.65,"B",SDDT,0)),0)),U,SDPCE) ^TMP("SDAM NOT UPDATED",$J,SDDT)=""
9 .S X1=SDDT,X2=1 D C^%DTC S SDDT=X
10 Q
11 ;
12WKL(SDBEG,SDEND) ; -- check if all dates have been updated
13 W !!,"Will now check if outpatient encounter dates have been updated..."
14 D CHK(SDBEG,SDEND,5)
15 I '$D(^TMP("SDAM NOT UPDATED",$J))>0 W "everything looks ok.",! G WKLQ
16 W !!,*7,"The outpatient encounter status update process has not completed"
17 W !,"for the following dates:",!
18 D LIST
19 W !!,"Note: To obtain accurate statistics, this workload report should"
20 W !," be run again after the outpatient encounter status update"
21 W !," process has been completed for these dates.",!
22WKLQ K ^TMP("SDAM NOT UPDATED",$J)
23 Q
24 ;
25LIST ; -- list error dates for display
26 N COUNT,SDDT
27 S COUNT=0,SDDT=0
28 F S SDDT=$O(^TMP("SDAM NOT UPDATED",$J,SDDT)) Q:'SDDT D
29 .S COUNT=COUNT+1 W ?$P("10^30^50",U,COUNT),$$FDATE^VALM1(SDDT)
30 .I COUNT=3 W ! S COUNT=0
31 Q
Note: See TracBrowser for help on using the repository browser.