RCRCELE ;ALB/CMS - TRANSMISSION LOG SEL/RESEQ LIST BUILD ; 09/13/97
V ;;4.5;Accounts Receivable;**63**;Mar 20, 1995
;;Per VHA Directive 10-93-142, this routine should not be modified.
;
SEL ; Entry point to select Items on List
; Select items will be highlighted and stored in TMP("RCRCE",$J,"SEL"
N DIC,DIRUT,DUOUT,RCLN,RCSELN,RCOUT,VALMBG,VALMLST,VALMY,X,Y S RCSELN=0
S VALMBG=1,VALMLST=$G(VALMCNT)
D EN^VALM2($G(XQORNOD(0)),0)
I '$D(VALMY) W !," ...Nothing Selected." D PAUSE^VALM1 D
.I ($D(DIROUT))!($D(DUOUT)) S RCOUT=1
F S RCSELN=$O(VALMY(RCSELN)) Q:('RCSELN)!($D(RCOUT)) D
.I $D(^TMP("RCRCE",$J,"SEL",RCSELN)) D UNSEL(RCSELN) Q
.S RCLN=+$G(^TMP("RCRCEX",$J,RCSELN))
.S ^TMP("RCRCE",$J,"SEL",RCSELN)=RCLN
.D SELECT^VALM10(RCLN,1)
I $D(RCOUT) G SELQ
I $O(^TMP("RCRCE",$J,"SEL",0)) D
.D FULL^VALM1
.W @IOF,!!,"Current Selection of Items on List: "
.S RCSELN=0 F S RCSELN=$O(^TMP("RCRCE",$J,"SEL",RCSELN)) Q:('RCSELN)!($D(RCOUT)) D
..S RCLN=+$G(^TMP("RCRCE",$J,"SEL",RCSELN))
..I $Y>(IOSL+3) W ! D PAUSE^VALM1 W @IOF,!,"Current Selection of Items on List:"
..I $D(DIRUT)!$D(DUOUT) S RCOUT=1 Q
..W !,@VALMAR@(RCLN,0)
.W ! D PAUSE^VALM1
SELQ Q
;
UNSEL(RCSELN) ; Unselect and Unhighlight items on the list
;Ask user if they want to Unselect the Item
N DIR,DIROUT,DTOUT,DUOUT,DIROUT,RCLN,X,Y
S DIR(0)="Y",DIR("B")="No"
S DIR("?")="Enter Yes to un-select pre-selected item."
S DIR("A")="Do you want to UNSELECT Item "_RCSELN_" "
W !! D ^DIR I $D(DTOUT)!$D(DIROUT) S RCOUT=1 G UNSELQ
I +Y S RCLN=^TMP("RCRCE",$J,"SEL",RCSELN) D
.D SELECT^VALM10(RCLN,0)
.K ^TMP("RCRCE",$J,"SEL",RCSELN)
UNSELQ Q
;
REQ ; Resequence list for Transmission Log
N DIR,DIROUT,DTOUT,DUOUT,DIROUT,RCBN0,RCBN2,RCCNT,RCCOM,RCDATE,RCLN,RCNT,RCX,RCY,X,Y
;
D FULL^VALM1
I '$O(^RCT(349.3,0)) W !!,?10,"** TRANSMISSION LOG EMPTY **",!! R !,"Press ANY key to continue:",RCLN:DTIME G REQQ
;
W !!!,?10,"* WARNING: THIS OPTION WILL RE-SEQUENCE ALL THE ITEMS ON THE *"
W !,?10,"* LIST. TRANSMISSION ENTRIES DELETED WILL NOT APPEAR. APPENDED *"
W !,?10,"* COMMENTS WILL DISPLAY. ALL CURRENT HIGHLIGHTED SELECTIONS *"
W !,?10,"* WILL BE UNSELECTED. *"
W !!
;
;Ask user if sure
K DIR,DIROUT,DTOUT,DUOUT,DIROUT,X,Y
S DIR(0)="Y",DIR("B")="No"
S DIR("?")="Enter Yes if you want to rebuild the current list"
S DIR("A")="Okay to Continue "
D ^DIR K DIR I 'Y G REQQ
I ($D(DTOUT))!($D(DIROUT)) S RCOUT=1 W !,"Nothing Changed." G REQQ
W !
;
;Delete Highlighted selected items
I $O(^TMP("RCRCE",$J,"SEL",0)) W !,?3,"Remove Highlighted Items..."
S RCY=0 F S RCY=$O(^TMP("RCRCE",$J,"SEL",RCY)) Q:'RCY D
.S RCLN=+$G(^TMP("RCRCE",$J,"SEL",RCY))
.D SELECT^VALM10(RCLN,0)
;
W !,?3,"Killing current list ..."
K ^TMP("RCRCEX",$J),^TMP("RCRCE",$J)
;
;Rebuild
W !,?3,"Rebuilding list ..."
D REQ^RCRCEL
I +$G(VALMCNT)=0 S VALMSG="NO MESSAGES FOUND"
REQQ Q
;
;RCRCELE
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRCRCELE 3008 printed Dec 13, 2024@01:47:39 Page 2
RCRCELE ;ALB/CMS - TRANSMISSION LOG SEL/RESEQ LIST BUILD ; 09/13/97
V ;;4.5;Accounts Receivable;**63**;Mar 20, 1995
+1 ;;Per VHA Directive 10-93-142, this routine should not be modified.
+2 ;
SEL ; Entry point to select Items on List
+1 ; Select items will be highlighted and stored in TMP("RCRCE",$J,"SEL"
+2 NEW DIC,DIRUT,DUOUT,RCLN,RCSELN,RCOUT,VALMBG,VALMLST,VALMY,X,Y
SET RCSELN=0
+3 SET VALMBG=1
SET VALMLST=$GET(VALMCNT)
+4 DO EN^VALM2($GET(XQORNOD(0)),0)
+5 IF '$DATA(VALMY)
WRITE !," ...Nothing Selected."
DO PAUSE^VALM1
Begin DoDot:1
+6 IF ($DATA(DIROUT))!($DATA(DUOUT))
SET RCOUT=1
End DoDot:1
+7 FOR
SET RCSELN=$ORDER(VALMY(RCSELN))
if ('RCSELN)!($DATA(RCOUT))
QUIT
Begin DoDot:1
+8 IF $DATA(^TMP("RCRCE",$JOB,"SEL",RCSELN))
DO UNSEL(RCSELN)
QUIT
+9 SET RCLN=+$GET(^TMP("RCRCEX",$JOB,RCSELN))
+10 SET ^TMP("RCRCE",$JOB,"SEL",RCSELN)=RCLN
+11 DO SELECT^VALM10(RCLN,1)
End DoDot:1
+12 IF $DATA(RCOUT)
GOTO SELQ
+13 IF $ORDER(^TMP("RCRCE",$JOB,"SEL",0))
Begin DoDot:1
+14 DO FULL^VALM1
+15 WRITE @IOF,!!,"Current Selection of Items on List: "
+16 SET RCSELN=0
FOR
SET RCSELN=$ORDER(^TMP("RCRCE",$JOB,"SEL",RCSELN))
if ('RCSELN)!($DATA(RCOUT))
QUIT
Begin DoDot:2
+17 SET RCLN=+$GET(^TMP("RCRCE",$JOB,"SEL",RCSELN))
+18 IF $Y>(IOSL+3)
WRITE !
DO PAUSE^VALM1
WRITE @IOF,!,"Current Selection of Items on List:"
+19 IF $DATA(DIRUT)!$DATA(DUOUT)
SET RCOUT=1
QUIT
+20 WRITE !,@VALMAR@(RCLN,0)
End DoDot:2
+21 WRITE !
DO PAUSE^VALM1
End DoDot:1
SELQ QUIT
+1 ;
UNSEL(RCSELN) ; Unselect and Unhighlight items on the list
+1 ;Ask user if they want to Unselect the Item
+2 NEW DIR,DIROUT,DTOUT,DUOUT,DIROUT,RCLN,X,Y
+3 SET DIR(0)="Y"
SET DIR("B")="No"
+4 SET DIR("?")="Enter Yes to un-select pre-selected item."
+5 SET DIR("A")="Do you want to UNSELECT Item "_RCSELN_" "
+6 WRITE !!
DO ^DIR
IF $DATA(DTOUT)!$DATA(DIROUT)
SET RCOUT=1
GOTO UNSELQ
+7 IF +Y
SET RCLN=^TMP("RCRCE",$JOB,"SEL",RCSELN)
Begin DoDot:1
+8 DO SELECT^VALM10(RCLN,0)
+9 KILL ^TMP("RCRCE",$JOB,"SEL",RCSELN)
End DoDot:1
UNSELQ QUIT
+1 ;
REQ ; Resequence list for Transmission Log
+1 NEW DIR,DIROUT,DTOUT,DUOUT,DIROUT,RCBN0,RCBN2,RCCNT,RCCOM,RCDATE,RCLN,RCNT,RCX,RCY,X,Y
+2 ;
+3 DO FULL^VALM1
+4 IF '$ORDER(^RCT(349.3,0))
WRITE !!,?10,"** TRANSMISSION LOG EMPTY **",!!
READ !,"Press ANY key to continue:",RCLN:DTIME
GOTO REQQ
+5 ;
+6 WRITE !!!,?10,"* WARNING: THIS OPTION WILL RE-SEQUENCE ALL THE ITEMS ON THE *"
+7 WRITE !,?10,"* LIST. TRANSMISSION ENTRIES DELETED WILL NOT APPEAR. APPENDED *"
+8 WRITE !,?10,"* COMMENTS WILL DISPLAY. ALL CURRENT HIGHLIGHTED SELECTIONS *"
+9 WRITE !,?10,"* WILL BE UNSELECTED. *"
+10 WRITE !!
+11 ;
+12 ;Ask user if sure
+13 KILL DIR,DIROUT,DTOUT,DUOUT,DIROUT,X,Y
+14 SET DIR(0)="Y"
SET DIR("B")="No"
+15 SET DIR("?")="Enter Yes if you want to rebuild the current list"
+16 SET DIR("A")="Okay to Continue "
+17 DO ^DIR
KILL DIR
IF 'Y
GOTO REQQ
+18 IF ($DATA(DTOUT))!($DATA(DIROUT))
SET RCOUT=1
WRITE !,"Nothing Changed."
GOTO REQQ
+19 WRITE !
+20 ;
+21 ;Delete Highlighted selected items
+22 IF $ORDER(^TMP("RCRCE",$JOB,"SEL",0))
WRITE !,?3,"Remove Highlighted Items..."
+23 SET RCY=0
FOR
SET RCY=$ORDER(^TMP("RCRCE",$JOB,"SEL",RCY))
if 'RCY
QUIT
Begin DoDot:1
+24 SET RCLN=+$GET(^TMP("RCRCE",$JOB,"SEL",RCY))
+25 DO SELECT^VALM10(RCLN,0)
End DoDot:1
+26 ;
+27 WRITE !,?3,"Killing current list ..."
+28 KILL ^TMP("RCRCEX",$JOB),^TMP("RCRCE",$JOB)
+29 ;
+30 ;Rebuild
+31 WRITE !,?3,"Rebuilding list ..."
+32 DO REQ^RCRCEL
+33 IF +$GET(VALMCNT)=0
SET VALMSG="NO MESSAGES FOUND"
REQQ QUIT
+1 ;
+2 ;RCRCELE