source: FOIAVistA/tag/r/ENGINEERING-EN/ENEWOD.m@ 1582

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

initial load of FOIAVistA 6/30/08 version

File size: 2.0 KB
Line 
1ENEWOD ;(WASH ISC)/DH-Display Electronic Work Order ;2.14.97
2 ;;7.0;ENGINEERING;**21,35,38**;Aug 17, 1993
3 ;
4SEL S DIC="^ENG(6920,",DIC(0)="AEQM" D ^DIC S DA=+Y G:DA'>0 EXIT
5 W:$E(IOST,1,2)="C-" @IOF
6 D D F D READ Q:ENX="" D @ENX
7 G SEL
8 ;
9D N X,EN,ENX,ENDSTAT,ENORIG
10 S ENDSTAT=32 F X=1:1:24 S EN(X)=""
11FDAT I $D(^ENG(6920,DA,0))>0 S EN(1)=$P(^(0),U),EN(2)=$P(^(0),U,2),EN(3)=$P(^(0),U,3),EN(4)=$P(^(0),U,4),EN(5)=$P(^(0),U,5) S:$E(EN(1),1,3)="PM-" ENDSTAT=35.2
12 I EN(3)]"" S EN(3)=$$EXTERNAL^DILFD(6920,2,"",EN(3))
13 I EN(4)=+EN(4),$D(^ENG("SP",EN(4),0)) S EN(4)=$P(^(0),U)
14FDAT1 I $D(^ENG(6920,DA,1))>0 S EN(10)=$P(^(1),U),EN(7)=$P(^(1),U,2),EN(8)=$P(^(1),U,3),EN(9)=$P(^(1),U,4)
15 I EN(10)]"",$D(^VA(200,EN(10),0)) S EN(10)=$P(^VA(200,EN(10),0),U)
16 I $D(^ENG(6920,DA,2)) S EN(11)=$P(^(2),U),EN(12)=$P(^(2),U,3) D SSH
17 I EN(12)]"" S EN(12)=$$EXTERNAL^DILFD(6920,17,"",EN(12))
18FDAT3 I $D(^ENG(6920,DA,3)) S EN(21)=$P(^(3),U),EN(16)=$P(^(3),U,2),EN(20)=$P(^(3),U,4),EN(15)=$P(^(3),U,5),EN(18)=$P(^(3),U,6),EN(19)=$P(^(3),U,7),EN(14)=$P(^(3),U,8)
19 S EN(17)=$$GET1^DIQ(6920,DA,21.9)
20 I EN(20)]"",$D(^DIC(49,EN(20),0)) S EN(20)=$P(^(0),U)
21 I $D(^ENG(6920,DA,4)) S EN(13)=$P(^(4),U) I ENDSTAT=32 S EN(6)=$P(^(4),U,3)
22FDAT5 I $D(^ENG(6920,DA,5)) S EN(22)=$P(^(5),U,2),EN(23)=$P(^(5),U,7) I ENDSTAT=35.2 S EN(6)=$P(^(5),U,8)
23 I EN(6)]"" S EN(6)=$$EXTERNAL^DILFD(6920,ENDSTAT,"",EN(6))
24 D ^ENEWOD1
25 I $E(IOST,1,2)="C-" W !! D HOLD^ENEWOD1
26 Q
27 ;
28SSH I $D(^DIC(6922,EN(11),0))>0 S EN(11)=$P(^DIC(6922,EN(11),0),U)
29 Q
30READ ; User interaction
31 D HOME^%ZIS W !,"D(DISPLAY), P(PRINT): EXIT// " R ENX:DTIME Q:ENX=""
32 S ENX=$E(ENX) I ENX'="D",ENX'="P" S ENX=""
33 Q
34 ;
35P ; Print abbreviated work order (electronic format)
36 S %ZIS="Q" D ^%ZIS Q:POP
37 I $D(IO("Q")) D Q
38 . S ZTRTN="PRT1^ENEWOD",ZTDESC="Print Electronic Work Order"
39 . S ZTSAVE("EN*")="",ZTSAVE("DA")=""
40 . D ^%ZTLOAD,HOME^%ZIS K ZTSK
41PRT1 U IO W:$E(IOST,1,2)="C-" @IOF
42 D D
43 W @IOF
44 I $D(ZTQUEUED) S ZTREQ="@"
45 N DA ; to protect DA when W.O. printed to P-MESSAGE
46 D ^%ZISC
47 Q
48 ;
49EXIT ;
50 Q
51 ;ENEWOD
Note: See TracBrowser for help on using the repository browser.