source: FOIAVistA/trunk/r/NOIS-FSC/FSCLMI.m@ 632

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

initial load of FOIAVistA 6/30/08 version

File size: 3.5 KB
Line 
1FSCLMI ;SLC/STAFF-NOIS List Manager - Installs ;1/13/98 12:34
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4ENTRY ; from list template - entry code, FSCSTUR
5 N DAY,LINE,NUM,NUM0,NUM1,SEQ
6 K ^TMP("FSC INSTALLS",$J)
7 I '$G(FSCDEV) W !
8 S VALMCNT=0,VALMCAP="",$P(VALMCAP," ",80)=""
9 I '$D(FSCSTU) Q
10 ;S VALMCNT=VALMCNT+1,^TMP("FSC INSTALLS",$J,VALMCNT,0)="Description:"
11 S DATE=$G(DATE,DT)
12 D
13 .I FSCSTU="ALERT" D Q
14 ..N DA,DIK S DIK="^FSCD(""STU ALERT"","
15 ..S NUM="" F S NUM=$O(^FSCD("STU ALERT","B",DUZ,NUM),-1) Q:NUM="" S NUM0=+$P($G(^FSCD("STU ALERT",NUM,0)),U,2) I NUM0 D
16 ...S NUM1=0 F S NUM1=$O(^FSCD("STU MSG",NUM0,1,NUM1)) Q:NUM1<1 S LINE=$G(^(NUM1,0)) D
17 ....S VALMCNT=VALMCNT+1,^TMP("FSC INSTALLS",$J,VALMCNT,0)=LINE
18 ...S DA=+NUM D ^DIK
19 .I FSCSTU="ALL" D Q
20 ..S DAY="" F S DAY=$O(^FSCD("STU MSG","B",DAY),-1) Q:DAY="" Q:DAY<DATE D
21 ...S NUM="" F S NUM=$O(^FSCD("STU MSG","B",DAY,NUM),-1) Q:NUM="" D
22 ....S NUM1=0 F S NUM1=$O(^FSCD("STU MSG",NUM,1,NUM1)) Q:NUM1<1 S LINE=$G(^(NUM1,0)) D
23 .....S VALMCNT=VALMCNT+1,^TMP("FSC INSTALLS",$J,VALMCNT,0)=LINE
24 .I FSCSTU="PACKAGE" D Q
25 ..I '$G(PACKAGE) Q
26 ..S DAY="" F S DAY=$O(^FSCD("STU MSG","APD",PACKAGE,DAY),-1) Q:DAY="" Q:DAY<DATE D
27 ...S NUM="" F S NUM=$O(^FSCD("STU MSG","APD",PACKAGE,DAY,NUM),-1) Q:NUM="" D
28 ....S NUM1=0 F S NUM1=$O(^FSCD("STU MSG",NUM,1,NUM1)) Q:NUM1<1 S LINE=$G(^(NUM1,0)) D
29 .....S VALMCNT=VALMCNT+1,^TMP("FSC INSTALLS",$J,VALMCNT,0)=LINE
30 .I FSCSTU="SITE" D Q
31 ..I '$G(SITE) Q
32 ..S DAY="" F S DAY=$O(^FSCD("STU MSG","ASD",SITE,DAY),-1) Q:DAY="" Q:DAY<DATE D
33 ...S NUM="" F S NUM=$O(^FSCD("STU MSG","ASD",SITE,DAY,NUM),-1) Q:NUM="" D
34 ....S NUM1=0 F S NUM1=$O(^FSCD("STU MSG",NUM,1,NUM1)) Q:NUM1<1 S LINE=$G(^(NUM1,0)) D
35 .....S VALMCNT=VALMCNT+1,^TMP("FSC INSTALLS",$J,VALMCNT,0)=LINE
36 S ^TMP("FSC INSTALLS",$J)=VALMCNT_U_VALMCNT
37 I 'VALMCNT S VALMCNT=2,^TMP("FSC INSTALLS",$J,1,0)=" ",^TMP("FSC INSTALLS",$J,2,0)=" No messages on list."
38 Q
39 ;
40HDRPATCH ; from FSCSTUR
41 N HDR S FSCSTU=$G(FSCSTU),DATE=$G(DATE,DT)
42 S HDR="Site Tracking"
43 I FSCSTU="PATCH SITE" S HDR=HDR_" - Patch "_$P($G(^A1AE(11005,+$G(PATCH),0)),U)_" installed at these sites"
44 I FSCSTU="PATCH SITENOT" S HDR=HDR_" - Patch "_$P($G(^A1AE(11005,+$G(PATCH),0)),U)_" is NOT installed at these sites"
45 I FSCSTU="PATCH ALL" S HDR=HDR_" - "_$P($G(^FSC("SITE",+$G(SITE),0)),U)_" patch installs backto "_$$FMTE^XLFDT(DATE)
46 I FSCSTU="PATCH ALLNOT" S HDR=HDR_" - "_$P($G(^FSC("SITE",+$G(SITE),0)),U)_" patches NOT installed"
47 I FSCSTU="PATCH PACK" S HDR=HDR_" - "_$P($G(^FSC("SITE",+$G(SITE),0)),U)_" patches for "_$P($G(^FSC("MOD",+$G(MODULE),0)),U)
48 I FSCSTU="PATCH PACKNOT" S HDR=HDR_" - "_$P($G(^FSC("SITE",+$G(SITE),0)),U)_" patches NOT installed for "_$P($G(^FSC("MOD",+$G(MODULE),0)),U)
49 S VALMHDR(1)=HDR
50 Q
51 ;
52HEADER ; from list template - header code, FSCSTUR
53 N HDR S FSCSTU=$G(FSCSTU),DATE=$G(DATE,DT)
54 S HDR="Site Tracking Update Messages"
55 I FSCSTU="ALERT" S HDR=HDR_" - Install Alerts"
56 I FSCSTU="ALL" S HDR=HDR_" - All installs backto "_$$FMTE^XLFDT(DATE)
57 I FSCSTU="PACKAGE" S HDR=HDR_" - "_$P($G(^FSC("PACK",+$G(PACKAGE),0)),U)_" installs backto "_$$FMTE^XLFDT(DATE)
58 I FSCSTU="SITE" S HDR=HDR_" - "_$P($G(^FSC("SITE",+$G(SITE),0)),U)_" installs backto "_$$FMTE^XLFDT(DATE)
59 S VALMHDR(1)=HDR
60 Q
61 ;
62EXIT ; from list template - exit code
63 I $G(FSC1) D CLEAR^VALM1
64 K ^TMP("FSC INSTALLS",$J)
65 Q
66 ;
67HELP ; from list template - help code
68 I $G(X)'["?" Q
69 S VALMBCK="R"
70 N XQH
71 I X="?" S XQH="FSC MENU MODIFY" D EN^XQH Q
72 I X="???" S VALMANS="?" D CLEAR^VALM1 S XQH="FSC U1 NOIS" D EN^XQH Q
73 Q
Note: See TracBrowser for help on using the repository browser.