GECSXBL1 ;WISC/RFJ-ask to mark code sheets for batching ;01 Nov 93
;;2.0;GCS;**2,37**;MAR 14, 1995;Build 3
Q
;
;
ASKTOBAT(GECSDA) ; ask to mark code sheet gecsda for batching
; if variable GECSAUTO="BATCH" then auto-mark for batch without asking
; if variable GECSAUTO="SAVE" then retain in file
N %,GECSFLAG,X,Y
;
; retain in file
I $G(GECSAUTO)="SAVE" Q
;
; automatically mark for batching without asking
I $G(GECSAUTO)="BATCH" S %=$$MARKBAT^GECSMUT1(GECSDA) Q
;
; ask to mark for batching
F D Q:$G(GECSFLAG)
. S DIR(0)="S^1:"_$S(GECS("SYSID")="FMS":"Transmit FMS Document",1:"Mark the Code Sheet For Batching")
. S DIR(0)=DIR(0)_";2:Edit the Code Sheet;3:Delete the Code Sheet;4:Retain the Code Sheet in the File for Editing Later;5:Print the Code Sheet;"
. S DIR("A")="CODE SHEET ACTION",DIR("B")=$S(GECS("SYSID")="FMS":4,1:1) D ^DIR K DIR
. ;
. I Y=4!$D(DTOUT)!($D(DUOUT)) W !,"CODE SHEET HAS BEEN RETAINED IN THE FILE FOR EDITING LATER!" D RETAIN^GECSUSTA(GECSDA) S GECSFLAG=1 Q
. ; fms code sheets, transmit using stack file
. I Y=1,GECS("SYSID")="FMS" D TRANSMIT^GECSUFMS S GECSFLAG=1 Q
. ;
. I Y=1 S %=$$MARKBAT^GECSMUT1(GECSDA) S:% GECSFLAG=1 Q
. I Y=2 S %=$$CSEDIT^GECSEDIT,%=$$MAPDATA^GECSXBLD(GECS("CSDA")) S:'% GECSFLAG=1 Q
. I Y=3 D Q
. . D DELASK^GECSUTIL(GECSDA)
. . I '$D(^GECS(2100,GECSDA)) K GECS("CSDA"),GECS("CSNAME") S GECSFLAG=1
. I Y=5 D
. . S %ZIS="Q" D ^%ZIS I POP Q
. . I '$D(IO("Q")) U IO D PRINT^GECSUTIL(GECSDA) D ^%ZISC Q
. . I $D(IO("Q")) K IO("Q") S ZTRTN="PRINTDQ^GECSUTIL",ZTDESC="Print Generic Code Sheet",ZTSAVE("GECSDA")="",ZTIO=ION_";"_IOST_";"_IOM_";"_IOSL D ^%ZTLOAD
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGECSXBL1 1747 printed Oct 16, 2024@17:57:31 Page 2
GECSXBL1 ;WISC/RFJ-ask to mark code sheets for batching ;01 Nov 93
+1 ;;2.0;GCS;**2,37**;MAR 14, 1995;Build 3
+2 QUIT
+3 ;
+4 ;
ASKTOBAT(GECSDA) ; ask to mark code sheet gecsda for batching
+1 ; if variable GECSAUTO="BATCH" then auto-mark for batch without asking
+2 ; if variable GECSAUTO="SAVE" then retain in file
+3 NEW %,GECSFLAG,X,Y
+4 ;
+5 ; retain in file
+6 IF $GET(GECSAUTO)="SAVE"
QUIT
+7 ;
+8 ; automatically mark for batching without asking
+9 IF $GET(GECSAUTO)="BATCH"
SET %=$$MARKBAT^GECSMUT1(GECSDA)
QUIT
+10 ;
+11 ; ask to mark for batching
+12 FOR
Begin DoDot:1
+13 SET DIR(0)="S^1:"_$SELECT(GECS("SYSID")="FMS":"Transmit FMS Document",1:"Mark the Code Sheet For Batching")
+14 SET DIR(0)=DIR(0)_";2:Edit the Code Sheet;3:Delete the Code Sheet;4:Retain the Code Sheet in the File for Editing Later;5:Print the Code Sheet;"
+15 SET DIR("A")="CODE SHEET ACTION"
SET DIR("B")=$SELECT(GECS("SYSID")="FMS":4,1:1)
DO ^DIR
KILL DIR
+16 ;
+17 IF Y=4!$DATA(DTOUT)!($DATA(DUOUT))
WRITE !,"CODE SHEET HAS BEEN RETAINED IN THE FILE FOR EDITING LATER!"
DO RETAIN^GECSUSTA(GECSDA)
SET GECSFLAG=1
QUIT
+18 ; fms code sheets, transmit using stack file
+19 IF Y=1
IF GECS("SYSID")="FMS"
DO TRANSMIT^GECSUFMS
SET GECSFLAG=1
QUIT
+20 ;
+21 IF Y=1
SET %=$$MARKBAT^GECSMUT1(GECSDA)
if %
SET GECSFLAG=1
QUIT
+22 IF Y=2
SET %=$$CSEDIT^GECSEDIT
SET %=$$MAPDATA^GECSXBLD(GECS("CSDA"))
if '%
SET GECSFLAG=1
QUIT
+23 IF Y=3
Begin DoDot:2
+24 DO DELASK^GECSUTIL(GECSDA)
+25 IF '$DATA(^GECS(2100,GECSDA))
KILL GECS("CSDA"),GECS("CSNAME")
SET GECSFLAG=1
End DoDot:2
QUIT
+26 IF Y=5
Begin DoDot:2
+27 SET %ZIS="Q"
DO ^%ZIS
IF POP
QUIT
+28 IF '$DATA(IO("Q"))
USE IO
DO PRINT^GECSUTIL(GECSDA)
DO ^%ZISC
QUIT
+29 IF $DATA(IO("Q"))
KILL IO("Q")
SET ZTRTN="PRINTDQ^GECSUTIL"
SET ZTDESC="Print Generic Code Sheet"
SET ZTSAVE("GECSDA")=""
SET ZTIO=ION_";"_IOST_";"_IOM_";"_IOSL
DO ^%ZTLOAD
End DoDot:2
End DoDot:1
if $GET(GECSFLAG)
QUIT
+30 QUIT