ENPLSV2 ;WISC/SAB-PROJECT COMMUNICATION SERVER (CONTINUED) ;5/26/94
;;7.0;ENGINEERING;**11**;Aug 17, 1993
A ;
L:$G(ENDA)>0 -^ENG("PROJ",ENDA)
S ENPACT=$P(ENREC,U,2)
S ENPNBR=$P(ENREC,U,3)
S ENPTTL=$P(ENREC,U,4)
; find project entry
S DIC=6925,DIC(0)="X",X=ENPNBR D ^DIC S ENDA=+Y L:Y>0 +^ENG("PROJ",ENDA)
Q
B ;
S ENPDA1=$P(ENREC,U,2)
S ENPTI1=$P(ENREC,U,3)
I ENCTZD'=0 D
. S ENDT=$$FMADD^XLFDT(ENPDA1-17000000_"."_ENPTI1,"",ENCTZD)
. S ENPDA1=$P(ENDT,".",1)+17000000
. S ENPTI1=$P(ENDT,".",2)_$E("000000",1,6-$L($P(ENDT,".",2)))
S ENPDA2=$P(ENREC,U,4)
S ENPTI2=$P(ENREC,U,5)
I ENCTZD'=0 D
. S ENDT=$$FMADD^XLFDT(ENPDA2-17000000_"."_ENPTI2,"",ENCTZD)
. S ENPDA2=$P(ENDT,".",1)+17000000
. S ENPTI2=$P(ENDT,".",2)_$E("000000",1,6-$L($P(ENDT,".",2)))
S ENPSTA=$P(ENREC,U,6)
S ENPREV=$P(ENREC,U,7)
D @(ENRSEG_ENCTYPE_"^ENPLSV3")
Q
C ;
S ENPCOM=$P(ENREC,U,5)
D @(ENRSEG_ENCTYPE)
Q
CATH ;
Q
CCON ;
; update communication log
I ENDA>0 D
.K ENTXT S ENTXT(1)=$E(ENBLANK,1,16)_"because "_ENPCOM
.D POSTCL^ENPLUTL(ENDA,"ENTXT",0) K ENTXT
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=$E(ENBLANK,1,48)_ENPCOM
Q
CNVI ;
; update communication log
I ENDA>0 D
.K ENTXT S ENTXT(1)=$E(ENBLANK,1,16)_ENPCOM
.D POSTCL^ENPLUTL(ENDA,"ENTXT",0) K ENTXT
; update mail message
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENPCOM
Q
CRET ;
; update communication log
I ENDA>0 D
.K ENTXT S ENTXT(1)=$E(ENBLANK,1,16)_ENPCOM
.D POSTCL^ENPLUTL(ENDA,"ENTXT",0) K ENTXT
; update mail message
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=ENPCOM
Q
CDIS ;
I ENDA>0 D
.K ENTXT S ENTXT(1)=$E(ENBLANK,1,16)_ENPCOM
.D POSTCL^ENPLUTL(ENDA,"ENTXT",0) K ENTXT
; update mail message
S ENL=ENL+1,^XMB(3.9,XMZ,2,ENL,0)=$E(ENBLANK,1,13)_ENPCOM
Q
CSUM ;
Q
D ;
D DATH^ENPLSV4
Q
;ENPLSV2
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENPLSV2 1832 printed Oct 16, 2024@17:55:51 Page 2
ENPLSV2 ;WISC/SAB-PROJECT COMMUNICATION SERVER (CONTINUED) ;5/26/94
+1 ;;7.0;ENGINEERING;**11**;Aug 17, 1993
A ;
+1 if $GET(ENDA)>0
LOCK -^ENG("PROJ",ENDA)
+2 SET ENPACT=$PIECE(ENREC,U,2)
+3 SET ENPNBR=$PIECE(ENREC,U,3)
+4 SET ENPTTL=$PIECE(ENREC,U,4)
+5 ; find project entry
+6 SET DIC=6925
SET DIC(0)="X"
SET X=ENPNBR
DO ^DIC
SET ENDA=+Y
if Y>0
LOCK +^ENG("PROJ",ENDA)
+7 QUIT
B ;
+1 SET ENPDA1=$PIECE(ENREC,U,2)
+2 SET ENPTI1=$PIECE(ENREC,U,3)
+3 IF ENCTZD'=0
Begin DoDot:1
+4 SET ENDT=$$FMADD^XLFDT(ENPDA1-17000000_"."_ENPTI1,"",ENCTZD)
+5 SET ENPDA1=$PIECE(ENDT,".",1)+17000000
+6 SET ENPTI1=$PIECE(ENDT,".",2)_$EXTRACT("000000",1,6-$LENGTH($PIECE(ENDT,".",2)))
End DoDot:1
+7 SET ENPDA2=$PIECE(ENREC,U,4)
+8 SET ENPTI2=$PIECE(ENREC,U,5)
+9 IF ENCTZD'=0
Begin DoDot:1
+10 SET ENDT=$$FMADD^XLFDT(ENPDA2-17000000_"."_ENPTI2,"",ENCTZD)
+11 SET ENPDA2=$PIECE(ENDT,".",1)+17000000
+12 SET ENPTI2=$PIECE(ENDT,".",2)_$EXTRACT("000000",1,6-$LENGTH($PIECE(ENDT,".",2)))
End DoDot:1
+13 SET ENPSTA=$PIECE(ENREC,U,6)
+14 SET ENPREV=$PIECE(ENREC,U,7)
+15 DO @(ENRSEG_ENCTYPE_"^ENPLSV3")
+16 QUIT
C ;
+1 SET ENPCOM=$PIECE(ENREC,U,5)
+2 DO @(ENRSEG_ENCTYPE)
+3 QUIT
CATH ;
+1 QUIT
CCON ;
+1 ; update communication log
+2 IF ENDA>0
Begin DoDot:1
+3 KILL ENTXT
SET ENTXT(1)=$EXTRACT(ENBLANK,1,16)_"because "_ENPCOM
+4 DO POSTCL^ENPLUTL(ENDA,"ENTXT",0)
KILL ENTXT
End DoDot:1
+5 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=$EXTRACT(ENBLANK,1,48)_ENPCOM
+6 QUIT
CNVI ;
+1 ; update communication log
+2 IF ENDA>0
Begin DoDot:1
+3 KILL ENTXT
SET ENTXT(1)=$EXTRACT(ENBLANK,1,16)_ENPCOM
+4 DO POSTCL^ENPLUTL(ENDA,"ENTXT",0)
KILL ENTXT
End DoDot:1
+5 ; update mail message
+6 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=ENPCOM
+7 QUIT
CRET ;
+1 ; update communication log
+2 IF ENDA>0
Begin DoDot:1
+3 KILL ENTXT
SET ENTXT(1)=$EXTRACT(ENBLANK,1,16)_ENPCOM
+4 DO POSTCL^ENPLUTL(ENDA,"ENTXT",0)
KILL ENTXT
End DoDot:1
+5 ; update mail message
+6 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=ENPCOM
+7 QUIT
CDIS ;
+1 IF ENDA>0
Begin DoDot:1
+2 KILL ENTXT
SET ENTXT(1)=$EXTRACT(ENBLANK,1,16)_ENPCOM
+3 DO POSTCL^ENPLUTL(ENDA,"ENTXT",0)
KILL ENTXT
End DoDot:1
+4 ; update mail message
+5 SET ENL=ENL+1
SET ^XMB(3.9,XMZ,2,ENL,0)=$EXTRACT(ENBLANK,1,13)_ENPCOM
+6 QUIT
CSUM ;
+1 QUIT
D ;
+1 DO DATH^ENPLSV4
+2 QUIT
+3 ;ENPLSV2