source: FOIAVistA/trunk/r/TOOLKIT-AWCM-XD-XIN-XPAR-XQAB-XT-XUC-XUR-ZIN-ZTED/XTPMKPCF.m@ 1470

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

initial load of FOIAVistA 6/30/08 version

File size: 3.0 KB
Line 
1XTPMKPCF ;OAK/BP - COMPUTED FIELDS AND OTHER ODDITIES FOR PATCH MONITOR;
2 ;;7.3;TOOLKIT;**98,106**; Apr 25, 1995;Build 1
3 ;
4 ; computed fields
5INSTALL ; returns the patch installation information from the INSTALL file.
6 ; note: Fileman variables are NOT killed because they are used in output.
7 ; read the index backwards and select the last patch reference because TEST
8 ; patches may be involved. If a test patch, null the pointer, like nothing is there.
9 S X=$P($G(^XPD(9.9,D0,0)),U,8) Q:X=""
10 S X=$O(^XPD(9.7,"B",X,9999999999),-1) I $G(^XPD(9.7,+X,2))["TEST v" S X="" Q
11 S X=$P($G(^XPD(9.7,+X,1)),U,3)
12 I X="" Q
13 S Y=X D DD^%DT S X=$P(Y,"@") K Y
14 Q
15 ;
16WHO ; returns who installed the patch
17 S X=$P($G(^XPD(9.9,D0,0)),U,8) Q:X=""
18 S X=$O(^XPD(9.7,"B",X,9999999999),-1) I $G(^XPD(9.7,+X,2))["TEST v" S X=""
19 S X=$P($G(^XPD(9.7,+X,0)),U,11)
20 S X=$P($G(^VA(200,+X,0)),U)
21 Q
22 ;
23 ; other utility items
24 ; patch inquiry
25INQUIRE S IOP="HOME" D ^%ZIS K IOP S $P(DASH,"-",75)=""
26 S HD="Patch Inquiry for "_^DD("SITE")
27 W @IOF,!,HD,!!! K DIC,X,Y
28 S DIC("A")="Enter PATCH NAME: ",DIC="^XPD(9.9,",DIC(0)="AEQM"
29 D ^DIC G:Y<0 EXITI S DA=+Y
30 ;
31LOOKUP W @IOF,! S DR="0:9",DIQ(0)="C"
32 S DA=+Y W @IOF,HD,!!!!!,DASH D EN1^DIQ W DASH
33 ;
34CONT W !!!,"Press RETURN to continue or '^' to exit " R ANS:DTIME G:'$T EXITI
35 G:ANS[U EXITI
36 G INQUIRE
37 ;
38EXITI I IOST?1"C-".E W @IOF,!
39 ; clean up FM vars left
40 K %,%X,A,ANS,D0,D1,D2,DA,DIC,DIK,DL,DX,HD
41 K I,POP,S,DASH,DR,X,Y,DK,DIQ,IOP
42 Q
43 ;
44PKGLOOK ; used for free-text lookup in monitoring of namespaces
45 N DIC,Y,D0,DO,DA,DICR
46 S DIC(0)="EQM",DIC="^DIC(9.4," D ^DIC
47 I Y<0 K X Q
48 S X=$P($G(^DIC(9.4,+Y,0)),U,2) ; get package prefix
49 Q
50CMPDTCG ; Compliance Date change
51 K XTBCMDCG
52 S XTBMLN1=$G(^XMB(3.9,XMZ,0)) I XTBMLN1["COMPLIANCE DATE CHANGE" DO
53 .F XTBX=0:0 S XTBX=$O(^XMB(3.9,XMZ,2,XTBX)) Q:XTBX=""!(+XTBX=0) S XTBY=$G(^XMB(3.9,XMZ,2,XTBX,0)) DO
54 ..I XTBY["PATCH " S XTBDESG=$P($P(XTBY,"PATCH ",2)," ",1) Q
55 ..I $D(XTBDESG),XTBY["The Compliance Date for patch"&(XTBY["has been changed to") DO
56 ...S XTBTCMPD=$P(XTBY,"has been changed to ",2)
57 ...S DIC(0)="M",(DIC,DIE)="^XPD(9.9,",X=XTBDESG D ^DIC I Y<0 S XTBX=9999999 Q
58 ...S DA=+Y,DR="8///"_XTBTCMPD D ^DIE
59 ...S XTBCMDCG=1
60 .K DR,DIC,DIE,DA,X,Y,XTBDESG,XTBTCMPD
61 Q
62 ;
63EXITA D ^%ZISC
64 K ^TMP($J)
65 K XTBDESG,XTBI,XTBINST,XTBINSTX,XTBPKG,XTBPRIO,XTBSEQ,XTBSUB,%ZIS,XTBANS,XTBCOMPD,XTBPURGI
66 K XTBVER,XTBX,XTBY,XTBZ,DIC,DIE,DO,DD,X,XMB,XMER,XMREC,XMRG,XX,XTBXX,XTBHDR,PG,POP,XTBMLN1
67 K XTBDA,XTBLIMIT,XTBLN,XTBPTNM,XTBRECPT,XTBRUNDT,XTBSUBJ,ZTDESC,XTBCNT
68 K XTBX,XTBDTA,XTBDTA,X1,X2,XMDUZ,XMSUB,XMTEXT,XMY,XMZ,Y,XTBRCPDT,XTBMG,XTBMGN
69 K XTBINSDA,XTBISTAT,NOFILE,XTBPTYPE,XTBPLVER,XTBPKGPT,XTBPCTVR,YY1
70 K XTBX1,XTBZ,NIGHT,XTBCMPDT,ZTSK,ZTIO,ZTRTN,ZTSAVE
71 Q
72 ;
73INSDATE ;Print out Installed Date
74 N X,X1
75 S X=$P($G(^XPD(9.9,D0,0)),U,8) Q:X=""
76 S X1=$P($G(^XPD(9.9,D0,0)),U,11) I X1>0 W $$FMTE^XLFDT(X1,"2Z") Q
77 S X=$O(^XPD(9.7,"B",X,9999999999),-1) I $G(^XPD(9.7,+X,2))["TEST v" S X="" Q
78 S X=$P($G(^XPD(9.7,+X,1)),U,3) W $$FMTE^XLFDT($P(X,"."),"2Z")
79 Q
Note: See TracBrowser for help on using the repository browser.