source: FOIAVistA/trunk/r/MEDICINE-MC/MCAROC3.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: 4.3 KB
Line 
1MCAROC3 ; GENERATED FROM 'MCARCATH3' PRINT TEMPLATE (#972) ; 10/04/96 ; (FILE 691.1, MARGIN=80)
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 F X=0:0 S X=$O(^DIPT(972,"DXS",X)) Q:'X S Y=$O(^(X,"")) F X=X:0 Q:Y="" S DXS(X,Y)=^(Y),Y=$O(^(Y))
15 D T Q:'DN D N D N D N:$X>29 Q:'DN W ?29 X DXS(1,9) K DIP K:DN Y W X
16 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 X DXS(2,9) K DIP K:DN Y W X
17 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "RIGHT CORONARY ARTERY:"
18 S X=$G(^MCAR(691.1,D0,20)) W ?28 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(695.9,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,30)
19 S I(1)=21,J(1)=691.27 F D1=0:0 Q:$O(^MCAR(691.1,D0,21,D1))'>0 X:$D(DSC(691.27)) DSC(691.27) S D1=$O(^(D1)) Q:D1'>0 D:$X>60 T Q:'DN D A1
20 G A1R
21A1 ;
22 S X=$G(^MCAR(691.1,D0,21,D1,0)) D N:$X>9 Q:'DN W ?9 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(696,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,30)
23 D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,2) S Y=$S(Y="":Y,$D(^MCAR(696.1,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,17)
24 D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,4) W:Y]"" $J(Y,7,2)
25 W ?42 S Y=$P(X,U,3) S Y=$S(Y="":Y,$D(^MCAR(696.2,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,25)
26 Q
27A1R ;
28 D N:$X>7 Q:'DN W ?7 X DXS(3,9.2) S DIP(3)=X S X=1,DIP(4)=X S X="",X=$S(DIP(2):DIP(3),DIP(4):X) K DIP K:DN Y W X
29 D N:$X>7 Q:'DN W ?7 X DXS(4,9.3) S DIP(5)=X S X=1,DIP(6)=X S X="",X=$S(DIP(3):DIP(5),DIP(6):X) K DIP K:DN Y W X
30 S I(1)=23,J(1)=691.28 F D1=0:0 Q:$O(^MCAR(691.1,D0,23,D1))'>0 X:$D(DSC(691.28)) DSC(691.28) S D1=$O(^(D1)) Q:D1'>0 D:$X>18 T Q:'DN D B1
31 G B1R
32B1 ;
33 D N:$X>8 Q:'DN W ?8 W "FROM:"
34 S X=$G(^MCAR(691.1,D0,23,D1,0)) W ?15 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(696,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,30)
35 D N:$X>44 Q:'DN W ?44 W "TO:"
36 W ?49 S Y=$P(X,U,2) S Y=$S(Y="":Y,$D(^MCAR(696,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,30)
37 Q
38B1R ;
39 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 S DIP(1)=$S($D(^MCAR(691.1,D0,24)):^(24),1:"") S X="LEFT MAIN CA: "_$S('$D(^MCAR(695.9,+$P(DIP(1),U,1),0)):"",1:$P(^(0),U,1)) K DIP K:DN Y W X
40 S I(1)=25,J(1)=691.29 F D1=0:0 Q:$O(^MCAR(691.1,D0,25,D1))'>0 X:$D(DSC(691.29)) DSC(691.29) S D1=$O(^(D1)) Q:D1'>0 D:$X>15 T Q:'DN D C1
41 G C1R
42C1 ;
43 S X=$G(^MCAR(691.1,D0,25,D1,0)) D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(696.1,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,17)
44 W ?52 S Y=$P(X,U,2) S Y=$S(Y="":Y,$D(^MCAR(696.2,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,25)
45 Q
46C1R ;
47 S I(1)=25.5,J(1)=691.47 F D1=0:0 Q:$O(^MCAR(691.1,D0,25.5,D1))'>0 X:$D(DSC(691.47)) DSC(691.47) S D1=$O(^(D1)) Q:D1'>0 D:$X>79 T Q:'DN D D1
48 G D1R
49D1 ;
50 S X=$G(^MCAR(691.1,D0,25.5,D1,0)) D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,1) W:Y]"" $J(Y,6,2)
51 W ?41 S Y=$P(X,U,2) S Y=$S(Y="":Y,$D(^MCAR(696.2,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,25)
52 Q
53D1R ;
54 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 S DIP(1)=$S($D(^MCAR(691.1,D0,26)):^(26),1:"") S X="LAD: "_$S('$D(^MCAR(695.9,+$P(DIP(1),U,1),0)):"",1:$P(^(0),U,1)) K DIP K:DN Y W X
55 S I(1)=27,J(1)=691.3 F D1=0:0 Q:$O(^MCAR(691.1,D0,27,D1))'>0 X:$D(DSC(691.3)) DSC(691.3) S D1=$O(^(D1)) Q:D1'>0 D:$X>15 T Q:'DN D E1
56 G E1R
57E1 ;
58 S X=$G(^MCAR(691.1,D0,27,D1,0)) D N:$X>9 Q:'DN W ?9 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(696,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,30)
59 D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,2) S Y=$S(Y="":Y,$D(^MCAR(696.1,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,17)
60 D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,4) W:Y]"" $J(Y,7,2)
61 W ?42 S Y=$P(X,U,3) S Y=$S(Y="":Y,$D(^MCAR(696.2,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,25)
62 Q
63E1R ;
64 D N:$X>7 Q:'DN W ?7 X DXS(5,9.2) S DIP(3)=X S X=1,DIP(4)=X S X="",X=$S(DIP(2):DIP(3),DIP(4):X) K DIP K:DN Y W X
65 D N:$X>7 Q:'DN W ?7 X DXS(6,9.3) S DIP(5)=X S X=1,DIP(6)=X S X="",X=$S(DIP(3):DIP(5),DIP(6):X) K DIP K:DN Y W X
66 S I(1)=29,J(1)=691.31 F D1=0:0 Q:$O(^MCAR(691.1,D0,29,D1))'>0 X:$D(DSC(691.31)) DSC(691.31) S D1=$O(^(D1)) Q:D1'>0 D:$X>18 T Q:'DN D F1
67 G F1R^MCAROC31
68F1 ;
69 D N:$X>8 Q:'DN W ?8 S DIP(1)=$S($D(^MCAR(691.1,D0,29,D1,0)):^(0),1:"") S X="FROM: "_$S('$D(^MCAR(696,+$P(DIP(1),U,1),0)):"",1:$P(^(0),U,1)) K DIP K:DN Y W X
70 G ^MCAROC31
Note: See TracBrowser for help on using the repository browser.