MCPARC ; GENERATED FROM 'MCNONENDOPARAC' PRINT TEMPLATE (#3778) ; 11/29/04 ; (FILE 699, MARGIN=75)
G BEGIN
N W !
T 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)
S DISTP=DISTP+1,DILCT=DILCT+1 D:'(DISTP#100) CSTP^DIO2
Q
DT I $G(DUZ("LANG"))>1,Y W $$OUT^DIALOGU(Y,"DD") Q
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
W Y Q
M D @DIXX
Q
BEGIN ;
S:'$D(DN) DN=1 S DISTP=$G(DISTP),DILCT=$G(DILCT)
I $D(DXS)<9 M DXS=^DIPT(3778,"DXS")
S I(0)="^MCAR(699,",J(0)=699
D N:$X>4 Q:'DN W ?4 W "PRIMARY PROVIDER: "
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)
D N:$X>4 Q:'DN W ?4 W "FELLOW: "
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)
D N:$X>39 Q:'DN W ?39 W "2ND FELLOW: "
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)
D N:$X>4 Q:'DN W ?4 W "PERFORMED AT: "
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)
D N:$X>39 Q:'DN W ?39 W "PERFORMED BY: "
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)
D N:$X>4 Q:'DN W ?4 W "WARD/CLINIC: "
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)
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "PROCEDURE: "
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
G A1R
A1 ;
S X=$G(^MCAR(697.2,D0,0)) W ?0,$E($P(X,U,8),1,30)
Q
A1R ;
K J(100),I(100) S:$D(I(0,0)) D0=I(0,0)
D N:$X>4 Q:'DN W ?4 W "PROCEDURE SUMMARY: "
S X=$G(^MCAR(699,D0,.2)) W ?0,$E($P(X,U,2),1,79)
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "PROCEDURE START TIME: "
S X=$G(^MCAR(699,D0,9)) W ?0,$E($P(X,U,1),1,4)
D N:$X>39 Q:'DN W ?39 W "PROCEDURE STOP TIME: "
W ?0,$E($P(X,U,2),1,4)
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "URGENCY: "
S Y=$P(X,U,3) W:Y]"" $S($D(DXS(1,Y)):DXS(1,Y),1:Y)
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "PROTOCOL: "
S X=$G(^MCAR(699,D0,31)) W ?0,$E($P(X,U,1),1,79)
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "EGD SIMPLE PRI. EXAM: "
W ?0,$E($P(X,U,2),1,50)
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "LAB OR XRAY: "
W ?0,$E($P(X,U,3),1,50)
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "OCCULT BLOOD: "
S X=$G(^MCAR(699,D0,32)) W ?0,$E($P(X,U,1),1,50)
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "SPECIMEN COLLECTION: "
W ?0,$E($P(X,U,2),1,50)
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "PRESCRIPTION GIVEN: "
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
G B1R
B1 ;
D N:$X>9 Q:'DN W ?9 W " "
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,40)
D N:$X>49 Q:'DN W ?49 W "DOSAGE: "
W ?0,$E($P(X,U,2),1,30)
Q
B1R ;
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "INSTRUCTION: "
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
G C1R
C1 ;
S X=$G(^MCAR(699,D0,203,D1,0)) S DIWL=20,DIWR=73 D ^DIWP
Q
C1R ;
D 0^DIWW
D ^DIWW
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "INSTRUMENT: "
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
G D1R
D1 ;
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)
Q
D1R ;
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "MEDICATIONS: "
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
G E1R
E1 ;
D N:$X>9 Q:'DN W ?9 W " "
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,40)
D N:$X>29 Q:'DN W ?29 W "DOSE ROUTE: "
S Y=$P(X,U,2) W:Y]"" $S($D(DXS(2,Y)):DXS(2,Y),1:Y)
D N:$X>59 Q:'DN W ?59 W "TOTAL DOSE: "
S Y=$P(X,U,3) W:Y]"" $J(Y,8,2)
Q
E1R ;
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "POST-PROCEDURE INST. CLEANING: "
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)
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "SIGNS AND SYMPTOMS: "
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
G F1R
F1 ;
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)
Q
F1R ;
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "SUMMARY: "
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)
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "RESULTS: "
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
G G1R
G1 ;
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)
Q
G1R ;
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "FOLLOWUP DEVICE/THERAPY: "
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
G H1R
H1 ;
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)
Q
H1R ;
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "SURVEILLANCE: "
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
G I1R
I1 ;
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)
Q
I1R ;
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "INDICATION COMMENTS: "
S X=$G(^MCAR(699,D0,0)) W ?0,$E($P(X,U,6),1,110)
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "INDICATED THERAPY: "
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
G J1R
J1 ;
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)
Q
J1R ;
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "DISEASE FOLLOWUP: "
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
G K1R
K1 ;
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)
Q
K1R ;
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "COMPLICATION: "
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
G L1R
L1 ;
D N:$X>9 Q:'DN W ?9 W " "
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)
D N:$X>49 Q:'DN W ?49 W "COMP. RESULTS: "
S Y=$P(X,U,2) W:Y]"" $S($D(DXS(5,Y)):DXS(5,Y),1:Y)
Q
L1R ;
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "DIAGNOSIS: "
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
G M1R
M1 ;
S X=$G(^MCAR(699,D0,33,D1,0)) S DIWL=18,DIWR=73 D ^DIWP
Q
M1R ;
D 0^DIWW
D ^DIWW
D T Q:'DN W ?2 S MCFILE=699 D DISP^MCMAG K DIP K:DN Y
W ?13 K MCFILE K DIP K:DN Y
K Y K DIWF
Q
HEAD ;
W !,"---------------------------------------------------------------------------",!!
MCPARC ; GENERATED FROM 'MCNONENDOPARAC' PRINT TEMPLATE (#3778) ; 11/29/04 ; (FILE 699, MARGIN=75)
+1 GOTO BEGIN
N WRITE !
T IF $X
WRITE !
IF '$DATA(DIOT(2))
IF DN
IF $DATA(IOSL)
IF $SELECT('$DATA(DIWF):1,$PIECE(DIWF,"B",2):$PIECE(DIWF,"B",2),1:1)+$Y'<IOSL
IF $DATA(^UTILITY($JOB,1))#2
IF ^(1)?1U1P1E.E
XECUTE ^(1)
+1 SET DISTP=DISTP+1
SET DILCT=DILCT+1
IF '(DISTP#100)
DO CSTP^DIO2
+2 QUIT
DT IF $GET(DUZ("LANG"))>1
IF Y
WRITE $$OUT^DIALOGU(Y,"DD")
QUIT
+1 IF Y
WRITE $PIECE("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC",U,$EXTRACT(Y,4,5))_" "
IF Y#100
WRITE $JUSTIFY(Y#100\1,2)_","
WRITE Y\10000+1700
IF Y#1
WRITE " "_$EXTRACT(Y_0,9,10)_":"_$EXTRACT(Y_"000",11,12)
QUIT
+2 WRITE Y
QUIT
M DO @DIXX
+1 QUIT
BEGIN ;
+1 IF '$DATA(DN)
SET DN=1
SET DISTP=$GET(DISTP)
SET DILCT=$GET(DILCT)
+2 IF $DATA(DXS)<9
MERGE DXS=^DIPT(3778,"DXS")
+3 SET I(0)="^MCAR(699,"
SET J(0)=699
+4 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "PRIMARY PROVIDER: "
+5 SET X=$GET(^MCAR(699,D0,"PROV"))
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^VA(200,Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,35)
+6 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "FELLOW: "
+7 SET X=$GET(^MCAR(699,D0,200))
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^VA(200,Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,35)
+8 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "2ND FELLOW: "
+9 SET X=$GET(^MCAR(699,D0,29))
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^VA(200,Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,35)
+10 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "PERFORMED AT: "
+11 SET X=$GET(^MCAR(699,D0,0))
SET Y=$PIECE(X,U,10)
SET Y=$SELECT(Y="":Y,$DATA(^SC(Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,30)
+12 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "PERFORMED BY: "
+13 SET Y=$PIECE(X,U,8)
SET Y=$SELECT(Y="":Y,$DATA(^VA(200,Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,35)
+14 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "WARD/CLINIC: "
+15 SET Y=$PIECE(X,U,11)
SET Y=$SELECT(Y="":Y,$DATA(^SC(Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,30)
+16 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "PROCEDURE: "
+17 SET I(100)="^MCAR(697.2,"
SET J(100)=697.2
SET I(0,0)=D0
SET DIP(1)=$SELECT($DATA(^MCAR(699,D0,0)):^(0),1:"")
SET X=$PIECE(DIP(1),U,12)
SET X=X
SET D(0)=+X
SET D0=D(0)
IF D0>0
DO A1
+18 GOTO A1R
A1 ;
+1 SET X=$GET(^MCAR(697.2,D0,0))
WRITE ?0,$EXTRACT($PIECE(X,U,8),1,30)
+2 QUIT
A1R ;
+1 KILL J(100),I(100)
IF $DATA(I(0,0))
SET D0=I(0,0)
+2 IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "PROCEDURE SUMMARY: "
+3 SET X=$GET(^MCAR(699,D0,.2))
WRITE ?0,$EXTRACT($PIECE(X,U,2),1,79)
+4 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "PROCEDURE START TIME: "
+5 SET X=$GET(^MCAR(699,D0,9))
WRITE ?0,$EXTRACT($PIECE(X,U,1),1,4)
+6 IF $X>39
DO N
IF 'DN
QUIT
WRITE ?39
WRITE "PROCEDURE STOP TIME: "
+7 WRITE ?0,$EXTRACT($PIECE(X,U,2),1,4)
+8 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "URGENCY: "
+9 SET Y=$PIECE(X,U,3)
IF Y]""
WRITE $SELECT($DATA(DXS(1,Y)):DXS(1,Y),1:Y)
+10 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "PROTOCOL: "
+11 SET X=$GET(^MCAR(699,D0,31))
WRITE ?0,$EXTRACT($PIECE(X,U,1),1,79)
+12 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "EGD SIMPLE PRI. EXAM: "
+13 WRITE ?0,$EXTRACT($PIECE(X,U,2),1,50)
+14 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "LAB OR XRAY: "
+15 WRITE ?0,$EXTRACT($PIECE(X,U,3),1,50)
+16 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "OCCULT BLOOD: "
+17 SET X=$GET(^MCAR(699,D0,32))
WRITE ?0,$EXTRACT($PIECE(X,U,1),1,50)
+18 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "SPECIMEN COLLECTION: "
+19 WRITE ?0,$EXTRACT($PIECE(X,U,2),1,50)
+20 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "PRESCRIPTION GIVEN: "
+21 SET I(1)=26
SET J(1)=699.74
FOR D1=0:0
IF $ORDER(^MCAR(699,D0,26,D1))'>0
QUIT
IF $DATA(DSC(699.74))
XECUTE DSC(699.74)
SET D1=$ORDER(^(D1))
IF D1'>0
QUIT
IF $X>26
DO T
IF 'DN
QUIT
DO B1
+22 GOTO B1R
B1 ;
+1 IF $X>9
DO N
IF 'DN
QUIT
WRITE ?9
WRITE " "
+2 SET X=$GET(^MCAR(699,D0,26,D1,0))
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^PSDRUG(Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,40)
+3 IF $X>49
DO N
IF 'DN
QUIT
WRITE ?49
WRITE "DOSAGE: "
+4 WRITE ?0,$EXTRACT($PIECE(X,U,2),1,30)
+5 QUIT
B1R ;
+1 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "INSTRUCTION: "
+2 SET I(1)=203
SET J(1)=699.0203
FOR D1=0:0
IF $ORDER(^MCAR(699,D0,203,D1))'>0
QUIT
SET D1=$ORDER(^(D1))
IF $X>19
DO T
IF 'DN
QUIT
DO C1
+3 GOTO C1R
C1 ;
+1 SET X=$GET(^MCAR(699,D0,203,D1,0))
SET DIWL=20
SET DIWR=73
DO ^DIWP
+2 QUIT
C1R ;
+1 DO 0^DIWW
+2 DO ^DIWW
+3 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "INSTRUMENT: "
+4 SET I(1)=34
SET J(1)=699.05
FOR D1=0:0
IF $ORDER(^MCAR(699,D0,34,D1))'>0
QUIT
IF $DATA(DSC(699.05))
XECUTE DSC(699.05)
SET D1=$ORDER(^(D1))
IF D1'>0
QUIT
IF $X>18
DO T
IF 'DN
QUIT
DO D1
+5 GOTO D1R
D1 ;
+1 SET X=$GET(^MCAR(699,D0,34,D1,0))
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^MCAR(699.48,Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,30)
+2 QUIT
D1R ;
+1 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "MEDICATIONS: "
+2 SET I(1)=8
SET J(1)=699.38
FOR D1=0:0
IF $ORDER(^MCAR(699,D0,8,D1))'>0
QUIT
IF $DATA(DSC(699.38))
XECUTE DSC(699.38)
SET D1=$ORDER(^(D1))
IF D1'>0
QUIT
IF $X>19
DO T
IF 'DN
QUIT
DO E1
+3 GOTO E1R
E1 ;
+1 IF $X>9
DO N
IF 'DN
QUIT
WRITE ?9
WRITE " "
+2 SET X=$GET(^MCAR(699,D0,8,D1,0))
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^MCAR(695,Y,0))#2:$PIECE(^(0),U),1:Y)
SET Y=$SELECT(Y="":Y,$DATA(^PSDRUG(Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,40)
+3 IF $X>29
DO N
IF 'DN
QUIT
WRITE ?29
WRITE "DOSE ROUTE: "
+4 SET Y=$PIECE(X,U,2)
IF Y]""
WRITE $SELECT($DATA(DXS(2,Y)):DXS(2,Y),1:Y)
+5 IF $X>59
DO N
IF 'DN
QUIT
WRITE ?59
WRITE "TOTAL DOSE: "
+6 SET Y=$PIECE(X,U,3)
IF Y]""
WRITE $JUSTIFY(Y,8,2)
+7 QUIT
E1R ;
+1 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "POST-PROCEDURE INST. CLEANING: "
+2 SET X=$GET(^MCAR(699,D0,15))
SET Y=$PIECE(X,U,10)
IF Y]""
WRITE $SELECT($DATA(DXS(3,Y)):DXS(3,Y),1:Y)
+3 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "SIGNS AND SYMPTOMS: "
+4 SET I(1)=3
SET J(1)=699.18
FOR D1=0:0
IF $ORDER(^MCAR(699,D0,3,D1))'>0
QUIT
IF $DATA(DSC(699.18))
XECUTE DSC(699.18)
SET D1=$ORDER(^(D1))
IF D1'>0
QUIT
IF $X>26
DO T
IF 'DN
QUIT
DO F1
+5 GOTO F1R
F1 ;
+1 SET X=$GET(^MCAR(699,D0,3,D1,0))
IF $X>25
DO N
IF 'DN
QUIT
WRITE ?25
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^MCAR(695.5,Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,99)
+2 QUIT
F1R ;
+1 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "SUMMARY: "
+2 SET X=$GET(^MCAR(699,D0,.2))
SET Y=$PIECE(X,U,1)
IF Y]""
WRITE $SELECT($DATA(DXS(4,Y)):DXS(4,Y),1:Y)
+3 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "RESULTS: "
+4 SET I(1)=16
SET J(1)=699.56
FOR D1=0:0
IF $ORDER(^MCAR(699,D0,16,D1))'>0
QUIT
IF $DATA(DSC(699.56))
XECUTE DSC(699.56)
SET D1=$ORDER(^(D1))
IF D1'>0
QUIT
IF $X>15
DO T
IF 'DN
QUIT
DO G1
+5 GOTO G1R
G1 ;
+1 SET X=$GET(^MCAR(699,D0,16,D1,0))
IF $X>14
DO N
IF 'DN
QUIT
WRITE ?14
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^MCAR(699.81,Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,60)
+2 QUIT
G1R ;
+1 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "FOLLOWUP DEVICE/THERAPY: "
+2 SET I(1)=6
SET J(1)=699.36
FOR D1=0:0
IF $ORDER(^MCAR(699,D0,6,D1))'>0
QUIT
IF $DATA(DSC(699.36))
XECUTE DSC(699.36)
SET D1=$ORDER(^(D1))
IF D1'>0
QUIT
IF $X>31
DO T
IF 'DN
QUIT
DO H1
+3 GOTO H1R
H1 ;
+1 SET X=$GET(^MCAR(699,D0,6,D1,0))
IF $X>30
DO N
IF 'DN
QUIT
WRITE ?30
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^MCAR(699.85,Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,30)
+2 QUIT
H1R ;
+1 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "SURVEILLANCE: "
+2 SET I(1)=7
SET J(1)=699.37
FOR D1=0:0
IF $ORDER(^MCAR(699,D0,7,D1))'>0
QUIT
IF $DATA(DSC(699.37))
XECUTE DSC(699.37)
SET D1=$ORDER(^(D1))
IF D1'>0
QUIT
IF $X>20
DO T
IF 'DN
QUIT
DO I1
+3 GOTO I1R
I1 ;
+1 SET X=$GET(^MCAR(699,D0,7,D1,0))
IF $X>20
DO N
IF 'DN
QUIT
WRITE ?20
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^MCAR(699.86,Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,30)
+2 QUIT
I1R ;
+1 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "INDICATION COMMENTS: "
+2 SET X=$GET(^MCAR(699,D0,0))
WRITE ?0,$EXTRACT($PIECE(X,U,6),1,110)
+3 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "INDICATED THERAPY: "
+4 SET I(1)=2
SET J(1)=699.17
FOR D1=0:0
IF $ORDER(^MCAR(699,D0,2,D1))'>0
QUIT
IF $DATA(DSC(699.17))
XECUTE DSC(699.17)
SET D1=$ORDER(^(D1))
IF D1'>0
QUIT
IF $X>25
DO T
IF 'DN
QUIT
DO J1
+5 GOTO J1R
J1 ;
+1 SET X=$GET(^MCAR(699,D0,2,D1,0))
IF $X>24
DO N
IF 'DN
QUIT
WRITE ?24
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^MCAR(699.6,Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,60)
+2 QUIT
J1R ;
+1 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "DISEASE FOLLOWUP: "
+2 SET I(1)=5
SET J(1)=699.35
FOR D1=0:0
IF $ORDER(^MCAR(699,D0,5,D1))'>0
QUIT
IF $DATA(DSC(699.35))
XECUTE DSC(699.35)
SET D1=$ORDER(^(D1))
IF D1'>0
QUIT
IF $X>24
DO T
IF 'DN
QUIT
DO K1
+3 GOTO K1R
K1 ;
+1 SET X=$GET(^MCAR(699,D0,5,D1,0))
IF $X>23
DO N
IF 'DN
QUIT
WRITE ?23
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^MCAR(699.84,Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,45)
+2 QUIT
K1R ;
+1 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "COMPLICATION: "
+2 SET I(1)=17
SET J(1)=699.58
FOR D1=0:0
IF $ORDER(^MCAR(699,D0,17,D1))'>0
QUIT
IF $DATA(DSC(699.58))
XECUTE DSC(699.58)
SET D1=$ORDER(^(D1))
IF D1'>0
QUIT
IF $X>20
DO T
IF 'DN
QUIT
DO L1
+3 GOTO L1R
L1 ;
+1 IF $X>9
DO N
IF 'DN
QUIT
WRITE ?9
WRITE " "
+2 SET X=$GET(^MCAR(699,D0,17,D1,0))
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^MCAR(696.9,Y,0))#2:$PIECE(^(0),U),1:Y)
WRITE $EXTRACT(Y,1,40)
+3 IF $X>49
DO N
IF 'DN
QUIT
WRITE ?49
WRITE "COMP. RESULTS: "
+4 SET Y=$PIECE(X,U,2)
IF Y]""
WRITE $SELECT($DATA(DXS(5,Y)):DXS(5,Y),1:Y)
+5 QUIT
L1R ;
+1 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "DIAGNOSIS: "
+2 SET I(1)=33
SET J(1)=699.04
FOR D1=0:0
IF $ORDER(^MCAR(699,D0,33,D1))'>0
QUIT
SET D1=$ORDER(^(D1))
IF $X>17
DO T
IF 'DN
QUIT
DO M1
+3 GOTO M1R
M1 ;
+1 SET X=$GET(^MCAR(699,D0,33,D1,0))
SET DIWL=18
SET DIWR=73
DO ^DIWP
+2 QUIT
M1R ;
+1 DO 0^DIWW
+2 DO ^DIWW
+3 DO T
IF 'DN
QUIT
WRITE ?2
SET MCFILE=699
DO DISP^MCMAG
KILL DIP
IF DN
KILL Y
+4 WRITE ?13
KILL MCFILE
KILL DIP
IF DN
KILL Y
+5 KILL Y
KILL DIWF
+6 QUIT
HEAD ;
+1 WRITE !,"---------------------------------------------------------------------------",!!