[613] | 1 | FBCHSL1 ;AISC/DMK-PRINT SUSPENSION LETTERS CONTINUED ;7/NOV/2006
|
---|
| 2 | ;;3.5;FEE BASIS;**23,69,101**;JAN 30, 1995;Build 2
|
---|
| 3 | ;;Per VHA Directive 2004-038, this routine should not be modified.
|
---|
| 4 | N FBACRR,FBSCDT
|
---|
| 5 | F K=0:0 S K=$O(^FBAAI("AI",K)) Q:K'>0 I $S($G(IFN):IFN=K,1:1) S FBSW=1,FBDT=BEGDATE-.001 F ZZ=0:0 S FBDT=$O(^FBAAI("AI",K,FBDT)) D WPBOT:FBDT'>0&(FBSW=0)!(FBDT>ENDDATE)&(FBSW=0) Q:FBDT'>0!(FBDT>ENDDATE) S FBSCDT=FBDT D MORE
|
---|
| 6 | K FBCHAD,FBCHDT,FBAMTC,FBAMTP,FBAMTS Q
|
---|
| 7 | MORE F J=0:0 S J=$O(^FBAAI("AI",K,FBDT,J)) Q:J'>0 I $S($G(DFN):DFN=J,1:1) D:$D(^DPT(J,0)) GOTP^FBAASLP I $D(^FBAAV(K,0)) D MID
|
---|
| 8 | Q
|
---|
| 9 | GOTV S Y(0)=^FBAAV(K,0),VNAM=$P(Y(0),"^",1),FBSW=0
|
---|
| 10 | I VNAM["," S VNAM=$P(VNAM,",",2)_" "_$P(VNAM,",",1)
|
---|
| 11 | S VST1=$P(Y(0),"^",3),VST2=$P(Y(0),"^",14),VCITY=$P(Y(0),"^",4),VSTATE=$S($D(^DIC(5,+$P(Y(0),"^",5),0)):$P(^(0),"^",2),1:" "),VZIP=$P(Y(0),"^",6)
|
---|
| 12 | W @IOF,!!!!!!!,?5,VNAM,!,?5,VST1,! I VST2]"" W ?5,VST2,!
|
---|
| 13 | W ?5,VCITY," ",VSTATE," ",VZIP,!!!!
|
---|
| 14 | WPBEG S DIWL=1,DIWF="WC79" K ^UTILITY($J,"W")
|
---|
| 15 | I $D(^FBAA(161.3,FBLET,1,1)) F FBRR=0:0 S FBRR=$O(^FBAA(161.3,FBLET,1,FBRR)) Q:FBRR'>0 S FBXX=^(FBRR,0),X=FBXX D ^DIWP
|
---|
| 16 | D ^DIWW:$D(FBXX) K FBXX
|
---|
| 17 | D HED
|
---|
| 18 | Q
|
---|
| 19 | MID S FBA=0 F FBAA=0:0 S FBA=$O(^FBAAI("AI",K,FBDT,J,FBA)) Q:FBA="" I $S(FBSLW=0:1,FBSLW=1&($D(FBAAS(FBA))):1,1:0) D MORE2
|
---|
| 20 | Q
|
---|
| 21 | MORE2 F L=0:0 S L=$O(^FBAAI("AI",K,FBDT,J,FBA,L)) Q:L'>0 I $D(^FBAAI(L,0)) S Z(0)=^(0) D BOT
|
---|
| 22 | Q
|
---|
| 23 | WPBOT D:$D(FBACRR) ACT^FBAASLP K FBACRR
|
---|
| 24 | S DIWL=1,DIWF="WC79" K ^UTILITY($J,"W") W !!
|
---|
| 25 | I $D(^FBAA(161.3,FBLET,2)) F FBRR=0:0 S FBRR=$O(^FBAA(161.3,FBLET,2,FBRR)) Q:FBRR'>0 S FBXX=^(FBRR,0),X=FBXX D ^DIWP
|
---|
| 26 | D ^DIWW:$D(FBXX) K FBXX
|
---|
| 27 | Q
|
---|
| 28 | BOT Q:$S($G(FBDEN):$P(Z(0),U,9)>0,1:0) ;quit if not den (if prn den's only)
|
---|
| 29 | N FBY3,FBFPPSC
|
---|
| 30 | S FBY3=$G(^FBAAI(L,3))
|
---|
| 31 | S FBFPPSC=$P(FBY3,U,1) ; fpps claim id
|
---|
| 32 | Q:$S(FBENA=2&(FBFPPSC]""):1,FBENA=1&(FBFPPSC=""):1,1:0)
|
---|
| 33 | N FBCSID,FBFPPSL,FBX,FBADJLR,FBADJLA,FBRRMKL,T,TAMT
|
---|
| 34 | S FBCSID=$P($G(^FBAAI(L,2)),U,11) ; patient control number
|
---|
| 35 | S FBFPPSL=$P(FBY3,U,2) ; fpps line item
|
---|
| 36 | S FBX=$$ADJLRA^FBCHFA(L_",")
|
---|
| 37 | S T=$P(Z(0),U,11)
|
---|
| 38 | I T]"" S T=$P($G(^FBAA(161.27,+T,0)),U)
|
---|
| 39 | S TAMT=$FN($P(Z(0),U,10),"",2)
|
---|
| 40 | S FBADJLR=$P(FBX,U)
|
---|
| 41 | S:FBADJLR]"" FBACRR(FBADJLR)=""
|
---|
| 42 | S FBADJLA=$P(FBX,U,2)
|
---|
| 43 | S FBRRMKL=$$RRL^FBCHFR(L_",")
|
---|
| 44 | I FBSW=1 D GOTV^FBAASLP,HED S FBSW=0,FBGOT=1
|
---|
| 45 | S Y=$P(Z(0),"^",7) D PDATE^FBAAUTL S FBCHDT=FBPDT,Y=$P(Z(0),"^",6) D PDATE^FBAAUTL S FBCHAD=FBPDT,FBAMTC=$P(Z(0),"^",8),FBAMTP=$P(Z(0),"^",9),FBAMTS=$P(Z(0),"^",10)
|
---|
| 46 | I $Y+4>IOSL W @IOF D HED
|
---|
| 47 | W !!,PNAME,?32,PSSN,?56,FBCHAD
|
---|
| 48 | W !,FBCSID,?24,FBCHDT,?44,"$ ",FBAMTC,?61,"$ ",FBAMTP,!
|
---|
| 49 | ; write adjustment reasons, if null then write suspend code
|
---|
| 50 | W ?4,$S(FBADJLR]"":FBADJLR,1:T)
|
---|
| 51 | ; write adjustment amounts, if null then write amount suspended
|
---|
| 52 | W ?32,"$ ",$S(FBADJLA]"":FBADJLA,1:TAMT)
|
---|
| 53 | W ?59,FBRRMKL
|
---|
| 54 | I FBFPPSC]"" W !,?4,"FPPS Claim ID: ",FBFPPSC,?32,"FPPS Line Item: ",FBFPPSL,!
|
---|
| 55 | I FBADJLR="" G:FBA=4&($D(^FBAAI(L,1,0))) WPFT D
|
---|
| 56 | . S DIWL=1,DIWF="WC79",FBI=FBA K ^UTILITY($J,"W")
|
---|
| 57 | . F FBRR=0:0 S FBRR=$O(^FBAA(161.27,FBI,1,FBRR)) Q:FBRR'>0 S FBXX=^(FBRR,0),X=FBXX D ^DIWP
|
---|
| 58 | . D ^DIWW:$D(FBXX) K FBXX
|
---|
| 59 | Q
|
---|
| 60 | HED W !,"PATIENT NAME",?36,"SSN",?53,"ADMISSION DATE"
|
---|
| 61 | W !,"PATIENT CONTROL #",?22,"DISCHARGE DATE",?42,"AMOUNT CLAIMED",?59,"AMOUNT PAID"
|
---|
| 62 | W !,"ADJUSTMENT CODE",?29,"ADJUSTMENT AMOUNT",?54,"MEDICARE REMITTANCE REMARK"
|
---|
| 63 | W !,UL,! Q
|
---|
| 64 | ;
|
---|
| 65 | GOTP ; Utilize new API for Name Standardization
|
---|
| 66 | ;
|
---|
| 67 | S Y(0)=^DPT(J,0),PNAME=$$NAME^FBCHREQ2(J)
|
---|
| 68 | S PSSN=$TR($$SSNL4^FBAAUTL($$SSN^FBAAUTL(J)),"-","")
|
---|
| 69 | I PNAME["," D
|
---|
| 70 | .N FBNAMES
|
---|
| 71 | .S FBNAMES("FILE")=2,FBNAMES("IENS")=J_",",FBNAMES("FIELD")=.01
|
---|
| 72 | .S PNAME=$$NAMEFMT^XLFNAME(.FBNAMES)
|
---|
| 73 | Q
|
---|
| 74 | WPFT S DIWL=1,DIWF="WC79" K ^UTILITY($J,"W")
|
---|
| 75 | F FBRR=0:0 S FBRR=$O(^FBAAI(L,1,FBRR)) Q:FBRR'>0 S FBXX=^(FBRR,0),X=FBXX D ^DIWP
|
---|
| 76 | D ^DIWW:$D(FBXX) K FBXX
|
---|
| 77 | Q
|
---|
| 78 | HELP W !,"Answer 'Yes' to print suspension letters for all suspension",!,"codes, otherwise answer 'No' to select specific codes." G RDCODE^FBAASLP
|
---|