RTNQ ;MJK/TROY ISC;Inquiry Utility Option; ; 3/20/87 11:09 AM ;
;;v 2.0;Record Tracking;;10/22/91
D DT^DICRW S X=$T(+1),DIK="^DOPT("""_$P(X," ;",1)_""","
G:$D(^DOPT($P(X," ;"),4)) A S ^DOPT($P(X," ;"),0)=$P(X,";",3)_"^1N^" F I=1:1 S Y=$T(@I) Q:Y="" S ^DOPT($P(X," ;"),I,0)=$P(Y,";",3,99)
D IXALL^DIK
A D OVERALL^RTPSET Q:$D(XQUIT)
W !! S DIC="^DOPT("""_$P($T(+1)," ;")_""",",DIC(0)="IQEAM" D ^DIC Q:Y<0 D @+Y G A
;
1 ;;Record Inquiry
G ^RTNQ2
;
2 ;;Short Inquiry
I '$D(RTAPL) D APL2^RTPSET D NEXT2:$D(RTAPL) K RTAPL,RTSYS Q
NEXT2 S RTA=+RTAPL D ASK^RTB K RTA I '$D(RTESC) G NEXT2:Y<0 S RTE=X D SHORT G NEXT2
K RTE,RTESC,C,I,Y
K %H,%I,DIC,DIY,N,POP,X,X1 Q
SHORT S RTINACFL="",RTDC("S")="I $P(^(0),U,4)="_+RTAPL D ^RTUTL2 K RTINACFL,RT1,RTC,RTDC Q
;
3 ;;Trace Movement History of Record
G ^RTNQ1
;
4 ;;Combination Data Trace
G ^RTNQ3
;
5 ;;Expanded Inquiry
G ^RTNQ4
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRTNQ 911 printed Oct 16, 2024@18:34:47 Page 2
RTNQ ;MJK/TROY ISC;Inquiry Utility Option; ; 3/20/87 11:09 AM ;
+1 ;;v 2.0;Record Tracking;;10/22/91
+2 DO DT^DICRW
SET X=$TEXT(+1)
SET DIK="^DOPT("""_$PIECE(X," ;",1)_""","
+3 if $DATA(^DOPT($PIECE(X," ;"),4))
GOTO A
SET ^DOPT($PIECE(X," ;"),0)=$PIECE(X,";",3)_"^1N^"
FOR I=1:1
SET Y=$TEXT(@I)
if Y=""
QUIT
SET ^DOPT($PIECE(X," ;"),I,0)=$PIECE(Y,";",3,99)
+4 DO IXALL^DIK
A DO OVERALL^RTPSET
if $DATA(XQUIT)
QUIT
+1 WRITE !!
SET DIC="^DOPT("""_$PIECE($TEXT(+1)," ;")_""","
SET DIC(0)="IQEAM"
DO ^DIC
if Y<0
QUIT
DO @+Y
GOTO A
+2 ;
1 ;;Record Inquiry
+1 GOTO ^RTNQ2
+2 ;
2 ;;Short Inquiry
+1 IF '$DATA(RTAPL)
DO APL2^RTPSET
if $DATA(RTAPL)
DO NEXT2
KILL RTAPL,RTSYS
QUIT
NEXT2 SET RTA=+RTAPL
DO ASK^RTB
KILL RTA
IF '$DATA(RTESC)
if Y<0
GOTO NEXT2
SET RTE=X
DO SHORT
GOTO NEXT2
+1 KILL RTE,RTESC,C,I,Y
+2 KILL %H,%I,DIC,DIY,N,POP,X,X1
QUIT
SHORT SET RTINACFL=""
SET RTDC("S")="I $P(^(0),U,4)="_+RTAPL
DO ^RTUTL2
KILL RTINACFL,RT1,RTC,RTDC
QUIT
+1 ;
3 ;;Trace Movement History of Record
+1 GOTO ^RTNQ1
+2 ;
4 ;;Combination Data Trace
+1 GOTO ^RTNQ3
+2 ;
5 ;;Expanded Inquiry
+1 GOTO ^RTNQ4