GECSMUT2 ;WISC/RFJ/KLD-maintenance utilities ;13 Oct 98
;;2.0;GCS;**19,33**;MAR 14, 1995
Q
;
;
RETRAN ; mark a batch for retransmission
N %,GECS,GECSBATC,GECSDATA,GECSDICS
D ^GECSSITE Q:'$G(GECS("SITE"))
D BATNOFMS^GECSUSEL Q:'$G(GECS("BATDA"))
S GECS("SITECOM")=GECS("SITE")_GECS("SITE1")
S GECSDICS="S %=^(0) I $P($P(%,U),""-"")=GECS(""SITECOM""),$P($P(%,U),""-"",2)=GECS(""SYSID""),$P(%,U,4)'="""",$P(%,U,3)=""T"",$S($P(%,U,6)="""":1,$P(%,U,6)=GECS(""BATDA""):1,1:0)"
F W ! S GECSBATC=$$BATCHSEL^GECSUSEL(GECSDICS) Q:'GECSBATC D
. S GECSDATA=$G(^GECS(2101.3,GECSBATC,0)) I GECSDATA="" Q
. I $E($P(GECSDATA,"^",4),1,5)=$E(DT,1,5),$E(DT,6,7)>9,$P(GECSDATA,"^",2)="AMS" D
. . W !!,"WARNING -- If you have already sent the AMIS code sheets for this month and the",!,"code sheets are duplicates, Austin will reject messages for each of the",!,"duplicates."
. S XP="READY TO MARK BATCH FOR RETRANSMISSION",XH="Enter 'YES' to mark batch for retransmission, 'NO' or '^' to exit."
. I $$YN^GECSUTIL(2)'=1 Q
. D MARK(GECSBATC)
. W !
. S %=0 F S %=$O(^GECS(2100,"AB",GECS("BATCH"),%)) Q:'% I $D(^GECS(2100,%,0)) D
. . S $P(^GECS(2100,%,"TRANS"),"^",2)="Y",^GECS(2100,"AE","Y",%)=""
. . W $J($P(^GECS(2100,%,0),"^"),10)
. . I $X>68 W !
. W !,"Batch Number ",GECS("BATCH")," ready for transmission."
Q
;
;
MARK(DA) ; mark batch for transmission
N D0,DDH,DI,DQ,DIC,DIE,DR,X,Y
S (DIC,DIE)="^GECS(2101.3,",DR=".5////B;4///@;5///@"
D ^DIE
K ^GECS(2101.3,DA,2)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGECSMUT2 1549 printed Dec 13, 2024@01:56:13 Page 2
GECSMUT2 ;WISC/RFJ/KLD-maintenance utilities ;13 Oct 98
+1 ;;2.0;GCS;**19,33**;MAR 14, 1995
+2 QUIT
+3 ;
+4 ;
RETRAN ; mark a batch for retransmission
+1 NEW %,GECS,GECSBATC,GECSDATA,GECSDICS
+2 DO ^GECSSITE
if '$GET(GECS("SITE"))
QUIT
+3 DO BATNOFMS^GECSUSEL
if '$GET(GECS("BATDA"))
QUIT
+4 SET GECS("SITECOM")=GECS("SITE")_GECS("SITE1")
+5 SET GECSDICS="S %=^(0) I $P($P(%,U),""-"")=GECS(""SITECOM""),$P($P(%,U),""-"",2)=GECS(""SYSID""),$P(%,U,4)'="""",$P(%,U,3)=""T"",$S($P(%,U,6)="""":1,$P(%,U,6)=GECS(""BATDA""):1,1:0)"
+6 FOR
WRITE !
SET GECSBATC=$$BATCHSEL^GECSUSEL(GECSDICS)
if 'GECSBATC
QUIT
Begin DoDot:1
+7 SET GECSDATA=$GET(^GECS(2101.3,GECSBATC,0))
IF GECSDATA=""
QUIT
+8 IF $EXTRACT($PIECE(GECSDATA,"^",4),1,5)=$EXTRACT(DT,1,5)
IF $EXTRACT(DT,6,7)>9
IF $PIECE(GECSDATA,"^",2)="AMS"
Begin DoDot:2
+9 WRITE !!,"WARNING -- If you have already sent the AMIS code sheets for this month and the",!,"code sheets are duplicates, Austin will reject messages for each of the",!,"duplicates."
End DoDot:2
+10 SET XP="READY TO MARK BATCH FOR RETRANSMISSION"
SET XH="Enter 'YES' to mark batch for retransmission, 'NO' or '^' to exit."
+11 IF $$YN^GECSUTIL(2)'=1
QUIT
+12 DO MARK(GECSBATC)
+13 WRITE !
+14 SET %=0
FOR
SET %=$ORDER(^GECS(2100,"AB",GECS("BATCH"),%))
if '%
QUIT
IF $DATA(^GECS(2100,%,0))
Begin DoDot:2
+15 SET $PIECE(^GECS(2100,%,"TRANS"),"^",2)="Y"
SET ^GECS(2100,"AE","Y",%)=""
+16 WRITE $JUSTIFY($PIECE(^GECS(2100,%,0),"^"),10)
+17 IF $X>68
WRITE !
End DoDot:2
+18 WRITE !,"Batch Number ",GECS("BATCH")," ready for transmission."
End DoDot:1
+19 QUIT
+20 ;
+21 ;
MARK(DA) ; mark batch for transmission
+1 NEW D0,DDH,DI,DQ,DIC,DIE,DR,X,Y
+2 SET (DIC,DIE)="^GECS(2101.3,"
SET DR=".5////B;4///@;5///@"
+3 DO ^DIE
+4 KILL ^GECS(2101.3,DA,2)
+5 QUIT