source: WorldVistAEHR/trunk/r/NOIS-FSC/FSCRPCGP.m@ 1394

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

initial load of WorldVistAEHR

File size: 4.8 KB
Line 
1FSCRPCGP ;SLC/STAFF-NOIS Patch Report ;1/13/98 15:46
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4PATCH(PATCH) ; from FSCRPCG
5 N CNT,LINE,LINE1,NUM,NUM1,PACKZERO,ZERO
6 S CNT=0
7 S ZERO=$G(^A1AE(11005,PATCH,0))
8 I '$L(ZERO) Q
9 S PACKZERO=$G(^DIC(9.4,+$P(ZERO,U,2),0))
10 D SET("=============================================================================",.CNT)
11 S LINE="Run Date: "_$$FMTE^XLFDT(DT)
12 S LINE=$$SETSTR^VALM1("Designation: ",LINE,46,13)_$P(ZERO,U)
13 D SET(LINE,.CNT)
14 S LINE="Package : "_$P(PACKZERO,U,2)_" - "_$P(PACKZERO,U)
15 S LINE=$$SETSTR^VALM1(" Priority: ",LINE,46,13)_$$PRIORITY($P(ZERO,U,7))
16 D SET(LINE,.CNT)
17 S LINE="Version : "_$P(ZERO,U,3)
18 I $P(ZERO,U,6) S LINE=$$SETSTR^VALM1("SEQ #"_$P(ZERO,U,6),LINE,23,12)
19 S LINE=$$SETSTR^VALM1(" Status: ",LINE,46,13)_$$STATUS($P(ZERO,U,8))
20 D SET(LINE,.CNT)
21 D SET("=============================================================================",.CNT)
22 D SET("",.CNT)
23 D ASSOC(PATCH,.CNT)
24 D SET("",.CNT)
25 S LINE="Subject: "_$P(ZERO,U,5)
26 D SET(LINE,.CNT)
27 D SET("",.CNT)
28 I $P(ZERO,U,8)'="v" Q ; *** don't display unreleased patch
29 D SET("Category",.CNT)
30 S NUM=0 F S NUM=$O(^A1AE(11005,PATCH,"C",NUM)) Q:NUM<1 S LINE=^(NUM,0) D
31 .S LINE=$$CATEGORY(LINE,$P(ZERO,U,7))
32 .I LINE="e" D
33 ..S LINE="Enhancement ("
34 ..I $P(ZERO,U,7)="m" S LINE=LINE_"Mandatory)" Q
35 ..I $P(ZERO,U,7)="n" S LINE=LINE_"Optional)" Q
36 ..S LINE=LINE_")"
37 .D SET(" - "_LINE,.CNT)
38 D SET("",.CNT)
39 D SET("Description",.CNT)
40 D SET("===========",.CNT)
41 D SET("",.CNT)
42 S NUM=0 F S NUM=$O(^A1AE(11005,PATCH,"D",NUM)) Q:NUM<1 S LINE=" "_^(NUM,0) D
43 .D SET(LINE,.CNT)
44 D SET("",.CNT)
45 D SET("Routine Information",.CNT)
46 D SET("===================",.CNT)
47 S NUM=0 F S NUM=$O(^A1AE(11005,PATCH,"P",NUM)) Q:NUM<1 S LINE=" - "_^(NUM,0) D
48 .D SET("",.CNT)
49 .D SET("Routine Name:",.CNT)
50 .D SET(LINE,.CNT)
51 .D SET("",.CNT)
52 .S NUM1=0 F S NUM1=$O(^A1AE(11005,PATCH,"P",NUM,"D",NUM1)) Q:NUM1<1 S LINE1=^(NUM1,0) D
53 ..D SET(LINE,.CNT)
54 .D SET("",.CNT)
55 .D SET("Routine Checksum:",.CNT)
56 .S NUM1=0 F S NUM1=$O(^A1AE(11005,PATCH,"P",NUM,"X",NUM1)) Q:NUM1<1 S LINE1=^(NUM1,0) D
57 ..D SET(LINE,.CNT)
58 D SET("",.CNT)
59 D SET("================================================================================",.CNT)
60 S LINE="User Information:"
61 D SET(LINE,.CNT)
62 S LINE="Entered By : "_$P($G(^VA(200,+$P(ZERO,U,9),0)),U)
63 S LINE=$$SETSTR^VALM1(" Date Entered : ",LINE,50,16)
64 I $P(ZERO,U,12) S LINE=LINE_$$FMTE^XLFDT($P(ZERO,U,12))
65 D SET(LINE,.CNT)
66 S LINE="Completed By: "_$P($G(^VA(200,+$P(ZERO,U,13),0)),U)
67 S LINE=$$SETSTR^VALM1("Date Completed: ",LINE,50,16)
68 I $P(ZERO,U,10) S LINE=LINE_$$FMTE^XLFDT($P(ZERO,U,10))
69 D SET(LINE,.CNT)
70 S LINE="Released By : "_$P($G(^VA(200,+$P(ZERO,U,14),0)),U)
71 S LINE=$$SETSTR^VALM1(" Date Released: ",LINE,50,16)
72 I $P(ZERO,U,11) S LINE=LINE_$$FMTE^XLFDT($P(ZERO,U,11))
73 D SET(LINE,.CNT)
74 D SET("================================================================================",.CNT)
75 Q
76 ;
77ASSOC(PATCH,CNT) ;
78 I '$D(^A1AE(11005,PATCH,"Q","B")) Q
79 N AN,AZ,APATCH,AZERO,NUM K AZ
80 S NUM=0 F S NUM=$O(^A1AE(11005,PATCH,"Q",NUM)) Q:NUM<1 S AZERO=$G(^(NUM,0)) I $L(AZERO) D
81 .S APATCH=+AZERO
82 .S AZ(APATCH)=$S($D(^A1AE(11005,APATCH,0)):"("_$P(^(0),U,8)_")"_$P(^(0),U),1:"patch not available")
83 .I AZ(APATCH)["*999*" S AZ(APATCH)=$P(AZ(APATCH),"*999*")_"*DBA*"_$P(AZ(APATCH),"*999*",2,99)
84 .I $P(AZERO,U,2)="y" S AZ("STOP",APATCH)=AZ(APATCH),AZ(APATCH)=$E(AZ(APATCH)_" ",1,15)_"<<= must be installed BEFORE '"_$P(^A1AE(11005,PATCH,0),U)_"'"
85 .E S AZ(APATCH)=$E(AZ(APATCH)_" ",1,19)_"install with patch '"_$P(^A1AE(11005,PATCH,0),U)_"'"
86 I $D(AZ)'=11 Q
87 S AN=0
88 S AZ=0 F S AZ=$O(AZ(AZ)) Q:'AZ I AZ(AZ)'["<<" D PSET(.AN,.AZ,.CNT)
89 S AZ=0 F S AZ=$O(AZ(AZ)) Q:'AZ I AZ(AZ)["<<" D PSET(.AN,.AZ,.CNT)
90 K AZ
91 Q
92 ;
93PSET(AN,AZ,CNT) ;
94 S AN=AN+1
95 I AN=1 D SET("Associated patches: "_AZ(AZ),.CNT) Q
96 E D SET(" "_AZ(AZ),.CNT)
97 Q
98 ;
99SET(LINE,CNT) ;
100 S CNT=CNT+1
101 S ^TMP("FSCRPC",$J,"OUTPUT",PATCH,CNT)=LINE
102 Q
103PRIORITY(PRI) ; $$(priortiy) -> external value
104 I PRI="p" Q "Patch for a Patch"
105 I PRI="n" Q "Not Urgent"
106 I PRI="m" Q "Mandatory"
107 I PRI="e" Q "EMERGENCY"
108 I PRI="i" Q "Informational"
109 Q ""
110 ;
111STATUS(STATUS) ; $$(status) -> external value
112 I STATUS="c" Q "Completed/NotReleased"
113 I STATUS="e" Q "Entered in Error"
114 I STATUS="u" Q "Under Development"
115 I STATUS="v" Q "Released"
116 I STATUS="r" Q "Retired"
117 Q ""
118 ;
119CATEGORY(CAT,PRI) ; $$(category, priority) -> external value
120 I CAT="d" Q "Data Dictonary"
121 I CAT="i" Q "Input Template"
122 I CAT="p" Q "Print Template"
123 I CAT="r" Q "Routine"
124 I CAT="s" Q "Sort Template"
125 I CAT="o" Q "Other"
126 I CAT="db" Q "Database"
127 I CAT="pp" Q "PATCH FOR A PATCH"
128 I CAT="inf" Q "Informational"
129 I CAT="e" Q "Enhancement ("_$S(PRI="m":"Mandatory",PRI="n":"Optional",1:"")_")"
130 I CAT="d" Q "Data Dictonary"
131 Q ""
132 ;
133TEST ;
134 N NUM,PATCH
135 S PATCH=5800
136 D PATCH(PATCH)
137 S NUM=0 F S NUM=$O(^TMP("FSCRPC",$J,"OUTPUT",PATCH,NUM)) Q:NUM<1 W !,^(NUM)
138 Q
Note: See TracBrowser for help on using the repository browser.