source: FOIAVistA/trunk/r/ACCOUNTS_RECEIVABLE-PRCA-PRY-RC/RCRCVLE.m@ 1611

Last change on this file since 1611 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 5.4 KB
Line 
1RCRCVLE ;ALB/CMS - TP POSSIBLE REFERRAL SEL/MOD LIST BUILD ; 09/13/97
2V ;;4.5;Accounts Receivable;**63**;Mar 20, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5SEL ; Entry point to select Items on List
6 ; Select items will be highlighted and stored in TMP("RCRCVL",$J,"SEL"
7 N DIC,DIRUT,DUOUT,RCSELN,RCOUT,VALMY,X,Y S RCSELN=0
8 D EN^VALM2($G(XQORNOD(0)),0)
9 I '$D(VALMY) W !," ...Nothing Selected." D PAUSE^VALM1 D
10 .I ($D(DIROUT))!($D(DUOUT)) S RCOUT=1
11 F S RCSELN=$O(VALMY(RCSELN)) Q:('RCSELN)!($D(RCOUT)) D
12 .I $D(^TMP("RCRCVL",$J,"SEL",RCSELN)) D UNSEL(RCSELN) Q
13 .S ^TMP("RCRCVL",$J,"SEL",RCSELN)=""
14 .D SELECT^VALM10(RCSELN,1)
15 I $D(RCOUT) G SELQ
16 I $O(^TMP("RCRCVL",$J,"SEL",0)) D
17 .D FULL^VALM1
18 .W @IOF,!!,"Current Selection of Items on List: "
19 .S RCSELN=0 F S RCSELN=$O(^TMP("RCRCVL",$J,"SEL",RCSELN)) Q:('RCSELN)!($D(RCOUT)) D
20 ..I $Y>(IOSL+3) W ! D PAUSE^VALM1 W @IOF,!,"Current Selection of Items on List:"
21 ..I $D(DIRUT)!$D(DUOUT) S RCOUT=1 Q
22 ..W !,@VALMAR@(RCSELN,0)
23 .W ! D PAUSE^VALM1
24SELQ Q
25 ;
26UNSEL(RCSELN) ; Unselect and Unhighlight items on the list
27 ;Ask user if they want to Unselect the Item
28 N DIR,DIROUT,DTOUT,DUOUT,DIROUT,X,Y
29 S DIR(0)="Y",DIR("B")="No"
30 S DIR("?")="Enter Yes to un-select pre-selected item."
31 S DIR("A")="Do you want to UNSELECT Item "_RCSELN_" "
32 W !! D ^DIR I $D(DTOUT)!$D(DIROUT) S RCOUT=1 G UNSELQ
33 I +Y K ^TMP("RCRCVL",$J,"SEL",RCSELN) D SELECT^VALM10(RCSELN,0)
34UNSELQ Q
35 ;
36MOD ; Entry point to Modify active list for third party possible referrals
37 ; Rebuilds the List of Possible Referrals by patname then resequence
38 N CNT,DIR,DIROUT,DTOUT,DUOUT,DIROUT,RCA,RCD,RCOUT,RCS,RCSBN,RCSEL,RCSN,RCSP,RCY,X,Y
39 ;
40 ;select bill to delete from highlighted selection
41 S RCSEL=""
42 I $O(^TMP("RCRCVL",$J,"SEL",0)) D DELA I $G(RCOUT) G MODQ
43 I RCSEL S RCD="" G MODA
44 ;
45 ;select bill to delete from in RCD()
46 S DIR(0)="LAOC^1:"_VALMCNT_":0",DIR("A")="Delete List item number(s): "
47 S DIR("?")="Enter item number(s) you want to remove from list"
48 W !! D ^DIR M RCD=Y
49 I ($D(DIROUT))!($D(DUOUT)) S RCOUT=1 W !,"Nothing Changed." G MODQ
50 ;
51MODA ;select bill to add in RCSBN()
52 K DIR S DIR("A")="Do you want to ADD AR Bills to the List "
53 S DIR("B")="Yes" D ASK^RCRCACP
54 I Y=1 W !!,"Add Selected Bill(s) to List" D BILL^RCRCVLB S RCOUT=0
55 ;
56 ;If none to add or delete quit
57 I 'RCSEL,$G(RCD)="",'$O(RCSBN(0)) G MODQ
58 ;
59 D FULL^VALM1 W @IOF
60 W !!,?10,"* WARNING: ADDING OR DELETING ITEMS FROM THE CURRENT LIST *"
61 W !,?10,"* WILL CAUSE THE LIST TO BE RE-SEQUENCED WHICH MAY CAUSE A *"
62 W !,?10,"* BILL TO BE ASSOCIATED WITH A DIFFERENT ITEM NUMBER. ALSO, *"
63 W !,?10,"* ALL CURRENT HIGHLIGHTED SELECTIONS WILL BE UNSELECTED. *"
64 W !!
65 ;
66 ;Display Current actions
67 I RCD W !,"Selected Items to Delete:",! S RCY="" F S RCY=$O(RCD(RCY)) Q:RCY="" D
68 .F RCSP=1:1:999 S RCS=$P(RCD(RCY),",",RCSP) Q:RCS="" D
69 ..I RCS["-" F RCSN=$P(RCS,"-",1):1:$P(RCS,"-",2) W !,@VALMAR@(RCSN,0) D
70 ...I $Y>(IOSL+3) D PAUSE^VALM1 W @IOF,!!,"Selected Items to Delete:",!
71 ..I RCS'["-" W !,@VALMAR@(RCS,0)
72 ..I $Y>(IOSL+3) D PAUSE^VALM1 W @IOF,!!,"Selected Items to Delete:",!
73 ;
74 I RCSEL W !,"Selected Items to Delete:",! S RCY=0 F S RCY=$O(^TMP("RCRCVL",$J,"SEL",RCY)) Q:'RCY D
75 .I $Y>(IOSL+3) D PAUSE^VALM1 W @IOF,!!,"Selected Items to Delete:",!
76 .W !,@VALMAR@(RCY,0)
77 ;
78 I $O(RCSBN(0)) W !!,"Selected Bills to Add:",! S RCY=0 F S RCY=$O(RCSBN(RCY)) Q:'RCY D
79 .I $Y>(IOSL+3) D PAUSE^VALM1 W @IOF,!!,"Selected Bills to Add:",!
80 .W !,$P(^PRCA(430,RCY,0),U,1)
81 ;
82 ;Ask user if sure
83 K DIR,DIROUT,DTOUT,DUOUT,DIROUT,X,Y
84 S DIR(0)="Y",DIR("B")="No"
85 S DIR("?")="Enter Yes if you want to rebuild the current list"
86 S DIR("A")="Okay to Continue "
87 W !! D ^DIR I 'Y G MODQ
88 I ($D(DTOUT))!($D(DIROUT)) S RCOUT=1 W !,"Nothing Changed." G MODQ
89 W !
90 ;
91 ;Delete all items in RCD variable from "B"
92 I RCD W !,?3,"Deleting Selected Items..." S RCY="" F S RCY=$O(RCD(RCY)) Q:RCY="" D
93 .F RCSP=1:1:999 S RCS=$P(RCD(RCY),",",RCSP) Q:RCS="" D
94 ..I RCS["-" F RCSN=$P(RCS,"-",1):1:$P(RCS,"-",2) D
95 ...K ^TMP("RCRCVL",$J,"B",$P($G(^DPT(+$G(^TMP("RCRCVLPT",$J,RCSN)),0),0),U,1),+$P($G(^TMP("RCRCVLX",$J,RCSN),0),U,2))
96 ..I RCS'["-" K ^TMP("RCRCVL",$J,"B",$P($G(^DPT(+$G(^TMP("RCRCVLPT",$J,RCS)),0),0),U,1),+$P($G(^TMP("RCRCVLX",$J,RCS),0),U,2))
97 ;
98 ;Delete all highlighted selected Items
99 I RCSEL W !,?3,"Deleting Selected Items..." S RCY=0 F S RCY=$O(^TMP("RCRCVL",$J,"SEL",RCY)) Q:'RCY D
100 .K ^TMP("RCRCVL",$J,"B",$P($G(^DPT(+$G(^TMP("RCRCVLPT",$J,RCY)),0),0),U,1),+$P($G(^TMP("RCRCVLX",$J,RCY),0),U,2))
101 ;
102 ;Add selected bills in RCA
103 I $O(RCSBN(0)) W !,?3,"Adding Selected Items..."
104 S RCY=0 F S RCY=$O(RCSBN(RCY)) Q:'RCY D
105 .S CNT=$G(VALMCNT)+1
106 .D SCRN^RCRCVL1(RCY,CNT)
107 ;
108 ;Delete Highlighted selected items
109 I $O(^TMP("RCRCVL",$J,"SEL",0)) W !,?3,"Deleting Highlighted Items..."
110 S RCY=0 F S RCY=$O(^TMP("RCRCVL",$J,"SEL",RCY)) Q:'RCY D SELECT^VALM10(RCY,0)
111 ;
112 W !,?3,"Killing current list ..."
113 S RCY=0 F S RCY=$O(^TMP("RCRCVL",$J,RCY)) Q:'RCY K ^TMP("RCRCVL",$J,RCY)
114 K ^TMP("RCRCVLX",$J),^TMP("RCRCVLPT",$J),^TMP("RCRCVL",$J,"IDX"),^TMP("RCRCVL",$J,"SEL")
115 ;
116 ;Rebuild using altered TMP("RCRCVL",$J,"B"
117 D RESL^RCRCVL1
118MODQ Q
119 ;
120DELA ;Ask if delete all items on selection list
121 N DIR,DIROUT,DTOUT,DUOUT,DIROUT,X,Y
122 S DIR(0)="Y",DIR("B")="Yes"
123 S DIR("?")="Enter Yes if you want to delete ALL the highlighted selected items from the current list"
124 S DIR("A")="Delete ALL highlighted selected items "
125 W !! D ^DIR S RCSEL=+Y
126 I ($D(DTOUT))!($D(DIROUT)) S RCOUT=1
127DELAQ Q
128 ;RCRCVLE
Note: See TracBrowser for help on using the repository browser.