AFJXMBOX ;FO-OAKLAND/GMB-SEARCH for PREVIOUSLY COMPLETED NETWORK HEALTH EX's ;03/17/2003 07:46
;;5.1;Network Health Exchange;**2,11,34**;Jan 23, 1996
; Totally rewritten 3/2003. (Previously FJ/CWS.)
; Called from ^AFJXWCP1 & ^AFJXWCPM
ENTER ;
N AXNHEDUZ,AXABORT
S AXABORT=0
S AXNHEDUZ=$$FIND1^DIC(200,"","X","NETWORK,HEALTH EXCHANGE","B")
F D Q:AXABORT
. N DIR,X,Y,AXLIST,AXCNT
. W @IOF
. S DIR(0)="SO^Y:Your Own;A:All"
. S DIR("A")="Select the requests to list"
. S DIR("B")="Your Own"
. D ^DIR I $D(DIRUT) S AXABORT=1 Q
. D LIST^AFJXMABX(AXNHEDUZ,Y,.AXLIST,.AXCNT) Q:'AXCNT
. D CHOOSE(.AXLIST,AXCNT)
Q
CHOOSE(AXLIST,AXCNT) ;
N DIR,X,Y,AXWHICH
W !
S DIR(0)="LCO^1:"_AXCNT
S DIR("A")="Select the reports you'd like to print"
D ^DIR Q:$D(DIRUT)
S AXWHICH=Y
N AXSAVE,I,ZTSK
W !
F I="AXLIST(","AXWHICH" S AXSAVE(I)=""
D EN^XUTMDEVQ("PRINT^AFJXMBOX","AFJX Print Completed NHE Results",.AXSAVE,,1)
Q:'$D(ZTSK)
W !,"Print queued. Task number: ",ZTSK
D WAIT^XMXUTIL
Q
PRINT ;
N AXI,AXRANGE,AXJ,AXMZ,AXPAGE,AXABORT
S AXABORT=0
F AXI=1:1:$L(AXWHICH,",")-1 D Q:AXABORT
. S AXRANGE=$P(AXWHICH,",",AXI)
. F AXJ=$P(AXRANGE,"-",1):1:$S(AXRANGE["-":$P(AXRANGE,"-",2),1:AXRANGE) D Q:AXABORT
. . D REPORT(AXLIST(AXJ),.AXPAGE,.AXABORT)
Q
REPORT(AXMZ,AXPAGE,AXABORT) ;
N AXI,AXTXT
S (AXI,AXPAGE)=0,AXI=3
D PHDR^AFJXMABX(AXMZ,.AXPAGE)
F S AXI=$O(^XMB(3.9,AXMZ,2,AXI)) Q:'AXI S AXTXT=$G(^(AXI,0)) D Q:AXABORT
. I $Y+3+($E(IOST,1,2)="C-")>IOSL D Q:AXABORT
. . I $E(IOST,1,2)="C-" W ! D PAGE^XMXUTIL(.AXABORT) Q:AXABORT
. . D PHDR^AFJXMABX(AXMZ,.AXPAGE)
. W !,AXTXT
I 'AXABORT,$E(IOST,1,2)="C-" D PAGE^XMXUTIL(.AXABORT)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HAFJXMBOX 1709 printed Nov 22, 2024@17:27:50 Page 2
AFJXMBOX ;FO-OAKLAND/GMB-SEARCH for PREVIOUSLY COMPLETED NETWORK HEALTH EX's ;03/17/2003 07:46
+1 ;;5.1;Network Health Exchange;**2,11,34**;Jan 23, 1996
+2 ; Totally rewritten 3/2003. (Previously FJ/CWS.)
+3 ; Called from ^AFJXWCP1 & ^AFJXWCPM
ENTER ;
+1 NEW AXNHEDUZ,AXABORT
+2 SET AXABORT=0
+3 SET AXNHEDUZ=$$FIND1^DIC(200,"","X","NETWORK,HEALTH EXCHANGE","B")
+4 FOR
Begin DoDot:1
+5 NEW DIR,X,Y,AXLIST,AXCNT
+6 WRITE @IOF
+7 SET DIR(0)="SO^Y:Your Own;A:All"
+8 SET DIR("A")="Select the requests to list"
+9 SET DIR("B")="Your Own"
+10 DO ^DIR
IF $DATA(DIRUT)
SET AXABORT=1
QUIT
+11 DO LIST^AFJXMABX(AXNHEDUZ,Y,.AXLIST,.AXCNT)
if 'AXCNT
QUIT
+12 DO CHOOSE(.AXLIST,AXCNT)
End DoDot:1
if AXABORT
QUIT
+13 QUIT
CHOOSE(AXLIST,AXCNT) ;
+1 NEW DIR,X,Y,AXWHICH
+2 WRITE !
+3 SET DIR(0)="LCO^1:"_AXCNT
+4 SET DIR("A")="Select the reports you'd like to print"
+5 DO ^DIR
if $DATA(DIRUT)
QUIT
+6 SET AXWHICH=Y
+7 NEW AXSAVE,I,ZTSK
+8 WRITE !
+9 FOR I="AXLIST(","AXWHICH"
SET AXSAVE(I)=""
+10 DO EN^XUTMDEVQ("PRINT^AFJXMBOX","AFJX Print Completed NHE Results",.AXSAVE,,1)
+11 if '$DATA(ZTSK)
QUIT
+12 WRITE !,"Print queued. Task number: ",ZTSK
+13 DO WAIT^XMXUTIL
+14 QUIT
PRINT ;
+1 NEW AXI,AXRANGE,AXJ,AXMZ,AXPAGE,AXABORT
+2 SET AXABORT=0
+3 FOR AXI=1:1:$LENGTH(AXWHICH,",")-1
Begin DoDot:1
+4 SET AXRANGE=$PIECE(AXWHICH,",",AXI)
+5 FOR AXJ=$PIECE(AXRANGE,"-",1):1:$SELECT(AXRANGE["-":$PIECE(AXRANGE,"-",2),1:AXRANGE)
Begin DoDot:2
+6 DO REPORT(AXLIST(AXJ),.AXPAGE,.AXABORT)
End DoDot:2
if AXABORT
QUIT
End DoDot:1
if AXABORT
QUIT
+7 QUIT
REPORT(AXMZ,AXPAGE,AXABORT) ;
+1 NEW AXI,AXTXT
+2 SET (AXI,AXPAGE)=0
SET AXI=3
+3 DO PHDR^AFJXMABX(AXMZ,.AXPAGE)
+4 FOR
SET AXI=$ORDER(^XMB(3.9,AXMZ,2,AXI))
if 'AXI
QUIT
SET AXTXT=$GET(^(AXI,0))
Begin DoDot:1
+5 IF $Y+3+($EXTRACT(IOST,1,2)="C-")>IOSL
Begin DoDot:2
+6 IF $EXTRACT(IOST,1,2)="C-"
WRITE !
DO PAGE^XMXUTIL(.AXABORT)
if AXABORT
QUIT
+7 DO PHDR^AFJXMABX(AXMZ,.AXPAGE)
End DoDot:2
if AXABORT
QUIT
+8 WRITE !,AXTXT
End DoDot:1
if AXABORT
QUIT
+9 IF 'AXABORT
IF $EXTRACT(IOST,1,2)="C-"
DO PAGE^XMXUTIL(.AXABORT)
+10 QUIT