source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENWOME1.m@ 1739

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

initial load of WorldVistAEHR

File size: 2.3 KB
Line 
1ENWOME1 ;(WASH ISC)/SAB-WORK ORDER MULTIPLE ENTRY, EQUIPMENT LIST; 2-6-95
2 ;;7.0;ENGINEERING;**35**;Aug 17, 1993
3LST ;
4 ; Input Variables
5 ; ENWODA = ien of master work order
6 ; ENEQDA = ien of equipment on master work order
7 ; ^TMP($J,equip ien) selected equipment array
8 ; = "" when wo not yet created by copying master
9 ; = work order ien^work order number
10 ; ENCOPY optional flag
11 ; = 1 to indicate work order copy has been completed
12 S %ZIS="Q" D ^%ZIS Q:POP
13 I $D(IO("Q")) D Q
14 . S ZTRTN="QEN^ENWOME1",ZTDESC="Multiple Work Order Equipment List"
15 . S ZTSAVE("ENCOPY")="",ZTSAVE("ENEQDA")="",ZTSAVE("ENWODA")=""
16 . S ZTSAVE("^TMP($J,")=""
17 . D ^%ZTLOAD,HOME^%ZIS K ZTSK
18QEN ; queued entry
19 U IO
20 S (END,ENPG)=0 S Y=$P(DT,".") D DD^%DT S ENDT=Y
21 S DIC="^ENG(6920,",DA=ENWODA,DR=".01;32",DIQ="ENDIQ",DIQ(0)="E"
22 D EN^DIQ1
23 S ENDASH="",$P(ENDASH,"-",IOM+1)="" D HD
24 S ENI=0 F S ENI=$O(^TMP($J,ENI)) Q:'ENI D D:$Y+4>IOSL HD Q:END
25 . W:$D(ENCOPY) !,$P($G(^TMP($J,ENI)),U,2),?24,ENDIQ(6920,ENWODA,32,"E")
26 . S DIC="^ENG(6914,",DA=ENI,DR=".01;6;1;4",DIQ="ENDIQ",DIQ(0)="E"
27 . D EN^DIQ1
28 . W !,?2,ENDIQ(6914,ENI,.01,"E")
29 . W ?14,$E(ENDIQ(6914,ENI,6,"E"),1,25)
30 . W ?41,$E(ENDIQ(6914,ENI,1,"E"),1,20)
31 . W ?63,$E(ENDIQ(6914,ENI,4,"E"),1,16)
32 . K ENDIQ(6914)
33 I $D(ZTQUEUED) S ZTREQ="Q" K ^TMP($J)
34 K DA,DIC,DIQ,DR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
35 K END,ENDASH,ENDIQ,ENDT,ENI,ENPG
36 D ^%ZISC
37 Q
38HD ; header
39 I $E(IOST,1,2)="C-",ENPG S DIR(0)="E" D ^DIR K DIR I 'Y S END=1 Q
40 I $E(IOST,1,2)="C-"!ENPG W @IOF
41 S ENPG=ENPG+1
42 W "Multiple Work Order Equipment List",?50,ENDT,?70,"page ",ENPG,!
43 W:$G(ENCOPY) !,"Work Order #",?24,"Status"
44 W !,?2,"Control #",?14,"Equipment Category",?41,"Manufacturer"
45 W ?63,"Model"
46 W !,?2,$E(ENDASH,1,10),?14,$E(ENDASH,1,25),?41,$E(ENDASH,1,20)
47 W ?63,$E(ENDASH,1,16)
48 W !,"(Master Equipment Work Order)"
49 W !,ENDIQ(6920,ENWODA,.01,"E"),?24,ENDIQ(6920,ENWODA,32,"E")
50 S DIC="^ENG(6914,",DA=ENEQDA,DR=".01;6;1;4",DIQ="ENDIQ",DIQ(0)="E"
51 D EN^DIQ1
52 W !,?2,ENDIQ(6914,ENEQDA,.01,"E")
53 W ?14,$E(ENDIQ(6914,ENEQDA,6,"E"),1,25)
54 W ?41,$E(ENDIQ(6914,ENEQDA,1,"E"),1,20)
55 W ?63,$E(ENDIQ(6914,ENEQDA,4,"E"),1,16)
56 K ENDIQ(6914)
57 ;W !,$E(ENDASH,1,10),?12,$E(ENDASH,1,25),?39,$E(ENDASH,1,20)
58 ;W ?61,$E(ENDASH,1,18)
59 W !!,"(Equipment "
60 W $S($G(ENCOPY):"Work Orders Copied from Master",1:"Selected"),")"
61 Q
62 ;ENWOME1
Note: See TracBrowser for help on using the repository browser.