PXRMXBSY ; SLC/PJH,PKR - Let the user know the computer is busy. ;02/11/2009
;;2.0;CLINICAL REMINDERS;**4,12**;Feb 04, 2005;Build 73
;
;=======================================================
ERROR ;Print Error message
I $D(^XTMP(PXRMXTMP,"ERROR"))>0 D
. W !!,"WARNING - REMINDER EVALUATION ERRORS; RESULTS MAY BE INCORRECT!"
. N ERRNAME S ERRNAME=""
. F S ERRNAME=$O(^XTMP(PXRMXTMP,"ERROR",ERRNAME)) Q:ERRNAME="" D
.. W !,"Reminder: "_ERRNAME_" had a total of "_$G(^XTMP(PXRMXTMP,"ERROR",ERRNAME))_" evaluation errors."
;
;Print Could not be determine message
I $D(^XTMP(PXRMXTMP,"CNBD"))>0 D
. W !!,"WARNING - REMINDER STATUS COULD NOT BE DETERMINED; RESULTS MAY BE INCORRECT!"
. N ERRNAME S ERRNAME=""
. F S ERRNAME=$O(^XTMP(PXRMXTMP,"CNBD",ERRNAME)) Q:ERRNAME="" D
.. W !,"Reminder: "_ERRNAME_" had a total of "_$G(^XTMP(PXRMXTMP,"CNBD",ERRNAME))_" CNBD errors."
Q
;
;=======================================================
NOTIFY(TEXT,SPINCNT) ;
I '$D(ZTQUEUED) D SPIN(TEXT,.SPINCNT)
I $D(ZTQUEUED) D TASKMSG(TEXT,SPINCNT)
Q
;
;=======================================================
SPIN(TEXT,SPINCNT) ;Move the spinner.
N QUAD
I SPINCNT=0 W !!,TEXT," "
S SPINCNT=SPINCNT+1
S QUAD=SPINCNT#8
I QUAD=1 W @IOBS,"|"
I QUAD=3 W @IOBS,"/"
I QUAD=5 W @IOBS,"-"
I QUAD=7 W @IOBS,"\"
Q
;
;=======================================================
TASKMSG(TEXT,SPINCNT) ;
I SPINCNT=0 S ZTSTOP=$$S^%ZTLOAD(TEXT)
Q
;
PXRMXBSY ; SLC/PJH,PKR - Let the user know the computer is busy. ;02/11/2009
+1 ;;2.0;CLINICAL REMINDERS;**4,12**;Feb 04, 2005;Build 73
+2 ;
+3 ;=======================================================
ERROR ;Print Error message
+1 IF $DATA(^XTMP(PXRMXTMP,"ERROR"))>0
Begin DoDot:1
+2 WRITE !!,"WARNING - REMINDER EVALUATION ERRORS; RESULTS MAY BE INCORRECT!"
+3 NEW ERRNAME
SET ERRNAME=""
+4 FOR
SET ERRNAME=$ORDER(^XTMP(PXRMXTMP,"ERROR",ERRNAME))
IF ERRNAME=""
QUIT
Begin DoDot:2
+5 WRITE !,"Reminder: "_ERRNAME_" had a total of "_$GET(^XTMP(PXRMXTMP,"ERROR",ERRNAME))_" evaluation errors."
End DoDot:2
End DoDot:1
+6 ;
+7 ;Print Could not be determine message
+8 IF $DATA(^XTMP(PXRMXTMP,"CNBD"))>0
Begin DoDot:1
+9 WRITE !!,"WARNING - REMINDER STATUS COULD NOT BE DETERMINED; RESULTS MAY BE INCORRECT!"
+10 NEW ERRNAME
SET ERRNAME=""
+11 FOR
SET ERRNAME=$ORDER(^XTMP(PXRMXTMP,"CNBD",ERRNAME))
IF ERRNAME=""
QUIT
Begin DoDot:2
+12 WRITE !,"Reminder: "_ERRNAME_" had a total of "_$GET(^XTMP(PXRMXTMP,"CNBD",ERRNAME))_" CNBD errors."
End DoDot:2
End DoDot:1
+13 QUIT
+14 ;
+15 ;=======================================================
NOTIFY(TEXT,SPINCNT) ;
+1 IF '$DATA(ZTQUEUED)
DO SPIN(TEXT,.SPINCNT)
+2 IF $DATA(ZTQUEUED)
DO TASKMSG(TEXT,SPINCNT)
+3 QUIT
+4 ;
+5 ;=======================================================
SPIN(TEXT,SPINCNT) ;Move the spinner.
+1 NEW QUAD
+2 IF SPINCNT=0
WRITE !!,TEXT," "
+3 SET SPINCNT=SPINCNT+1
+4 SET QUAD=SPINCNT#8
+5 IF QUAD=1
WRITE @IOBS,"|"
+6 IF QUAD=3
WRITE @IOBS,"/"
+7 IF QUAD=5
WRITE @IOBS,"-"
+8 IF QUAD=7
WRITE @IOBS,"\"
+9 QUIT
+10 ;
+11 ;=======================================================
TASKMSG(TEXT,SPINCNT) ;
+1 IF SPINCNT=0
SET ZTSTOP=$$S^%ZTLOAD(TEXT)
+2 QUIT
+3 ;