TIUPS163 ; SLC/JER,AJB - More Review Screen Actions ;14-MAY-2004 [10/18/04 11:47am]
;;1.0;TEXT INTEGRATION UTILITIES;**163**;Jun 20, 1997
MAIN ;controls branching
D REINDEX,NEWXREF
Q
NEWXREF ;creates new xref "VS" on field 1207
N TIUD0,TIUARR,TIURES
S TIUD0=0
S TIUD0=$O(^TIU(8925,"VS",TIUD0))
I 'TIUD0 D
. S TIUARR("FILE")=8925
. S TIUARR("NAME")="VS"
. S TIUARR("USE")="LS"
. S TIUARR("TYPE")="R"
. S TIUARR("SHORT DESCR")="REGULAR XREF ON FIELD 1207"
. S TIUARR("DESCR",1)="THIS XREF CONTAINS AS A SUBSCRIPT"
. S TIUARR("DESCR",2)="THE VALUE OF FIELD 1207 OF FILE #8925"
. S TIUARR("VAL",1)=1207
. S TIUARR("VAL",1,"SUBSCRIPT")=1
. D CREIXN^DDMOD(.TIUARR,"W",.TIURES,"OUT")
D QUE
Q
QUE ;queue the indexing of the VS xref
N TIUD0
S TIUD0=0
S TIUD0=$O(^TIU(8925,"VS",TIUD0))
I 'TIUD0 D
. N ZTDESC,ZTIO,ZTRTN,ZTSAVE,ZTSK,DIR,TIUQUIT
. S ZTRTN="INDEXVS^TIUPS163",ZTIO="",ZTSAVE("DUZ")=""
. S ZTDESC="Index the new VS XRef on file 8925"
. D ^%ZTLOAD
. I $G(ZTSK) D
. . K ^XTMP("TIUPS163")
. . N X,X1,X2 S X1=DT,X2=30
. . D C^%DTC
. . S ^XTMP("TIUPS163",0)=X_"^"_DT_"^"
. . S ^XTMP("TIUPS163","COUNT")=0
. . W !!,"A task has been queued in the background."
. . W !," The task number is "_$G(ZTSK)_"."
. . W !," To check on the status of the task, in programmer mode "
. . W !," type D STATUS^TIUPS163"
Q
REINDEX ;reindex the ACL xref on 8925.1
N DIK
S DIK="^TIU(8925.1,",DIK(1)=".01^ACL"
D BMES^XPDUTL("REBUILDING NEW ""ACL"" CROSS-REFERENCE ON FILE 8925.1")
K ^TIU(8925.1,"ACL") ; Remove the existing ACL x-ref
D ENALL^DIK
D BMES^XPDUTL("DONE")
Q
INDEXVS ;index the VS xref on 8925
N TIUDA,TIUCNT,%,%H,%I,X
D NOW^%DTC
S ^XTMP("TIUPS163","STARTDT")=%
S TIUDA=0,TIUCNT=0
F S TIUDA=$O(^TIU(8925,TIUDA)) Q:'TIUDA S TIUCNT=TIUCNT+1 S ^XTMP("TIUPS163","COUNT")=TIUCNT I $P($G(^TIU(8925,TIUDA,12)),U,7) S ^TIU(8925,"VS",$P($G(^TIU(8925,TIUDA,12)),U,7),TIUDA)=""
D NOW^%DTC
S ^XTMP("TIUPS163","ENDDT")=%
Q
STATUS ;check on status of VS xref indexing
I $G(^XTMP("TIUPS163","ENDDT")) D
. N START,END,X,Y
. W !,"Indexing completed!"
. S Y=$G(^XTMP("TIUPS163","STARTDT")) D DD^%DT
. W !,"Task started: "_Y
. S Y=$G(^XTMP("TIUPS163","ENDDT")) D DD^%DT
. W !,"Task ended: "_Y
I '$G(^XTMP("TIUPS163","ENDDT")) D
. W "Still working on the index."
. W !,$G(^XTMP("TIUPS163","COUNT"))_" of "_$P($G(^TIU(8925,0)),U,4)
. W " completed"
. I $G(^XTMP("TIUPS163","COUNT"))=0 W !,"You must have tasked it!"
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HTIUPS163 2532 printed Dec 13, 2024@02:44:07 Page 2
TIUPS163 ; SLC/JER,AJB - More Review Screen Actions ;14-MAY-2004 [10/18/04 11:47am]
+1 ;;1.0;TEXT INTEGRATION UTILITIES;**163**;Jun 20, 1997
MAIN ;controls branching
+1 DO REINDEX
DO NEWXREF
+2 QUIT
NEWXREF ;creates new xref "VS" on field 1207
+1 NEW TIUD0,TIUARR,TIURES
+2 SET TIUD0=0
+3 SET TIUD0=$ORDER(^TIU(8925,"VS",TIUD0))
+4 IF 'TIUD0
Begin DoDot:1
+5 SET TIUARR("FILE")=8925
+6 SET TIUARR("NAME")="VS"
+7 SET TIUARR("USE")="LS"
+8 SET TIUARR("TYPE")="R"
+9 SET TIUARR("SHORT DESCR")="REGULAR XREF ON FIELD 1207"
+10 SET TIUARR("DESCR",1)="THIS XREF CONTAINS AS A SUBSCRIPT"
+11 SET TIUARR("DESCR",2)="THE VALUE OF FIELD 1207 OF FILE #8925"
+12 SET TIUARR("VAL",1)=1207
+13 SET TIUARR("VAL",1,"SUBSCRIPT")=1
+14 DO CREIXN^DDMOD(.TIUARR,"W",.TIURES,"OUT")
End DoDot:1
+15 DO QUE
+16 QUIT
QUE ;queue the indexing of the VS xref
+1 NEW TIUD0
+2 SET TIUD0=0
+3 SET TIUD0=$ORDER(^TIU(8925,"VS",TIUD0))
+4 IF 'TIUD0
Begin DoDot:1
+5 NEW ZTDESC,ZTIO,ZTRTN,ZTSAVE,ZTSK,DIR,TIUQUIT
+6 SET ZTRTN="INDEXVS^TIUPS163"
SET ZTIO=""
SET ZTSAVE("DUZ")=""
+7 SET ZTDESC="Index the new VS XRef on file 8925"
+8 DO ^%ZTLOAD
+9 IF $GET(ZTSK)
Begin DoDot:2
+10 KILL ^XTMP("TIUPS163")
+11 NEW X,X1,X2
SET X1=DT
SET X2=30
+12 DO C^%DTC
+13 SET ^XTMP("TIUPS163",0)=X_"^"_DT_"^"
+14 SET ^XTMP("TIUPS163","COUNT")=0
+15 WRITE !!,"A task has been queued in the background."
+16 WRITE !," The task number is "_$GET(ZTSK)_"."
+17 WRITE !," To check on the status of the task, in programmer mode "
+18 WRITE !," type D STATUS^TIUPS163"
End DoDot:2
End DoDot:1
+19 QUIT
REINDEX ;reindex the ACL xref on 8925.1
+1 NEW DIK
+2 SET DIK="^TIU(8925.1,"
SET DIK(1)=".01^ACL"
+3 DO BMES^XPDUTL("REBUILDING NEW ""ACL"" CROSS-REFERENCE ON FILE 8925.1")
+4 ; Remove the existing ACL x-ref
KILL ^TIU(8925.1,"ACL")
+5 DO ENALL^DIK
+6 DO BMES^XPDUTL("DONE")
+7 QUIT
INDEXVS ;index the VS xref on 8925
+1 NEW TIUDA,TIUCNT,%,%H,%I,X
+2 DO NOW^%DTC
+3 SET ^XTMP("TIUPS163","STARTDT")=%
+4 SET TIUDA=0
SET TIUCNT=0
+5 FOR
SET TIUDA=$ORDER(^TIU(8925,TIUDA))
if 'TIUDA
QUIT
SET TIUCNT=TIUCNT+1
SET ^XTMP("TIUPS163","COUNT")=TIUCNT
IF $PIECE($GET(^TIU(8925,TIUDA,12)),U,7)
SET ^TIU(8925,"VS",$PIECE($GET(^TIU(8925,TIUDA,12)),U,7),TIUDA)=""
+6 DO NOW^%DTC
+7 SET ^XTMP("TIUPS163","ENDDT")=%
+8 QUIT
STATUS ;check on status of VS xref indexing
+1 IF $GET(^XTMP("TIUPS163","ENDDT"))
Begin DoDot:1
+2 NEW START,END,X,Y
+3 WRITE !,"Indexing completed!"
+4 SET Y=$GET(^XTMP("TIUPS163","STARTDT"))
DO DD^%DT
+5 WRITE !,"Task started: "_Y
+6 SET Y=$GET(^XTMP("TIUPS163","ENDDT"))
DO DD^%DT
+7 WRITE !,"Task ended: "_Y
End DoDot:1
+8 IF '$GET(^XTMP("TIUPS163","ENDDT"))
Begin DoDot:1
+9 WRITE "Still working on the index."
+10 WRITE !,$GET(^XTMP("TIUPS163","COUNT"))_" of "_$PIECE($GET(^TIU(8925,0)),U,4)
+11 WRITE " completed"
+12 IF $GET(^XTMP("TIUPS163","COUNT"))=0
WRITE !,"You must have tasked it!"
End DoDot:1
+13 QUIT