source: FOIAVistA/tag/r/ENGINEERING-EN/ENWOCOMP.m@ 719

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

initial load of FOIAVistA 6/30/08 version

File size: 1007 bytes
Line 
1ENWOCOMP ;(WIRMFO)/DLM/JED/DH-TEST FOR COMPLETED WORK ORDER ;5/11/1998
2 ;;7.0;ENGINEERING;**35,53**;Aug 17, 1993
3 ; Called by x-refs in File 6920 and by various engineering work
4 ; order routines.
5 ; Expects DA as IEN to File 6920.
6 ; Principal tasks are to maintain incomplete work order list and
7 ; to call for posting of equipment repair history.
8TEST ;Is work order complete?
9 Q:$D(^ENG(6920,DA,0))=0
10 N ENDCOMP,ENINV,ENSH,ENTEC
11 S ENSH=$P($G(^ENG(6920,DA,2)),U)
12 S ENTEC=$P($G(^ENG(6920,DA,2)),U,2)
13 S ENDCOMP=$P($G(^ENG(6920,DA,5)),U,2)
14 I ENDCOMP]"" G COMP
15 ;
16UNCOMP ;Work order is incomplete
17 S:ENSH]"" ^ENG(6920,"AINC",ENSH,9999999999-DA)=""
18 Q
19COMP ;Work order is complete
20 K:ENSH]"" ^ENG(6920,"AINC",ENSH,9999999999-DA)
21 I '$D(DIU(0)) S ENINV=$P($G(^ENG(6920,DA,3)),U,8) D:ENINV]"" W^ENEQHS
22 Q
23 ;
24DEL ;Remove from INCOMPLETE WORK ORDER list
25 ;Expects DA
26 Q:'$D(DA)
27 N ENSHKEY
28 S ENSHKEY=$P($G(^ENG(6920,DA,2)),U)
29 Q:ENSHKEY=""
30 K ^ENG(6920,"AINC",ENSHKEY,9999999999-DA)
31 Q
32 ;
33 ;ENWOCOMP
Note: See TracBrowser for help on using the repository browser.