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

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

initial load of FOIAVistA 6/30/08 version

File size: 1.3 KB
Line 
1IBAUTL1 ;ALB/AAS - IB UTILITY ROUTINE FOR MEDICARE RATES ; 30-AUG-91
2 ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5RATE ; - Calculates the Medicare rate for a CPT code.
6 ; - Input X = visit date ^ division ^ ifn of cpt code
7 ; - Output Y = charge
8 ;
9 S IBX=X N X S X=IBX
10 S IBRG=$O(^IBE(350.4,"AIVDT",+$P(X,"^",3),-($P(X,"^")+1))) I IBRG S IBRG=$O(^(+IBRG,0)) ;determine current ib action type for code
11 I $S('IBRG:1,'$D(^IBE(350.4,+IBRG,0)):1,'$P(^(0),"^",3):1,1:0) S Y=-1 G RATEQ
12 S IBRG=+$P(^IBE(350.4,IBRG,0),"^",3)
13 S DA=$O(^IBE(350.2,"AIVDT",IBRG,-($P(X,"^")+1))) I DA S DA=$O(^(+DA,0)) ; determine current ib action charge for rate group
14 I $S('DA:1,'$D(^IBE(350.2,DA,10)):1,1:0) S Y=-1 G RATEQ
15 X ^IBE(350.2,DA,10)
16RATEQ K IBRG,IBX
17 Q
18 ;
19VAR ; -Called by entries in 350.2 to get variables
20 ; -input x=visit date^division ifn
21 ; da=internal number from 350.2
22 ; -output y=wage%^non-wage%^locality multiplier
23 ;
24 S IBLOC=$O(^IBE(350.5,"AIVDT",+$P(X,"^",2),-($P(X,"^")+1))) I IBLOC S IBLOC=$O(^(+IBLOC,0))
25 I $S('IBLOC:1,'$D(^IBE(350.5,+IBLOC,0)):1,'$P(^(0),"^",7):1,1:0) S Y=-1 G VARQ
26 S Y=$P(^IBE(350.5,IBLOC,0),"^",5,7)
27VARQ K IBLOC,IBWAG Q
28 ;
29TEST S DA=14,X=DT_"^1^10141" D RATE ;X ^IBE(350.2,DA,10) W X," ",Y
Note: See TracBrowser for help on using the repository browser.