[613] | 1 | QAOSPURG ;HISC/DAD-PURGE AUTO ENROLL RUN DATES FILE ;1/13/93 14:12
|
---|
| 2 | ;;3.0;Occurrence Screen;;09/14/1993
|
---|
| 3 | W !!!?32,"*** WARNING ***",!!?4,"This option purges the historical data that tells the Occurrence Screen",!?17,"package on what dates auto enrollment was run",*7,!
|
---|
| 4 | ASK ;
|
---|
| 5 | W !,"Are you sure you want to continue" S %=2 D YN^DICN G:(%=-1)!(%=2) EXIT I '% W !!?5,"Please answer Y(es) or N(o)",! G ASK
|
---|
| 6 | SCRN ;
|
---|
| 7 | W !!,"Select the screens to purge." K ^UTILITY($J,"QAO SCREEN")
|
---|
| 8 | S QAQDIC="^QA(741.1,",QAQDIC(0)="AEMNQZ",QAQDIC("A")="Select SCREEN: "
|
---|
| 9 | S QAQDIC("B")="ALL",QAQUTIL="QAO SCREEN" D ^QAQSELCT G:QAQQUIT EXIT
|
---|
| 10 | DATE ;
|
---|
| 11 | W !!,"Select the date range to purge."
|
---|
| 12 | D ^QAQDATE G:QAQQUIT EXIT I QAQNBEG'<DT W !?5,"*** Beginning date must be in the past !! ***",*7 G DATE
|
---|
| 13 | S ZTRTN="ENTSK^QAOSPURG",ZTIO="",ZTDTH=$H
|
---|
| 14 | S ZTSAVE("QAQ*")="",ZTSAVE("^UTILITY($J,""QAO SCREEN"",")=""
|
---|
| 15 | S ZTDESC="Purge auto enroll run dates file"
|
---|
| 16 | D ^%ZTLOAD W !,"Deletion request queued."
|
---|
| 17 | G EXIT
|
---|
| 18 | ;
|
---|
| 19 | ENTSK ; Tasked entry point
|
---|
| 20 | S QAOSDR="" K SCRNFLD,^UTILITY($J,"QAM MONITOR")
|
---|
| 21 | F QA=1:1 S X=$T(SCRNFLD+QA) Q:X="" S SCRNFLD(+X)=$P(X,";;",2)
|
---|
| 22 | F QAOSSCRN=0:0 S QAOSSCRN=$O(^UTILITY($J,"QAO SCREEN",QAOSSCRN)) Q:QAOSSCRN'>0 D
|
---|
| 23 | . S SCRNFLD=$G(SCRNFLD(10*QAOSSCRN))
|
---|
| 24 | . I SCRNFLD D
|
---|
| 25 | .. S QAOSDR=QAOSDR_$S(QAOSDR]"":";",1:"")_SCRNFLD_"///@"
|
---|
| 26 | .. K SCRNFLD(10*QAOSSCRN)
|
---|
| 27 | .. Q
|
---|
| 28 | . S QAMD0=+$P($G(^QA(741.1,QAOSSCRN,0)),"^",5)
|
---|
| 29 | . S QAM=$P($G(^QA(743,QAMD0,0)),"^")
|
---|
| 30 | . S:QAM]"" ^UTILITY($J,"QAM MONITOR",QAM,QAMD0)=""
|
---|
| 31 | . Q
|
---|
| 32 | ; Purge Monitoring System AUTO ENROLL RUN DATE file (#743.6)
|
---|
| 33 | D EN3^QAMARCH1
|
---|
| 34 | ; Purge Occurrence Screen QA OCCURRENCE AUTO RUN DATES file (#741.99)
|
---|
| 35 | S QAOSALL=$S($O(SCRNFLD(0))'>0:1,1:0)
|
---|
| 36 | F QAOS=QAQNBEG-.0000001:0 S QAOS=$O(^QA(741.99,"B",QAOS)) Q:(QAOS'>0)!(QAOS\1>QAQNEND) F QAOSD0=0:0 S QAOSD0=$O(^QA(741.99,"B",QAOS,QAOSD0)) Q:QAOSD0'>0 D
|
---|
| 37 | . I QAOSALL D
|
---|
| 38 | .. S DIK="^QA(741.99,",DA=QAOSD0 D ^DIK
|
---|
| 39 | .. Q
|
---|
| 40 | . E D
|
---|
| 41 | .. S DIE="^QA(741.99,",DA=QAOSD0,DR=QAOSDR D ^DIE
|
---|
| 42 | .. Q
|
---|
| 43 | . Q
|
---|
| 44 | EXIT ;
|
---|
| 45 | K %,%DT,DA,DIK,QAOS,QAOSD0,QAOSQUIT,X,Y,D,I,Z,ZTRTN,ZTSAVE,ZTIO,ZTDESC
|
---|
| 46 | K ZTDTH,QAM,QAMD0,QAMD1,QAMDATE,QAMMON,QAMMONNM,SCRNFLD,QAOSALL,QAOSDR
|
---|
| 47 | K DIE,DR,^UTILITY($J,"QAM MONITOR"),^UTILITY($J,"QAO SCREEN")
|
---|
| 48 | D K^QAQDATE S:$D(ZTQUEUED) ZTREQ="@"
|
---|
| 49 | Q
|
---|
| 50 | SCRNFLD ;;TOTAL FIELD FOR EACH SCREEN IN FILE #741.99
|
---|
| 51 | 1010 ;;1
|
---|
| 52 | 1011 ;;1.1
|
---|
| 53 | 1020 ;;2
|
---|
| 54 | 1030 ;;3
|
---|
| 55 | 1041 ;;4.1
|
---|
| 56 | 1042 ;;4.2
|
---|
| 57 | 1051 ;;5.1
|
---|
| 58 | 1052 ;;5.2
|
---|
| 59 | 1061 ;;6.1
|
---|
| 60 | 1062 ;;6.2
|
---|
| 61 | 1070 ;;7
|
---|
| 62 | 1080 ;;8
|
---|
| 63 | 1090 ;;9
|
---|
| 64 | 1990 ;;99
|
---|