source: FOIAVistA/tag/r/ENGINEERING-EN/ENETRAN.m@ 1590

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

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1ENETRAN ;(WASH ISC)/DH-Assign Electronic Work Orders ;1.30.97
2 ;;7.0;ENGINEERING;**35**;Aug 17, 1993
3EN N IOINLOW,IOINHI D ZIS^ENUTL
4 S %DT="XT",X="N" D ^%DT X ^DD("DD") S ENDATE=Y
5 I $D(ENSHKEY),ENSHKEY'>0 K ENSHKEY
6 I $D(ENSHKEY),ENSHKEY#100>89 D GATH2 G EXIT
7 S:$D(ENSHKEY) ENOLKEY=ENSHKEY K ENSHKEY I $D(^DIC(6910,1,0)),$P(^(0),U,6)]"" S ENSHKEY=$P(^(0),U,6)
8 E S DIC="^DIC(6922,",DIC(0)="AEQ",DIC("S")="I Y#100>89" D ^DIC K DIC("S") G:Y'>0 EXIT S ENSHKEY=+Y
9 I $D(ENSHKEY) D GATH2 G EXIT
10GATH1 ;
11 S ENSHKEY=89 F S ENSHKEY=$O(^DIC(6922,ENSHKEY)) Q:ENSHKEY'>0 D:ENSHKEY#100>89 GATH2
12 G EXIT
13GATH2 ;Procss fict shop
14 K ^TMP($J) S ENCNT=0
15 S ENSHOP=$P(^DIC(6922,ENSHKEY,0),U,1)
16 ; get work orders from incomplete work order x-ref ("AINC")
17 S ENDX=0
18 F S ENDX=$O(^ENG(6920,"AINC",ENSHKEY,ENDX)) Q:ENDX'>0 D
19 . S DA=9999999999-ENDX
20 . Q:'$D(^ENG(6920,DA,0)) ; missing 0 node
21 . Q:$P($G(^ENG(6920,DA,5)),U,2)]"" ; closed out
22 . L +^ENG(6920,DA):1 I '$T Q ; being edited
23 . ; OK to add on list
24 . L -^ENG(6920,DA)
25 . S ENCNT=ENCNT+1,^TMP($J,DA)="" W:'(ENCNT#10) "."
26DONE D ^ENETRAN1
27 Q
28 ;
29EXIT K ^TMP($J),ENSHOP,ENDA,ENDATE,ENCNT,ENL,ENWO,ENEWO,ENSHKEY,ENDSTAT,ENLOC,ENDX
30 K EN,ENPG,ENY,ENTO,ENFR,ENDA,ENPRI,ENMAN,ENCAT,ENEX,ENEX1,ENEX2,ENEX3,ENEX4,ENERN,ENRDT,ENBY,ENDATE,ENNX,ENEWKEY,ENSABR,ENTRAN,ENCODEN,ENCODE,ENCODEI
31 K I,J,K,X,DIC,DIE,DA,DR,DIWL,DIWR,DIWF
32 I $D(ENOLKEY) S ENSHKEY=ENOLKEY K ENOLKEY
33 S:$D(ZTQUEUED) ZTREQ="@"
34 Q
35HLD S X="" W !,"Press RETURN to continue, '^' to escape..." R X:DTIME
36 Q
37 ;ENETRAN
Note: See TracBrowser for help on using the repository browser.