AMHLEGPP ; IHS/CMI/LAB - PRINT ENCOUNTER RECORD ;
;;4.0;IHS BEHAVIORAL HEALTH;;MAY 14, 2010
;
;print individual forms for each member of group
COMP ;EP - do nothing
Q
PRINT ; EP - print individual forms
S AMHQUIT=0
S AMHY=0 F S AMHY=$O(AMHLEGP("RECS ADDED",AMHY)) Q:AMHY'=+AMHY!(AMHQUIT) S AMHR=AMHLEGP("RECS ADDED",AMHY) D PRINT1 Q:AMHQUIT
XIT ;
K AMHY,AMHLEGP,AMHX,AMHR,AMHNRQ
Q
PRINT1 ;
S AMHDOLOG=1
S AMHLEGPF=1
S AMHEFT=AMHEFTH
D ^AMHLEFP2
K AMHLEGPF,AMHDOLOG
W:$D(IOF) @IOF
W:$G(AMHGUI) "ZZZZZZZ",!
Q
TESTGUI ;
K ^TMP($J,"LORI")
S AMHGUI=1
S (AMHLEFT,AMHEFTH)="F" ;WILL BE F, B, S, T, E
;ARRAY OF RECORD IENS AMHLEGP("RECS ADDED",COUNTER)=AMHREC IEN
S AMHLEGP("RECS ADDED",1)=1000
S AMHLEGP("RECS ADDED",2)=2100
D GUIR^XBLM("PRINT^AMHLEGPP","^TMP($J,""LORI"",")
Q
GUI(AMHARRAY,AMHLEGP,AMHLEFT,AMHEFTH) ;EP -- gui entry point
K ^TMP($J,"AMHGROUP")
S AMHARRAY="^TMP($J,""AMHGROUP"")"
S AMHGUI=1
;S (AMHLEFT,AMHEFTH)="F" ;WILL BE F, B, S, T, E
;ARRAY OF RECORD IENS AMHLEGP("RECS ADDED",COUNTER)=AMHREC IEN
;S AMHLEGP("RECS ADDED",1)=1000
;S AMHLEGP("RECS ADDED",2)=2100
D GUIR^XBLM("PRINT^AMHLEGPP","^TMP($J,""AMHGROUP"",")
Q
AMHLEGPP ; IHS/CMI/LAB - PRINT ENCOUNTER RECORD ;
+1 ;;4.0;IHS BEHAVIORAL HEALTH;;MAY 14, 2010
+2 ;
+3 ;print individual forms for each member of group
COMP ;EP - do nothing
+1 QUIT
PRINT ; EP - print individual forms
+1 SET AMHQUIT=0
+2 SET AMHY=0
FOR
SET AMHY=$ORDER(AMHLEGP("RECS ADDED",AMHY))
IF AMHY'=+AMHY!(AMHQUIT)
QUIT
SET AMHR=AMHLEGP("RECS ADDED",AMHY)
DO PRINT1
IF AMHQUIT
QUIT
XIT ;
+1 KILL AMHY,AMHLEGP,AMHX,AMHR,AMHNRQ
+2 QUIT
PRINT1 ;
+1 SET AMHDOLOG=1
+2 SET AMHLEGPF=1
+3 SET AMHEFT=AMHEFTH
+4 DO ^AMHLEFP2
+5 KILL AMHLEGPF,AMHDOLOG
+6 IF $DATA(IOF)
WRITE @IOF
+7 IF $GET(AMHGUI)
WRITE "ZZZZZZZ",!
+8 QUIT
TESTGUI ;
+1 KILL ^TMP($JOB,"LORI")
+2 SET AMHGUI=1
+3 ;WILL BE F, B, S, T, E
SET (AMHLEFT,AMHEFTH)="F"
+4 ;ARRAY OF RECORD IENS AMHLEGP("RECS ADDED",COUNTER)=AMHREC IEN
+5 SET AMHLEGP("RECS ADDED",1)=1000
+6 SET AMHLEGP("RECS ADDED",2)=2100
+7 DO GUIR^XBLM("PRINT^AMHLEGPP","^TMP($J,""LORI"",")
+8 QUIT
GUI(AMHARRAY,AMHLEGP,AMHLEFT,AMHEFTH) ;EP -- gui entry point
+1 KILL ^TMP($JOB,"AMHGROUP")
+2 SET AMHARRAY="^TMP($J,""AMHGROUP"")"
+3 SET AMHGUI=1
+4 ;S (AMHLEFT,AMHEFTH)="F" ;WILL BE F, B, S, T, E
+5 ;ARRAY OF RECORD IENS AMHLEGP("RECS ADDED",COUNTER)=AMHREC IEN
+6 ;S AMHLEGP("RECS ADDED",1)=1000
+7 ;S AMHLEGP("RECS ADDED",2)=2100
+8 DO GUIR^XBLM("PRINT^AMHLEGPP","^TMP($J,""AMHGROUP"",")
+9 QUIT