INXHR081 ; GENERATED FROM 'INHSG MESSAGE' PRINT TEMPLATE (#2828) ; 10/25/01 ; (continued)
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)
D N:$X>51 Q:'DN W ?51 N DIP X DXS(1,9.2) S D1=I(1,0) K DIP K:DN Y W $E(X,1,6)
S X=$G(^INTHL7M(D0,1,D1,0)) D N:$X>58 Q:'DN W ?58,$E($P(X,U,2),1,6)
D N:$X>66 Q:'DN W ?66 S Y=$P(X,U,9) W:Y]"" $S($D(DXS(24,Y)):DXS(24,Y),1:Y)
D N:$X>71 Q:'DN W ?71 S Y=$P(X,U,3) W:Y]"" $S($D(DXS(25,Y)):DXS(25,Y),1:Y)
D N:$X>76 Q:'DN W ?76 S Y=$P(X,U,4) W:Y]"" $S($D(DXS(26,Y)):DXS(26,Y),1:Y)
D T Q:'DN D N D N:$X>8 Q:'DN W ?8 W "Parent Segment:"
D N:$X>24 Q:'DN W ?24 S Y=$P(X,U,11) S Y=$S(Y="":Y,$D(^INTHL7S(Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,45)
D T Q:'DN D N D N:$X>18 Q:'DN W ?18 W "File:"
D N:$X>24 Q:'DN W ?24 S Y=$P(X,U,5) S Y=$S(Y="":Y,$D(^DIC(Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,45)
D T Q:'DN D N D N:$X>8 Q:'DN W ?8 W "Multiple Field:"
D N:$X>24 Q:'DN W ?24,$E($P(X,U,8),1,30)
D T Q:'DN D N D N:$X>4 Q:'DN W ?4 W "User-Defined Index:"
D N:$X>24 Q:'DN W ?24,$E($P(X,U,12),1,6)
D T Q:'DN D N D N:$X>6 Q:'DN W ?6 W "Lookup Parameter:"
D N:$X>24 Q:'DN W ?24 S Y=$P(X,U,7) W:Y]"" $S($D(DXS(27,Y)):DXS(27,Y),1:Y)
D T Q:'DN D N D N:$X>12 Q:'DN W ?12 W "Make Links:"
D N:$X>24 Q:'DN W ?24 S Y=$P(X,U,10) W:Y]"" $S($D(DXS(28,Y)):DXS(28,Y),1:Y)
D T Q:'DN D N D N:$X>14 Q:'DN W ?14 W "Template:"
D N:$X>24 Q:'DN W ?24,$E($P(X,U,6),1,30)
D T Q:'DN D N D N:$X>14 Q:'DN W ?14 W "ID Field:"
D N:$X>24 Q:'DN W ?24,$E($P(X,U,18),1,3)
D T Q:'DN D N D N:$X>14 Q:'DN W ?14 W "ID Value:"
D N:$X>24 Q:'DN W ?24,$E($P(X,U,19),1,15)
D T Q:'DN D N D N:$X>15 Q:'DN W ?15 W "Routine:"
S X=$G(^INTHL7M(D0,1,D1,3)) D N:$X>24 Q:'DN S DIWL=25,DIWR=80 S Y=$E(X,1,100) S X=Y D ^DIWP
D A^DIWW
D T Q:'DN D N D N:$X>6 Q:'DN W ?6 W "MUMPS Code before Lookup:"
S:'$D(DIWF) DIWF="" S:DIWF'["N" DIWF=DIWF_"N" S X="" S I(2)=1,J(2)=4011.04 F D2=0:0 Q:$O(^INTHL7M(D0,1,D1,1,D2))'>0 S D2=$O(^(D2)) D:$X>6 T Q:'DN D A2
G A2R
A2 ;
S X=$G(^INTHL7M(D0,1,D1,1,D2,0)) S DIWL=10,DIWR=80 D ^DIWP
Q
A2R ;
D A^DIWW
D T Q:'DN D N D N:$X>6 Q:'DN W ?6 W "Script code before Lookup:"
S:'$D(DIWF) DIWF="" S:DIWF'["N" DIWF=DIWF_"N" S X="" S I(2)=2,J(2)=4011.05 F D2=0:0 Q:$O(^INTHL7M(D0,1,D1,2,D2))'>0 S D2=$O(^(D2)) D:$X>6 T Q:'DN D B2
G B2R
B2 ;
S X=$G(^INTHL7M(D0,1,D1,2,D2,0)) S DIWL=10,DIWR=80 D ^DIWP
Q
B2R ;
D A^DIWW
D T Q:'DN D N D N:$X>6 Q:'DN W ?6 W "Screening Logic:"
S X=$G(^INTHL7M(D0,1,D1,4)) D T Q:'DN D N D N:$X>9 Q:'DN S DIWL=10,DIWR=80 S Y=$E(X,1,250) S X=Y D ^DIWP
D A^DIWW
D T Q:'DN D N D N:$X>6 Q:'DN W ?6 W "Outgoing MUMPS Code:"
S:'$D(DIWF) DIWF="" S:DIWF'["N" DIWF=DIWF_"N" S X="" S I(2)=5,J(2)=4011.07 F D2=0:0 Q:$O(^INTHL7M(D0,1,D1,5,D2))'>0 S D2=$O(^(D2)) D:$X>6 T Q:'DN D C2
G C2R
C2 ;
S X=$G(^INTHL7M(D0,1,D1,5,D2,0)) S DIWL=10,DIWR=80 D ^DIWP
Q
C2R ;
D A^DIWW
D T Q:'DN D N D N:$X>15 Q:'DN W ?15 W "R R L X"
D T Q:'DN D N D N:$X>0 Q:'DN W ?0 W "SeqNo Len DT q p k f Field Name Data Location"
D T Q:'DN D N D N:$X>0 Q:'DN W ?0 W "--------------------------------------------------------------------------------"
S DICMX="D L^DIWP" D T Q:'DN D N D N:$X>0 Q:'DN S DIWL=1,DIWR=6 N DIP X DXS(2,9.4) S D1=I(1,0) K DIP K:DN Y
D 0^DIWW K DIP K:DN Y
S DICMX="D L^DIWP" D N:$X>6 Q:'DN S DIWL=7,DIWR=10 N DIP X DXS(3,9.5) S D1=I(1,0) K DIP K:DN Y
D 0^DIWW K DIP K:DN Y
S DICMX="D L^DIWP" D N:$X>11 Q:'DN S DIWL=12,DIWR=14 N DIP X DXS(4,9.5) S D1=I(1,0) K DIP K:DN Y
D 0^DIWW K DIP K:DN Y
S DICMX="D L^DIWP" D N:$X>15 Q:'DN S DIWL=16,DIWR=16 N DIP X DXS(5,9.4) S D1=I(1,0) K DIP K:DN Y
D 0^DIWW K DIP K:DN Y
S DICMX="D L^DIWP" D N:$X>17 Q:'DN S DIWL=18,DIWR=18 N DIP X DXS(6,9.4) S D1=I(1,0) K DIP K:DN Y
D 0^DIWW K DIP K:DN Y
S DICMX="D L^DIWP" D N:$X>19 Q:'DN S DIWL=20,DIWR=20 N DIP X DXS(7,9.4) S D1=I(1,0) K DIP K:DN Y
D 0^DIWW K DIP K:DN Y
G ^INXHR082
INXHR081 ; GENERATED FROM 'INHSG MESSAGE' PRINT TEMPLATE (#2828) ; 10/25/01 ; (continued)
+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 $X>51
DO N
IF 'DN
QUIT
WRITE ?51
NEW DIP
XECUTE DXS(1,9.2)
SET D1=I(1,0)
KILL DIP
IF DN
KILL Y
WRITE $EXTRACT(X,1,6)
+3 SET X=$GET(^INTHL7M(D0,1,D1,0))
IF $X>58
DO N
IF 'DN
QUIT
WRITE ?58,$EXTRACT($PIECE(X,U,2),1,6)
+4 IF $X>66
DO N
IF 'DN
QUIT
WRITE ?66
SET Y=$PIECE(X,U,9)
IF Y]""
WRITE $SELECT($DATA(DXS(24,Y)):DXS(24,Y),1:Y)
+5 IF $X>71
DO N
IF 'DN
QUIT
WRITE ?71
SET Y=$PIECE(X,U,3)
IF Y]""
WRITE $SELECT($DATA(DXS(25,Y)):DXS(25,Y),1:Y)
+6 IF $X>76
DO N
IF 'DN
QUIT
WRITE ?76
SET Y=$PIECE(X,U,4)
IF Y]""
WRITE $SELECT($DATA(DXS(26,Y)):DXS(26,Y),1:Y)
+7 DO T
IF 'DN
QUIT
DO N
IF $X>8
DO N
IF 'DN
QUIT
WRITE ?8
WRITE "Parent Segment:"
+8 IF $X>24
DO N
IF 'DN
QUIT
WRITE ?24
SET Y=$PIECE(X,U,11)
SET Y=$SELECT(Y="":Y,$DATA(^INTHL7S(Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,45)
+9 DO T
IF 'DN
QUIT
DO N
IF $X>18
DO N
IF 'DN
QUIT
WRITE ?18
WRITE "File:"
+10 IF $X>24
DO N
IF 'DN
QUIT
WRITE ?24
SET Y=$PIECE(X,U,5)
SET Y=$SELECT(Y="":Y,$DATA(^DIC(Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,45)
+11 DO T
IF 'DN
QUIT
DO N
IF $X>8
DO N
IF 'DN
QUIT
WRITE ?8
WRITE "Multiple Field:"
+12 IF $X>24
DO N
IF 'DN
QUIT
WRITE ?24,$EXTRACT($PIECE(X,U,8),1,30)
+13 DO T
IF 'DN
QUIT
DO N
IF $X>4
DO N
IF 'DN
QUIT
WRITE ?4
WRITE "User-Defined Index:"
+14 IF $X>24
DO N
IF 'DN
QUIT
WRITE ?24,$EXTRACT($PIECE(X,U,12),1,6)
+15 DO T
IF 'DN
QUIT
DO N
IF $X>6
DO N
IF 'DN
QUIT
WRITE ?6
WRITE "Lookup Parameter:"
+16 IF $X>24
DO N
IF 'DN
QUIT
WRITE ?24
SET Y=$PIECE(X,U,7)
IF Y]""
WRITE $SELECT($DATA(DXS(27,Y)):DXS(27,Y),1:Y)
+17 DO T
IF 'DN
QUIT
DO N
IF $X>12
DO N
IF 'DN
QUIT
WRITE ?12
WRITE "Make Links:"
+18 IF $X>24
DO N
IF 'DN
QUIT
WRITE ?24
SET Y=$PIECE(X,U,10)
IF Y]""
WRITE $SELECT($DATA(DXS(28,Y)):DXS(28,Y),1:Y)
+19 DO T
IF 'DN
QUIT
DO N
IF $X>14
DO N
IF 'DN
QUIT
WRITE ?14
WRITE "Template:"
+20 IF $X>24
DO N
IF 'DN
QUIT
WRITE ?24,$EXTRACT($PIECE(X,U,6),1,30)
+21 DO T
IF 'DN
QUIT
DO N
IF $X>14
DO N
IF 'DN
QUIT
WRITE ?14
WRITE "ID Field:"
+22 IF $X>24
DO N
IF 'DN
QUIT
WRITE ?24,$EXTRACT($PIECE(X,U,18),1,3)
+23 DO T
IF 'DN
QUIT
DO N
IF $X>14
DO N
IF 'DN
QUIT
WRITE ?14
WRITE "ID Value:"
+24 IF $X>24
DO N
IF 'DN
QUIT
WRITE ?24,$EXTRACT($PIECE(X,U,19),1,15)
+25 DO T
IF 'DN
QUIT
DO N
IF $X>15
DO N
IF 'DN
QUIT
WRITE ?15
WRITE "Routine:"
+26 SET X=$GET(^INTHL7M(D0,1,D1,3))
IF $X>24
DO N
IF 'DN
QUIT
SET DIWL=25
SET DIWR=80
SET Y=$EXTRACT(X,1,100)
SET X=Y
DO ^DIWP
+27 DO A^DIWW
+28 DO T
IF 'DN
QUIT
DO N
IF $X>6
DO N
IF 'DN
QUIT
WRITE ?6
WRITE "MUMPS Code before Lookup:"
+29 IF '$DATA(DIWF)
SET DIWF=""
IF DIWF'["N"
SET DIWF=DIWF_"N"
SET X=""
SET I(2)=1
SET J(2)=4011.04
FOR D2=0:0
IF $ORDER(^INTHL7M(D0,1,D1,1,D2))'>0
QUIT
SET D2=$ORDER(^(D2))
IF $X>6
DO T
IF 'DN
QUIT
DO A2
+30 GOTO A2R
A2 ;
+1 SET X=$GET(^INTHL7M(D0,1,D1,1,D2,0))
SET DIWL=10
SET DIWR=80
DO ^DIWP
+2 QUIT
A2R ;
+1 DO A^DIWW
+2 DO T
IF 'DN
QUIT
DO N
IF $X>6
DO N
IF 'DN
QUIT
WRITE ?6
WRITE "Script code before Lookup:"
+3 IF '$DATA(DIWF)
SET DIWF=""
IF DIWF'["N"
SET DIWF=DIWF_"N"
SET X=""
SET I(2)=2
SET J(2)=4011.05
FOR D2=0:0
IF $ORDER(^INTHL7M(D0,1,D1,2,D2))'>0
QUIT
SET D2=$ORDER(^(D2))
IF $X>6
DO T
IF 'DN
QUIT
DO B2
+4 GOTO B2R
B2 ;
+1 SET X=$GET(^INTHL7M(D0,1,D1,2,D2,0))
SET DIWL=10
SET DIWR=80
DO ^DIWP
+2 QUIT
B2R ;
+1 DO A^DIWW
+2 DO T
IF 'DN
QUIT
DO N
IF $X>6
DO N
IF 'DN
QUIT
WRITE ?6
WRITE "Screening Logic:"
+3 SET X=$GET(^INTHL7M(D0,1,D1,4))
DO T
IF 'DN
QUIT
DO N
IF $X>9
DO N
IF 'DN
QUIT
SET DIWL=10
SET DIWR=80
SET Y=$EXTRACT(X,1,250)
SET X=Y
DO ^DIWP
+4 DO A^DIWW
+5 DO T
IF 'DN
QUIT
DO N
IF $X>6
DO N
IF 'DN
QUIT
WRITE ?6
WRITE "Outgoing MUMPS Code:"
+6 IF '$DATA(DIWF)
SET DIWF=""
IF DIWF'["N"
SET DIWF=DIWF_"N"
SET X=""
SET I(2)=5
SET J(2)=4011.07
FOR D2=0:0
IF $ORDER(^INTHL7M(D0,1,D1,5,D2))'>0
QUIT
SET D2=$ORDER(^(D2))
IF $X>6
DO T
IF 'DN
QUIT
DO C2
+7 GOTO C2R
C2 ;
+1 SET X=$GET(^INTHL7M(D0,1,D1,5,D2,0))
SET DIWL=10
SET DIWR=80
DO ^DIWP
+2 QUIT
C2R ;
+1 DO A^DIWW
+2 DO T
IF 'DN
QUIT
DO N
IF $X>15
DO N
IF 'DN
QUIT
WRITE ?15
WRITE "R R L X"
+3 DO T
IF 'DN
QUIT
DO N
IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "SeqNo Len DT q p k f Field Name Data Location"
+4 DO T
IF 'DN
QUIT
DO N
IF $X>0
DO N
IF 'DN
QUIT
WRITE ?0
WRITE "--------------------------------------------------------------------------------"
+5 SET DICMX="D L^DIWP"
DO T
IF 'DN
QUIT
DO N
IF $X>0
DO N
IF 'DN
QUIT
SET DIWL=1
SET DIWR=6
NEW DIP
XECUTE DXS(2,9.4)
SET D1=I(1,0)
KILL DIP
IF DN
KILL Y
+6 DO 0^DIWW
KILL DIP
IF DN
KILL Y
+7 SET DICMX="D L^DIWP"
IF $X>6
DO N
IF 'DN
QUIT
SET DIWL=7
SET DIWR=10
NEW DIP
XECUTE DXS(3,9.5)
SET D1=I(1,0)
KILL DIP
IF DN
KILL Y
+8 DO 0^DIWW
KILL DIP
IF DN
KILL Y
+9 SET DICMX="D L^DIWP"
IF $X>11
DO N
IF 'DN
QUIT
SET DIWL=12
SET DIWR=14
NEW DIP
XECUTE DXS(4,9.5)
SET D1=I(1,0)
KILL DIP
IF DN
KILL Y
+10 DO 0^DIWW
KILL DIP
IF DN
KILL Y
+11 SET DICMX="D L^DIWP"
IF $X>15
DO N
IF 'DN
QUIT
SET DIWL=16
SET DIWR=16
NEW DIP
XECUTE DXS(5,9.4)
SET D1=I(1,0)
KILL DIP
IF DN
KILL Y
+12 DO 0^DIWW
KILL DIP
IF DN
KILL Y
+13 SET DICMX="D L^DIWP"
IF $X>17
DO N
IF 'DN
QUIT
SET DIWL=18
SET DIWR=18
NEW DIP
XECUTE DXS(6,9.4)
SET D1=I(1,0)
KILL DIP
IF DN
KILL Y
+14 DO 0^DIWW
KILL DIP
IF DN
KILL Y
+15 SET DICMX="D L^DIWP"
IF $X>19
DO N
IF 'DN
QUIT
SET DIWL=20
SET DIWR=20
NEW DIP
XECUTE DXS(7,9.4)
SET D1=I(1,0)
KILL DIP
IF DN
KILL Y
+16 DO 0^DIWW
KILL DIP
IF DN
KILL Y
+17 GOTO ^INXHR082