source: WorldVistAEHR/trunk/r/TOOLKIT-AWCM-XD-XIN-XPAR-XQAB-XT-XUC-XUR-ZIN-ZTED/XTPMNEX7.m@ 1582

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

initial load of WorldVistAEHR

File size: 3.0 KB
Line 
1XTPMNEX7 ;OAK/BP - PATCHES DUE IN NEXT 7 DAYS ; 2/7/06
2 ;;7.3;TOOLKIT;**98,100**; Apr 25, 1995;Build 4
3 ;
4RPT S XTBHDR="Patches Due Within Seven Days for "_^DD("SITE")
5 S XTBBDT=3010101,X="T+7",%DT="" D ^%DT S XTBEDT=Y
6 W @IOF,!,XTBHDR,!!! S %ZIS="AEQ" D ^%ZIS G:POP EXIT
7 I $D(IO("Q")) S ZTIO=ION,ZTRTN="RPT1^XTPMNEX7",ZTDESC=XTBHDR,ZTSAVE("XTB*")="" D ^%ZTLOAD D HOME^%ZIS
8 I $D(ZTSK) W !,"Queued as task# ",ZTSK,!! H 2 G EXIT
9 ;
10RPT1 U IO K ^TMP($J) S XTBX="",(XTBCNT,XTBLN)=0
11 S XTBUP="I $Y>(IOSL-5) S PG=PG+1 D PAUSE W @IOF,!,XTBHDR,?(IOM-12),""Page: "",PG,!!"
12 S Y=DT X ^DD("DD") S XTBRUNDT=Y
13 F XTBX=XTBBDT:0 S XTBX=$O(^XPD(9.9,"D",XTBX)) Q:XTBX=""!(XTBX>XTBEDT) DO
14 .F XTBDA=0:0 S XTBDA=$O(^XPD(9.9,"D",XTBX,XTBDA)) Q:XTBDA="" DO
15 ..S XTBDTA=$G(^XPD(9.9,XTBDA,0)),XTBINST=$P(XTBDTA,U,8) Q:XTBDTA=""!(XTBINST="") ; no data or no install name
16 ..Q:$P(XTBDTA,U,11)]"" ; non-kids install date
17 ..S XTBXX=$O(^XPD(9.7,"B",XTBINST,9999999999),-1) I $G(^XPD(9.7,+XTBXX,2))["TEST" S XTBXX=""
18 ..Q:$P($G(^XPD(9.7,+XTBXX,0)),U,9)=3 ; 3 = installed
19 ..D SET
20 S PG=0 D HDR S (XTBCPLDT,XTBPTNM,OLXTBCPL)=""
21 I '$D(^TMP($J)) W !!,?10,"Nothing to report",! G PREXIT
22 F S XTBCPLDT=$O(^TMP($J,XTBCPLDT)) Q:XTBCPLDT="" DO
23 .F S XTBPTNM=$O(^TMP($J,XTBCPLDT,XTBPTNM)) Q:XTBPTNM="" DO
24 ..F XTBLN=0:0 S XTBLN=$O(^TMP($J,XTBCPLDT,XTBPTNM,XTBLN)) Q:XTBLN="" DO
25 ...S XTBDTA=^TMP($J,XTBCPLDT,XTBPTNM,XTBLN)
26 ...S XTBSUBJ=$P(XTBDTA,U),XTBPRIO=$P(XTBDTA,U,2),XTBRECPT=$P(XTBDTA,U,3)
27 ...I OLXTBCPL'=XTBCPLDT W !
28 ...S Y=XTBCPLDT X ^DD("DD") S XTBCPLD1=Y
29 ...W XTBCPLD1,?13,XTBPTNM,?27,XTBSUBJ,?55,XTBPRIO,?67,XTBRECPT,! S XTBCNT=XTBCNT+1
30 ...S OLXTBCPL=XTBCPLDT
31 ...X XTBUP
32 X XTBUP
33 ;
34PREXIT W !!,"Number of patches: ",XTBCNT,!
35 I IOST?1"C-".E W !,"Press RETURN to end " R ANS:DTIME
36 ;
37EXIT D ^%ZISC
38 K ^TMP($J),%ZIS,ANS,XTBANS,XTBCNT,XTBCPLDT,XTBDA,XTBINST,XTBLN,XTBPKG,XTBPRIO,XTBPTNM
39 K XTBRECPT,XTBRUNDT,XTBSUBJ,XTBX,XTBXX,XTBDTA,XTBHDR,OLXTBCPL,PG,XTBPKFLV,XTBPKPTR,POP,XTBPTCVR,X,X1
40 K Y,YY1,ZTDESC,ZTSK,ZTIO,ZTRTN,ZTSAVE,XTBCPLD1,%DT,XTBBDT,XTBEDT,XTBPSITE,XTBUP,IOP,XMY
41 Q
42 ;
43SET S XTBPTNM=$P(XTBDTA,U,1),XTBSUBJ=$E($P(XTBDTA,U,7),1,26)
44 S X=$P(XTBDTA,U,3),XTBPRIO=$S(X="m":"Mandatory",X="e":"Emergency",1:"Unknown")
45 S Y=$P(XTBDTA,U,2) X ^DD("DD") S XTBRECPT=Y
46 S XTBCPLDT=$P(XTBDTA,U,9) ; compliance date
47 S XTBLN=XTBLN+1,^TMP($J,XTBCPLDT,XTBPTNM,XTBLN)=XTBSUBJ_U_XTBPRIO_U_XTBRECPT
48 Q
49 ;
50HDR I PG<1,IOST?1"C-".E W @IOF
51 S PG=PG+1
52 W:PG>1 @IOF W !,XTBHDR,?(IOM-12),"Page: ",PG,!,"Run date: "_XTBRUNDT,!!!
53 W "Compliance",!,"Date",?13,"Patch #",?27,"Subject",?55,"Priority",?67,"Recpt Date",!
54 W "----------",?13,"-------",?27,"-------",?55,"--------",?67,"----- ----",!
55 Q
56 ;
57PAUSE W !,"Press RETURN to continue or '^' to exit: " R XTBANS:DTIME
58 I XTBANS[U S (XTBLN,XTBCPLDT,XTBPTNM)="ZZZZZ"
59 Q
60 ;
61SITETSK ;compile a list from sites
62 S XTBPSITE=1,IOP="P-MESSAGE;80;60",XMY("TRAN.BA@NXT.KERNEL.FO-OAKLAND.MED.VA.GO")=""
63 S XTBHDR="Patches Due Within Eight Days for "_^DD("SITE")
64 S XTBBDT=3010101,X="T+8",%DT="" D ^%DT S XTBEDT=Y
65 G RPT1
Note: See TracBrowser for help on using the repository browser.