AMHBHTPP ; IHS/CMI/LAB - behavioral health display for GUI ;
;;4.0;IHS BEHAVIORAL HEALTH;;MAY 14, 2010
;
;
;
TEST ;
S TEST(3061010)=""
S TEST(3061020)=""
D TPP(.RETVAL,167,"B",.TEST)
Q
TPP(AMHARRAY,AMHIEN,AMHPREV,AMHREVP) ;EP CALL FROM REMOTE PROC: AMHBH SUICIDE FORM DSP
;
S JOB=$J,AMHGUI=1,XWBWRAP=1
S ZTIO="",ZTQUEUED=1
S AMHARRAY="^XTMP(""AMHTP"","_$J_")"
S AMHTP=AMHIEN,AMHBROW=1
S AMHPREV=$G(AMHPREV)
I '$D(AMHREVP) D
.S X=0 F S X=$O(^AMHPTXP(AMHTP,41,X)) Q:X'=+X S AMHREVP(X)=""
K ^XTMP("AMHTP",JOB)
S ^XTMP("AMHTPRUN",JOB)=""
D ^XBKSET
;S ZTRTN="TSK^AMHBHTPP",ZTIO="",ZTDESC="AMH TP DISPLAY",ZTSAVE("AMH*")="",ZTSAVE("JOB")="",ZTDTH=$H D ^%ZTLOAD
;F I=1:1:60 Q:$G(^XTMP("AMHTPRUN",$J))="DONE" H 1
D TSK
D KILL
Q
;
TSK ;
D ^XBKSET
S ^XTMP("AMHTPRUN",JOB)="START"
D GUIR^XBLM("PRINT^AMHLETPP","^XTMP(""AMHTP"",JOB)")
S ^XTMP("AMHTP",JOB,.5)=$O(^XTMP("AMHTP",JOB,""),-1)+1
S ^XTMP("AMHTPRUN",JOB)="DONE"
Q
;
KILL ;
K AMHCTR,AMHGUI,AMHTP,DIC,JOB,X,Y,ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE,AMHPREV
Q
AMHBHTPP ; IHS/CMI/LAB - behavioral health display for GUI ;
+1 ;;4.0;IHS BEHAVIORAL HEALTH;;MAY 14, 2010
+2 ;
+3 ;
+4 ;
TEST ;
+1 SET TEST(3061010)=""
+2 SET TEST(3061020)=""
+3 DO TPP(.RETVAL,167,"B",.TEST)
+4 QUIT
TPP(AMHARRAY,AMHIEN,AMHPREV,AMHREVP) ;EP CALL FROM REMOTE PROC: AMHBH SUICIDE FORM DSP
+1 ;
+2 SET JOB=$JOB
SET AMHGUI=1
SET XWBWRAP=1
+3 SET ZTIO=""
SET ZTQUEUED=1
+4 SET AMHARRAY="^XTMP(""AMHTP"","_$JOB_")"
+5 SET AMHTP=AMHIEN
SET AMHBROW=1
+6 SET AMHPREV=$GET(AMHPREV)
+7 IF '$DATA(AMHREVP)
Begin DoDot:1
+8 SET X=0
FOR
SET X=$ORDER(^AMHPTXP(AMHTP,41,X))
IF X'=+X
QUIT
SET AMHREVP(X)=""
End DoDot:1
+9 KILL ^XTMP("AMHTP",JOB)
+10 SET ^XTMP("AMHTPRUN",JOB)=""
+11 DO ^XBKSET
+12 ;S ZTRTN="TSK^AMHBHTPP",ZTIO="",ZTDESC="AMH TP DISPLAY",ZTSAVE("AMH*")="",ZTSAVE("JOB")="",ZTDTH=$H D ^%ZTLOAD
+13 ;F I=1:1:60 Q:$G(^XTMP("AMHTPRUN",$J))="DONE" H 1
+14 DO TSK
+15 DO KILL
+16 QUIT
+17 ;
TSK ;
+1 DO ^XBKSET
+2 SET ^XTMP("AMHTPRUN",JOB)="START"
+3 DO GUIR^XBLM("PRINT^AMHLETPP","^XTMP(""AMHTP"",JOB)")
+4 SET ^XTMP("AMHTP",JOB,.5)=$ORDER(^XTMP("AMHTP",JOB,""),-1)+1
+5 SET ^XTMP("AMHTPRUN",JOB)="DONE"
+6 QUIT
+7 ;
KILL ;
+1 KILL AMHCTR,AMHGUI,AMHTP,DIC,JOB,X,Y,ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE,AMHPREV
+2 QUIT