source: WorldVistAEHR/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBRCON1.m@ 1036

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

initial load of WorldVistAEHR

File size: 4.3 KB
RevLine 
[613]1IBRCON1 ;ALB/RJS - PASS CONVERTED INPATIENT CHARGES ; 28-APR-92
2 ;;2.0;INTEGRATED BILLING;**153**;21-MAR-94
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5 ;Selection is by patient name
6 ;
7EN ; Entry point for stand-alone 'pass' option
8 I '$D(^IB("AI")) W !!,"There are no patients with converted charges at this time.",! Q
9 ;
10 D HOME^%ZIS
11 W !!,"This option is used to pass Means Test charges which have been"
12 W !,"converted. Please enter a patient with converted charges and these"
13 W !,"charges will be displayed and may be selected to be released to Accounts",!,"Receivable.",!
14 ;
15ASK S IBRHOLD=0
16 R !!,"Select PATIENT NAME: ",X:DTIME G END:"^"[X
17 I $E(X,1,2)="??" D HLP1 G ASK
18 I $E(X)="?" D HLP G ASK
19 S DIC("S")="I $D(^IB(""AI"",+Y))"
20 S DIC="^DPT(",DIC(0)="MQE" D ^DIC K DIC G ASK:Y<1 S DFN=+Y
21 ;
22 K IBA
23 S IBRRJS=0 F IBNUM=1:1 S IBRRJS=$O(^IB("AI",DFN,IBRRJS)) Q:'IBRRJS S IBA(IBNUM)=IBRRJS
24 I '$D(IBA) W !!,"This patient does not have any converted charges",! G ASK
25 ;
26 D DEM^VADPT W @IOF,VADM(1)," Pt ID: ",VA("PID"),! F I=1:1:79 W "-"
27 ;
28 ; - display header and list charges
29RESUME W !!,"The following IB Actions for this patient, are CONVERTED CHARGES:" D HDR1
30 S IBQ=0 F IBNUM=1:1 Q:'$D(IBA(IBNUM)) D:'(IBNUM#15) Q:IBQ S IBN=IBA(IBNUM) D LST1
31 . R !,"Enter RETURN to continue or '^' to stop: ",X:DTIME S:X["^"!('$T) IBQ=1 Q
32 ;
33 ; - prompt user to select IB Actions
34 S DIR(0)="LAO^1:"_(IBNUM-1)_"^K:X[""."" X",DIR("A")="Select IB Action"_$E("s",IBNUM>2)_" (REF #) to pass (or '^' to exit): ",DIR("?")="^D HELP^IBRCON1"
35 W ! D ^DIR K DIR I $D(DUOUT) G END
36 I $D(DIRUT) G LOOP
37 ;
38 S IBRANGE=Y,IBSEQNO=1,IBDUZ=DUZ
39 ;
40 S DIR("B")="YES"
41 S DIR(0)="YOA",DIR("A")="OK to pass "_$S($P(Y,",",2):"these charges",1:"this charge")_" to Accounts Receivable: "
42 D ^DIR K DIR I $D(DUOUT) G END
43 I 'Y!($D(DIRUT)) G LOOP
44 ;
45 ; - pass charges to Accounts Receivable
46 W !!,"Passing charges to Accounts Receivable...",! D HDR2
47 F IBRRJS=1:1 S IBNUM=$P(IBRANGE,",",IBRRJS) Q:'IBNUM S IBNOS=IBA(IBNUM) D ^IBR,ERR:Y<1 I Y>0 S IBN=IBA(IBNUM) D LST2
48 W !!,"The charge"_$E("s",$P(IBRANGE,",",2)>0)_" listed above "_$S($P(IBRANGE,",",2):"have",1:"has")_" been passed to Accounts Receivable",!
49 W:IBRHOLD=1 !,"* Please note that charges placed 'On Hold' are still",!," pending release from Integrated Billing."
50 ;
51LOOP ;
52 G ASK
53 ;
54END K DIRUT,DUOUT,DTOUT,IBA,IBAFY,IBARTYP,IBATYP,IBN,IBDA,IBDUZ,IBFAC,IBRRJSL,IBRANGE,IBNOS,IBNUM,IBQ,IBSEQNO,IBSERV,IBSITE,IBTOTL,IBTRAN,IBWHER,VA,VADM,VAERR
55 K DFN,DIC,DIR,I,IBA,IBLINE,IBND,IBRRJS,VA,VADM,X,Y,IBRHOLD
56 Q
57 ;
58 ;
59HDR1 ; Display charge header.
60 N IBLINE S $P(IBLINE,"=",81)=""
61 W !,IBLINE,!," REF Action ID Bill Type",?44,"From",?54,"To",?64,"Charge"
62 W !,IBLINE Q
63 ;
64HDR2 ; Display charge header.
65 N IBLINE S $P(IBLINE,"=",81)=""
66 W !,IBLINE,!,?42,"Bill # or"
67 W !," REF Action ID Bill Type",?42,"On Hold",?53,"From",?64,"To",?73,"Charge"
68 W !,IBLINE Q
69 ;
70LST1 ; Display individual IB Action.
71 N IBND S IBND=$G(^IB(IBN,0))
72 W !?1,$J(IBNUM,2),?7,$J(+IBND,9),?18,$P($G(^IBE(350.1,+$P(IBND,"^",3),0)),"^",8)
73 W ?42,$$DAT1^IBOUTL($P(IBND,"^",14)),?52,$$DAT1^IBOUTL($P(IBND,"^",15))
74 W ?61,$J(+$P(IBND,"^",7),9,2)
75 Q
76 ;
77LST2 ; Display individual IB Action.
78 N IBND S IBND=$G(^IB(IBN,0))
79 W !?1,$J(IBNUM,2),?7,$J(+IBND,9),?18,$P($G(^IBE(350.1,+$P(IBND,"^",3),0)),"^",8)
80 I $P(IBND,U,5)=8 W ?42,"On Hold" S IBRHOLD=1
81 E W ?42,$P($P(IBND,"^",11),"-",2)
82 W ?51,$$DAT1^IBOUTL($P(IBND,"^",14)),?61,$$DAT1^IBOUTL($P(IBND,"^",15))
83 W ?70,$J(+$P(IBND,"^",7),9,2)
84 Q
85 ;
86ERR ; Display error message.
87 W !?1,$J(IBNUM,2),?7,"Error encountered - a separate bulletin has been posted"
88 Q
89 ;
90HLP ; Display basic help message.
91 W !!,"Enter: the name of a patient with converted charges or"
92 W !?10,"'??' -- to see all patients with converted charges or"
93 W !?10,"'^' -- to quit this option.",!
94 Q
95 ;
96HLP1 ; Display all patients with converted charges
97 N DFN,I,IBQ,VA,VAERR
98 W !!,"The following patients have converted charges"
99 S (DFN,IBQ)=0 F I=1:1 S DFN=$O(^IB("AI",DFN)) Q:'DFN D:'(I#15) Q:IBQ D PID^VADPT6 W !?3,$P($G(^DPT(DFN,0)),"^"),$J("",10),VA("PID")
100 . R !,"Enter RETURN to continue or '^' to stop: ",X:DTIME S:X["^"!('$T) IBQ=1 Q
101 W ! Q
102 ;
103HELP ; Help for the 'Select' prompt.
104 W !!?4,"Please enter a list or range of IB Actions (i.e. 1,3,5 or 2-4,8), none"
105 W !?4,"greater than ",IBNUM-1,", to be passed to Accounts Receivable, or '^' to quit."
106 Q
Note: See TracBrowser for help on using the repository browser.