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

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

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1IBNCPRR1 ;ALB/OEC - Prescription Report for 3rd Party Billing (Extrinsic Functions) ;01/11/06
2 ;;2.0;INTEGRATED BILLING;**347**;21-MAR-94;Build 24
3 ;;Per VHA Directive 2004-038, this routine should not be modified.
4 ;This routine contains extrinsic function used by IBNCPRR
5RXINS(IBRX,IBFL) ; Determine insurance by the RX
6 Q 0
7 ;
8ECMENO(IBRX) ;
9 Q $E(IBRX,$L(IBRX)-6,$L(IBRX))
10 ;
11BILLINS(IBIFN) ; Insurance from the Bill#
12 I 'IBIFN Q 0
13 Q +$P($G(^DGCR(399,+IBIFN,"M")),U)
14 ;
15DAT(X) ;Convert FM date to displayable (mm/dd/yy) format.
16 N DATE,YR
17 I $G(X) S YR=$E(X,2,3)
18 I $G(X) S DATE=$S(X:$E(X,4,5)_"/"_$E(X,6,7)_"/"_YR,1:"")
19 Q $G(DATE)
20 ;
21DATTIM(X) ;Convert FM date to displayable (mm/dd/yy HH:MM) format.
22 N DATE,YR,IBT,IBM,IBH,IBAP
23 I $G(X) S YR=$E(X,2,3)
24 I $G(X) S DATE=$S(X:$E(X,4,5)_"/"_$E(X,6,7)_"/"_YR,1:"")
25 S IBT=$P(X,".",2) S:$L(IBT)<4 IBT=IBT_$E("0000",1,4-$L(IBT))
26 S IBH=$E(IBT,1,2),IBM=$E(IBT,3,4)
27 S IBAP="a" I IBH>12 S IBH=IBH-12,IBAP="p" S:$L(IBH)<2 IBH="0"_IBH
28 I IBT S:'IBH IBH=12 S DATE=DATE_" "_IBH_":"_IBM_IBAP
29 Q $G(DATE)
30 ;
31SSN4(DFN) ;last 4 SSN
32 N X
33 S X=$P($G(^DPT(DFN,0)),U,9)
34 Q $E(X,$L(X)-3,$L(X))
35 ;
36COPAY(IBRX,IBFL) ;
37 N IBACT,IBCOP
38 S IBACT=$S('IBFL:$P($$IBND^IBRXUTL($$FILE^IBRXUTL(IBRX,2),IBRX),U,2),1:$P($$IBNDFL^IBRXUTL($$FILE^IBRXUTL(IBRX,2),IBRX,IBFL),U))
39 S IBCOP=$P($G(^IB(+IBACT,0)),U,7)
40 Q $J(IBCOP,5,2)
41 ;
42 ; Next refill date (in not exist - DT)
43NXTREFDT(IBRX,IBFL) ;
44 N IBDT
45 S IBDT=$P($$SUBFILE^IBRXUTL(IBRX,IBFL+1,52,.01),".")
46 S:'IBDT IBDT=DT
47 Q IBDT
48 ;
Note: See TracBrowser for help on using the repository browser.