ENEQP1 ;(WASH ISC)/DH-Actual SET in Equipment History Sub-file ;1.14.98
;;7.0;ENGINEERING;**48**;Aug 17, 1993
S ENDTCP=DT,X1="XX"
I ENACTN>0,$P(^ENG(6920.1,ENACTN,0),U,2)]"" S X1=$P(^(0),U,2)
S ENH=ENDTCP_"-"_X1_U_ENREF_U_ENSTAT_U_ENHRS_U_ENLABOR_U_ENMATRL_U_ENVNDR_U_ENEMP_U_ENWORK
I ENTMPLT,NUMBER>0 D Q
. F %=0:0 S %=$O(^DIBT(NUMBER,1,%)) Q:%'>0 D RECORD
. K ENINV,ENDTCP,ENH,X1
F %=0:0 S %=$O(^TMP($J,%)) Q:%'>0 D RECORD
K ENINV,ENDTCP,ENH,X1
Q
;
RECORD ;Get sub-node and SET it
S ENINV=% W !,ENINV
D EXT^ENEQHS
Q
;ENEQP1
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENEQP1 561 printed Nov 22, 2024@17:02:50 Page 2
ENEQP1 ;(WASH ISC)/DH-Actual SET in Equipment History Sub-file ;1.14.98
+1 ;;7.0;ENGINEERING;**48**;Aug 17, 1993
+2 SET ENDTCP=DT
SET X1="XX"
+3 IF ENACTN>0
IF $PIECE(^ENG(6920.1,ENACTN,0),U,2)]""
SET X1=$PIECE(^(0),U,2)
+4 SET ENH=ENDTCP_"-"_X1_U_ENREF_U_ENSTAT_U_ENHRS_U_ENLABOR_U_ENMATRL_U_ENVNDR_U_ENEMP_U_ENWORK
+5 IF ENTMPLT
IF NUMBER>0
Begin DoDot:1
+6 FOR %=0:0
SET %=$ORDER(^DIBT(NUMBER,1,%))
if %'>0
QUIT
DO RECORD
+7 KILL ENINV,ENDTCP,ENH,X1
End DoDot:1
QUIT
+8 FOR %=0:0
SET %=$ORDER(^TMP($JOB,%))
if %'>0
QUIT
DO RECORD
+9 KILL ENINV,ENDTCP,ENH,X1
+10 QUIT
+11 ;
RECORD ;Get sub-node and SET it
+1 SET ENINV=%
WRITE !,ENINV
+2 DO EXT^ENEQHS
+3 QUIT
+4 ;ENEQP1