source: FOIAVistA/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNQ1.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 2.6 KB
Line 
1IBCNQ1 ;ALB/CPM - OUTPATIENT VISIT DATE INQUIRY ; 31-JUL-91
2 ;;2.0; INTEGRATED BILLING ;**199**; 21-MAR-94
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5 ;MAP TO DGCRNQ1
6 ;
7 D HOME^%ZIS
8ASKPAT ;
9 ;***
10 ;I $D(XRT0) S:'$D(XRTN) XRTN="IBCNQ1" D T1^%ZOSV ;stop rt clock
11 ;S XRTL=$ZU(0),XRTN="IBCNQ1-1" D T0^%ZOSV ;start rt clock
12 N DPTNOFZY S DPTNOFZY=1 ;Suppress PATIENT file fuzzy lookups
13 D END S DIC="^DPT(",DIC(0)="AEMQZ" W ! D ^DIC K DIC G:+Y<1 END
14 S DFN=+Y I '$O(^DGCR(399,"AOPV",DFN,"")) W !!,"This patient has no bills with OP visits. Please enter another patient." G ASKPAT
15 ;
16 S IBQUIT=0,IBAC=78
17ASKDAT S DIR("A")="Select OP Visit Date",DIR(0)="DO^::EX^K:'$D(^DGCR(399,""AOPV"",DFN,Y)) X"
18 S DIR("?",1)="Please enter a valid Outpatient Visit date for this patient.",DIR("?")="Enter '??' to list valid dates and bill numbers.",DIR("??")="^D HELP^IBCNQ1"
19 D ^DIR K DIR G:Y<1 END
20 S X=$O(^DGCR(399,"AOPV",DFN,Y,0)) I '$O(^DGCR(399,"AOPV",DFN,Y,X)) S IBIFN=X
21 I '$D(IBIFN) D LIST K IBARR G END:IBQUIT
22 I $D(IBIFN) D VIEW^IBCNQ ; Display bill record
23 G ASKPAT:'IBQUIT
24 ;
25END K DFN,IBQUIT,DGI,DGX,DGY,IBS,IBNUM,IBAC,IB,IBBNO,IBN,IBU,IBUK,IBUN,IBX,IBSTAT,IBAC1,IBIFN,IBOPD,IBNOW,IBPAGE,IBPT,J,X,X2,Y
26 ;***
27 ;I $D(XRT0) S:'$D(XRTN) XRTN="IBCNQ1" D T1^%ZOSV ;stop rt clock
28 Q
29 ;
30LIST ; If multiple bills for an OP visit date, list them.
31 W !!?5,"Select one of the following bills for this visit date:"
32 ;
33 S DGI=0
34 F J=1:1 S DGI=$O(^DGCR(399,"AOPV",DFN,Y,DGI)) Q:'DGI S IBARR(J)=DGI W !?12,J D DISP,ASKNUM:'(J#5) G:IBQUIT!($D(IBIFN)) LQ
35 I '((J-1)#5) W !!?5,"End of list.",!
36ASKNUM W !?5,"Select 1-"_$S(J#5:J-1,1:J)_", or type '^' to quit: " R DGX:DTIME S:'$T!(DGX["^") IBQUIT=1 Q:IBQUIT!(DGX="") I +DGX<1!(+DGX>$S(J#5:J-1,1:J)) W !!?5,*7,"Enter a NUMBER from 1 to "_$S(J#5:J-1,1:J)_".",! G ASKNUM
37 I $D(IBARR(DGX)) S IBIFN=IBARR(DGX)
38LQ Q
39 ;
40HELP ; List all OP visit dates and bill numbers for patient.
41 W !!?5,"Enter one of the following OP visit dates: ",!
42 S (DGY,Y)="",J=0 F S Y=$O(^DGCR(399,"AOPV",DFN,Y)) Q:'Y!(DGY["^") S DGX="" F S DGX=$O(^DGCR(399,"AOPV",DFN,Y,DGX)) Q:'DGX S J=J+1 D:'(J#20) PAUSE Q:DGY["^" W !?5,$E(Y,4,5)_"-"_$E(Y,6,7)_"-"_$E(Y,2,3) S DGI=DGX D DISP
43 Q
44 ;
45PAUSE W !!?5,"Enter '^' to stop or <CR> to continue: " R DGY:DTIME S:'$T DGY="^"
46 W:DGY'["^" ! Q
47 ;
48DISP ; Write the bill number, rate type, and bill status.
49 Q:'$D(^DGCR(399,DGI,0)) S IBS=$P(^(0),"^",13) W ?20,$P(^(0),"^"),?30,$P($G(^DGCR(399.3,+$P(^(0),"^",7),0)),"^")
50 W ?55,$S(IBS=1:"ENTERED/NOT REVIEWED",IBS=2:"REVIEWED",IBS=3:"AUTHORIZED",IBS=4:"PRINTED",IBS=7:"CANCELLED",IBS=0:"CLOSED",1:"")
51 Q
Note: See TracBrowser for help on using the repository browser.