RCRJRCOC ;WISC/RFJ/BGJ-count current receivables ;1 Aug 00 ;;4.5;Accounts Receivable;**156,170,182,203,220,138,239**;Mar 20, 1995 ;;Per VHA Directive 10-93-142, this routine should not be modified. ; IA 4385 for call to $$MRATYPE^IBCEMU2 Q ; ; CURRENT(RCBILLDA,RCVALUE) ; count current bills balance ; rcvalue = prin ^ int ^ admin ^ mf ^ cc ; N %,RCFUND,RCRSC,RCTOHSIF,RCTOMCCF,SGL,TYPE,MRATYPE,ARACTDT,CATEGORY ; ; calculate the rsc for the bill. the rsc is only used for ; mccf bills S RCRSC="" I $$ACCK^PRCAACC(RCBILLDA) S RCRSC=$$CALCRSC^RCXFMSUR(RCBILLDA) ; ; calculate the amount that goes to mccf and hsif D MCCFHSIF(RCBILLDA,RCVALUE,RCRSC,DATEEND+1) ; ; store the data for the ndb, if a 0 is returned by the function, ; then the bill has already been counted as a current receivable,quit I '$$NDBSTORE(RCBILLDA,RCVALUE,1) Q ; ; store results for FMS SV document for accrued bills only ; do not include prepayments (26) I $$ACCK^PRCAACC(RCBILLDA),$P($G(^PRCA(430,RCBILLDA,0)),"^",2)'=26 D . ; get the bills fund and category . S RCFUND=$$GETFUNDB^RCXFMSUF(RCBILLDA) . S RCFUND=$$ADJFUND^RCRJRCO(RCFUND) ; may remove the line after 10/1/03 . S CATEGORY=+$P($G(^PRCA(430,RCBILLDA,0)),"^",2) . ; . ; ----- this code is used to set up the SV code sheet ----- . S TYPE=21 . ; special type for tort feasor . I $E(RCRSC,1,2)=86 S TYPE="2A" . ; . ; Get ARACTDT=AR Date Active for bill . S ARACTDT=+$P($P($G(^PRCA(430,RCBILLDA,6)),"^",21),".") . ; determine Receivable Type: 1=pre-MRA, 2=post-MRA Medicre, 3=post-MRA non-Medicare . ; DBIA #4385 activated on 31-Mar-2004 . S MRATYPE=$$MRATYPE^IBCEMU2(RCBILLDA,ARACTDT) . ; set TYPE to 2F for post-MRA Medicare bills or to 2L for . ; post-MRA non-Medicare bills (for RHI receivables only) . I $E(RCRSC,1,2)=85,MRATYPE>1 S TYPE=$S(MRATYPE=2:"2F",1:"2L") . ; . ; store dollars to mccf and hsif . I RCTOMCCF S ^TMP($J,"RCRJRCOLSV",TYPE,RCFUND,RCRSC)=$G(^TMP($J,"RCRJRCOLSV",TYPE,RCFUND,RCRSC))+RCTOMCCF . I RCTOHSIF S ^TMP($J,"RCRJRCOLSV",21,5358.1,$S(RCRSC="8BZZ":"8B1Z",1:"8C1Z"))=$G(^TMP($J,"RCRJRCOLSV",21,5358.1,$S(RCRSC="8BZZ":"8B1Z",1:"8C1Z")))+RCTOHSIF . ; . ; ----- this code is used to build the user report . S %=+$P($P($G(^PRCA(430,RCBILLDA,6)),"^",21),".") . S ^TMP($J,"RCRJRCOLREPORT",%,RCBILLDA)=$P(RCVALUE,"^")_"^"_($P(RCVALUE,"^",2)+$P(RCVALUE,"^",3)+$P(RCVALUE,"^",4)+$P(RCVALUE,"^",5))_"^SV"_TYPE . ; . ; ----- this code is used to build the OIG extract, piece 3 = GL acct . S ^TMP($J,"RCRJROIG",RCBILLDA)=$P(RCVALUE,"^")_"^"_($P(RCVALUE,"^",2)+$P(RCVALUE,"^",3)+$P(RCVALUE,"^",4)+$P(RCVALUE,"^",5))_"^"_$S(TYPE=21:1315,1:1333) . ; . ; ----- this code is used to set up medicare supplemental SVs . S %=$G(^PRCA(430,RCBILLDA,13)) . ; medicare contract adjustment field 131 for bills activated in AR during the month the ARDC is running . I $P(%,"^",1),ARACTDT'