source: FOIAVistA/trunk/r/MEDICINE-MC/MCPARC.m@ 1757

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

initial load of FOIAVistA 6/30/08 version

File size: 7.4 KB
Line 
1MCPARC ; GENERATED FROM 'MCNONENDOPARAC' PRINT TEMPLATE (#1278) ; 12/09/02 ; (FILE 699, MARGIN=75)
2 G BEGIN
3N W !
4T W:$X ! I '$D(DIOT(2)),DN,$D(IOSL),$S('$D(DIWF):1,$P(DIWF,"B",2):$P(DIWF,"B",2),1:1)+$Y'<IOSL,$D(^UTILITY($J,1))#2,^(1)?1U1P1E.E X ^(1)
5 S DISTP=DISTP+1,DILCT=DILCT+1 D:'(DISTP#100) CSTP^DIO2
6 Q
7DT I $G(DUZ("LANG"))>1,Y W $$OUT^DIALOGU(Y,"DD") Q
8 I Y W $P("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC",U,$E(Y,4,5))_" " W:Y#100 $J(Y#100\1,2)_"," W Y\10000+1700 W:Y#1 " "_$E(Y_0,9,10)_":"_$E(Y_"000",11,12) Q
9 W Y Q
10M D @DIXX
11 Q
12BEGIN ;
13 S:'$D(DN) DN=1 S DISTP=$G(DISTP),DILCT=$G(DILCT)
14 I $D(DXS)<9 M DXS=^DIPT(1278,"DXS")
15 S I(0)="^MCAR(699,",J(0)=699
16 D N:$X>4 Q:'DN W ?4 W "PRIMARY PROVIDER: "
17 S X=$G(^MCAR(699,D0,"PROV")) S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^VA(200,Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,35)
18 D N:$X>4 Q:'DN W ?4 W "FELLOW: "
19 S X=$G(^MCAR(699,D0,200)) S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^VA(200,Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,35)
20 D N:$X>39 Q:'DN W ?39 W "2ND FELLOW: "
21 S X=$G(^MCAR(699,D0,29)) S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^VA(200,Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,35)
22 D N:$X>4 Q:'DN W ?4 W "PERFORMED AT: "
23 S X=$G(^MCAR(699,D0,0)) S Y=$P(X,U,10) S Y=$S(Y="":Y,$D(^SC(Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,30)
24 D N:$X>39 Q:'DN W ?39 W "PERFORMED BY: "
25 S Y=$P(X,U,8) S Y=$S(Y="":Y,$D(^VA(200,Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,35)
26 D N:$X>4 Q:'DN W ?4 W "WARD/CLINIC: "
27 S Y=$P(X,U,11) S Y=$S(Y="":Y,$D(^SC(Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,30)
28 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "PROCEDURE: "
29 S I(100)="^MCAR(697.2,",J(100)=697.2 S I(0,0)=D0 S DIP(1)=$S($D(^MCAR(699,D0,0)):^(0),1:"") S X=$P(DIP(1),U,12),X=X S D(0)=+X S D0=D(0) I D0>0 D A1
30 G A1R
31A1 ;
32 S X=$G(^MCAR(697.2,D0,0)) W ?0,$E($P(X,U,8),1,30)
33 Q
34A1R ;
35 K J(100),I(100) S:$D(I(0,0)) D0=I(0,0)
36 D N:$X>4 Q:'DN W ?4 W "PROCEDURE SUMMARY: "
37 S X=$G(^MCAR(699,D0,.2)) W ?0,$E($P(X,U,2),1,79)
38 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "PROCEDURE START TIME: "
39 S X=$G(^MCAR(699,D0,9)) W ?0,$E($P(X,U,1),1,4)
40 D N:$X>39 Q:'DN W ?39 W "PROCEDURE STOP TIME: "
41 W ?0,$E($P(X,U,2),1,4)
42 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "URGENCY: "
43 S Y=$P(X,U,3) W:Y]"" $S($D(DXS(1,Y)):DXS(1,Y),1:Y)
44 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "PROTOCOL: "
45 S X=$G(^MCAR(699,D0,31)) W ?0,$E($P(X,U,1),1,79)
46 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "EGD SIMPLE PRI. EXAM: "
47 W ?0,$E($P(X,U,2),1,50)
48 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "LAB OR XRAY: "
49 W ?0,$E($P(X,U,3),1,50)
50 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "OCCULT BLOOD: "
51 S X=$G(^MCAR(699,D0,32)) W ?0,$E($P(X,U,1),1,50)
52 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "SPECIMEN COLLECTION: "
53 W ?0,$E($P(X,U,2),1,50)
54 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "PRESCRIPTION GIVEN: "
55 S I(1)=26,J(1)=699.74 F D1=0:0 Q:$O(^MCAR(699,D0,26,D1))'>0 X:$D(DSC(699.74)) DSC(699.74) S D1=$O(^(D1)) Q:D1'>0 D:$X>26 T Q:'DN D B1
56 G B1R
57B1 ;
58 D N:$X>9 Q:'DN W ?9 W " "
59 S X=$G(^MCAR(699,D0,26,D1,0)) S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^PSDRUG(Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,30)
60 D N:$X>49 Q:'DN W ?49 W "DOSAGE: "
61 W ?0,$E($P(X,U,2),1,30)
62 Q
63B1R ;
64 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "INSTRUCTION: "
65 S I(1)=203,J(1)=699.0203 F D1=0:0 Q:$O(^MCAR(699,D0,203,D1))'>0 S D1=$O(^(D1)) D:$X>19 T Q:'DN D C1
66 G C1R
67C1 ;
68 S X=$G(^MCAR(699,D0,203,D1,0)) S DIWL=20,DIWR=73 D ^DIWP
69 Q
70C1R ;
71 D 0^DIWW
72 D ^DIWW
73 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "INSTRUMENT: "
74 S I(1)=34,J(1)=699.05 F D1=0:0 Q:$O(^MCAR(699,D0,34,D1))'>0 X:$D(DSC(699.05)) DSC(699.05) S D1=$O(^(D1)) Q:D1'>0 D:$X>18 T Q:'DN D D1
75 G D1R
76D1 ;
77 S X=$G(^MCAR(699,D0,34,D1,0)) S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(699.48,Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,30)
78 Q
79D1R ;
80 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "MEDICATIONS: "
81 S I(1)=8,J(1)=699.38 F D1=0:0 Q:$O(^MCAR(699,D0,8,D1))'>0 X:$D(DSC(699.38)) DSC(699.38) S D1=$O(^(D1)) Q:D1'>0 D:$X>19 T Q:'DN D E1
82 G E1R
83E1 ;
84 D N:$X>9 Q:'DN W ?9 W " "
85 S X=$G(^MCAR(699,D0,8,D1,0)) S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(695,Y,0))#2:$P(^(0),U),1:Y) S Y=$S(Y="":Y,$D(^PSDRUG(Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,30)
86 D N:$X>29 Q:'DN W ?29 W "DOSE ROUTE: "
87 S Y=$P(X,U,2) W:Y]"" $S($D(DXS(2,Y)):DXS(2,Y),1:Y)
88 D N:$X>59 Q:'DN W ?59 W "TOTAL DOSE: "
89 S Y=$P(X,U,3) W:Y]"" $J(Y,8,2)
90 Q
91E1R ;
92 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "POST-PROCEDURE INST. CLEANING: "
93 S X=$G(^MCAR(699,D0,15)) S Y=$P(X,U,10) W:Y]"" $S($D(DXS(3,Y)):DXS(3,Y),1:Y)
94 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "SIGNS AND SYMPTOMS: "
95 S I(1)=3,J(1)=699.18 F D1=0:0 Q:$O(^MCAR(699,D0,3,D1))'>0 X:$D(DSC(699.18)) DSC(699.18) S D1=$O(^(D1)) Q:D1'>0 D:$X>26 T Q:'DN D F1
96 G F1R
97F1 ;
98 S X=$G(^MCAR(699,D0,3,D1,0)) D N:$X>25 Q:'DN W ?25 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(695.5,Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,99)
99 Q
100F1R ;
101 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "SUMMARY: "
102 S X=$G(^MCAR(699,D0,.2)) S Y=$P(X,U,1) W:Y]"" $S($D(DXS(4,Y)):DXS(4,Y),1:Y)
103 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "RESULTS: "
104 S I(1)=16,J(1)=699.56 F D1=0:0 Q:$O(^MCAR(699,D0,16,D1))'>0 X:$D(DSC(699.56)) DSC(699.56) S D1=$O(^(D1)) Q:D1'>0 D:$X>15 T Q:'DN D G1
105 G G1R
106G1 ;
107 S X=$G(^MCAR(699,D0,16,D1,0)) D N:$X>14 Q:'DN W ?14 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(699.81,Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,60)
108 Q
109G1R ;
110 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "FOLLOWUP DEVICE/THERAPY: "
111 S I(1)=6,J(1)=699.36 F D1=0:0 Q:$O(^MCAR(699,D0,6,D1))'>0 X:$D(DSC(699.36)) DSC(699.36) S D1=$O(^(D1)) Q:D1'>0 D:$X>31 T Q:'DN D H1
112 G H1R
113H1 ;
114 S X=$G(^MCAR(699,D0,6,D1,0)) D N:$X>30 Q:'DN W ?30 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(699.85,Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,30)
115 Q
116H1R ;
117 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "SURVEILLANCE: "
118 S I(1)=7,J(1)=699.37 F D1=0:0 Q:$O(^MCAR(699,D0,7,D1))'>0 X:$D(DSC(699.37)) DSC(699.37) S D1=$O(^(D1)) Q:D1'>0 D:$X>20 T Q:'DN D I1
119 G I1R
120I1 ;
121 S X=$G(^MCAR(699,D0,7,D1,0)) D N:$X>20 Q:'DN W ?20 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(699.86,Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,30)
122 Q
123I1R ;
124 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "INDICATION COMMENTS: "
125 S X=$G(^MCAR(699,D0,0)) W ?0,$E($P(X,U,6),1,110)
126 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "INDICATED THERAPY: "
127 S I(1)=2,J(1)=699.17 F D1=0:0 Q:$O(^MCAR(699,D0,2,D1))'>0 X:$D(DSC(699.17)) DSC(699.17) S D1=$O(^(D1)) Q:D1'>0 D:$X>25 T Q:'DN D J1
128 G J1R
129J1 ;
130 S X=$G(^MCAR(699,D0,2,D1,0)) D N:$X>24 Q:'DN W ?24 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(699.6,Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,60)
131 Q
132J1R ;
133 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "DISEASE FOLLOWUP: "
134 S I(1)=5,J(1)=699.35 F D1=0:0 Q:$O(^MCAR(699,D0,5,D1))'>0 X:$D(DSC(699.35)) DSC(699.35) S D1=$O(^(D1)) Q:D1'>0 D:$X>24 T Q:'DN D K1
135 G K1R
136K1 ;
137 S X=$G(^MCAR(699,D0,5,D1,0)) D N:$X>23 Q:'DN W ?23 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(699.84,Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,45)
138 Q
139K1R ;
140 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "COMPLICATION: "
141 S I(1)=17,J(1)=699.58 F D1=0:0 Q:$O(^MCAR(699,D0,17,D1))'>0 X:$D(DSC(699.58)) DSC(699.58) S D1=$O(^(D1)) Q:D1'>0 D:$X>20 T Q:'DN D L1
142 G L1R
143L1 ;
144 D N:$X>9 Q:'DN W ?9 W " "
145 S X=$G(^MCAR(699,D0,17,D1,0)) S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(696.9,Y,0))#2:$P(^(0),U),1:Y) W $E(Y,1,40)
146 D N:$X>49 Q:'DN W ?49 W "COMP. RESULTS: "
147 S Y=$P(X,U,2) W:Y]"" $S($D(DXS(5,Y)):DXS(5,Y),1:Y)
148 Q
149L1R ;
150 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "DIAGNOSIS: "
151 S I(1)=33,J(1)=699.04 F D1=0:0 Q:$O(^MCAR(699,D0,33,D1))'>0 S D1=$O(^(D1)) D:$X>17 T Q:'DN D M1
152 G M1R
153M1 ;
154 S X=$G(^MCAR(699,D0,33,D1,0)) S DIWL=18,DIWR=73 D ^DIWP
155 Q
156M1R ;
157 D 0^DIWW
158 D ^DIWW
159 D T Q:'DN W ?2 S MCFILE=699 D DISP^MCMAG K DIP K:DN Y
160 W ?13 K MCFILE K DIP K:DN Y
161 K Y K DIWF
162 Q
163HEAD ;
164 W !,"---------------------------------------------------------------------------",!!
Note: See TracBrowser for help on using the repository browser.