Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ENWOCOMP

ENWOCOMP.m

Go to the documentation of this file.
  1. ENWOCOMP ;(WIRMFO)/DLM/JED/DH-TEST FOR COMPLETED WORK ORDER ;5/11/1998
  1. ;;7.0;ENGINEERING;**35,53**;Aug 17, 1993
  1. ; Called by x-refs in File 6920 and by various engineering work
  1. ; order routines.
  1. ; Expects DA as IEN to File 6920.
  1. ; Principal tasks are to maintain incomplete work order list and
  1. ; to call for posting of equipment repair history.
  1. TEST ;Is work order complete?
  1. Q:$D(^ENG(6920,DA,0))=0
  1. N ENDCOMP,ENINV,ENSH,ENTEC
  1. S ENSH=$P($G(^ENG(6920,DA,2)),U)
  1. S ENTEC=$P($G(^ENG(6920,DA,2)),U,2)
  1. S ENDCOMP=$P($G(^ENG(6920,DA,5)),U,2)
  1. I ENDCOMP]"" G COMP
  1. ;
  1. UNCOMP ;Work order is incomplete
  1. S:ENSH]"" ^ENG(6920,"AINC",ENSH,9999999999-DA)=""
  1. Q
  1. COMP ;Work order is complete
  1. K:ENSH]"" ^ENG(6920,"AINC",ENSH,9999999999-DA)
  1. I '$D(DIU(0)) S ENINV=$P($G(^ENG(6920,DA,3)),U,8) D:ENINV]"" W^ENEQHS
  1. Q
  1. ;
  1. DEL ;Remove from INCOMPLETE WORK ORDER list
  1. ;Expects DA
  1. Q:'$D(DA)
  1. N ENSHKEY
  1. S ENSHKEY=$P($G(^ENG(6920,DA,2)),U)
  1. Q:ENSHKEY=""
  1. K ^ENG(6920,"AINC",ENSHKEY,9999999999-DA)
  1. Q
  1. ;
  1. ;ENWOCOMP