KMPDECH ; OAK/RAK - CM Tools Echo ;4/6/06 08:40
;;3.0;KMPD;;Jan 22, 2009;Build 42
;
ECHO ;-entry point
;
N DATA,I,ID,SITE,SITENM,TEXT,TRANSTO,XMDUZ,XMSUB,XMTEXT,XMY
;
; get id from subject
S ID=$P($G(XQSUB),"~",2)
; scheduled downtime start and stop times
S DATA=$P($G(^KMPD(8973,1,5)),U,1,2)
; site info
S SITE=$$SITE^VASITE Q:SITE=""
S SITENM=$P(SITE,U,2)
S XMDUZ="ECHO BACK FROM "_SITENM
S XMSUB="CP ECHO~"_ID_"~"_$P(SITE,U,2)_" ("_$P(SITE,U,3)_")~"
D TRANSTO^KMPDUTL7(1,5,.TRANSTO) Q:'$D(TRANSTO)
S I=""
F S I=$O(TRANSTO(I)) Q:I="" S XMY(I)=""
S TEXT(1)="START="_$P(DATA,U)
S TEXT(2)="STOP="_$P(DATA,U,2)
S XMTEXT="TEXT("
D ^XMD
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HKMPDECH 684 printed Dec 13, 2024@01:40:31 Page 2
KMPDECH ; OAK/RAK - CM Tools Echo ;4/6/06 08:40
+1 ;;3.0;KMPD;;Jan 22, 2009;Build 42
+2 ;
ECHO ;-entry point
+1 ;
+2 NEW DATA,I,ID,SITE,SITENM,TEXT,TRANSTO,XMDUZ,XMSUB,XMTEXT,XMY
+3 ;
+4 ; get id from subject
+5 SET ID=$PIECE($GET(XQSUB),"~",2)
+6 ; scheduled downtime start and stop times
+7 SET DATA=$PIECE($GET(^KMPD(8973,1,5)),U,1,2)
+8 ; site info
+9 SET SITE=$$SITE^VASITE
if SITE=""
QUIT
+10 SET SITENM=$PIECE(SITE,U,2)
+11 SET XMDUZ="ECHO BACK FROM "_SITENM
+12 SET XMSUB="CP ECHO~"_ID_"~"_$PIECE(SITE,U,2)_" ("_$PIECE(SITE,U,3)_")~"
+13 DO TRANSTO^KMPDUTL7(1,5,.TRANSTO)
if '$DATA(TRANSTO)
QUIT
+14 SET I=""
+15 FOR
SET I=$ORDER(TRANSTO(I))
if I=""
QUIT
SET XMY(I)=""
+16 SET TEXT(1)="START="_$PIECE(DATA,U)
+17 SET TEXT(2)="STOP="_$PIECE(DATA,U,2)
+18 SET XMTEXT="TEXT("
+19 DO ^XMD
+20 QUIT