YSASRU1 ;ASF/ALB,HIOFO/FT - ASI NATIONAL ROLL UP UTILS ;2/21/13 11:11am
;;5.01;MENTAL HEALTH;**24,30,32,38,121**;Dec 30, 1994;Build 61
;Reference to ^%ZTLOAD supported by IA #10063
Q
RESENDI ;individual resend
;entry point for YSAS ASI ADD INDIVIDUAL option
N DIC,YSASIEN
S DIC="^YSTX(604,",DIC(0)="AEQM",DIC("A")="Select ASI Administration:" D ^DIC
Q:Y'>0
S YSASIEN=+Y
I $P($G(^YSTX(604,YSASIEN,.5)),U)'=1 W !,"This ASI has not been signed and cannot be transmitted!",$C(7) G RESENDI
S DA=YSASIEN,DIE="^YSTX(604,",DR="5.5///1"
L +^YSTX(604,YSASIEN):DILOCKTM Q:'$T
D ^DIE
L -^YSTX(604,YSASIEN)
W !,"Placed in transmission list"
G RESENDI
;
TIMED ;send all signed given between
;entry point for YSAS ASI ADD RANGE option
N YSASE,YSASNB,YSASL
W !,"PLEASE use this option ONLY when instructed to do so by the",!,"Remote Systems Support staff!"
K DIR S DIR(0)="Y",DIR("A")="Have you been instructed to resend data",DIR("B")="No"
D ^DIR Q:Y'=1
K DIR S DIR(0)="D^2960101:DT",DIR("A")="Enter Earliest Date" D ^DIR
Q:$D(DIRUT)
S YSASE=Y
K DIR S DIR(0)="D^"_YSASE_":DT",DIR("A")="Enter Latest Date" D ^DIR
Q:$D(DIRUT)
S YSASL=Y
S YSASE=YSASE-.001,YSASNB=0
F I=1:1 S YSASE=$O(^YSTX(604,"AD",YSASE)) Q:YSASE>YSASL!(YSASE'>0) D
. S N=0 F S N=$O(^YSTX(604,"AD",YSASE,N)) Q:N'>0 D
.. I $P($G(^YSTX(604,N,.5)),U)=1 S ^YSTX(604,"ATR",1,N)="",$P(^YSTX(604,N,5),U,3)=1,YSASNB=YSASNB+1
;
W !,YSASNB," ASI's added to the transmission list"
Q
QUEIT ; task out resend
;entry point for YSAS ASI REQUE option
S X1=DT,X2=7 D C^%DTC
K DIR S DIR(0)="D^NOW:"_X_":EFXR",DIR("A")="Resend Date and Time",DIR("B")="T@11pm"
D ^DIR
Q:$D(DIRUT)
S ZTRTN="EN^YSASRU",ZTIO="",ZTDTH=Y,ZTDESC="ASI RESEND YSASRU1" D ^%ZTLOAD
W !,"Thanks........" H 2
Q
AA ; print awaiting report
;entry point for YSAS ASI AWAITING option
S DIC="^YSTX(604,",L=0,FLDS=".05;""DATE"",.02;L30,.04;L5,.09;L20",BY="5.5,.05,.02"
S FR(1)="",FR(2)="",FR(3)="",DHD="ASI Awaitng Transmission List"
D EN1^DIP
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HYSASRU1 2044 printed Oct 16, 2024@18:14:03 Page 2
YSASRU1 ;ASF/ALB,HIOFO/FT - ASI NATIONAL ROLL UP UTILS ;2/21/13 11:11am
+1 ;;5.01;MENTAL HEALTH;**24,30,32,38,121**;Dec 30, 1994;Build 61
+2 ;Reference to ^%ZTLOAD supported by IA #10063
+3 QUIT
RESENDI ;individual resend
+1 ;entry point for YSAS ASI ADD INDIVIDUAL option
+2 NEW DIC,YSASIEN
+3 SET DIC="^YSTX(604,"
SET DIC(0)="AEQM"
SET DIC("A")="Select ASI Administration:"
DO ^DIC
+4 if Y'>0
QUIT
+5 SET YSASIEN=+Y
+6 IF $PIECE($GET(^YSTX(604,YSASIEN,.5)),U)'=1
WRITE !,"This ASI has not been signed and cannot be transmitted!",$CHAR(7)
GOTO RESENDI
+7 SET DA=YSASIEN
SET DIE="^YSTX(604,"
SET DR="5.5///1"
+8 LOCK +^YSTX(604,YSASIEN):DILOCKTM
if '$TEST
QUIT
+9 DO ^DIE
+10 LOCK -^YSTX(604,YSASIEN)
+11 WRITE !,"Placed in transmission list"
+12 GOTO RESENDI
+13 ;
TIMED ;send all signed given between
+1 ;entry point for YSAS ASI ADD RANGE option
+2 NEW YSASE,YSASNB,YSASL
+3 WRITE !,"PLEASE use this option ONLY when instructed to do so by the",!,"Remote Systems Support staff!"
+4 KILL DIR
SET DIR(0)="Y"
SET DIR("A")="Have you been instructed to resend data"
SET DIR("B")="No"
+5 DO ^DIR
if Y'=1
QUIT
+6 KILL DIR
SET DIR(0)="D^2960101:DT"
SET DIR("A")="Enter Earliest Date"
DO ^DIR
+7 if $DATA(DIRUT)
QUIT
+8 SET YSASE=Y
+9 KILL DIR
SET DIR(0)="D^"_YSASE_":DT"
SET DIR("A")="Enter Latest Date"
DO ^DIR
+10 if $DATA(DIRUT)
QUIT
+11 SET YSASL=Y
+12 SET YSASE=YSASE-.001
SET YSASNB=0
+13 FOR I=1:1
SET YSASE=$ORDER(^YSTX(604,"AD",YSASE))
if YSASE>YSASL!(YSASE'>0)
QUIT
Begin DoDot:1
+14 SET N=0
FOR
SET N=$ORDER(^YSTX(604,"AD",YSASE,N))
if N'>0
QUIT
Begin DoDot:2
+15 IF $PIECE($GET(^YSTX(604,N,.5)),U)=1
SET ^YSTX(604,"ATR",1,N)=""
SET $PIECE(^YSTX(604,N,5),U,3)=1
SET YSASNB=YSASNB+1
End DoDot:2
End DoDot:1
+16 ;
+17 WRITE !,YSASNB," ASI's added to the transmission list"
+18 QUIT
QUEIT ; task out resend
+1 ;entry point for YSAS ASI REQUE option
+2 SET X1=DT
SET X2=7
DO C^%DTC
+3 KILL DIR
SET DIR(0)="D^NOW:"_X_":EFXR"
SET DIR("A")="Resend Date and Time"
SET DIR("B")="T@11pm"
+4 DO ^DIR
+5 if $DATA(DIRUT)
QUIT
+6 SET ZTRTN="EN^YSASRU"
SET ZTIO=""
SET ZTDTH=Y
SET ZTDESC="ASI RESEND YSASRU1"
DO ^%ZTLOAD
+7 WRITE !,"Thanks........"
HANG 2
+8 QUIT
AA ; print awaiting report
+1 ;entry point for YSAS ASI AWAITING option
+2 SET DIC="^YSTX(604,"
SET L=0
SET FLDS=".05;""DATE"",.02;L30,.04;L5,.09;L20"
SET BY="5.5,.05,.02"
+3 SET FR(1)=""
SET FR(2)=""
SET FR(3)=""
SET DHD="ASI Awaitng Transmission List"
+4 DO EN1^DIP
+5 QUIT