RTCL ; GENERATED FROM 'RT MISSING' PRINT TEMPLATE (#482) ; 07/15/96 ; (FILE 190.2, MARGIN=132)
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 F X=0:0 S X=$O(^DIPT(482,"DXS",X)) Q:'X S Y=$O(^(X,"")) F X=X:0 Q:Y="" S DXS(X,Y)=^(Y),Y=$O(^(Y))
S X=$G(^RTV(190.2,D0,0)) D N:$X>0 Q:'DN W ?0 S Y=$P(X,U,1) S C=$P(^DD(190.2,.01,0),U,2) D Y^DIQ:Y S C="," W $E(Y,1,20)
S I(100)="^RT(",J(100)=190 S I(0,0)=D0 S DIP(1)=$S($D(^RTV(190.2,D0,0)):^(0),1:"") S X=$P(DIP(1),U,1),X=X S D(0)=+X S D0=D(0) I D0>0 D A1
G A1R
A1 ;
S I(200)="^DPT(",J(200)=2 S I(100,0)=D0 S DIP(101)=$S($D(^RT(D0,0)):^(0),1:"") S X=$P(DIP(101),U,9),X=X S D(0)=+X S D0=D(0) I D0>0 D A2
G A2R
A2 ;
X DXS(1,9.4) S X=$E(DIP(209),DIP(210),X) S Y=X,X=DIP(208),X=X_Y K DIP K:DN Y W X
Q
A2R ;
K J(200),I(200) S:$D(I(100,0)) D0=I(100,0)
S I(200)="^DIC(195.2,",J(200)=195.2 S I(100,0)=D0 S DIP(101)=$S($D(^RT(D0,0)):^(0),1:"") S X=$P(DIP(101),U,3),X=X S D(0)=+X S D0=D(0) I D0>0 D B2
G B2R
B2 ;
S X=$G(^DIC(195.2,D0,0)) D N:$X>39 Q:'DN W ?39,$E($P(X,U,2),1,3)
Q
B2R ;
K J(200),I(200) S:$D(I(100,0)) D0=I(100,0)
S X=$G(^RT(D0,0)) S Y=$P(X,U,7) W:Y]"" $J(Y,3,0)
Q
A1R ;
K J(100),I(100) S:$D(I(0,0)) D0=I(0,0)
S X=$G(^RTV(190.2,D0,0)) D N:$X>51 Q:'DN W ?51 S Y=$P(X,U,4) W:Y]"" $S($D(DXS(3,Y)):DXS(3,Y),1:Y)
S DIXX(1)="B1",I(0,0)=D0 X DXS(2,9)
G B1R
B1 ;
I $D(DSC(190.3)) X DSC(190.3) E Q
W:$X>63 ! S I(100)="^RTV(190.3,",J(100)=190.3
S X=$G(^RTV(190.3,D0,0)) D N:$X>64 Q:'DN W ?64 S Y=$P(X,U,5) S C=$P(^DD(190.3,5,0),U,2) D Y^DIQ:Y S C="," W $E(Y,1,20)
D N:$X>89 Q:'DN W ?89 S Y=$P(X,U,6) D DT
D N:$X>114 Q:'DN W ?114 S Y=$P(X,U,15) W:Y]"" $S($D(DXS(4,Y)):DXS(4,Y),1:Y)
Q
B1R ;
K J(100),I(100) S:$D(I(0,0)) D0=I(0,0)
D T Q:'DN D N D N:$X>0 Q:'DN W ?0 W "Entered as Missing : "
S X=$G(^RTV(190.2,D0,0)) S Y=$P(X,U,2) D DT
D N:$X>49 Q:'DN W ?49 W "Entered By: "
S Y=$P(X,U,3) S Y=$S(Y="":Y,$D(^VA(200,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,35)
D T Q:'DN D N D N:$X>0 Q:'DN W ?0 W "Supervisor Comments: "
S I(1)=1,J(1)=190.21 F D1=0:0 Q:$O(^RTV(190.2,D0,1,D1))'>0 S D1=$O(^(D1)) D:$X>23 T Q:'DN D C1
G C1R
C1 ;
S X=$G(^RTV(190.2,D0,1,D1,0)) S DIWL=25,DIWR=130 D ^DIWP
Q
C1R ;
D A^DIWW
D N:$X>0 Q:'DN W ?0 S X="-",DIP(1)=X,DIP(2)=X,X=$S($D(IOM):IOM,1:80) S X=X,X1=DIP(1) S %=X1 X:%]"" "F X=X:0 S %=%_X1 Q:$L(%)>X" S X=$E(%,1,X) K DIP K:DN Y W X
D N:$X>0 Q:'DN W ?0 W "[The following fields will only contain information if the record was found by a user who is 'not' a file room supervisor.]"
D T Q:'DN D N D N:$X>0 Q:'DN W ?0 W "Entered as Found : "
S X=$G(^RTV(190.2,D0,0)) S Y=$P(X,U,6) D DT
D N:$X>49 Q:'DN W ?49 W "Entered By: "
S Y=$P(X,U,8) S Y=$S(Y="":Y,$D(^VA(200,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,35)
D N:$X>89 Q:'DN W ?89 W "Where it was found: "
S Y=$P(X,U,5) S C=$P(^DD(190.2,5,0),U,2) D Y^DIQ:Y S C="," W $E(Y,1,30)
D T Q:'DN D N D N:$X>0 Q:'DN W ?0 W "User Comments : "
S I(1)=2,J(1)=190.22 F D1=0:0 Q:$O(^RTV(190.2,D0,2,D1))'>0 S D1=$O(^(D1)) D:$X>23 T Q:'DN D D1
G D1R
D1 ;
S X=$G(^RTV(190.2,D0,2,D1,0)) S DIWL=25,DIWR=130 D ^DIWP
Q
D1R ;
D A^DIWW
D N:$X>0 Q:'DN W ?0 S X="=",DIP(1)=X,DIP(2)=X,X=$S($D(IOM):IOM,1:80) S X=X,X1=DIP(1) S %=X1 X:%]"" "F X=X:0 S %=%_X1 Q:$L(%)>X" S X=$E(%,1,X) K DIP K:DN Y W X
D T Q:'DN D N W ?0 W ""
K Y K DIWF
Q
HEAD ;
W !,?0,"NAME",?39,"TYPE",?51,"STATUS",?64,"BORROWER HISTORY",?89,"CHARGED",?114,"BARCODED?"
W !,"------------------------------------------------------------------------------------------------------------------------------------",!!
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRTCL 4088 printed Oct 16, 2024@18:34:18 Page 2
RTCL ; GENERATED FROM 'RT MISSING' PRINT TEMPLATE (#482) ; 07/15/96 ; (FILE 190.2, MARGIN=132)
+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
FOR X=0:0
SET X=$ORDER(^DIPT(482,"DXS",X))
if 'X
QUIT
SET Y=$ORDER(^(X,""))
FOR X=X:0
if Y=""
QUIT
SET DXS(X,Y)=^(Y)
SET Y=$ORDER(^(Y))
+3 SET X=$GET(^RTV(190.2,D0,0))
if $X>0
DO N
if 'DN
QUIT
WRITE ?0
SET Y=$PIECE(X,U,1)
SET C=$PIECE(^DD(190.2,.01,0),U,2)
if Y
DO Y^DIQ
SET C=","
WRITE $EXTRACT(Y,1,20)
+4 SET I(100)="^RT("
SET J(100)=190
SET I(0,0)=D0
SET DIP(1)=$SELECT($DATA(^RTV(190.2,D0,0)):^(0),1:"")
SET X=$PIECE(DIP(1),U,1)
SET X=X
SET D(0)=+X
SET D0=D(0)
IF D0>0
DO A1
+5 GOTO A1R
A1 ;
+1 SET I(200)="^DPT("
SET J(200)=2
SET I(100,0)=D0
SET DIP(101)=$SELECT($DATA(^RT(D0,0)):^(0),1:"")
SET X=$PIECE(DIP(101),U,9)
SET X=X
SET D(0)=+X
SET D0=D(0)
IF D0>0
DO A2
+2 GOTO A2R
A2 ;
+1 XECUTE DXS(1,9.4)
SET X=$EXTRACT(DIP(209),DIP(210),X)
SET Y=X
SET X=DIP(208)
SET X=X_Y
KILL DIP
if DN
KILL Y
WRITE X
+2 QUIT
A2R ;
+1 KILL J(200),I(200)
if $DATA(I(100,0))
SET D0=I(100,0)
+2 SET I(200)="^DIC(195.2,"
SET J(200)=195.2
SET I(100,0)=D0
SET DIP(101)=$SELECT($DATA(^RT(D0,0)):^(0),1:"")
SET X=$PIECE(DIP(101),U,3)
SET X=X
SET D(0)=+X
SET D0=D(0)
IF D0>0
DO B2
+3 GOTO B2R
B2 ;
+1 SET X=$GET(^DIC(195.2,D0,0))
if $X>39
DO N
if 'DN
QUIT
WRITE ?39,$EXTRACT($PIECE(X,U,2),1,3)
+2 QUIT
B2R ;
+1 KILL J(200),I(200)
if $DATA(I(100,0))
SET D0=I(100,0)
+2 SET X=$GET(^RT(D0,0))
SET Y=$PIECE(X,U,7)
if Y]""
WRITE $JUSTIFY(Y,3,0)
+3 QUIT
A1R ;
+1 KILL J(100),I(100)
if $DATA(I(0,0))
SET D0=I(0,0)
+2 SET X=$GET(^RTV(190.2,D0,0))
if $X>51
DO N
if 'DN
QUIT
WRITE ?51
SET Y=$PIECE(X,U,4)
if Y]""
WRITE $SELECT($DATA(DXS(3,Y)):DXS(3,Y),1:Y)
+3 SET DIXX(1)="B1"
SET I(0,0)=D0
XECUTE DXS(2,9)
+4 GOTO B1R
B1 ;
+1 IF $DATA(DSC(190.3))
XECUTE DSC(190.3)
IF '$TEST
QUIT
+2 if $X>63
WRITE !
SET I(100)="^RTV(190.3,"
SET J(100)=190.3
+3 SET X=$GET(^RTV(190.3,D0,0))
if $X>64
DO N
if 'DN
QUIT
WRITE ?64
SET Y=$PIECE(X,U,5)
SET C=$PIECE(^DD(190.3,5,0),U,2)
if Y
DO Y^DIQ
SET C=","
WRITE $EXTRACT(Y,1,20)
+4 if $X>89
DO N
if 'DN
QUIT
WRITE ?89
SET Y=$PIECE(X,U,6)
DO DT
+5 if $X>114
DO N
if 'DN
QUIT
WRITE ?114
SET Y=$PIECE(X,U,15)
if Y]""
WRITE $SELECT($DATA(DXS(4,Y)):DXS(4,Y),1:Y)
+6 QUIT
B1R ;
+1 KILL J(100),I(100)
if $DATA(I(0,0))
SET D0=I(0,0)
+2 DO T
if 'DN
QUIT
DO N
if $X>0
DO N
if 'DN
QUIT
WRITE ?0
WRITE "Entered as Missing : "
+3 SET X=$GET(^RTV(190.2,D0,0))
SET Y=$PIECE(X,U,2)
DO DT
+4 if $X>49
DO N
if 'DN
QUIT
WRITE ?49
WRITE "Entered By: "
+5 SET Y=$PIECE(X,U,3)
SET Y=$SELECT(Y="":Y,$DATA(^VA(200,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,35)
+6 DO T
if 'DN
QUIT
DO N
if $X>0
DO N
if 'DN
QUIT
WRITE ?0
WRITE "Supervisor Comments: "
+7 SET I(1)=1
SET J(1)=190.21
FOR D1=0:0
if $ORDER(^RTV(190.2,D0,1,D1))'>0
QUIT
SET D1=$ORDER(^(D1))
if $X>23
DO T
if 'DN
QUIT
DO C1
+8 GOTO C1R
C1 ;
+1 SET X=$GET(^RTV(190.2,D0,1,D1,0))
SET DIWL=25
SET DIWR=130
DO ^DIWP
+2 QUIT
C1R ;
+1 DO A^DIWW
+2 if $X>0
DO N
if 'DN
QUIT
WRITE ?0
SET X="-"
SET DIP(1)=X
SET DIP(2)=X
SET X=$SELECT($DATA(IOM):IOM,1:80)
SET X=X
SET X1=DIP(1)
SET %=X1
if %]""
XECUTE "F X=X:0 S %=%_X1 Q:$L(%)>X"
SET X=$EXTRACT(%,1,X)
KILL DIP
if DN
KILL Y
WRITE X
+3 if $X>0
DO N
if 'DN
QUIT
WRITE ?0
WRITE "[The following fields will only contain information if the record was found by a user who is 'not' a file room supervisor.]"
+4 DO T
if 'DN
QUIT
DO N
if $X>0
DO N
if 'DN
QUIT
WRITE ?0
WRITE "Entered as Found : "
+5 SET X=$GET(^RTV(190.2,D0,0))
SET Y=$PIECE(X,U,6)
DO DT
+6 if $X>49
DO N
if 'DN
QUIT
WRITE ?49
WRITE "Entered By: "
+7 SET Y=$PIECE(X,U,8)
SET Y=$SELECT(Y="":Y,$DATA(^VA(200,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,35)
+8 if $X>89
DO N
if 'DN
QUIT
WRITE ?89
WRITE "Where it was found: "
+9 SET Y=$PIECE(X,U,5)
SET C=$PIECE(^DD(190.2,5,0),U,2)
if Y
DO Y^DIQ
SET C=","
WRITE $EXTRACT(Y,1,30)
+10 DO T
if 'DN
QUIT
DO N
if $X>0
DO N
if 'DN
QUIT
WRITE ?0
WRITE "User Comments : "
+11 SET I(1)=2
SET J(1)=190.22
FOR D1=0:0
if $ORDER(^RTV(190.2,D0,2,D1))'>0
QUIT
SET D1=$ORDER(^(D1))
if $X>23
DO T
if 'DN
QUIT
DO D1
+12 GOTO D1R
D1 ;
+1 SET X=$GET(^RTV(190.2,D0,2,D1,0))
SET DIWL=25
SET DIWR=130
DO ^DIWP
+2 QUIT
D1R ;
+1 DO A^DIWW
+2 if $X>0
DO N
if 'DN
QUIT
WRITE ?0
SET X="="
SET DIP(1)=X
SET DIP(2)=X
SET X=$SELECT($DATA(IOM):IOM,1:80)
SET X=X
SET X1=DIP(1)
SET %=X1
if %]""
XECUTE "F X=X:0 S %=%_X1 Q:$L(%)>X"
SET X=$EXTRACT(%,1,X)
KILL DIP
if DN
KILL Y
WRITE X
+3 DO T
if 'DN
QUIT
DO N
WRITE ?0
WRITE ""
+4 KILL Y
KILL DIWF
+5 QUIT
HEAD ;
+1 WRITE !,?0,"NAME",?39,"TYPE",?51,"STATUS",?64,"BORROWER HISTORY",?89,"CHARGED",?114,"BARCODED?"
+2 WRITE !,"------------------------------------------------------------------------------------------------------------------------------------",!!