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

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

initial load of WorldVistAEHR

File size: 1.7 KB
Line 
1IBARXMR ;LL/ELZ - PHARMCAY COPAY CAP RPC STUFF ;17-NOV-2000
2 ;;2.0;INTEGRATED BILLING;**150,158,156,308**;21-MAR-94
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5RQUERY(IBR,IBICN,IBM) ; remote query call
6 ; called from rpc IBARXM QUERY ONLY
7 N DFN
8 S DFN=$$DFN^IBARXMU(IBICN) I 'DFN S IBY(0)=0 Q
9 D QUERY(.IBR,DFN,IBM)
10 S IBR=$NA(IBY)
11 Q
12 ;
13QUERY(IBR,DFN,IBM) ; call for querying data
14 ; IBR = where results are returned
15 ; IBM = month/year for query
16 N IBX,IBZ,IBS,IBC
17 K IBR
18 ;
19 S IBS=+$P($$SITE^IBARXMU,"^",3)
20 S (IBX,IBC)=0 F S IBX=$O(^IBAM(354.71,"AD",DFN,IBM,IBX)) Q:IBX<1 D
21 . S IBZ=^IBAM(354.71,IBX,0) Q:(+IBZ)'=IBS
22 . S IBC=IBC+1
23 . D SENDF^IBARXMU(.IBZ)
24 . S IBR(IBC)=IBZ
25 S IBR(0)=IBC
26 Q
27 ;
28TRANS(IBR,IBICN,IBD) ; remote procedure call for receiving transaction data (new or updated)
29 ; called from rpc IBARXM TRANS DATA
30 ; IBICN = the patient's ICN
31 ; IBR = return acceptance response
32 ; IBD = data being received on a transaction
33 N DFN,IBA
34 S DFN=$$DFN^IBARXMU(IBICN)
35 S IBR=$S(DFN>0:$$ADD^IBARXMN(DFN,IBD),1:0)
36 Q
37 ;
38BILL(IBR,IBICN,IBT,IBB) ; remote procedure call to indicate a bill should be
39 ; billed after all, this occurs when a copay bill was cancelled and
40 ; the patient had previously reached his cap and the bill indicated was
41 ; not billed.
42 ; called from rpc IBARXM TRANS BILL
43 ; IBR = return acceptance response
44 ; IBICN = patient's icn
45 ; IBT = 354.71 transaction number to bill
46 ; IBB = amount to bill
47 N DFN
48 S DFN=$$DFN^IBARXMU(IBICN) I 'DFN S IBR="-1^Patient not found" Q
49 ;
50 ; if PFSS/IDX transaction call VDEF and quit
51 I $$SWSTAT^IBBAPI,$P($G(^IBAM(354.71,+^IBAM(354.71,"B",IBT,0),0)),"^",20) S IBR=$$QUEUE^VDEFQM("DFT^P03","SUBTYPE=CPBL^IEN="_IBT_":"_IBB,,"PFSS OUTBOUND") Q
52 ;
53 D BILL^IBARXMB(IBT,IBB)
54 S IBR=1
55 Q
Note: See TracBrowser for help on using the repository browser.