source: FOIAVistA/trunk/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPRN7PT.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 6.2 KB
Line 
1RMPRN7PT ;HINES/HNC -PRINT NPPD NEW WORKSHEETS ;2/14/01
2 ;;3.0;PROSTHETICS;**57,84,103**;Feb 09, 1996
3 ;
4 ; AAC Patch 84, 2/25/04 additions, deletions and change descriptions for Groups and lines
5 ; AAC Patch 84, 2/25/04 change description for group 600
6 ; AAC Patch 103, 1/17/05 NPPD CATEGORIES/LINES - NEW and REPAIRS
7 ;
8 K ^TMP($J,"NS")
9 S STN=1
10 S SSNCT=0,BDC=0
11 F S BDC=$O(^TMP($J,"A",BDC)) Q:BDC'>0 S SSNCT=SSNCT+1
12 K BDC,^TMP($J,"A")
13 F S STN=$O(^TMP($J,"N",STN)) Q:STN="" W:$E(IOST,1,2)="C-" @IOF D HDR,CDATA,SUM
14 Q
15HDR ;
16 W !,"REPORT OF 2529-3 NEW PROSTHETICS ACTIVITIES"
17 ;header based on sort select
18 W !,$$HDR^RMPRN7S(RMPRDET)
19 S Y=DATE(1) D DD^%DT S DATE(3)=Y W !,DATE(3)," - " S Y=DATE(2) D DD^%DT S DATE(4)=Y W DATE(4)
20 W !,?10,"STATION: ",STN
21 ;RMPRSUM if summary header
22 Q:$G(RMPRSUM)
23 W !!
24 W !,"Line",?7,"Item",?21,"VA",?26,"Com",?31,"Total",?37,"Cost",?46
25 W "Ave Com",?54
26 W "SC/OP",?61,"NSC/OP",?68,"SC/IP",?74,"NSC/IP"
27 I IOM>120 D
28 .W ?83,"SP LEG"
29 .W ?90,"A&A",?97,"PHC",?104,"ELG REF",?112,"NEW",?120,"$ELG REF"
30 Q
31CDATA ;
32 S LINE="",LINEP=""
33 S (CA,CB,CC,CD,CE,CF,CG,CH,CI,CJ,CK,CL,CM)=0
34 F S LINE=$O(^TMP($J,"N",STN,LINE)) Q:LINE="" Q:FL=1 D
35 .I $E(LINE,0,3)'=$E(LINEP,0,3) D SUM Q:FL=1 D LBL
36 .W !,LINE,?7,$E($P(^TMP($J,"N",STN,LINE),U,15),1,14)
37 .W ?21,$P(^TMP($J,"N",STN,LINE),U,1) S CA=CA+$P(^(LINE),U,1)
38 .W ?26,$P(^TMP($J,"N",STN,LINE),U,2) S CB=CB+$P(^(LINE),U,2)
39 .W ?31,$P(^TMP($J,"N",STN,LINE),U,1)+($P(^TMP($J,"N",STN,LINE),U,2))
40 .W ?37,$FN($J($P(^TMP($J,"N",STN,LINE),U,3),0,0),",") S CC=CC+$P(^(LINE),U,3)
41 .W:$P(^TMP($J,"N",STN,LINE),U,2)>0 ?46,$FN($J(($P(^(LINE),U,3))/($P(^(LINE),U,2)),0,0),",")
42 .W ?55,$P(^TMP($J,"N",STN,LINE),U,4) S CD=CD+$P(^(LINE),U,4)
43 .W ?62,$P(^TMP($J,"N",STN,LINE),U,5) S CE=CE+$P(^(LINE),U,5)
44 .W ?69,$P(^TMP($J,"N",STN,LINE),U,6) S CF=CF+$P(^(LINE),U,6)
45 .W ?76,$P(^TMP($J,"N",STN,LINE),U,7) S CG=CG+$P(^(LINE),U,7)
46 .S CH=CH+$P(^TMP($J,"N",STN,LINE),U,8)
47 .S CI=CI+$P(^TMP($J,"N",STN,LINE),U,9)
48 .S CJ=CJ+$P(^TMP($J,"N",STN,LINE),U,10)
49 .S CK=CK+$P(^TMP($J,"N",STN,LINE),U,11)
50 .S CL=CL+$P(^TMP($J,"N",STN,LINE),U,12)
51 .S CM=CM+$P(^TMP($J,"N",STN,LINE),U,16)
52 .I IOM>120 D
53 ..W ?83,$P(^TMP($J,"N",STN,LINE),U,8)
54 ..W ?90,$P(^TMP($J,"N",STN,LINE),U,9)
55 ..W ?97,$P(^TMP($J,"N",STN,LINE),U,10)
56 ..W ?104,$P(^TMP($J,"N",STN,LINE),U,11)
57 ..W ?112,$P(^TMP($J,"N",STN,LINE),U,12)
58 ..W ?120,$P(^TMP($J,"N",STN,LINE),U,16)
59 .S LINEP=LINE
60 Q
61SUM ;Print summary for group
62 Q:FL=1
63 I LINEP'="" D Q:FL=1
64 .I $Y+13>IOSL,IOST["C-" D CHK Q:FL=1
65 .S GROUPT=CA_U_CB_U_(CA+CB)_U_$J(CC,0,0)_U_CD_U_CE_U_CF_U_CG_U_CH_U_CI_U_CJ_U_CK_U_CL_U_CM
66 .W !,LN,!
67 .W ?21,CA,?26,CB,?31,(CA+CB),?37,$FN($J(CC,0,0),","),?55,CD,?62,CE,?69,CF,?76,CG
68 .I IOM>120 W ?83,CH,?90,CI,?97,CJ,?104,CK,?112,CL,?120,CM
69 .W !
70 .D LBLG
71 .S ^TMP($J,"NS",STN,GROUP,STN)=GROUPT
72 .S (CA,CB,CC,CD,CE,CF,CG,CH,CI,CJ,CK,CL,CM)=0
73 Q:$G(LINEP)'="999 ZL"
74 D FSUM S RMPRSUM=1 D HDR K RMPRSUM
75 W !!,"STATION SUMMARY (2529-3 NEW ACTIVITIES)"
76 W !,?21,"VA",?31,"Com",?41,"Total",?51,"Cost",?61
77 W "Ave Com",?71,"Elg Ref $"
78 W !,LN
79 W !,?21,$FN(CA,","),?31,$FN(CB,","),?41,$FN((CA+CB),","),?51,"$"_$FN($J(CC,0,0),",")
80 I CB>0 W ?61,"$"_$FN($J((CC/CB),0,0),",")
81 I CM>0 W ?71,"$"_$FN($J(CM,0,0),",")
82 W !,LN,!!
83 W ?21,"SC/OP",?31,"NSC/OP",?41,"SC/IP",?51,"NSC/IP"
84 W !,LN,!,?21,CD,?31,CE,?41,CF,?51,CG
85 W !,LN
86 W !,?21,"SPEC LEG",?31,"A&A",?41,"PHC",?51,"ELG REF",?61,"NEW"
87 W !,LN,!,?21,CH,?31,CI,?41,CJ,?51,CK,?61,CL,!,LN
88 W !,?21,"Total Disability: ",$FN((CD+CE+CF+CG),","),?47,"Unique SSN: ",SSNCT,!
89 S (CA,CB,CC,CD,CE,CF,CG,CH,CI,CJ,CK,CL,CM)=0
90 I IOST["C-" D CHK
91 Q
92LBLG ;group description for final summary
93 I $E(LINEP,0,3)=100 S GROUP=$E(LINEP,0,3)_" 2529-3 WHEELCHAIRS AND ACCESSORIES"
94 I $E(LINEP,0,3)=200 S GROUP=$E(LINEP,0,3)_" 2529-3 ARTIFICIAL LEGS"
95 I $E(LINEP,0,3)=300 S GROUP=$E(LINEP,0,3)_" 2529-3 ARTIFICIAL ARMS AND TERMINAL DEVICES"
96 I $E(LINEP,0,3)=400 S GROUP=$E(LINEP,0,3)_" 2529-3 ORTHOSIS/ORTHOTICS"
97 I $E(LINEP,0,3)=500 S GROUP=$E(LINEP,0,3)_" 2529-3 SHOES/ORTHOTICS"
98 I $E(LINEP,0,3)=600 S GROUP=$E(LINEP,0,3)_" 2529-3 SENSORI-NEURO AIDS"
99 I $E(LINEP,0,3)=700 S GROUP=$E(LINEP,0,3)_" 2529-3 RESTORATIONS"
100 I $E(LINEP,0,3)=800 S GROUP=$E(LINEP,0,3)_" 2529-3 OXYGEN AND RESPIRATORY"
101 I $E(LINEP,0,3)=900 S GROUP=$E(LINEP,0,3)_" 2529-3 MEDICAL EQUIPMENT"
102 I $E(LINEP,0,3)=910 S GROUP=$E(LINEP,0,3)_" 2529-3 ALL OTHER SUPPLIES AND EQUIPMENT"
103 I $E(LINEP,0,3)=920 S GROUP=$E(LINEP,0,3)_" 2529-3 HOME DIALYSIS PROGRAM"
104 I $E(LINEP,0,3)=930 S GROUP=$E(LINEP,0,3)_" 2529-3 ADAPTIVE EQUIPMENT"
105 I $E(LINEP,0,3)=940 S GROUP=$E(LINEP,0,3)_" 2529-3 HISA"
106 I $E(LINEP,0,3)=960 S GROUP=$E(LINEP,0,3)_" 2529-3 SURGICAL IMPLANTS"
107 I $E(LINEP,0,3)=999 S GROUP=$E(LINEP,0,3)_" 2529-3 MISC"
108 Q
109LBL ;label for group
110 I $E(LINE,0,3)=100 W !,"2529-3 WHEELCHAIRS AND ACCESSORIES"
111 I $E(LINE,0,3)=200 W !,"2529-3 ARTIFICIAL LEGS"
112 I $E(LINE,0,3)=300 W !,"2529-3 ARTIFICIAL ARMS AND TERMINAL DEVICES"
113 I $E(LINE,0,3)=400 W !,"2529-3 ORTHOSIS/ORTHOTICS"
114 I $E(LINE,0,3)=500,IOST'["C-" W @IOF D HDR W !,"2529-3 SHOES/ORTHOTICS"
115 I $E(LINE,0,3)=500,IOST["C-" W !,"2529-3 SHOES/ORTHOTICS"
116 I $E(LINE,0,3)=600 W !,"2529-3 SENSORI-NEURO AIDS"
117 I $E(LINE,0,3)=700 W !,"2529-3 RESTORATIONS"
118 I $E(LINE,0,3)=800 W !,"2529-3 OXYGEN AND RESPIRATORY"
119 I $E(LINE,0,3)=900,IOST'["C-" W @IOF D HDR W !,"2529-3 MEDICAL EQUIPMENT"
120 I $E(LINE,0,3)=900,IOST["C-" W !,"2529-3 MEDICAL EQUIPMENT"
121 I $E(LINE,0,3)=910 W !,"2529-3 ALL OTHER SUPPLIES AND EQUIPMENT"
122 I $E(LINE,0,3)=920 W !,"2529-3 HOME DIALYSIS PROGRAM"
123 I $E(LINE,0,3)=930 W !,"2529-3 ADAPTIVE EQUIPMENT"
124 I $E(LINE,0,3)=940 W !,"2529-3 HISA"
125 I $E(LINE,0,3)=960 W !,"2529-3 SURGICAL IMPLANTS"
126 I $E(LINE,0,3)=999,IOST'["C-" W @IOF D HDR W !,"2529-3 MISC"
127 I $E(LINE,0,3)=999,IOST["C-" W !,"2529-3 MISC"
128 Q
129FSUM ;final summay on New Worksheets STATION
130 S H=0
131 F S H=$O(^TMP($J,"NS",STN,H)) Q:H="" D
132 .S H1=0,H2=0
133 .F S H1=$O(^TMP($J,"NS",STN,H,H1)) Q:H1="" D
134 ..Q:H1'=STN
135 ..S H2=^TMP($J,"NS",STN,H,H1)
136 ..S CA=CA+$P(H2,U,1)
137 ..S CB=CB+$P(H2,U,2)
138 ..S CC=CC+$P(H2,U,4)
139 ..S CD=CD+$P(H2,U,5)
140 ..S CE=CE+$P(H2,U,6)
141 ..S CF=CF+$P(H2,U,7)
142 ..S CG=CG+$P(H2,U,8)
143 ..S CH=CH+$P(H2,U,9)
144 ..S CI=CI+$P(H2,U,10)
145 ..S CJ=CJ+$P(H2,U,11)
146 ..S CK=CK+$P(H2,U,12)
147 ..S CL=CL+$P(H2,U,13)
148 ..S CM=CM+$P(H2,U,14)
149 Q
150CHK ;
151 K DIR W !! S DIR(0)="E" D ^DIR S:+Y'>0 FL=1
152 W @IOF
153 Q
154 ;END
Note: See TracBrowser for help on using the repository browser.