source: FOIAVistA/trunk/r/ENGINEERING-EN/ENY2K.m@ 1671

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

initial load of FOIAVistA 6/30/08 version

File size: 7.2 KB
Line 
1ENY2K ;;(WIRMFO)/DH-Equipment Y2K Management ;5.18.98
2 ;;7.0;ENGINEERING;**51**;August 17, 1993
3 ;
4 ; This module identifies individual pieces of equipment that may fail
5 ; to operate properly as of January 1, 2000.
6 ; It also provides a means (the Y2K worklist) of tracking the
7 ; necessary corrective actions.
8 ;
9IND ; data entry for manually selected equipment list
10 K ^TMP($J)
11 N DIC,ENY2K,ESCAPE,COUNT
12 S COUNT=0
13 W !!,"First we'll get answers for the Y2K questions, then we'll ask for an",!,"equipment list.",!
14 D DATA^ENY2K1
15 G:$G(ESCAPE) EXIT
16 F J="PRE","FC","NC","CC","NA" S COUNT(J)=0
17 S DIC="^ENG(6914,",DIC(0)="AEQM"
18 F D GETEQ^ENUTL Q:Y'>0 D:$D(^ENG(6914,+Y,0))
19 . Q:$D(^TMP($J,+Y))
20 . I "^4^5^"[(U_$P($G(^ENG(6914,+Y,3)),U)_U) W !,?5,"Sorry, but "_+Y_" is not an active equipment record." Q
21 . S X=$P($G(^ENG(6914,+Y,11)),U) I X]"" S COUNT("PRE")=COUNT("PRE")+1,COUNT(X)=COUNT(X)+1,^TMP($J,X,+Y)=""
22 . S ^TMP($J,+Y)="",COUNT=COUNT+1
23 D:$D(^TMP($J))
24 . W !!,"You have selected "_COUNT_" equipment records for updating."
25 . W !,"Do you wish to proceed?"
26 . S DIR(0)="Y",DIR("B")="YES"
27 . D ^DIR K DIR Q:$D(DIRUT)!('Y)
28 . D:COUNT("PRE") OVERWRT^ENY2K8
29 . D:'$G(ESCAPE) UPDATE^ENY2K1
30 G EXIT
31 ;
32CAT ; data entry by EQUIPMENT CATEGORY
33 N CAT,DIC,DIE,DA,DR,COUNT,ENY2K,ESCAPE
34 F D CAT1 D Q:$G(ESCAPE)
35 . I $G(ESCAPE),$G(CAT)]"" L -^ENG("CAT",CAT)
36 . Q:$G(ESCAPE)
37 . D:$G(ENY2K("CONT")) DATA^ENY2K1
38 . I $G(ESCAPE) L -^ENG("CAT",CAT) Q
39 . D UPDATE^ENY2K1
40 . L -^ENG("CAT",CAT) S CAT="",CAT(0)=""
41 G EXIT
42 ;
43CAT1 K ^TMP($J) W !
44 S DIC="^ENG(6911,",DIC(0)="AEMQ" D ^DIC I Y'>0 S ESCAPE=1 Q
45 S CAT=$P(Y,U,2),CAT(0)=$P(Y,U)
46 L +^ENG("CAT",CAT):1 I '$T W !,"Another user is editing this equipment category. Can't proceed." S CAT="",CAT(0)="" G CAT1
47 F J="PRE","FC","NC","CC","NA" S COUNT(J)=0
48 S (DA,COUNT)=0 F S DA=$O(^ENG(6914,"G",CAT(0),DA)) Q:'DA D
49 . I $D(^ENG(6914,DA,0)),"^4^5^"'[(U_$P($G(^(3)),U)_U) S COUNT=COUNT+1,^TMP($J,DA)="",X=$P($G(^ENG(6914,DA,11)),U) I X]"" S COUNT("PRE")=COUNT("PRE")+1,COUNT(X)=COUNT(X)+1,^TMP($J,X,DA)=""
50 I 'COUNT W !!,"There are no active equipment records in the EQUIPMENT CATEGORY of",!,CAT_"." L -^ENG("CAT",CAT) S CAT="",CAT(0)="" G CAT1
51 W !!,"There are "_COUNT_" active equipment records in the "_CAT,!,"EQUIPMENT CATEGORY. Do you wish to proceed?"
52 S DIR(0)="Y",DIR("B")="YES"
53 D ^DIR K DIR I $D(DIRUT) S ESCAPE=1 Q
54 S ENY2K("CONT")=Y I 'ENY2K("CONT") L -^ENG("CAT",CAT) S CAT="",CAT(0)="" G CAT1
55 I COUNT("PRE"),'$D(CRITER) D OVERWRT^ENY2K8
56 Q
57 ;
58CSN ; data entry by CATEGORY STOCK NUMBER
59 N CSN,DIC,DIE,DA,DR,COUNT,ENY2K,ESCAPE
60 F D CSN1 D Q:$G(ESCAPE)
61 . I $G(ESCAPE),$G(CSN)]"" L -^ENG("CSN",CSN)
62 . Q:$G(ESCAPE)
63 . D:$G(ENY2K("CONT")) DATA^ENY2K1
64 . I $G(ESCAPE) L -^ENG("CSN",CSN) Q
65 . D UPDATE^ENY2K1
66 . L -^ENG("CSN",CSN) S CSN="",CSN(0)=""
67 G EXIT
68 ;
69CSN1 K ^TMP($J) W !
70 S DIC="^ENCSN(6917,",DIC(0)="AEQM" D ^DIC I Y'>0 S ESCAPE=1 Q
71 S CSN=$P(Y,U,2),CSN(0)=$P(Y,U)
72 L +^ENG("CSN",CSN):1 I '$T W !,"Another user is editing this CATEGORY STOCK NUMBER. Can't proceed." S CSN="",CSN(0)="" G CSN1
73 F J="PRE","FC","NC","CC","NA" S COUNT(J)=0
74 S (DA,COUNT)=0 F S DA=$O(^ENG(6914,"J",CSN(0),DA)) Q:'DA D
75 . I $D(^ENG(6914,DA,0)),"^4^5^"'[(U_$P($G(^(3)),U)_U) S COUNT=COUNT+1,^TMP($J,DA)="",X=$P($G(^ENG(6914,DA,11)),U) I X]"" S COUNT("PRE")=COUNT("PRE")+1,COUNT(X)=COUNT(X)+1,^TMP($J,X,DA)=""
76 I 'COUNT W !!,"There are no active equipment records whose CATEGORY STOCK NUMBER is",!,CSN_"." S CSN="",CSN(0)="" G CSN1
77 W !!,"There are "_COUNT_" active equipment records whose CATEGORY STOCK ",!,"NUMBER is "_CSN_". Do you wish to proceed?"
78 S DIR(0)="Y",DIR("B")="YES"
79 D ^DIR K DIR I $D(DIRUT) S ESCAPE=1 Q
80 S ENY2K("CONT")=Y I 'ENY2K("CONT") L -^ENG("CSN",CSN) S CSN="",CSN(0)="" G CSN1
81 I COUNT("PRE"),'$D(CRITER) D OVERWRT^ENY2K8
82 Q
83 ;
84MFG ; data entry by MANUFACTURER (all models)
85 N MFG,DIC,DIE,DA,DR,COUNT,ENY2K,ESCAPE
86 F D MFG1 D Q:$G(ESCAPE)
87 . I $G(ESCAPE),$G(MFG)]"" L -^ENG("MFG",MFG)
88 . Q:$G(ESCAPE)
89 . D:$G(ENY2K("CONT")) DATA^ENY2K1
90 . I $G(ESCAPE) L -^ENG("MFG",MFG) Q
91 . D UPDATE^ENY2K1
92 . L -^ENG("MFG",MFG) S MFG="",MFG(0)=""
93 G EXIT
94 ;
95MFG1 K ^TMP($J)
96 S DIC="^ENG(""MFG"",",DIC(0)="AEMQ" D ^DIC I Y'>0 S ESCAPE=1 Q
97 S MFG=$P(Y,U,2),MFG(0)=$P(Y,U)
98 L +^ENG("MFG",MFG):1 I '$T W !,"Another user is editing this MANUFACTURER. Can't proceed." S MFG="",MFG(0)="" G MFG1
99 F J="PRE","FC","NC","CC","NA" S COUNT(J)=0
100 S (DA,COUNT)=0 F S DA=$O(^ENG(6914,"K",MFG(0),DA)) Q:'DA D
101 . I $D(^ENG(6914,DA,0)),"^4^5^"'[(U_$P($G(^(3)),U)_U) S COUNT=COUNT+1,^TMP($J,DA)="",X=$P($G(^ENG(6914,DA,11)),U) I X]"" S COUNT("PRE")=COUNT("PRE")+1,COUNT(X)=COUNT(X)+1,^TMP($J,X,DA)=""
102 I 'COUNT W !!,"There are no active equipment entries manufactured by "_MFG_"." L -^ENG("MFG",MFG) S MFG="",MFG(0)="" G MFG1
103 W !!,"There are "_COUNT_" equipment entries that were manufactured by",!,MFG_". Do you wish to proceed?"
104 S DIR(0)="Y",DIR("B")="YES"
105 D ^DIR K DIR I $D(DIRUT) S ESCAPE=1 Q
106 S ENY2K("CONT")=Y I 'ENY2K("CONT") L -^ENG("MFG",MFG) S MFG="",MFG(0)="" G MFG1
107 I COUNT("PRE"),'$D(CRITER) D OVERWRT^ENY2K8
108 Q
109 ;
110LOC ; data entry by LOCAL ID
111 N LOC,DIC,DIE,DA,DR,COUNT,ENY2K,ESCAPE,PAGE,DATE
112 F D LOC1^ENY2K9 D Q:$G(ESCAPE)
113 . I $G(ESCAPE),$G(LOC)]"" L -^ENG("LOC",LOC)
114 . Q:$G(ESCAPE)
115 . D:$G(ENY2K("CONT")) DATA^ENY2K1
116 . I $G(ESCAPE) L -^ENG("LOC",LOC) Q
117 . D UPDATE^ENY2K1
118 . L -^ENG("LOC",LOC) S LOC="",LOC(0)="",END=""
119 G EXIT
120 ;
121MOD ; data entry by MANUFACTURER and MODEL
122 N MFG,MOD,DIC,DIE,DA,DR,COUNT,ENY2K,ESCAPE,ENDX
123 F D MOD1 D Q:$G(ESCAPE)
124 . I $G(ESCAPE),$G(MFG)]"" L -^ENG("MFG","MOD",MFG,MOD)
125 . Q:$G(ESCAPE)
126 . D:$G(ENY2K("CONT")) DATA^ENY2K1
127 . I $G(ESCAPE) L -^ENG("MFG","MOD",MFG,MOD)
128 . D UPDATE^ENY2K1
129 . L -^ENG("MFG","MOD",MFG,MOD) S (MFG,MOD)="",MFG(0)=""
130 G EXIT
131 ;
132MOD1 K ^TMP($J) W !
133 S DIC="^ENG(""MFG"",",DIC(0)="AEQM" D ^DIC I Y'>0 S ESCAPE=1 Q
134 S MFG=$P(Y,U,2),MFG(0)=$P(Y,U)
135 I '$O(^ENG(6914,"K",MFG(0),0)) W !!,"There are no active equipment records for devices made by",!,MFG_"." S MFG="",MFG(0)="" G MOD1
136MOD2 R !,"Please enter the MODEL (as recorded in Equipment File): ",X:DTIME I '$T!($E(X)="^")!(X="") S ESCAPE=1,MFG="",MFG(0)="" Q
137 I $E(X)="?" W !,"Enter a valid MODEL number (ex: "_$O(^ENG(6914,"E","M"))_")." G MOD2
138 I '$D(^ENG(6914,"E",X)) D I X="" W "??",*7 G MOD2
139 . S DIC="^ENG(6914,",ENDX="E"
140 . D IX^ENLIB1
141 S MOD=X
142 L +^ENG("MFG","MOD",MFG,MOD):1 I '$T W !,"Another user is editing this MANUFACTURER~MODEL. Can't proceed." S (MFG,MOD)="",MFG(0)="" G MOD1
143 F J="PRE","FC","NC","CC","NA" S COUNT(J)=0
144 S (DA,COUNT)=0 F S DA=$O(^ENG(6914,"E",MOD,DA)) Q:'DA D
145 . I $D(^ENG(6914,DA,0)),$P($G(^(1)),U,4)=MFG(0),"^4^5^"'[(U_$P($G(^(3)),U)_U) S COUNT=COUNT+1,^TMP($J,DA)="",X=$P($G(^ENG(6914,DA,11)),U) I X]"" S COUNT("PRE")=COUNT("PRE")+1,COUNT(X)=COUNT(X)+1,^TMP($J,X,DA)=""
146 I 'COUNT W !!,"There are no active equipment records for which MANUFACTURER and MODEL are",!,MFG_" and "_MOD_", respectively." L -^ENG("MFG","MOD",MFG,MOD) S (MFG,MOD)="",MFG(0)="" G MOD1
147 W !!,"There are "_COUNT_" active equipment records that meet your search criteria.",!,"Do you wish to proceed?"
148 S DIR(0)="Y",DIR("B")="YES"
149 D ^DIR K DIR I $D(DIRUT) S ESCAPE=1 Q
150 S ENY2K("CONT")=Y I 'ENY2K("CONT") L -^ENG("MFG","MOD",MFG,MOD) S (MFG,MOD)="",MFG(0)="" G MOD1
151 I COUNT("PRE"),'$D(CRITER) D OVERWRT^ENY2K8
152 Q
153 ;
154EXIT K ^TMP($J)
155 Q
156 ;ENY2K
Note: See TracBrowser for help on using the repository browser.