source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENY2K9.m@ 1150

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

initial load of WorldVistAEHR

File size: 2.4 KB
Line 
1ENY2K9 ;;(WIRMFO)/DH-Equipment Y2K Management ;5.8.98
2 ;;7.0;ENGINEERING;**51**;August 17, 1993
3 ; extension of ENY2K to handle local ids
4LOC1 K ^TMP($J)
5 N STOP
6 R !!,"Please enter the starting LOCAL ID: ",X:DTIME I '$T!($E(X)="^")!(X="") S ESCAPE=1 Q
7 S LOC=X
8 I '$D(^ENG(6914,"L",LOC)) D Q:$G(ESCAPE) G:LOC="" LOC1
9 . S L=$L(LOC),LOC(1)=$O(^ENG(6914,"L",LOC))
10 . I $E(LOC(1),1,L)=LOC S LOC=LOC(1) Q
11 . S LOC="" W "??",*7
12 . S DIR(0)="Y",DIR("A")="Would you like a list of valid LOCAL IDs",DIR("B")="YES"
13 . D ^DIR K DIR Q:'Y
14 . S %ZIS="" D ^%ZIS I POP S ESCAPE=1 Q
15 . S PAGE=0,Y=DT D NOW^%DTC S Y=% X ^DD("DD") S DATE("PRNT")=$P(Y,":",1,2)
16 . D LOCHDR S LOC(2)="" F S LOC(2)=$O(^ENG(6914,"L",LOC(2))) Q:LOC(2)="" W !,?5,$J(LOC(2),15) I (IOSL-$Y)'>2 D HOLD,LOCHDR Q:$G(STOP)
17 W " ("_LOC_")"
18LOC2 W !,"Go thru (or '^' to escape): "_LOC_"// " R END:DTIME I '$T!($E(END)="^") S LOC="" G LOC1
19 I LOC]END W !!,"The ending point may not preceed the starting point." S (LOC,END)="" G LOC1
20 L +^ENG("LOC",LOC):1 I '$T W !,"Another user is editing this LOCAL ID. Can't proceed." S (LOC,END)="" G LOC1
21 F J="PRE","FC","NC","CC","NA" S COUNT(J)=0
22 S (DA,COUNT)=0,LOC(0)=LOC F S DA=$O(^ENG(6914,"L",LOC(0),DA)) Q:'DA D
23 . 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)=""
24 F S LOC(0)=$O(^ENG(6914,"L",LOC(0))) Q:LOC(0)]END!(LOC(0)="") S DA=0 F S DA=$O(^ENG(6914,"L",LOC(0),DA)) Q:'DA D
25 . 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(J)=COUNT(J)+1,^TMP($J,X,DA)=""
26 I 'COUNT W !!,"There are no active equipment records within the selected range." L -^ENG("LOC",LOC) S (LOC,END)="" G LOC1
27 W !!,"There are "_COUNT_" active equipment records within the selected range.",!,"Would you like to proceed?"
28 S DIR(0)="Y",DIR("B")="YES"
29 D ^DIR K DIR I $D(DIRUT) S ESCAPE=1 Q
30 S ENY2K("CONT")=Y I 'ENY2K("CONT") L -^ENG("LOC",LOC) S (LOC,END)="" G LOC1
31 I COUNT("PRE"),'$D(CRITER) D OVERWRT^ENY2K8
32 Q
33 ;
34LOCHDR ; header for list of valid LOCAL IDENTIFIERS
35 W:PAGE>0!($E(IOST,1,2)="C-") @IOF S PAGE=PAGE+1
36 W "LOCAL IDENTIFIERS in Use at this Site "_DATE("PRNT")_" Page: "_PAGE
37 K LOC(3) S $P(LOC(3),"-",79)="-" W !,LOC(3)
38 Q
39 ;
40HOLD Q:$E(IOST,1,2)'="C-"
41 W !,"Press <RETURN> to continue, '^' to escape..." R X:DTIME
42 I '$T!($E(X)="^") S STOP=1
43 Q
44 ;ENY2K9
Note: See TracBrowser for help on using the repository browser.