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

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

initial load of FOIAVistA 6/30/08 version

File size: 4.6 KB
Line 
1IBTRED0 ;ALB/AAS - EXPAND/EDIT CLAIMS TRACKING ENTRY - CONT. ;01-JUL-1993
2 ;;2.0;INTEGRATED BILLING;**160,210,317,276**;21-MAR-94
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5% I '$G(IBTRN)!($G(IORVON)="") G ^IBTRED
6 D CLIN,BILL,PRE
7 Q
8 ;
9CLIN ; -- clinical data region
10 N OFFSET,START,IBICD
11 S START=7,OFFSET=2
12 ;
13CLIN1 N IBETYP S IBETYP=$$TRTP^IBTRE1(IBTRN) I 'IBETYP!(IBETYP>2) Q
14 D SET^IBCNSP(START,OFFSET," Clinical Information ",IORVON,IORVOFF)
15 I "12"[IBETYP D @IBETYP
16 Q
17 ;
181 ; -- inpatient clinical data
19 ;D SET^IBCNSP(START+1,OFFSET," Provider: "_$E($P($G(VAIN(2)),"^",2),1,15))
20 D SET^IBCNSP(START+1,OFFSET," Provider: "_$E($$APROV^IBTRE6(IBTRN),1,15))
21 D SET^IBCNSP(START+2,OFFSET,"Admitting Diag: "_$E($$ADMDIAG^IBTRE6(IBTRN),1,23))
22 D SET^IBCNSP(START+3,OFFSET," Primary Diag: "_$E($$PDIAG^IBTRE6(IBTRN),1,23))
23 D LISTP^IBTRE6(IBTRN,.IBICD)
24 D SET^IBCNSP(START+4,OFFSET," 1st Procedure: "_$E($$PROC^IBTRE6(+$G(IBICD(1)),1),1,23))
25 D SET^IBCNSP(START+5,OFFSET," 2nd Procedure: "_$E($$PROC^IBTRE6(+$G(IBICD(2)),1),1,23))
26 Q
27 ;
282 ; -- outpatient clinic data
29 N IBDATE ; Date of service for CSV
30 S IBDATE=$$TRNDATE^IBACSV(IBTRN)
31 S IBOE=$P(IBTRND,"^",4)
32 I +IBOE<1 D SET^IBCNSP(START+1,OFFSET," No Outpatient Encounter Found") Q
33 N SDDXY,SDPRY D SET^SDCO3(+IBOE) S IBPCNT=SDCNT D SET^SDCO4(IBOE) S IBDCNT=SDCNT
34 D SET^IBCNSP(START+1,OFFSET," Provider: "_$E($P($G(^VA(200,+$P($G(SDPRY(1)),"^",2),0)),"^"),1,23)) ;sdd(409.44
35 D SET^IBCNSP(START+2,OFFSET," Provider: "_$E($P($G(^VA(200,+$P($G(SDPRY(2)),"^",2),0)),"^"),1,23)) ;sdd(409.44
36 D SET^IBCNSP(START+3,OFFSET," Diagnosis: "_$E($$DIAG^IBTRE6(+$P($G(SDDXY(1)),"^",2),1,IBDATE),1,23)) ;sdd(409.43
37 D SET^IBCNSP(START+4,OFFSET," Diagnosis: "_$E($$DIAG^IBTRE6(+$P($G(SDDXY(2)),"^",2),1,IBDATE),1,23)) ;sdd(409.43
38 D SET^IBCNSP(START+5,OFFSET," Special Cond: "_$$ENCL^IBTRED(IBOE))
39 Q
40 ;
41BILL ; -- billing information region
42 N OFFSET,START,IBBIL,IBECME,IBECMEN,IBCOMM
43 S START=15,OFFSET=2
44 S IBBIL=+$P(IBTRND,"^",11)
45 S IBDGCR=$G(^DGCR(399,IBBIL,0)),IBDGCRU1=$G(^("U1"))
46 S IBECMEN=$P($P($G(^DGCR(399,IBBIL,"M1")),U,8),";") ;ecme#
47 S IBECME=''IBECMEN
48 S IBAMNT=$$BILLD^IBTRED1(IBTRN)
49 D SET^IBCNSP(START,OFFSET+20," Billing Information ",IORVON,IORVOFF)
50 D SET^IBCNSP(START+1,OFFSET," Episode Billable: "_$S(+$P(IBTRND,"^",19):"NO",1:"YES"))
51 D SET^IBCNSP(START+2,OFFSET," Non-Billable Reason: "_$E($P($G(^IBE(356.8,+$P(IBTRND,"^",19),0)),"^"),1,20))
52 D SET^IBCNSP(START+3,OFFSET," Next Bill Date: "_$$DAT1^IBOUTL($P(IBTRND,"^",17)))
53 D SET^IBCNSP(START+4,OFFSET,"Work. Comp/OWCP/Tort: "_$E($$EXPAND^IBTRE(356,.12,$P(IBTRND,"^",12)),1,14))
54 D SET^IBCNSP(START+5,OFFSET," Initial Bill: "_$P(IBDGCR,"^")_$S(IBECME:"e",1:""))
55 I IBECME D SET^IBCNSP(START+6,OFFSET," ECME Number: "_IBECMEN)
56 D SET^IBCNSP(START+6+IBECME,OFFSET," Bill Status: "_$E($$EXPAND^IBTRE(399,.13,$P(IBDGCR,"^",13)),1,14))
57 ;S IBCOMM="" I +$P(IBTRND,"^",19) ; removed 'IF' for displaying the comment
58 S IBCOMM=$E($P(IBTRND1,"^",8),1,60)
59 I IBCOMM'="" D SET^IBCNSP(START+7+IBECME,OFFSET," Additional Comment: "_IBCOMM)
60 I $P($G(^IBT(356,IBTRN,3,0)),"^",3) D
61 . N IBX,IBY
62 . S IBY="",IBX=0 F S IBX=$O(^IBT(356,IBTRN,3,IBX)) Q:'IBX S IBY($P($G(^IBT(356.85,+$G(^IBT(356,IBTRN,3,IBX,0)),0)),"^"))=""
63 . S IBX="" F S IBX=$O(IBY(IBX)) Q:IBX="" S IBY=IBY_$S($L(IBY):", ",1:"")_IBX
64 . D SET^IBCNSP(START+($S(+$P(IBTRND,"^",19):8,1:7)),OFFSET," Billable Findings: "_IBY)
65 D BILL1
66 Q
67 ;
68BILL1 ; -- other side of billing info
69 N OFFSET,START
70 S START=15,OFFSET=45
71 D SET^IBCNSP(START+1,OFFSET," Total Charges: $ "_$J($P(IBAMNT,"^"),8))
72 D SET^IBCNSP(START+2,OFFSET,"Estimated Recv (Pri): $ "_$J($P(IBTRND,"^",21),8))
73 D SET^IBCNSP(START+3,OFFSET,"Estimated Recv (Sec): $ "_$J($P(IBTRND,"^",22),8))
74 D SET^IBCNSP(START+4,OFFSET,"Estimated Recv (ter): $ "_$J($P(IBTRND,"^",23),8))
75 D SET^IBCNSP(START+5,OFFSET," Means Test Charges: $ "_$J($P(IBTRND,"^",28),8))
76 D SET^IBCNSP(START+6,OFFSET," Amount Paid: $ "_$J($P(IBAMNT,"^",2),8))
77 Q
78 ;
79PRE ; -- pre-certification region
80 N OFFSET,START,IBTRC,IBTRCD
81 ;S START=15,OFFSET=45
82 S START=1,OFFSET=45
83 D SET^IBCNSP(START,OFFSET," Treatment Authorization Info ",IORVON,IORVOFF)
84 D SET^IBCNSP(START+1,OFFSET,"Authorization #: "_$$PRECRT^IBTRC1(IBTRN))
85 D SET^IBCNSP(START+2,OFFSET," No. Days Approved: "_$J($$DAY^IBTRE(IBTRN),3))
86 D SET^IBCNSP(START+3,OFFSET,"Second Opinion Required: "_$$EXPAND^IBTRE(356,.14,$P(IBTRND,"^",14)))
87 D SET^IBCNSP(START+4,OFFSET,"Second Opinion Obtained: "_$$EXPAND^IBTRE(356,.15,$P(IBTRND,"^",15)))
88 Q
89 ;
90SPCOND(IBTRN) ; -- see if sc or other special condition for patient
91 ; -- if inpt. look in ptf. if opt look opt encounter file
92 ;
93 Q ""
Note: See TracBrowser for help on using the repository browser.