source: FOIAVistA/tag/r/NOIS-FSC/FSCSTUPN.m@ 1154

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

initial load of FOIAVistA 6/30/08 version

File size: 3.7 KB
Line 
1FSCSTUPN ;SLC/STAFF-NOIS Site Tracking Update - Patches Not Installed ;1/4/98 20:48
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4SITENOT(PATCH,CNT) ; from FSCLMIPX, FSCRPCG
5 N DOMAIN,PACKAGE,PATCH0,NUM,SITENAME,VERSION,VDATE
6 S CNT=+$G(CNT)
7 S PATCH0=$G(^A1AE(11005,+$G(PATCH),0)) I '$L(PATCH0) Q
8 S VDATE=$P(PATCH0,U,11)
9 I 'VDATE S CNT=1 D SETUP(.CNT," This patch has not been verified.") Q
10 I VDATE<2980101 S CNT=1 D Q
11 .D SETUP(.CNT,"This patch was released prior to implementation of tracking (1/1/98).")
12 .D SETUP(.CNT,"No data available.")
13 S PACKAGE=$P(PATCH0,U,2) I 'PACKAGE Q
14 S VERSION=$P(PATCH0,U,3) I 'VERSION Q
15 S SITENAME="" F S SITENAME=$O(^FSC("SITE","B",SITENAME)) Q:SITENAME="" D
16 .S NUM=0 F S NUM=$O(^FSC("SITE","B",SITENAME,NUM)) Q:NUM<1 D
17 ..S DOMAIN=+$P($G(^FSC("SITE",NUM,0)),U,14) I 'DOMAIN Q
18 ..I $O(^NTS(2050.2,"APD",PATCH,DOMAIN,0)) Q
19 ..I '$$CHECK(PACKAGE,VERSION,DOMAIN) Q
20 ..D SETUP(.CNT,SITENAME)
21 I 'CNT D SETUP(.CNT," Patch is installed at all sites.")
22 D SETUP(.CNT," ")
23 D SETUP(.CNT,"Note: Tracking of patch installs began 1/1/98. Prior installs are not reported.")
24 Q
25 ;
26ALLNOT(SITE,CNT) ; from FSCLMIPX, FSCRPCG
27 N DOMAIN,LINE,PACKAGE,PATCH,PATCH0,PATCHID,SUBJECT,VERSION K ^TMP("FSC PATCH",$J)
28 S CNT=+$G(CNT)
29 S DOMAIN=+$P($G(^FSC("SITE",+$G(SITE),0)),U,14) I 'DOMAIN Q
30 S PATCH=0 F S PATCH=$O(^NTS(2050.2,"B",PATCH)) Q:PATCH<1 D
31 .I $O(^NTS(2050.2,"APD",PATCH,DOMAIN,0)) Q
32 .S PATCH0=$G(^A1AE(11005,PATCH,0)) I '$L(PATCH0) Q
33 .I '$P(PATCH0,U,11) Q
34 .I $P(PATCH,U,8)="e" Q
35 .S PACKAGE=$P(PATCH0,U,2) I 'PACKAGE Q
36 .S VERSION=$P(PATCH0,U,3) I 'VERSION Q
37 .I '$$CHECK(PACKAGE,VERSION,DOMAIN) Q
38 .S PATCHID=$P(PATCH0,U),SUBJECT=$P(PATCH0,U,5)
39 .S LINE=$$SETSTR^VALM1(SUBJECT,PATCHID,15,$L(SUBJECT))
40 .S ^TMP("FSC PATCH",$J,PATCHID)=LINE
41 S PATCHID="" F S PATCHID=$O(^TMP("FSC PATCH",$J,PATCHID)) Q:PATCHID="" S LINE=^(PATCHID) D
42 .D SETUP(.CNT,LINE)
43 I 'CNT D SETUP(.CNT," All patches installed. This only applies to patches being tracked.")
44 D SETUP(.CNT," ")
45 D SETUP(.CNT,"Note: Tracking of patch installs began 1/1/98. Prior installs are not reported.")
46 K ^TMP("FSC PATCH",$J)
47 Q
48 ;
49PACKNOT(SITE,MODULE,CNT) ; from FSCLMIPX, FSCRPCG
50 N DOMAIN,LINE,PACKAGE,PATCH,PATCH0,PATCHID,SUBJECT,VERSION
51 S CNT=+$G(CNT)
52 S DOMAIN=+$P($G(^FSC("SITE",+$G(SITE),0)),U,14) I 'DOMAIN Q
53 S PACKAGE=+$P($G(^FSC("MOD",+$G(MODULE),0)),U,8) I 'PACKAGE Q
54 S PACKAGE=+$P(^FSC("PACK",PACKAGE,0),U,3) I 'PACKAGE Q
55 S VERSION=+$P($P(^FSC("MOD",MODULE,0),U),"/",2) I 'VERSION S VERSION=1
56 I '$$CHECK(PACKAGE,VERSION,DOMAIN) Q
57 S PATCH=0 F S PATCH=$O(^NTS(2050.2,"APVPD",PACKAGE,VERSION,PATCH)) Q:PATCH<1 D
58 .I $O(^NTS(2050.2,"APVPD",PACKAGE,VERSION,PATCH,DOMAIN,0)) Q
59 .S PATCH0=$G(^A1AE(11005,PATCH,0)) I '$L(PATCH0) Q
60 .I '$P(PATCH0,U,11) Q
61 .I '$P(PATCH,U,8)="e" Q
62 .S PATCHID=$P(PATCH0,U),SUBJECT=$P(PATCH0,U,5)
63 .S LINE=$$SETSTR^VALM1(SUBJECT,PATCHID,15,$L(SUBJECT))
64 .D SETUP(.CNT,LINE)
65 I 'CNT D SETUP(.CNT," All patches installed. This only applies to patches being tracked.")
66 D SETUP(.CNT," ")
67 D SETUP(.CNT,"Note: Tracking of patch installs began 1/1/98. Prior installs are not reported.")
68 Q
69 ;
70SETUP(CNT,LINE) ;
71 S CNT=CNT+1
72 I $D(VALMCNT) S ^TMP("FSC INSTALLS",$J,CNT,0)=LINE Q
73 S ^TMP("FSCRPC",$J,"OUTPUT",CNT)=LINE
74 Q
75 ;
76CHECK(PACKAGE,VERSION,DOMAIN) ; $$(package, version, domain) -> 1 if installed at site, else 0
77 N SITEVER
78 I $O(^NTS(2050.2,"ADPVP",DOMAIN,PACKAGE,+VERSION,0)) Q 1
79 S SITEVER=+$$VERINST(PACKAGE,DOMAIN)
80 I SITEVER,SITEVER=+VERSION Q 1
81 Q 0
82 ;
83VERINST(PACKAGE,DOMAIN) ; $$(package,domain) -> current version#
84 N APP,SITENUM
85 S DOMAIN=$P($G(^DIC(4.2,+DOMAIN,0)),U)
86 I '$L(DOMAIN) Q ""
87 S SITENUM=$O(^NTS(2050,"AE",DOMAIN,0))
88 I 'SITENUM Q ""
89 S APP=+$O(^DIC(120102,"AP",PACKAGE,0))
90 I 'APP Q ""
91 Q $P($G(^NTS(2050,SITENUM,8,APP,0)),U,7)
Note: See TracBrowser for help on using the repository browser.