source: FOIAVistA/trunk/r/MEDICINE-MC/MCOETT11.m@ 1076

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

initial load of FOIAVistA 6/30/08 version

File size: 4.2 KB
Line 
1MCOETT11 ; GENERATED FROM 'MCARETT1' PRINT TEMPLATE (#164) ; 03/21/95 ; (continued)
2 ;;2.2;MEDICINE;;Jun 08, 1995
3 G BEGIN
4N W !
5T 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)
6 S DISTP=DISTP+1 D:'(DISTP#100) CSTP
7 Q
8CSTP I '$D(ZTQUEUED) K DISTOP Q
9 Q:$G(DISTOP)=0 S:$G(DISTOP)="" DISTOP=1
10 I DISTOP'=1 X DISTOP K:'$T DISTOP S DISTOP=$T Q:'$T
11 Q:'$$S^%ZTLOAD
12 W:$G(IO)]"" !,"*** TASK "_ZTSK_" STOPPED BY USER - DURING "_$S($D(DPQ):"SORT",1:"PRINT")_" EXECUTION ***",!! S ZTSTOP=1,DN=0 Q
13DT 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
14 W Y Q
15M D @DIXX
16 Q
17BEGIN ;
18 S:'$D(DN) DN=1 S DISTP=$G(DISTP)
19 D N:$X>48 Q:'DN W ?48 X $P(^DD(691.7,28,0),U,5,99) S DIP(1)=X S X=DIP(1),DIP(2)=X S X=6,DIP(3)=X S X=2,X=$J(DIP(2),DIP(3),X) K DIP K:DN Y W X
20 D N:$X>63 Q:'DN W ?63 X $P(^DD(691.7,42,0),U,5,99) S DIP(1)=X S X=DIP(1),DIP(2)=X S X=6,DIP(3)=X S X=2,X=$J(DIP(2),DIP(3),X) K DIP K:DN Y W X
21 D N:$X>6 Q:'DN W ?6 W "MIN:SEC"
22 D N:$X>49 Q:'DN W ?49 X DXS(6,9.2) S X=$S(DIP(2):DIP(3),DIP(4):X) K DIP K:DN Y W X
23 D N:$X>64 Q:'DN W ?64 S DIP(1)=$S($D(^MCAR(691.7,D0,4)):^(4),1:"") S X=$P(DIP(1),U,9)_":"_$P(DIP(1),U,10) K DIP K:DN Y W X
24 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "----------------------------------------------------------------------"
25 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 S DIP(1)=$S($D(^MCAR(691.7,D0,4)):^(4),1:"") S X="PEAK MPH: "_$P(DIP(1),U,4) K DIP K:DN Y W X
26 W ?15 S DIP(1)=$S($D(^MCAR(691.7,D0,4)):^(4),1:"") S X=" % GRADE: "_$P(DIP(1),U,5) K DIP K:DN Y W X
27 W ?26 S DIP(1)=$S($D(^MCAR(691.7,D0,4)):^(4),1:"") S X=" METS: "_$P(DIP(1),U,6) K DIP K:DN Y W X
28 W ?37 X $P(^DD(691.7,48,0),U,5,99) S DIP(1)=X S X=" % TARGET HR: "_DIP(1) K DIP K:DN Y W X
29 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 X DXS(7,9) K DIP K:DN Y W X
30 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 S DIP(1)=$S($D(^MCAR(691.7,D0,5)):^(5),1:"") S X="TIME ST SEGMENT RETURN TO BASELINE: "_$P(DIP(1),U,7) K DIP K:DN Y W X
31 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "SIGNIFICANT ARRHYTHMIAS:"
32 S X=$G(^MCAR(691.7,D0,5)) W ?30 S Y=$P(X,U,4) W:Y]"" $S($D(DXS(9,Y)):DXS(9,Y),1:Y)
33 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "BLOOD PRESSURE CHANGES:"
34 S X=$G(^MCAR(691.7,D0,7)) W ?29 S Y=$P(X,U,4) W:Y]"" $S($D(DXS(10,Y)):DXS(10,Y),1:Y)
35 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "OTHER EKG CHANGES:"
36 S I(1)=9,J(1)=691.75 F D1=0:0 Q:$O(^MCAR(691.7,D0,9,D1))'>0 S D1=$O(^(D1)) D:$X>24 T Q:'DN D B1
37 G B1R
38B1 ;
39 S X=$G(^MCAR(691.7,D0,9,D1,0)) S DIWL=25,DIWR=78 D ^DIWP
40 Q
41B1R ;
42 D A^DIWW
43 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "INTERPRETATION:"
44 S X=$G(^MCAR(691.7,D0,5)) W ?21 S Y=$P(X,U,8) W:Y]"" $S($D(DXS(11,Y)):DXS(11,Y),1:Y)
45 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "COMMENTS:"
46 S I(1)=6,J(1)=691.73 F D1=0:0 Q:$O(^MCAR(691.7,D0,6,D1))'>0 S D1=$O(^(D1)) D:$X>15 T Q:'DN D C1
47 G C1R
48C1 ;
49 S X=$G(^MCAR(691.7,D0,6,D1,0)) S DIWL=16,DIWR=75 D ^DIWP
50 Q
51C1R ;
52 D A^DIWW
53 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "HEART MEDS:"
54 S I(1)=1,J(1)=691.71 F D1=0:0 Q:$O(^MCAR(691.7,D0,1,D1))'>0 X:$D(DSC(691.71)) DSC(691.71) S D1=$O(^(D1)) Q:D1'>0 D:$X>17 T Q:'DN D D1
55 G D1R
56D1 ;
57 S X=$G(^MCAR(691.7,D0,1,D1,0)) W ?17 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(695,Y,0))#2:$P(^(0),U,1),1:Y) S Y=$S(Y="":Y,$D(^PSDRUG(Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,40)
58 W " "
59 W ?0,$E($P(X,U,2),1,10)
60 W " "
61 W ?0,$E($P(X,U,3),1,10)
62 Q
63D1R ;
64 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "COMPLICATIONS:"
65 S I(1)=11,J(1)=691.703 F D1=0:0 Q:$O(^MCAR(691.7,D0,11,D1))'>0 X:$D(DSC(691.703)) DSC(691.703) S D1=$O(^(D1)) Q:D1'>0 D:$X>20 T Q:'DN D E1
66 G E1R
67E1 ;
68 S X=$G(^MCAR(691.7,D0,11,D1,0)) D N:$X>19 Q:'DN W ?19 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^MCAR(696.9,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,40)
69 Q
70E1R ;
71 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "EKG TECH:"
72 S X=$G(^MCAR(691.7,D0,7)) W ?15 S Y=$P(X,U,1) S Y=$S(Y="":Y,$D(^VA(200,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,30)
73 D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "ATTN PHYS:"
74 W ?16 S Y=$P(X,U,2) S Y=$S(Y="":Y,$D(^VA(200,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,30)
75 K Y K DIWF
76 Q
77HEAD ;
78 W !,"--------------------------------------------------------------------------------",!!
Note: See TracBrowser for help on using the repository browser.