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

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

initial load of FOIAVistA 6/30/08 version

File size: 4.2 KB
Line 
1IBTUBUL ;ALB/AAS - UNBILLED AMOUNTS ;29-SEP-94
2 ;;2.0;INTEGRATED BILLING;**19,123,159,217,155,356**;21-MAR-94
3 ;;Per VHA Directive 2004-038, this routine should not be modified.
4 ;
5TEST ; - Create and send test bulletin.
6 N IBBDT,IBEDT,IBSEL,IBTEST
7 S IBBDT=DT,IBEDT=DT,IBSEL="1,2,3",IBTEST=1
8 ;
9BULL ; - Create and send bulletin.
10 N IBGRP,IBT,IBX,XMDUZ,XMSUB,XMTEXT,XMN,XMY,XMZ,I,IDX,X,Y
11 ;
12 S XMSUB="UNBILLED AMOUNTS SUMMARY REPORT"_$S($G(IBTEST):" (TEST)",1:"")
13 S IBX=$P($$SITE^VASITE,U,2,3)
14 S IBT(1)="SUMMARY UNBILLED AMOUNTS FOR "_$P(IBX,U)_" ("_$P(IBX,U,2)_")."
15 S IBT(2)="PERIOD: FROM "_$$DAT1^IBOUTL(IBBDT)_" TO "_$$DAT1^IBOUTL(IBEDT)
16 S IDX=3
17 I $G(IBDET) S IBT(3)="DETAILED REPORT PRINTED TO '"_IO_"'",IDX=4
18 I $G(IBCOMP) D
19 . S IBT(IDX)="UNBILLED AMOUNTS FIGURES STORED FOR "_$$DAT2^IBOUTL(IBTIMON)
20 . S IDX=IDX+1
21 ;
22 S IBT(IDX)="",IDX=IDX+1
23 I $G(IBTEST) D G BULL1
24 .S IBT(IDX)="*** TEST DATA, TEST DATA ***",IDX=IDX+1 D TESTV
25 ;
26BULL1 ; - Create bulletin.
27 I IBSEL[1 D
28 . S X=$$INPAVG^IBTUBOU(IBTIMON)
29 . S IBT(IDX+1)="Inpatient Care:"
30 . S IBT(IDX+2)=" Number of Unbilled Inpatient Admissions : "_$J(IBUNB("EPISM-A"),11)
31 . S IBT(IDX+3)=" Number of MRA Unbilled Inpt Admissions : "_$J(IBUNB("EPISM-A-MRA"),11)
32 . S IBT(IDX+4)=" Number of Inpt. Institutional Cases : "_$J(IBUNB("EPISM-I"),11)
33 . S IBT(IDX+5)=" Average Inpt. Institutional Bill Amount : "_$J($P(X,"^"),11,2)
34 . S IBT(IDX+6)=" Number of Inpt. Professional Cases : "_$J(IBUNB("EPISM-P"),11)
35 . S IBT(IDX+7)=" Average Inpt. Professional Bill Amount : "_$J($P(X,"^",2),11,2)
36 . S IBT(IDX+8)=" Total Unbilled Inpatient Care : "_$J(IBUNB("UNBILIP"),11,2)
37 . S IBT(IDX+9)=" Total MRA Unbilled Inpatient Care : "_$J(IBUNB("UNBILIP-MRA"),11,2)
38 . S IBT(IDX+10)="",IDX=IDX+10
39 ;
40 I IBSEL[2 D
41 .S IBT(IDX+1)="Outpatient Care:"
42 .S IBT(IDX+2)=" Number of Unbilled Outpatient Cases : "_$J(IBUNB("ENCNTRS"),11)
43 .S IBT(IDX+3)=" Number of Unbilled CPT Codes : "_$J(IBUNB("CPTMS-I")+IBUNB("CPTMS-P"),11)
44 .S IBT(IDX+4)=" Number of MRA Unbilled CPT Codes : "_$J(IBUNB("CPTMS-I-MRA")+IBUNB("CPTMS-P-MRA"),11)
45 .S IBT(IDX+5)=" Total Unbilled Outpatient Care : "_$J(IBUNB("UNBILOP"),11,2)
46 .S IBT(IDX+6)=" Total MRA Unbilled Outpatient Care : "_$J(IBUNB("UNBILOP-MRA"),11,2)
47 .S IBT(IDX+7)="",IDX=IDX+7
48 ;
49 I IBSEL[3 D
50 .S IBT(IDX+1)="Prescriptions:"
51 .S IBT(IDX+2)=" Number of Unbilled Prescriptions : "_$J(IBUNB("PRESCRP"),11)
52 .S IBT(IDX+3)=" Number of MRA Unbilled Prescriptions : "_$J(IBUNB("PRESCRP-MRA"),11)
53 .S IBT(IDX+4)=" Total Unbilled Prescriptions : "_$J(IBUNB("UNBILRX"),11,2)
54 .S IBT(IDX+5)=" Total MRA Unbilled Prescriptions : "_$J(IBUNB("UNBILRX-MRA"),11,2)
55 .S IBT(IDX+6)="",IDX=IDX+6
56 ;
57 I IBSEL="1,2,3" D
58 .S IBT(IDX+1)="Total Unbilled Amount (all care) : "_$J(IBUNB("UNBILTL"),11,2)
59 .S IBT(IDX+2)="Total MRA Unbilled Amount (all care) : "_$J(IBUNB("UNBILTL-MRA"),11,2)
60 .S IDX(IDX+3)="",IDX=IDX+3
61 ;
62 S IBT(IDX+1)="",IDX=IDX+1
63 I IBSEL[1 D
64 . S IBT(IDX+1)="Note: Average bill Amount is based on Bills Authorized during the 12"
65 . S IBT(IDX+2)=" months preceding the month of this report."
66 . S IDX=IDX+2
67 ;
68 S IBT(IDX+1)="Note: Number of cases is insured cases in Claims Tracking that are"
69 S IBT(IDX+2)=" not billed (or bill not authorized/req MRA) but appear to be billable."
70 D SEND
71 ;
72BULLQ Q
73 ;
74SEND ; - Send bulletin.
75 K XMY S XMDUZ="INTEGRATED BILLING PACKAGE",XMTEXT="IBT("
76 S XMN=0,IBGRP=$P($G(^XMB(3.8,+$P($G(^IBE(350.9,1,6)),"^",25),0)),"^")
77 I $G(IBCOMP),IBGRP]"" S XMY("G."_IBGRP_"@"_^XMB("NETNAME"))=""
78 I '$G(IBCOMP) S XMY(DUZ)=""
79 D ^XMD
80 Q
81 ;
82TESTV ; - Set up test variables.
83 S IBTIMON=9999999
84 S IBUNB("EPISM-A")=11111
85 S IBUNB("EPISM-A-MRA")=22222
86 S IBUNB("EPISM-I")=11111
87 S IBUNB("EPISM-P")=0
88 S IBUNB("UNBILIP")=99999.99
89 S IBUNB("UNBILIP-MRA")=77777.77
90 S IBUNB("ENCNTRS")=11111
91 S IBUNB("CPTMS-I")=11111
92 S IBUNB("CPTMS-I-MRA")=22222
93 S IBUNB("CPTMS-P")=0
94 S IBUNB("CPTMS-P-MRA")=0
95 S IBUNB("UNBILOP")=99999.99
96 S IBUNB("UNBILOP-MRA")=77777.77
97 S IBUNB("PRESCRP")=11111
98 S IBUNB("PRESCRP-MRA")=22222
99 S IBUNB("UNBILRX")=11111
100 S IBUNB("UNBILRX-MRA")=22222
101 S IBUNB("UNBILTL")=99999.99
102 S IBUNB("UNBILTL-MRA")=77777.77
103 Q
Note: See TracBrowser for help on using the repository browser.