source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENEQPMS3.m@ 767

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

initial load of WorldVistAEHR

File size: 2.3 KB
Line 
1ENEQPMS3 ;(WASH ISC)/DH-Sort PMI Worklist ;5.15.97
2 ;;7.0;ENGINEERING;**35,42**;Aug 17, 1993
3SPL0 ; For all entries?
4 N ENX,ENDX,X1,X2
5SPL1 W !,"For all ",$S(ENSRT="E":"ENTRY NUMBERS",ENSRT="I":"LOCAL ID's",ENSRT="L":"LOCATIONS",ENSRT="C":"EQUIPMENT CATEGORIES",ENSRT="S":"SERVICES",1:"??")
6 S %=1,X="" D YN^DICN S:%<0 X="^" Q:%<0 I %<1 W !,"Please enter 'Y'es or 'N'o.",*7 G SPL1
7 I %=1 D Q
8 . S ENSRT("ALL")=1
9 . I ENSRT="L" D
10 .. S ENSRT("LOC","ALL")=1
11 .. S ENSRT("BY")="BWR" F X1="BLDG","WING","ROOM" S ENSRT(X1,"ALL")=""
12 .. I $D(^ENG(6928.3,"D")) S ENSRT("BY")="DBWR",ENSRT("DIV","ALL")=""
13 D @ENSRT
14 I '$D(ENSRT) S X=U Q ;Aborted location select
15 I ENSRT'="L",'($D(ENSRT("FR"))&$D(ENSRT("TO"))) G SPL1
16 Q
17 ;
18E ; Entry numbers
19 S DIC="^ENG(6914,",DIC(0)="AEQ",DIC("A")="Start with EQUIPMENT ENTRY NUMBER: "
20 D ^DIC K DIC("A") Q:$D(DTOUT)!($D(DUOUT))!(Y'>0)
21 S ENSRT("FR")=+Y
22 S DIC("A")="Go to ENTRY NUMBER (must be larger than "_ENSRT("FR")_"): " S DIC("S")="I $P(^(0),U)>ENSRT(""FR"")"
23 D ^DIC K DIC Q:$D(DTOUT)!($D(DUOUT))!(Y'>0)
24 S ENSRT("TO")=+Y
25 Q
26 ;
27I ; Local identifier
28 S DIC="^ENG(6914,",ENDX="L"
29I11 R !,"Start with: ",X:DTIME Q:X="^"!(X="") S:X=" " X="?" G:$E(X)="?" I15
30 S X2=$L(X) I $D(^ENG(6914,"L",X)) S ENSRT("FR")=X G I2
31 I $E($O(^ENG(6914,"L",X)),1,X2)=X D IX^ENLIB1 G:X="" I11 Q:X="^" S ENSRT("FR")=X W " ",ENSRT("FR") G I2
32 S ENX=X,ENIX=0 I X?.N D IX^ENLIB1 Q:X="^" I $E(X,1,X2)=ENX S ENSRT("FR")=X W " ",ENSRT("FR") G I2
33 I 'ENIX W !,"No LOCAL IDENTIFIERS begin with: ",ENX
34 K ENIX
35I15 W !,"Would you like a list of all LOCAL IDENTIFIERS" S %=1 D YN^DICN S:%<0 X="^" Q:%<0 G:%'=1 I11
36 S X="" D IX^ENLIB1 G:X="" I11 Q:X="^" S ENSRT("FR")=X W " ",ENSRT("FR")
37I2 R !,"Go to: ",X:DTIME Q:X="^" I $E(X)="?" W !,"Please enter a character string which follows or equals",!,ENSRT("FR")," This string will be the end point of our search." G I2
38 I ENSRT("FR")]X W !,"This entry precedes ",ENSRT("FR"),".",*7 G I2
39 S ENSRT("TO")=X W !,"OK. Including everything from ",ENSRT("FR")," to ",ENSRT("TO"),"."
40 Q
41 ;
42L ; Location
43 D GEN^ENSPSRT
44 Q
45 ;
46C ; Equipment category
47 S DIC="^ENG(6911,",DIC(0)="AEMQ" D ^DIC Q:Y'>0 S (ENSRT("FR"),ENSRT("TO"))=+Y
48 Q
49 ;
50S ; Owning service
51 S DIC="^DIC(49,",DIC(0)="AEMQ" D ^DIC Q:Y'>0 S (ENSRT("FR"),ENSRT("TO"))=+Y
52 Q
53 ;
54CONT S:$D(ENY) ENY=0 R !!,"<cr> to continue, '^' to abort...",X:DTIME
55 Q
56 ;ENEQPMS3
Note: See TracBrowser for help on using the repository browser.