1 | RCXFMSPR ;WISC/RFJ-print revenue source codes ;1 Oct 97
|
---|
2 | ;;4.5;Accounts Receivable;**90,96,101,156,170,203**;Mar 20, 1995
|
---|
3 | ;;Per VHA Directive 10-93-142, this routine should not be modified.
|
---|
4 | W !,"This option will print out a list of the revenue source codes sent from"
|
---|
5 | W !,"the VISTA system to FMS."
|
---|
6 | ;
|
---|
7 | ; select device
|
---|
8 | W ! S %ZIS="Q" D ^%ZIS Q:POP
|
---|
9 | I $D(IO("Q")) D D ^%ZTLOAD K IO("Q"),ZTSK Q
|
---|
10 | . S ZTDESC="Revenue Source Code Report",ZTRTN="DQ^RCXFMSPR"
|
---|
11 | . S ZTSAVE("ZTREQ")="@"
|
---|
12 | W !!,"<*> please wait <*>"
|
---|
13 | ;
|
---|
14 | DQ ; queue starts here
|
---|
15 | N %,%I,BINARY,COL2DESC,COL3DESC,COLUMN1,COLUMN2,COLUMN3,COLUMN4
|
---|
16 | N DECIMAL,DESCRIP,NOW,PAGE,RCSTFLAG,SCREEN,X,Y
|
---|
17 | D NOW^%DTC S Y=% D DD^%DT S NOW=Y
|
---|
18 | S PAGE=1,SCREEN=0 I '$D(ZTQUEUED),IO=IO(0),$E(IOST)="C" S SCREEN=1
|
---|
19 | U IO D H
|
---|
20 | ;
|
---|
21 | S COLUMN1="A",COLUMN2="R",COLUMN3="R",COLUMN4="V",DESCRIP="Miscellaneous"
|
---|
22 | D WRITEIT
|
---|
23 | ;
|
---|
24 | ; for now, column 1 is always 8 and column 4 is always Z
|
---|
25 | S COLUMN1=8,COLUMN4="Z"
|
---|
26 | F COLUMN2=1:1:9,"A","B","C","D","E","F","G","H","I","J","K","L","M" D Q:$G(RCSTFLAG)
|
---|
27 | . S COL2DESC=$P($T(@("A"_COLUMN2)),";",3)
|
---|
28 | . ;
|
---|
29 | . S COLUMN3=$S(COLUMN2=5:"*",1:"Z")
|
---|
30 | . S DESCRIP=COL2DESC D WRITEIT
|
---|
31 | . ;
|
---|
32 | . I $G(RCSTFLAG) Q
|
---|
33 | . ;
|
---|
34 | . ; show hsif - disabled by patch 203
|
---|
35 | . ;I COLUMN2="B"!(COLUMN2="C") S DESCRIP=DESCRIP_" HSIF",COLUMN3=1 D WRITEIT
|
---|
36 | ;
|
---|
37 | I $G(RCSTFLAG) D Q Q
|
---|
38 | ;
|
---|
39 | ; print reimbursable health insurance rsc's
|
---|
40 | S COLUMN2=5
|
---|
41 | W !!?6,"For REIMBURSABLE HEALTH INSURANCE [85*Z]:"
|
---|
42 | F DECIMAL=0:1:31 D Q:$G(RCSTFLAG)
|
---|
43 | . I DECIMAL<10 S COLUMN3=DECIMAL
|
---|
44 | . E S COLUMN3=$C(65+DECIMAL-10)
|
---|
45 | . ;
|
---|
46 | . ; convert decimal to binary (ex: 10011) so it can be
|
---|
47 | . ; parsed in rsc to get the description
|
---|
48 | . S BINARY=$$CONVERT(DECIMAL)
|
---|
49 | . S COL3DESC=$P($T(@("B"_$E(BINARY,1,2))),";",3)
|
---|
50 | . S COL3DESC=COL3DESC_", "_$P($T(@("C"_$E(BINARY,3))),";",3)
|
---|
51 | . S COL3DESC=COL3DESC_", "_$P($T(@("D"_$E(BINARY,4))),";",3)
|
---|
52 | . S COL3DESC=COL3DESC_", "_$P($T(@("E"_$E(BINARY,5))),";",3)
|
---|
53 | . S DESCRIP=COL3DESC
|
---|
54 | . D WRITEIT
|
---|
55 | ;
|
---|
56 | Q D ^%ZISC
|
---|
57 | Q
|
---|
58 | ;
|
---|
59 | ;
|
---|
60 | GETDESC(RSC) ; return the description for the revenue source code
|
---|
61 | N BINARY,COL3DESC,COLUMN2,COLUMN3,DESC
|
---|
62 | I RSC="ARRV" Q "Miscellaneous"
|
---|
63 | I RSC=8046 Q "Administrative"
|
---|
64 | I RSC=8047 Q "Interest"
|
---|
65 | I RSC=8048 Q "Marshal Fee and Court Cost"
|
---|
66 | S DESC="UNKNOWN"
|
---|
67 | S COLUMN2=$E(RSC,2)
|
---|
68 | I "123456789ABCDEFGHIJKLM"[COLUMN2 S DESC=$P($T(@("A"_COLUMN2)),";",3)
|
---|
69 | ; HSIF reference disabled by patch 203
|
---|
70 | ; I RSC="8B1Z"!(RSC="8C1Z") S DESC=DESC_" (HSIF)"
|
---|
71 | I COLUMN2'=5 Q DESC
|
---|
72 | ;
|
---|
73 | S COLUMN3=$E(RSC,3)
|
---|
74 | ; convert alpha letters to decimal
|
---|
75 | I "0123456789"'[COLUMN3 S COLUMN3=$A(COLUMN3)-55
|
---|
76 | S BINARY=$$CONVERT(COLUMN3)
|
---|
77 | S COL3DESC=$P($T(@("B"_$E(BINARY,1,2))),";",3)
|
---|
78 | S COL3DESC=COL3DESC_", "_$P($T(@("C"_$E(BINARY,3))),";",3)
|
---|
79 | S COL3DESC=COL3DESC_", "_$P($T(@("D"_$E(BINARY,4))),";",3)
|
---|
80 | S COL3DESC=COL3DESC_", "_$P($T(@("E"_$E(BINARY,5))),";",3)
|
---|
81 | Q "RHI, "_COL3DESC
|
---|
82 | ;
|
---|
83 | ;
|
---|
84 | CONVERT(DECIMAL) ; convert decimal number to binary (5 digits)
|
---|
85 | N Y
|
---|
86 | S Y=""
|
---|
87 | F S Y=$E("0123456789ABCDEF",DECIMAL#2+1)_Y,DECIMAL=DECIMAL\2 Q:DECIMAL<1
|
---|
88 | S Y=$E("00000",0,5-$L(Y))_Y
|
---|
89 | Q Y
|
---|
90 | ;
|
---|
91 | ;
|
---|
92 | WRITEIT ; display the rsc
|
---|
93 | W !,COLUMN1,COLUMN2,COLUMN3,COLUMN4,?6,DESCRIP
|
---|
94 | I $Y>(IOSL-5) D:SCREEN PAUSE Q:$G(RCSTFLAG) D H
|
---|
95 | Q
|
---|
96 | ;
|
---|
97 | ;
|
---|
98 | PAUSE ; pause at end of page
|
---|
99 | N X U IO(0) W !,"Press RETURN to continue, '^' to exit:" R X:DTIME S:'$T X="^" S:X["^" RCSTFLAG=1 U IO
|
---|
100 | Q
|
---|
101 | ;
|
---|
102 | ;
|
---|
103 | H ; header
|
---|
104 | S %=NOW_" PAGE "_PAGE,PAGE=PAGE+1 I PAGE'=2!(SCREEN) W @IOF
|
---|
105 | W $C(13),"REVENUE SOURCE CODE REPORT (VISTA TO FMS)",?(80-$L(%)),%
|
---|
106 | W !,"RSC",?6,"Description"
|
---|
107 | S %="",$P(%,"-",81)=""
|
---|
108 | W !,%
|
---|
109 | Q
|
---|
110 | ;
|
---|
111 | ;
|
---|
112 | ; this is a listing of all column2 values with a description
|
---|
113 | A1 ;;Hospital Care (NSC)
|
---|
114 | A2 ;;Outpatient Care (NSC)
|
---|
115 | A3 ;;Nursing Home Care (NSC)
|
---|
116 | A4 ;;Ineligible Hospitalization
|
---|
117 | A5 ;;Reimbursable Health Insurance
|
---|
118 | A6 ;;Tort Feasor
|
---|
119 | A7 ;;Workmans Compensation (Non-Federal)
|
---|
120 | A8 ;;C (Means Test)
|
---|
121 | A9 ;;Emergency/Humanitarian
|
---|
122 | AA ;;No Fault Auto Accident
|
---|
123 | AB ;;Pharmacy Co-Pay (SC Vet)
|
---|
124 | AC ;;Pharmacy Co-Pay (NSC Vet)
|
---|
125 | AD ;;Nursing Home Care Per Diem
|
---|
126 | AE ;;Hospital Care Per Diem
|
---|
127 | AF ;;Medicare
|
---|
128 | AG ;;Adult Day Health Care (LTC)
|
---|
129 | AH ;;Domiciliary (LTC)
|
---|
130 | AI ;;Respite Care-Institutional (LTC)
|
---|
131 | AJ ;;Respite Care-Non-Institutional (LTC)
|
---|
132 | AK ;;Geriatric Eval-Institutional (LTC)
|
---|
133 | AL ;;Geriatric Eval-Non-Institutional (LTC)
|
---|
134 | AM ;;Nursing Home Care-Long Term Care (LTC)
|
---|
135 | ;
|
---|
136 | ;
|
---|
137 | ; this is a listing for the type of care, first 2 binary digits
|
---|
138 | ; if column2 is reimbursable health insurance
|
---|
139 | B00 ;;Inpatient (Hosp)
|
---|
140 | B01 ;;Outpatient
|
---|
141 | B10 ;;Nursing Home
|
---|
142 | B11 ;;Other
|
---|
143 | ;
|
---|
144 | ;
|
---|
145 | ; this is a listing for the service connected, binary digit 3
|
---|
146 | C0 ;;SC for NSC
|
---|
147 | C1 ;;NSC Vet
|
---|
148 | ;
|
---|
149 | ;
|
---|
150 | ; this is a listing for means test, binary digit 4
|
---|
151 | D0 ;;MT Cat A
|
---|
152 | D1 ;;MT Cat C
|
---|
153 | ;
|
---|
154 | ;
|
---|
155 | ; this is a listing for age group, binary digit 5
|
---|
156 | E0 ;;Age <65
|
---|
157 | E1 ;;Age 65+
|
---|