source: WorldVistAEHR/trunk/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPRN7PR.m@ 775

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

initial load of WorldVistAEHR

File size: 5.6 KB
RevLine 
[613]1RMPRN7PR ;HINES/HNC -PRINT REPAIR 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 - New Group description changes, R60
6 ; - Repair Group description changes, R60
7 ; AAC Patch 103 - 1/17/05 NPPD CATEGORIES/LINES - NEW and REPAIR UPDATES
8 ;
9 K ^TMP($J,"RS")
10 S STN=1
11 F S STN=$O(^TMP($J,"R",STN)) Q:STN="" D HDR,CDATA,SUM
12 Q
13HDR ;leave this form feed alone
14 W @IOF
15 W !,"REPORT OF 2529-3 REPAIR PROSTHETICS ACTIVITIES"
16 ;header depending on sort selected
17 W !,$$HDR^RMPRN7S(RMPRDET)
18 S Y=DATE(1) D DD^%DT W !,Y," - " S Y=DATE(2) D DD^%DT W Y
19 W !,?10,"STATION: ",STN
20 ;RMPRSUM if summary header
21 Q:$G(RMPRSUM)
22 W !!
23 W !,"Line",?7,"Item",?21,"VA",?26,"Com",?31,"Total",?37,"Cost",?46
24 W "Ave Com",?54
25 W "SC/OP",?61,"NSC/OP",?68,"SC/IP",?74,"NSC/IP"
26 I IOM>120 D
27 .W ?83,"SP LEG"
28 .W ?90,"A&A",?97,"PHC",?104,"ELG REF",?112,"NEW",?120,"$ELG REF"
29 Q
30CDATA ;
31 Q:FL=1
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,"R",STN,LINE)) Q:LINE="" Q:FL=1 D
35 .I $E(LINE,0,3)'=$E(LINEP,0,3) D SUM Q:FL=1 D LBLR
36 .W !,LINE,?7,$E($P(^TMP($J,"R",STN,LINE),U,15),1,14)
37 .W ?21,$P(^TMP($J,"R",STN,LINE),U,1) S CA=CA+$P(^(LINE),U,1)
38 .W ?26,$P(^TMP($J,"R",STN,LINE),U,2) S CB=CB+$P(^(LINE),U,2)
39 .W ?31,$P(^TMP($J,"R",STN,LINE),U,1)+($P(^TMP($J,"R",STN,LINE),U,2))
40 .W ?37,$FN($J($P(^TMP($J,"R",STN,LINE),U,3),0,0),",") S CC=CC+$P(^(LINE),U,3)
41 .W:$P(^TMP($J,"R",STN,LINE),U,2)>0 ?46,$FN($J(($P(^(LINE),U,3))/($P(^(LINE),U,2)),0,0),",")
42 .W ?55,$P(^TMP($J,"R",STN,LINE),U,4) S CD=CD+$P(^(LINE),U,4)
43 .W ?62,$P(^TMP($J,"R",STN,LINE),U,5) S CE=CE+$P(^(LINE),U,5)
44 .W ?69,$P(^TMP($J,"R",STN,LINE),U,6) S CF=CF+$P(^(LINE),U,6)
45 .W ?76,$P(^TMP($J,"R",STN,LINE),U,7) S CG=CG+$P(^(LINE),U,7)
46 .S CH=CH+$P(^TMP($J,"R",STN,LINE),U,8)
47 .S CI=CI+$P(^TMP($J,"R",STN,LINE),U,9)
48 .S CJ=CJ+$P(^TMP($J,"R",STN,LINE),U,10)
49 .S CK=CK+$P(^TMP($J,"R",STN,LINE),U,11)
50 .S CL=CL+$P(^TMP($J,"R",STN,LINE),U,12)
51 .S CM=CM+$P(^TMP($J,"R",STN,LINE),U,16)
52 .I IOM>120 D
53 ..W ?83,$P(^TMP($J,"R",STN,LINE),U,8)
54 ..W ?90,$P(^TMP($J,"R",STN,LINE),U,9)
55 ..W ?97,$P(^TMP($J,"R",STN,LINE),U,10)
56 ..W ?104,$P(^TMP($J,"R",STN,LINE),U,11)
57 ..W ?112,$P(^TMP($J,"R",STN,LINE),U,12)
58 ..W ?120,$P(^TMP($J,"R",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,"RS",STN,GROUP,STN)=GROUPT
72 .S (CA,CB,CC,CD,CE,CF,CG,CH,CI,CJ,CK,CL,CM)=0
73 Q:$G(LINEP)'="R99 ZL"
74 D FSUM S RMPRSUM=1 D HDR K RMPRSUM
75 W !!,"STATION SUMMARY (2529-3 REPAIR ACTIVITIES)"
76 ;W !,$$HDR^RMPRN7S(RMPRDET)
77 W !,?21,"VA",?31,"Com",?41,"Total",?51,"Cost",?61
78 W "Ave Com",?71,"Elg Ref $"
79 W !,LN
80 W !,?21,CA,?31,CB,?41,(CA+CB),?51,"$"_$FN($J(CC,0,0),",")
81 W ?61
82 I CB>0 W "$"_$FN($J((CC/CB),0,0),",")
83 W ?71
84 I CM>0 W "$"_$FN($J((CM),0,0),",")
85 W !,LN,!
86 W !,?21,"SC/OP",?31,"NSC/OP",?41,"SC/IP",?51,"NSC/IP"
87 W !,LN,!
88 W ?21,CD,?31,CE,?41,CF,?51,CG
89 W !,LN
90 W !,?21,"SPEC LEG",?31,"A&A",?41,"PHC",?51,"ELG REF",?61,"NEW"
91 W !,LN,!,?21,CH,?31,CI,?41,CJ,?51,CK,?61,CL,!,LN
92 W !,?21,"Total Disability: ",(CD+CE+CF+CG),!,LN,!
93 S (CA,CB,CC,CD,CE,CF,CG,CH,CI,CJ,CK,CL)=0
94 I IOST["C-" D CHK
95 Q
96LBLG ;group description fo final repair summary
97 I $E(LINEP,0,3)="R07" S GROUP=$E(LINEP,0,3)_" HEARING AID, LOCAL REPAIRS"
98 I $E(LINEP,0,3)="R10" S GROUP=$E(LINEP,0,3)_" WHEELCHAIRS AND ACCESSORIES"
99 I $E(LINEP,0,3)="R20" S GROUP=$E(LINEP,0,3)_" ARTIFICIAL LEGS"
100 I $E(LINEP,0,3)="R30" S GROUP=$E(LINEP,0,3)_" ARTIFICIAL ARMS AND TERMINAL DEVICES"
101 I $E(LINEP,0,3)="R40" S GROUP=$E(LINEP,0,3)_" ORTHOSIS"
102 I $E(LINEP,0,3)="R50" S GROUP=$E(LINEP,0,3)_" SHOES/ORTHOTICS"
103 I $E(LINEP,0,3)="R60" S GROUP=$E(LINEP,0,3)_" SENSORI-NEURO AIDS"
104 I $E(LINEP,0,3)="R70" S GROUP=$E(LINEP,0,3)_" HOME DIALYSIS EQUIPMENT"
105 I $E(LINEP,0,3)="R80" S GROUP=$E(LINEP,0,3)_" MEDICAL EQUIPMENT"
106 I $E(LINEP,0,3)="R90" S GROUP=$E(LINEP,0,3)_" ALL OTHER"
107 I $E(LINEP,0,3)="R91" S GROUP=$E(LINEP,0,3)_" OXYGEN & RESPIRATORY"
108 I $E(LINEP,0,3)="R92" S GROUP=$E(LINEP,0,3)_" AUTO & VAN EQUIP"
109 I $E(LINEP,0,3)="R99" S GROUP=$E(LINEP,0,3)_" MISC"
110 Q
111LBLR ;label for repair group
112 I $E(LINE,0,3)="R10" W !,"2529-3 WHEELCHAIRS AND ACCESSORIES"
113 I $E(LINE,0,3)="R20" W !,"2529-3 ARTIFICIAL LEGS"
114 I $E(LINE,0,3)="R30" W !,"2529-3 ARTIFICIAL ARMS AND TERMINAL DEVICES"
115 I $E(LINE,0,3)="R40" W !,"2529-3 ORTHOSIS"
116 I $E(LINE,0,3)="R50" W !,"2529-3 SHOES/ORTHOTICS"
117 I $E(LINE,0,3)="R60" W !,"2529-3 SENSORI-NEURO AIDS"
118 I $E(LINE,0,3)="R70" W !,"2529-3 HOME DIALYSIS EQUIPMENT"
119 I $E(LINE,0,3)="R80",IOST'["C-" D HDR W !,"2529-3 MEDICAL EQUIPMENT"
120 I $E(LINE,0,3)="R80",IOST["C-" W !,"2529-3 MEDICAL EQUIPMENT"
121 I $E(LINE,0,3)="R90" W !,"2529-3 ALL OTHER"
122 I $E(LINE,0,3)="R91" W !,"2529-3 OXYGEN & RESPIRATORY"
123 I $E(LINE,0,3)="R92" W !,"2529-3 AUTO & VAN EQUIP"
124 I $E(LINE,0,3)="R99" W !,"2529-3 MISC"
125 Q
126FSUM ;final summay on Repair Worksheets STATION
127 S H=0
128 F S H=$O(^TMP($J,"RS",STN,H)) Q:H="" D
129 .S H1=0,H2=0
130 .F S H1=$O(^TMP($J,"RS",STN,H,H1)) Q:H1="" D
131 ..Q:H1'=STN
132 ..S H2=^TMP($J,"RS",STN,H,H1)
133 ..S CA=CA+$P(H2,U,1)
134 ..S CB=CB+$P(H2,U,2)
135 ..S CC=CC+$P(H2,U,4)
136 ..S CD=CD+$P(H2,U,5)
137 ..S CE=CE+$P(H2,U,6)
138 ..S CF=CF+$P(H2,U,7)
139 ..S CG=CG+$P(H2,U,8)
140 ..S CH=CH+$P(H2,U,9)
141 ..S CI=CI+$P(H2,U,10)
142 ..S CJ=CJ+$P(H2,U,11)
143 ..S CK=CK+$P(H2,U,12)
144 ..S CL=CL+$P(H2,U,13)
145 ..S CM=CM+$P(H2,U,14)
146 Q
147CHK ;
148 K DIR W !! S DIR(0)="E" D ^DIR S:+Y'>0 FL=1
149 W @IOF
150 Q
151 ;END
Note: See TracBrowser for help on using the repository browser.