YSASBUL ;692/DCL-SEND BULLETIN VIA E-MAIL ON ASI TO SIGN ;1/23/97 11:37
;;5.01;MENTAL HEALTH;**24**;Dec 30, 1994
Q
;
BUL(YSASIEN,YSAST,YSASI) ;Send e-mail from transcriber to interviewer that ASI is ready for signature
Q:$G(YSASIEN)'>0
Q:$G(YSAST)'>0
Q:$G(YSASI)'>0
N XMSUB,XMTEXT,XMY,XMDUZ,YSASL,YSASTE,YSASPE,YSASDUZE
S YSASDUZE=$P(^VA(200,DUZ,0),"^")
S XMY(DUZ)=""
S XMY(YSAST)=""
S XMY(YSASI)=""
N DUZ
S (DUZ,XMDUZ)=.5,XMSUB="ASI FOR "_$$F(.02)_" IS READY FOR REVIEW AND SIGNATURE"
S XMTEXT="^TMP($J,""YSASBUL"","
K ^TMP($J,"YSASBUL")
;names in external format
S YSASPE=$$F(.02),YSASTE=$$F(.14)
S ^TMP($J,"YSASBUL",$$L)="To: "_$$F(.09)
S ^TMP($J,"YSASBUL",$$L)=" "
S ^TMP($J,"YSASBUL",$$L)=$$F(.04)_" ASI, on "_$$F(.05)_", for "_$E($P(YSASPE,",",2))_". "_$P(YSASPE,",")_" has been completed, by "_$E($P(YSASTE,",",2))_". "_$P(YSASTE,",")_","
S ^TMP($J,"YSASBUL",$$L)="and is ready for your review and electronic signature."
S ^TMP($J,"YSASBUL",$$L)=" "
S ^TMP($J,"YSASBUL",$$L)=" "
S ^TMP($J,"YSASBUL",$$L)=" "
S ^TMP($J,"YSASBUL",$$L)="cc: "_YSASTE
S:YSASTE'=YSASDUZE ^TMP($J,"YSASBUL",$$L)="cc: "_YSASDUZE
D ^XMD
K ^TMP($J,"YSASBUL")
Q
;
L() ;Line counter
S YSASL=$G(YSASL)+1
Q YSASL
;
F(YSASF) ;Return value of field
N DIERR
Q $$GET1^DIQ(604,YSASIEN_",",YSASF)
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HYSASBUL 1343 printed Oct 16, 2024@18:13:42 Page 2
YSASBUL ;692/DCL-SEND BULLETIN VIA E-MAIL ON ASI TO SIGN ;1/23/97 11:37
+1 ;;5.01;MENTAL HEALTH;**24**;Dec 30, 1994
+2 QUIT
+3 ;
BUL(YSASIEN,YSAST,YSASI) ;Send e-mail from transcriber to interviewer that ASI is ready for signature
+1 if $GET(YSASIEN)'>0
QUIT
+2 if $GET(YSAST)'>0
QUIT
+3 if $GET(YSASI)'>0
QUIT
+4 NEW XMSUB,XMTEXT,XMY,XMDUZ,YSASL,YSASTE,YSASPE,YSASDUZE
+5 SET YSASDUZE=$PIECE(^VA(200,DUZ,0),"^")
+6 SET XMY(DUZ)=""
+7 SET XMY(YSAST)=""
+8 SET XMY(YSASI)=""
+9 NEW DUZ
+10 SET (DUZ,XMDUZ)=.5
SET XMSUB="ASI FOR "_$$F(.02)_" IS READY FOR REVIEW AND SIGNATURE"
+11 SET XMTEXT="^TMP($J,""YSASBUL"","
+12 KILL ^TMP($JOB,"YSASBUL")
+13 ;names in external format
+14 SET YSASPE=$$F(.02)
SET YSASTE=$$F(.14)
+15 SET ^TMP($JOB,"YSASBUL",$$L)="To: "_$$F(.09)
+16 SET ^TMP($JOB,"YSASBUL",$$L)=" "
+17 SET ^TMP($JOB,"YSASBUL",$$L)=$$F(.04)_" ASI, on "_$$F(.05)_", for "_$EXTRACT($PIECE(YSASPE,",",2))_". "_$PIECE(YSASPE,",")_" has been completed, by "_$EXTRACT($PIECE(YSASTE,",",2))_". "_$PIECE(YSASTE,",")_","
+18 SET ^TMP($JOB,"YSASBUL",$$L)="and is ready for your review and electronic signature."
+19 SET ^TMP($JOB,"YSASBUL",$$L)=" "
+20 SET ^TMP($JOB,"YSASBUL",$$L)=" "
+21 SET ^TMP($JOB,"YSASBUL",$$L)=" "
+22 SET ^TMP($JOB,"YSASBUL",$$L)="cc: "_YSASTE
+23 if YSASTE'=YSASDUZE
SET ^TMP($JOB,"YSASBUL",$$L)="cc: "_YSASDUZE
+24 DO ^XMD
+25 KILL ^TMP($JOB,"YSASBUL")
+26 QUIT
+27 ;
L() ;Line counter
+1 SET YSASL=$GET(YSASL)+1
+2 QUIT YSASL
+3 ;
F(YSASF) ;Return value of field
+1 NEW DIERR
+2 QUIT $$GET1^DIQ(604,YSASIEN_",",YSASF)