source: WorldVistAEHR/trunk/r/NOIS-FSC/FSCSTUPT.m@ 1766

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

initial load of WorldVistAEHR

File size: 3.5 KB
Line 
1FSCSTUPT ;SLC/STAFF-NOIS Site Tracking Update - Patches (Test) Installed ;1/4/98 20:49
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4TEST(PATCH,CNT) ; from FSCLMIPX, FSCRPCG
5 N DOMAIN,INDATE,LINE,NUM,SITENAME,VDATE,ZERO K ^TMP("FSC PATCH",$J)
6 S CNT=+$G(CNT)
7 S PATCH=+$G(PATCH) I 'PATCH Q
8 S VDATE=$P($G(^A1AE(11005,PATCH,0)),U,11)
9 I VDATE,VDATE<2980101 S CNT=1 D Q
10 .D SETUP(.CNT,"This patch was released prior to implementation of tracking (1/1/98).")
11 .D SETUP(.CNT,"No data available.")
12 S DOMAIN=0 F S DOMAIN=$O(^NTS(2050.2,"APD",PATCH,DOMAIN)) Q:DOMAIN<1 D
13 .S SITENAME=$P($G(^FSC("SITE",+$O(^FSC("SITE","AE",DOMAIN,0)),0)),U)
14 .I '$L(SITENAME) Q
15 .S NUM=0 F S NUM=$O(^NTS(2050.2,"APD",PATCH,DOMAIN,NUM)) Q:NUM<1 D
16 ..S ZERO=$G(^NTS(2050.2,NUM,0))
17 ..S INDATE=$$FMTE^XLFDT($P(ZERO,U,3))
18 ..I VDATE,INDATE'<VDATE Q
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 'CNT D SETUP(.CNT," No test installs of this patch at any site.")
24 D SETUP(.CNT," ")
25 D SETUP(.CNT,"Note: Tracking of patch installs began 1/1/98. Prior installs are not reported.")
26 K ^TMP("FSC PATCH",$J)
27 Q
28 ;
29SITE(SITE,CNT) ; from FSCLMIPX, FSCRPCG
30 N DAY,DOMAIN,INDATE,LINE,NUM,PATCH,PATCH0,SUBJECT,ZERO
31 S CNT=+$G(CNT)
32 S DOMAIN=+$P($G(^FSC("SITE",+$G(SITE),0)),U,14) I 'DOMAIN Q
33 S DAY="" F S DAY=$O(^NTS(2050.2,"ADTP",DOMAIN,DAY),-1) Q:DAY="" D
34 .S PATCH=0 F S PATCH=$O(^NTS(2050.2,"ADTP",DOMAIN,DAY,PATCH)) Q:PATCH<1 D
35 ..S PATCH0=$G(^A1AE(11005,PATCH,0)) I '$L(PATCH0) Q
36 ..Q:$P(PATCH0,U,11) S SUBJECT=$P(PATCH0,U,5)
37 ..S NUM="" F S NUM=$O(^NTS(2050.2,"ADTP",DOMAIN,DAY,PATCH,NUM),-1) Q:NUM="" D
38 ...S ZERO=$G(^NTS(2050.2,NUM,0))
39 ...S INDATE=$$FMTE^XLFDT($P(ZERO,U,3))
40 ...S LINE=$$SETSTR^VALM1($P(PATCH0,U),INDATE,15,$L($P(PATCH0,U)))
41 ...S LINE=$$SETSTR^VALM1(SUBJECT,LINE,30,$L(SUBJECT))
42 ...D SETUP(.CNT,LINE)
43 I 'CNT D SETUP(.CNT," No unreleased patches installed at this site.")
44 D SETUP(.CNT," ")
45 D SETUP(.CNT,"Note: Tracking of patch installs began 1/1/98. Prior installs are not reported.")
46 Q
47 ;
48PACK(MODULE,CNT) ; from FSCLMIPX, FSCRPCG
49 N DOMAIN,INDATE,LINE,NUM,PACKAGE,PATCH,PATCH0,SITENAME,SUBJECT,VERSION,ZERO
50 S CNT=+$G(CNT)
51 S PACKAGE=+$P($G(^FSC("MOD",+$G(MODULE),0)),U,8) I 'PACKAGE Q
52 S PACKAGE=+$P(^FSC("PACK",PACKAGE,0),U,3) I 'PACKAGE Q
53 S VERSION=+$P($P(^FSC("MOD",MODULE,0),U),"/",2) I 'VERSION S VERSION=1
54 S PATCH=0 F S PATCH=$O(^NTS(2050.2,"APVPD",PACKAGE,VERSION,PATCH)) Q:PATCH<1 D
55 .S PATCH0=$G(^A1AE(11005,PATCH,0)) I '$L(PATCH0) Q
56 .Q:$P(PATCH0,U,11) S SUBJECT=$P(PATCH0,U,5)
57 .S DOMAIN=0 F S DOMAIN=$O(^NTS(2050.2,"APVPD",PACKAGE,VERSION,PATCH,DOMAIN)) Q:DOMAIN<1 D
58 ..S SITENAME=$P($G(^FSC("SITE",+$O(^FSC("SITE","AE",DOMAIN,0)),0)),U)
59 ..I '$L(SITENAME) Q
60 ..S NUM=0 F S NUM=$O(^NTS(2050.2,"APVPD",PACKAGE,VERSION,PATCH,DOMAIN,NUM)) Q:NUM<1 D
61 ...S ZERO=$G(^NTS(2050.2,NUM,0))
62 ...S INDATE=$$FMTE^XLFDT($P(ZERO,U,3))
63 ...S LINE=$$SETSTR^VALM1(SITENAME,$P(PATCH0,U),15,$L(SITENAME))
64 ...S LINE=$$SETSTR^VALM1(INDATE,LINE,45,$L(INDATE))
65 ...D SETUP(.CNT,LINE)
66 I 'CNT D SETUP(.CNT," No unreleased patches installed for this package.")
67 D SETUP(.CNT," ")
68 D SETUP(.CNT,"Note: Tracking of patch installs began 1/1/98. Prior installs are not reported.")
69 Q
70 ;
71SETUP(CNT,LINE) ;
72 S CNT=CNT+1
73 I $D(VALMCNT) S ^TMP("FSC INSTALLS",$J,CNT,0)=LINE Q
74 S ^TMP("FSCRPC",$J,"OUTPUT",CNT)=LINE
75 Q
Note: See TracBrowser for help on using the repository browser.