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

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

initial load of WorldVistAEHR

File size: 3.8 KB
Line 
1IBCA0 ;ALB/AAS - ADD NEW BILLING RECORD-CONT. ;01 JUN 88 12:00
2 ;;2.0;INTEGRATED BILLING;**51**;21-MAR-94
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ; DBIA REFERENCE TO ^DGPM("ATID1") = DBIA419
5 ;
6 ;MAP TO DGCRA0
7 ;
8 ;moved from IBA (4.5) to split routine
9 ;
10CEOC1 W !!,"ARE YOU BILLING FOR A CONTINUING EPISODE OF CARE" S %=2 D YN^DICN G CHKINQ:%=2,NREC^IBCA:%=-1
11 I '% W !!?4,"YES - If this bill is for continuing care which has already been partially",!?9,"billed for on another bill.",!?4,"NO - If this is the initial bill for an episode of care." G CEOC1
12 W ! D EN4^IBCA3 I '$D(IBIDS(.17)) G CEOC1
13CHKINQ Q
14 ;
15IP W !!?4,"ARE YOU BILLING FOR AN UNDISPLAYED EPISODE OF CARE" S %=2 D YN^DICN
16 I '% W !!?4,"YES - If this bill is for an episode of care at a Non-VA facility",!?4," for which no PTF record exists.",!?4,"NO - If for VA care or you just made a mistake." G IP
17 W ! S DGPERCNT=% I DGPERCNT=1 S IBIDS(162)=$O(^DGCR(399.1,"B","STILL PATIENT",0))
18IP1 Q:DGPERCNT'=1 S %DT="AEXP",%DT(0)=IBX,%DT("A")=" NON-VA DISCHARGE DATE: " D ^%DT K %DT Q:X="" I Y<1!(Y>DT) W !!,"Enter a DISCHARGE DATE after the admission date and not greater than today!",! G IP1
19 S IBIDS(.16)=Y,IBIDS(162)=$O(^DGCR(399.1,"B",$E("DISCHARGED TO HOME OR SELF CARE",1,30),0))
20 Q
21DISPAD ;display admissions
22 K IBIDS(.03),IBIDS(.08),IBI,IBJ,IBDSDT S (IBI,IBJ)="",IBCNT=0
23 F I=0:0 S IBI=$O(^DGPM("ATID1",DFN,IBI)) Q:IBI="" S IBCNT=IBCNT+1,IBI1=9999999.9999999-IBI,IBI(IBCNT)=IBI1,IBI(IBI1\1)=IBI1
24 F J=0:0 S IBJ=$O(^DGPT("AFEE",DFN,IBJ)) Q:IBJ="" S IBCNT=IBCNT+1,IBJ(IBCNT)=IBJ,IBJ(IBJ)=IBJ
25 I 'IBCNT W !!,"Patient has no admissions on file."
26 ;
27 W !?4,$S($O(IBI(0))="":"THERE ARE NO INPATIENT EVENT (ADMISSION) DATES.",1:"Select INPATIENT EVENT (ADMISSION) DATE:")
28 F I=1:2 Q:'$D(IBI(I)) S Y=IBI(I) X ^DD("DD") W !?8,I_" ",Y I $D(IBI(I+1)) S Y=IBI(I+1) X ^DD("DD") W ?40,I+1," ",Y
29 S J=$O(IBJ(0)) I J]"" W !?4,"OR",!?4,"Select NON-VA INPATIENT EVENT (ADMISSION) DATE:" F J=J:2 Q:'$D(IBJ(J)) S Y=IBJ(J) X ^DD("DD") W !?8,J_" ",Y I $D(IBJ(J+1)) S Y=IBJ(J+1) X ^DD("DD") W ?40,J+1," ",Y
30 W !!?4,$S(IBCNT:"CHOOSE 1-"_IBCNT_" or ",1:""),"Enter DATE: " R IBX:DTIME G:IBX="^"!(IBX="")!('$T) ENDDIS
31 I IBX'?.N!(IBX<1)!(IBX>IBCNT) S X=IBX,%DT="EXP",%DT(0)="-NOW" D ^%DT S IBX=Y I Y<1 D HELPAD G DISPAD
32 I IBX?7N.N D IP I DGPERCNT=1 S IBIDS(.03)=IBX,IBDSDT=$S($D(IBIDS(.16)):IBIDS(.16),1:""),IBIDS(159)=2,IBIDS(158)=2 G ENDDIS
33 I $D(IBI(IBX)) S IBIDS(.03)=IBI(IBX),IBIDS(.08)=$O(^DGPM("ATID1",DFN,9999999.9999999-IBI(IBX),0))
34 I $D(IBIDS(.08)),$D(^DGPM(IBIDS(.08),0)) S IBIDS(.08)=$P(^(0),"^",16) S:$P(^(0),"^",17)]"" IBDSDT=+^DGPM($P(^(0),"^",17),0) D NOPTF G:'$D(IBIDS(.08)) DISPAD G ENDDIS
35 I $D(IBJ(IBX)) S IBIDS(.03)=IBJ(IBX),IBIDS(.08)=$O(^DGPT("AFEE",DFN,IBJ(IBX),0)) S:$D(^DGPT(IBIDS(.08),70)) IBDSDT=+^(70) D NOPTF G:'$D(IBIDS(.08)) DISPAD G ENDDIS
36 D HELPAD G DISPAD
37 ;
38ENDDIS I $G(IBIDS(.08)) D
39 .N PTF Q:'$D(^DGPT(IBIDS(.08),"M"))
40 .S PTF=IBIDS(.08) D SC1^IBCSC6
41 .W !?4,"PTF record indicates ",IBSCM," of ",IBM," movements are for Service Connected Care."
42 .I IBSCM,IBSCM=IBM W !?4,*7,"Warning, PTF record indicates all movements are for Service Connected Care.",*7
43 ;
44 K IBCNT,IBI,IBJ,DGPERCNT,IBX,%,%DT Q
45 ;
46NOPTF I $S(IBIDS(.08)="":1,'$D(^DGPT(IBIDS(.08),0)):1,1:0) K IBIDS(.08) W !!?4,*7,"PTF Record for this Admission is Missing",! Q
47 Q
48HELPAD I IBCNT D
49 . W !!?4,"Enter a number from 1 to ",IBCNT," to select the EVENT DATE. Inpatient",!?4,"admission dates are admissions for this VA Facility. Non-VA admissions",!?4,"are for Fee Basis admissions with associated PTF records."
50 . W !!?4,"Or you may enter a DATE in the past for which there is a Non-VA Admission",!?4,"without an associated PTF record",!
51 E D
52 . W !!?4,"Enter a DATE in the past for which there is a Non-VA Admission",!?4,"without an associated PTF record",!
53 Q
Note: See TracBrowser for help on using the repository browser.