source: WorldVistAEHR/trunk/r/NOIS-FSC/FSCSTUPI.m@ 1639

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

initial load of WorldVistAEHR

File size: 5.0 KB
Line 
1FSCSTUPI ;SLC/STAFF-NOIS Site Tracking Update - Patches Installed ;3/4/98 19:46
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4SITE(PATCH,CNT) ; from FSCLMIPX, FSCRPCG
5 N DOMAIN,INDATE,LINE,NUM,OTHER,SITENAME,VDATE,ZERO K ^TMP("FSC PATCH",$J)
6 S CNT=+$G(CNT),OTHER=0
7 S PATCH=+$G(PATCH) I 'PATCH Q
8 S VDATE=$P($G(^A1AE(11005,PATCH,0)),U,11)
9 I 'VDATE S CNT=1 D SETUP(.CNT," This patch has not been verified.")
10 I VDATE,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 DOMAIN=0 F S DOMAIN=$O(^NTS(2050.2,"APD",PATCH,DOMAIN)) Q:DOMAIN<1 D
14 .S SITENAME=$P($G(^FSC("SITE",+$O(^FSC("SITE","AE",DOMAIN,0)),0)),U)
15 .I '$L(SITENAME) S OTHER=1 Q
16 .S NUM=0 F S NUM=$O(^NTS(2050.2,"APD",PATCH,DOMAIN,NUM)) Q:NUM<1 D
17 ..S ZERO=$G(^NTS(2050.2,NUM,0))
18 ..S INDATE=$$FMTE^XLFDT($P(ZERO,U,3))
19 ..S ^TMP("FSC PATCH",$J,SITENAME,NUM)=$$SETSTR^VALM1(INDATE,SITENAME,30,$L(INDATE))
20 S SITENAME="" F S SITENAME=$O(^TMP("FSC PATCH",$J,SITENAME)) Q:SITENAME="" D
21 .S NUM="" F S NUM=$O(^TMP("FSC PATCH",$J,SITENAME,NUM),-1) Q:NUM="" S LINE=^(NUM) D
22 ..D SETUP(.CNT,LINE)
23 I OTHER D
24 .K ^TMP("FSC PATCH",$J)
25 .D SETUP(.CNT," ")
26 .D SETUP(.CNT,"Other domains where this patch is installed:")
27 .D SETUP(.CNT," ")
28 .S DOMAIN=0 F S DOMAIN=$O(^NTS(2050.2,"APD",PATCH,DOMAIN)) Q:DOMAIN<1 D
29 ..S SITENAME=$P($G(^FSC("SITE",+$O(^FSC("SITE","AE",DOMAIN,0)),0)),U)
30 ..I $L(SITENAME) Q
31 ..S SITENAME=$P($G(^DIC(4.2,DOMAIN,0)),U) I '$L(SITENAME) Q
32 ..S NUM=0 F S NUM=$O(^NTS(2050.2,"APD",PATCH,DOMAIN,NUM)) Q:NUM<1 D
33 ...S ZERO=$G(^NTS(2050.2,NUM,0))
34 ...S INDATE=$$FMTE^XLFDT($P(ZERO,U,3))
35 ...S ^TMP("FSC PATCH",$J,SITENAME,NUM)=$$SETSTR^VALM1(INDATE,SITENAME,30,$L(INDATE))
36 .S SITENAME="" F S SITENAME=$O(^TMP("FSC PATCH",$J,SITENAME)) Q:SITENAME="" D
37 ..S NUM="" F S NUM=$O(^TMP("FSC PATCH",$J,SITENAME,NUM),-1) Q:NUM="" S LINE=^(NUM) D
38 ...D SETUP(.CNT,LINE)
39 I 'CNT D SETUP(.CNT," Patch is not installed at any sites.")
40 D SETUP(.CNT," ")
41 D SETUP(.CNT,"Note: Tracking of patch installs began 1/1/98. Prior installs are not reported.")
42 K ^TMP("FSC PATCH",$J)
43 Q
44 ;
45ALL(SITE,DATE,CNT) ; from FSCLMIPX, FSCRPCG
46 N DAY,DOMAIN,INDATE,LINE,NUM,PATCH,PATCH0,SUBJECT,ZERO
47 S CNT=+$G(CNT)
48 S DATE=+$G(DATE) I 'DATE Q
49 S DOMAIN=+$P($G(^FSC("SITE",+$G(SITE),0)),U,14) I 'DOMAIN Q
50 S DAY="" F S DAY=$O(^NTS(2050.2,"ADTP",DOMAIN,DAY),-1) Q:DAY="" Q:DAY<DATE D
51 .S PATCH=0 F S PATCH=$O(^NTS(2050.2,"ADTP",DOMAIN,DAY,PATCH)) Q:PATCH<1 D
52 ..S PATCH0=$G(^A1AE(11005,PATCH,0)) I '$L(PATCH0) Q
53 ..S SUBJECT=$P(PATCH0,U,5)
54 ..S NUM="" F S NUM=$O(^NTS(2050.2,"ADTP",DOMAIN,DAY,PATCH,NUM),-1) Q:NUM="" D
55 ...S ZERO=$G(^NTS(2050.2,NUM,0))
56 ...S INDATE=$$FMTE^XLFDT($P(ZERO,U,3))
57 ...S LINE=$$SETSTR^VALM1($P(PATCH0,U),INDATE,15,$L($P(PATCH0,U)))
58 ...S LINE=$$SETSTR^VALM1(SUBJECT,LINE,30,$L(SUBJECT))
59 ...D SETUP(.CNT,LINE)
60 I 'CNT D SETUP(.CNT," No patches installed within this date range.")
61 D SETUP(.CNT," ")
62 D SETUP(.CNT,"Note: Tracking of patch installs began 1/1/98. Prior installs are not reported.")
63 Q
64 ;
65PACK(SITE,MODULE,CNT) ; from FSCLMIPX, FSCRPCG
66 N DOMAIN,INDATE,LINE,NUM,PACKAGE,PATCH,PATCH0,SUBJECT,VERSION,VDATE,ZERO
67 S CNT=+$G(CNT)
68 S DOMAIN=+$P($G(^FSC("SITE",+$G(SITE),0)),U,14) I 'DOMAIN Q
69 S PACKAGE=+$P($G(^FSC("MOD",+$G(MODULE),0)),U,8) I 'PACKAGE Q
70 S PACKAGE=+$P(^FSC("PACK",PACKAGE,0),U,3) I 'PACKAGE Q
71 S VERSION=+$P($P(^FSC("MOD",MODULE,0),U),"/",2) I 'VERSION S VERSION=1
72 S PATCH=0 F S PATCH=$O(^NTS(2050.2,"ADPVP",DOMAIN,PACKAGE,VERSION,PATCH)) Q:PATCH<1 D
73 .S PATCH0=$G(^A1AE(11005,PATCH,0)) I '$L(PATCH0) Q
74 .S VDATE=$P(PATCH0,U,11)
75 .I VDATE,VDATE<2980101 Q
76 .S SUBJECT=$P(PATCH0,U,5)
77 .S NUM=0 F S NUM=$O(^NTS(2050.2,"ADPVP",DOMAIN,PACKAGE,VERSION,PATCH,NUM)) Q:NUM<1 D
78 ..S ZERO=$G(^NTS(2050.2,NUM,0))
79 ..S INDATE=$$FMTE^XLFDT($P(ZERO,U,3))
80 ..S LINE=$$SETSTR^VALM1(INDATE,$P(PATCH0,U),15,$L(INDATE))
81 ..S LINE=$$SETSTR^VALM1(SUBJECT,LINE,30,$L(SUBJECT))
82 ..D SETUP(.CNT,LINE)
83 I 'CNT D SETUP(.CNT," No patches installed.")
84 D SETUP(.CNT," ")
85 D SETUP(.CNT,"Note: Tracking of patch installs began 1/1/98. Prior installs are not reported.")
86 Q
87 ;
88INSTALL(PATCH,SITE,CNT) ; from FSCRPCG
89 N DOMAIN,INDATE,LINE,MSG,NUM,VDATE,ZERO
90 S CNT=+$G(CNT)
91 S PATCH=+$G(PATCH) I 'PATCH Q
92 S VDATE=$P($G(^A1AE(11005,PATCH,0)),U,11)
93 I 'VDATE S CNT=1 D SETUP(.CNT," This patch has not been verified.")
94 I VDATE,VDATE<2980101 S CNT=1 D Q
95 .D SETUP(.CNT,"This patch was released prior to implementation of tracking (1/1/98).")
96 .D SETUP(.CNT,"No data available.")
97 S DOMAIN=+$P($G(^FSC("SITE",+$G(SITE),0)),U,14) I 'DOMAIN Q
98 S NUM=0 F S NUM=$O(^NTS(2050.2,"APD",PATCH,DOMAIN,NUM)) Q:NUM<1 D
99 .S ZERO=$G(^NTS(2050.2,NUM,0)),MSG=$G(^(1))
100 .S INDATE=$$FMTE^XLFDT($P(ZERO,U,3))
101 .S LINE=$$SETSTR^VALM1(MSG,INDATE,15,$L(MSG))
102 .D SETUP(.CNT,LINE)
103 I 'CNT D SETUP(.CNT," Patch is not installed.")
104 D SETUP(.CNT," ")
105 D SETUP(.CNT,"Note: Tracking of patch installs began 1/1/98. Prior installs are not reported.")
106 Q
107 ;
108SETUP(CNT,LINE) ;
109 S CNT=CNT+1
110 I $D(VALMCNT) S ^TMP("FSC INSTALLS",$J,CNT,0)=LINE Q
111 S ^TMP("FSCRPC",$J,"OUTPUT",CNT)=LINE
112 Q
Note: See TracBrowser for help on using the repository browser.