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

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

initial load of WorldVistAEHR

File size: 4.1 KB
Line 
1IBJTEA ;ALB/ARH-TPI PATIENT ELIGIBLITY SCREEN ;16-FEB-1995
2 ;;2.0;INTEGRATED BILLING;**39,153,183**;21-MAR-94
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5 ; the EL Patient Eligibility screen is based on the Eligibility Inquiry for Patient Billing
6 ; [DG PATIENT ELIGIBILITY INQUIRY] display option
7 ;
8EN ; -- main entry point for IBJ TP CLAIMS INFO
9 D EN^VALM("IBJT PT ELIGIBILITY")
10 Q
11 ;
12HDR ; -- header code
13 D HDR^IBJTU1(+$G(IBIFN),+DFN,1)
14 Q
15 ;
16INIT ; -- init variables and list array
17 K ^TMP("IBJTEA",$J)
18 I '$G(DFN) S VALMQUIT="" G INITQ
19 I '$G(IBIFN) D PRTCL^IBJU1("IBJT SHORT MENU")
20 D BLD
21INITQ Q
22 ;
23HELP ; -- help code
24 S X="?" D DISP^XQORM1 W !!
25 Q
26 ;
27EXIT ; -- exit code
28 K ^TMP("IBJTEA",$J)
29 D CLEAR^VALM1
30 Q
31 ;
32BLD ; DFN, required, uses Statment From date of the bill if available, DT if not
33 I '$G(DFN) G BLDQ
34 N IBX,IBY,IBI,IBDU,IBDT,IBDTE,IBLN,IBD,IBT,IBTC,IBTW,IBSW,IBLR,IBGRPB,IBGRPE,IBCNT
35 S (IBLN,VALMCNT)=1
36 S IBTC(1)=1,IBTW(1)=25,IBSW(1)=23,IBTC(2)=52,IBTW(2)=15,IBSW(2)=11,IBTC(4)=1,IBTW(4)=0,IBSW(4)=38
37 ;
38 S IBGRPB=IBLN,IBLR=1
39 ;
40 S IBX=$$LST^DGMTU(DFN)
41 S IBT="Means Test: ",IBD=$P(IBX,U,4)
42 S IBD=$S('IBX:"Not in Means Test File",IBD="P":"PEN",IBD="C":"YES",IBD="G":"GMT",IBD="R":"REQ",1:"NO")
43 S IBLN=$$SET(IBT,IBD,IBLN,IBLR)
44 S IBT="Date of Test: ",IBD=$$DATE^IBJU1($P(IBX,U,2)) S IBLN=$$SET(IBT,IBD,IBLN,IBLR)
45 S IBX=$$LST^DGMTU(DFN,"",2)
46 S IBT="Co-pay Exemption Test: ",IBD=$P(IBX,U,3) S IBLN=$$SET(IBT,IBD,IBLN,IBLR)
47 S IBT="Date of Test: ",IBD=$$DATE^IBJU1($P(IBX,U,2)) S IBLN=$$SET(IBT,IBD,IBLN,IBLR)
48 ;
49 I +$$BIL^DGMTUB(DFN) S IBT="",IBD="Patient has agreed to pay deductible" S IBLN=$$SET(IBT,IBD,IBLN,4)
50 ;
51 S IBGRPE=IBLN,IBLN=IBGRPB,IBLR=2
52 ;
53 S IBT="Insured: ",IBD=$S(+$$INSURED^IBCNS1(DFN):"Yes",1:"No") S IBLN=$$SET(IBT,IBD,IBLN,IBLR)
54 D SVC^VADPT
55 S IBT="A/O Exposure: ",IBD=$S(+VASV(2):"Yes",1:"") S IBLN=$$SET(IBT,IBD,IBLN,IBLR)
56 S IBT="Rad. Exposure: ",IBD=$S(+VASV(3):"Yes",1:"") S IBLN=$$SET(IBT,IBD,IBLN,IBLR)
57 K VASV
58 ;
59 S (IBLN,VALMCNT)=$S(IBLN>IBGRPE:IBLN,1:IBGRPE)
60 S IBTC(5)=1,IBTW(5)=25,IBSW(5)=53,IBLR=5
61 S (IBT,IBD)="" S IBLN=$$SET(IBT,IBD,IBLN,IBLR)
62 ;
63 D ELIG^VADPT
64 S IBT="Primary Elig. Code: ",IBD=$P(VAEL(1),U,2)_$S(VAEL(8)'="":" -- "_$P(VAEL(8),U,2),1:"") S IBLN=$$SET(IBT,IBD,IBLN,IBLR)
65 I $D(VAEL(1))>1 S IBT="Other Elig. Code(s): ",IBI=0 F S IBI=$O(VAEL(1,IBI)) Q:'IBI D
66 . S IBD=$P(VAEL(1,IBI),U,2) S IBLN=$$SET(IBT,IBD,IBLN,IBLR),IBT=""
67 S (IBT,IBD)="" S IBLN=$$SET(IBT,IBD,IBLN,IBLR)
68 ;
69 S IBT="Service Connected: ",IBD=$S('VAEL(3):"No",1:$P(VAEL(3),U,2)_"%") S IBLN=$$SET(IBT,IBD,IBLN,IBLR)
70 S IBT="Rated Disabilities: " D
71 . I 'VAEL(4) S IBD="Not a Veteran" S IBLN=$$SET(IBT,IBD,IBLN,IBLR) Q
72 . I '$O(^DPT(DFN,.372,0)) S IBD="None" S IBLN=$$SET(IBT,IBD,IBLN,IBLR) Q
73 . S IBI=0 F S IBI=$O(^DPT(DFN,.372,IBI)) Q:'IBI D
74 .. S IBX=$G(^DPT(DFN,.372,IBI,0)),IBY=$G(^DIC(31,+IBX,0))
75 .. S IBD=$S($P(IBY,U,4)="":$P(IBY,U,1),1:$P(IBY,U,4))_" ("_$P(IBX,U,2)_"%-"_$S(+$P(IBX,U,3):"SC",1:"NSC")_")"
76 .. S IBLN=$$SET(IBT,IBD,IBLN,IBLR),IBT=""
77 K VAEL
78 ;
79 ; initially requested by a test site, but group decided only rated disablities should be displayed
80 ;I $O(^DPT(DFN,.373,0)) D
81 ;. ;
82 ;. S IBTC(1)=0,IBTW(1)=0,IBSW(1)=79,IBLR=1
83 ;. S (IBT,IBD)="" S IBLN=$$SET(IBT,IBD,IBLN,IBLR)
84 ;. ;
85 ;. S IBT="",IBD=" Service Connected Conditions as stated by applicant" S IBLN=$$SET(IBT,IBD,IBLN,IBLR)
86 ;. S IBT="",IBD=" ---------------------------------------------------" S IBLN=$$SET(IBT,IBD,IBLN,IBLR)
87 ;. ;
88 ;. S (IBT,IBD)="",(IBCNT,IBI)=0
89 ;. F S IBI=$O(^DPT(DFN,.373,IBI)) Q:'IBI D
90 ;.. S IBX=$G(^DPT(DFN,.373,IBI,0)) Q:IBX=""
91 ;.. S IBY=$P(IBX,U,1)_" ("_$P(IBX,U,2)_"%)"
92 ;.. S IBD=IBD_" "_IBY_$J("",(37-$L(IBY))),IBCNT=IBCNT+1
93 ;.. I IBCNT>1 S IBLN=$$SET(IBT,IBD,IBLN,IBLR),IBD="",IBCNT=0
94 ;. I IBD'="" S IBLN=$$SET(IBT,IBD,IBLN,IBLR),IBD="",IBCNT=0
95 ;
96 S VALMCNT=IBLN-1
97 ;
98BLDQ K VAERR
99 Q
100 ;
101SET(TTL,DATA,LN,LR) ;
102 N IBY
103 S IBY=$J(TTL,IBTW(LR))_DATA D SET1(IBY,LN,IBTC(LR),(IBTW(LR)+IBSW(LR)))
104 S LN=LN+1
105 Q LN
106 ;
107SET1(STR,LN,COL,WD,RV) ; set up TMP array with screen data
108 N IBX S IBX=$G(^TMP("IBJTEA",$J,LN,0))
109 S IBX=$$SETSTR^VALM1(STR,IBX,COL,WD)
110 D SET^VALM10(LN,IBX) I $G(RV)'="" D CNTRL^VALM10(LN,COL,WD,IORVON,IORVOFF)
111 Q
Note: See TracBrowser for help on using the repository browser.